Skip to content

Commit 7f1f1ef

Browse files
Mark Yaorkhuangtao
authored andcommitted
drm/rockchip: vop: don't force enable post scale
Vop would always report post buf empty error if enable post scale config with non-scale factor Change-Id: Ibc3f27c674195e6467471069488f14471927f709 Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
1 parent 1dc3517 commit 7f1f1ef

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

drivers/gpu/drm/rockchip/rockchip_drm_vop.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2053,7 +2053,12 @@ static void vop_post_config(struct drm_crtc *crtc)
20532053
val = scl_cal_scale2(vdisplay, vsize) << 16;
20542054
val |= scl_cal_scale2(hdisplay, hsize);
20552055
VOP_CTRL_SET(vop, post_scl_factor, val);
2056-
VOP_CTRL_SET(vop, post_scl_ctrl, 0x3);
2056+
2057+
#define POST_HORIZONTAL_SCALEDOWN_EN(x) ((x) << 0)
2058+
#define POST_VERTICAL_SCALEDOWN_EN(x) ((x) << 1)
2059+
VOP_CTRL_SET(vop, post_scl_ctrl,
2060+
POST_HORIZONTAL_SCALEDOWN_EN(hdisplay != hsize) ||
2061+
POST_VERTICAL_SCALEDOWN_EN(vdisplay != vsize));
20572062
if (mode->flags & DRM_MODE_FLAG_INTERLACE) {
20582063
u16 vact_st_f1 = vtotal + vact_st + 1;
20592064
u16 vact_end_f1 = vact_st_f1 + vsize;

0 commit comments

Comments
 (0)