drm/rockchip: vop: fix the dsp_h/dsp_sty calculation for rk3506

The dsp_h/dsp_sty calculation for rk3506 is the same as
rk3576 vopl. The dsp_h/dest->y1 must be halved to ensure
display correctly.

Change-Id: Ia041489bd2795325519907b8a07f69fc1b3f0680
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
This commit is contained in:
Damon Ding
2024-07-05 16:14:14 +08:00
committed by Tao Huang
parent 92512bbb18
commit 28c5eb68a5

View File

@@ -2119,7 +2119,7 @@ static void vop_plane_atomic_update(struct drm_plane *plane,
dsp_h = 4;
actual_h = dsp_h * actual_h / drm_rect_height(dest);
}
if ((vop->version == VOP_VERSION(2, 2) || vop->version == VOP_VERSION(2, 0xd)) &&
if ((vop->version == VOP_VERSION(2, 2) || vop->version >= VOP_VERSION(2, 0xd)) &&
(adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE))
dsp_h = dsp_h / 2;
@@ -2134,7 +2134,7 @@ static void vop_plane_atomic_update(struct drm_plane *plane,
dsp_stx = dest->x1 + mode->crtc_htotal - mode->crtc_hsync_start;
dsp_sty = dest->y1 + mode->crtc_vtotal - mode->crtc_vsync_start;
if ((vop->version == VOP_VERSION(2, 2) || vop->version == VOP_VERSION(2, 0xd)) &&
if ((vop->version == VOP_VERSION(2, 2) || vop->version >= VOP_VERSION(2, 0xd)) &&
(adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE))
dsp_sty = dest->y1 / 2 + mode->crtc_vtotal - mode->crtc_vsync_start;
dsp_st = dsp_sty << 16 | (dsp_stx & 0xffff);