From: Mark Yao Date: Fri, 26 Jun 2015 10:07:25 +0000 (+0800) Subject: drm/rockchip: vop: Fix virtual stride calculation X-Git-Tag: v4.3-rc1~75^2~2^2~5 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f1c79abef5bae62aefcadf16917905cb7f98dc19;p=karo-tx-linux.git drm/rockchip: vop: Fix virtual stride calculation vir_stride need number words of the virtual width, and fb->pitches save bytes_per_pixel, so just div 4 switch to stride. Signed-off-by: Mark Yao --- diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index 34b78e736532..6b447318ef51 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -667,7 +667,7 @@ static int vop_update_plane_event(struct drm_plane *plane, offset += (src.y1 >> 16) * fb->pitches[0]; yrgb_mst = rk_obj->dma_addr + offset; - y_vir_stride = fb->pitches[0] / (fb->bits_per_pixel >> 3); + y_vir_stride = fb->pitches[0] >> 2; /* * If this plane update changes the plane's framebuffer, (or more