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;