From: Mark Yao Date: Mon, 5 Jun 2017 03:55:51 +0000 (+0800) Subject: drm/rockchip: logo: round_up pitches to word align X-Git-Tag: release-20171130_firefly~4^2~447 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=bfdc50442eaeda98e834fac45ffe3ec2c2546b6b;p=firefly-linux-kernel-4.4.55.git drm/rockchip: logo: round_up pitches to word align Change-Id: I836193ca37fb62c72c61aa47a807959c3c189925 Signed-off-by: Mark Yao --- 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: