drm/rockchip: logo: round_up pitches to word align
authorMark Yao <mark.yao@rock-chips.com>
Mon, 5 Jun 2017 03:55:51 +0000 (11:55 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Mon, 5 Jun 2017 10:36:07 +0000 (18:36 +0800)
Change-Id: I836193ca37fb62c72c61aa47a807959c3c189925
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
drivers/gpu/drm/rockchip/rockchip_drm_drv.c

index 81cca3b6611edb6d7db8e7d7ddd41aa1eeb24278..cca9ca20e83c8b86c12bcee7c56bc5cf8480e8a4 100644 (file)
@@ -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: