mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 12:57:06 +09:00
drm/rockchip: vop2: wb uv address must follow yrgb address without gap
VOP writeback directly without stride, and the uv buffer is follow yrgb buffer without gap. Change-Id: I9f63eb0527499e2d18d99fc248dbfd95b5d6179d Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
This commit is contained in:
@@ -1866,9 +1866,14 @@ static int vop2_wb_encoder_atomic_check(struct drm_encoder *encoder,
|
||||
|
||||
wb_state->vp_id = vp->id;
|
||||
wb_state->yrgb_addr = rockchip_fb_get_dma_addr(fb, 0);
|
||||
/*
|
||||
* uv address must follow yrgb address without gap.
|
||||
* the fb->offsets is include stride, so we should
|
||||
* not use it.
|
||||
*/
|
||||
if (fb->format->is_yuv) {
|
||||
wb_state->uv_addr = rockchip_fb_get_dma_addr(fb, 1);
|
||||
wb_state->uv_addr += fb->offsets[1];
|
||||
wb_state->uv_addr = wb_state->yrgb_addr;
|
||||
wb_state->uv_addr += DIV_ROUND_UP(fb->width * fb->format->bpp[0], 8) * fb->height;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user