|
@@ -757,7 +757,7 @@ static void vop_plane_atomic_update(struct drm_plane *plane,
|
|
|
spin_lock(&vop->reg_lock);
|
|
|
|
|
|
VOP_WIN_SET(vop, win, format, format);
|
|
|
- VOP_WIN_SET(vop, win, yrgb_vir, fb->pitches[0] >> 2);
|
|
|
+ VOP_WIN_SET(vop, win, yrgb_vir, DIV_ROUND_UP(fb->pitches[0], 4));
|
|
|
VOP_WIN_SET(vop, win, yrgb_mst, dma_addr);
|
|
|
if (is_yuv_support(fb->format->format)) {
|
|
|
int hsub = drm_format_horz_chroma_subsampling(fb->format->format);
|
|
@@ -771,7 +771,7 @@ static void vop_plane_atomic_update(struct drm_plane *plane,
|
|
|
offset += (src->y1 >> 16) * fb->pitches[1] / vsub;
|
|
|
|
|
|
dma_addr = rk_uv_obj->dma_addr + offset + fb->offsets[1];
|
|
|
- VOP_WIN_SET(vop, win, uv_vir, fb->pitches[1] >> 2);
|
|
|
+ VOP_WIN_SET(vop, win, uv_vir, DIV_ROUND_UP(fb->pitches[1], 4));
|
|
|
VOP_WIN_SET(vop, win, uv_mst, dma_addr);
|
|
|
}
|
|
|
|