drm/sun4i: Fix dsi dcs long write function
authorOndrej Jirman <megous@megous.com>
Fri, 28 Aug 2020 12:50:32 +0000 (14:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Sep 2020 11:55:27 +0000 (13:55 +0200)
commitcc8785cc8fd457b416aa5354d8262a14bc8c69e5
tree6865468a2d1f57af93c976822fe06ad4189f2cbd
parenta2e7a8bff0ff530a10fe715bd08e09d214e7b4bd
drm/sun4i: Fix dsi dcs long write function

[ Upstream commit fd90e3808fd2c207560270c39b86b71af2231aa1 ]

It's writing too much data. regmap_bulk_write expects number of
register sized chunks to write, not a byte sized length of the
bounce buffer. Bounce buffer needs to be padded too, so that
regmap_bulk_write will not read past the end of the buffer.

Fixes: 133add5b5ad4 ("drm/sun4i: Add Allwinner A31 MIPI-DSI controller support")
Signed-off-by: Ondrej Jirman <megous@megous.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20200828125032.937148-1-megous@megous.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c