From: Mark Yao Date: Wed, 9 Aug 2017 07:00:10 +0000 (+0800) Subject: video/rockchip: rga2: correct BGRA stride X-Git-Tag: release-20171130_firefly~4^2~7 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=93f90ec2cbe0dc31ad712aec3707e13ce29cdf4e;p=firefly-linux-kernel-4.4.55.git video/rockchip: rga2: correct BGRA stride Change-Id: I019e2e410936f43b244ddde260cbd51c16a175e4 Signed-off-by: Mark Yao --- diff --git a/drivers/video/rockchip/rga2/rga2_mmu_info.c b/drivers/video/rockchip/rga2/rga2_mmu_info.c index c22419f211e4..5aef238540e4 100644 --- a/drivers/video/rockchip/rga2/rga2_mmu_info.c +++ b/drivers/video/rockchip/rga2/rga2_mmu_info.c @@ -180,7 +180,8 @@ static int rga2_buf_size_cal(unsigned long yrgb_addr, unsigned long uv_addr, uns pageCount = (size_yrgb + PAGE_SIZE - 1) >> PAGE_SHIFT; break; case RGA2_FORMAT_BGRA_8888 : - size_yrgb = w*h*4; + stride = (w * 4 + 3) & (~3); + size_yrgb = stride * h; start = yrgb_addr >> PAGE_SHIFT; pageCount = (size_yrgb + PAGE_SIZE - 1) >> PAGE_SHIFT; break;