From bfdc50442eaeda98e834fac45ffe3ec2c2546b6b Mon Sep 17 00:00:00 2001 From: Mark Yao Date: Mon, 5 Jun 2017 11:55:51 +0800 Subject: [PATCH] drm/rockchip: logo: round_up pitches to word align Change-Id: I836193ca37fb62c72c61aa47a807959c3c189925 Signed-off-by: Mark Yao --- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c index 81cca3b6611e..cca9ca20e83c 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c @@ -255,7 +255,7 @@ get_framebuffer_by_node(struct drm_device *drm_dev, struct device_node *node) } bpp = val; - mode_cmd.pitches[0] = mode_cmd.width * bpp / 8; + mode_cmd.pitches[0] = ALIGN(mode_cmd.width * bpp, 32) / 8; switch (bpp) { case 16: -- 2.34.1