drm/rockchip: vop: Set mcu mode before setting output mode and dither

When drive vop into mcu mode with mcu_hold enabled,
the following setting of output mode and dither will
not take effect until mcu_hold released.

So we can send mcu cmd at the default output P888 mode,
this give us a changce to avoid the cmd data to be changed
by dither module.

Change-Id: I6b0a23d2cfdacd9b81d0956bea6cedd2dcdde4f6
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
This commit is contained in:
Andy Yan
2020-05-15 10:55:42 +08:00
committed by Tao Huang
parent b2aba76340
commit cb6bdbb874

View File

@@ -2930,6 +2930,10 @@ static void vop_crtc_atomic_enable(struct drm_crtc *crtc,
*/
if (vop->lut_active)
vop_crtc_load_lut(crtc);
if (vop->mcu_timing.mcu_pix_total)
vop_mcu_mode(crtc);
dclk_inv = (adjusted_mode->flags & DRM_MODE_FLAG_PPIXDATA) ? 0 : 1;
VOP_CTRL_SET(vop, dclk_pol, dclk_inv);
@@ -3051,8 +3055,6 @@ static void vop_crtc_atomic_enable(struct drm_crtc *crtc,
clk_set_rate(vop->dclk, adjusted_mode->crtc_clock * 1000);
if (vop->mcu_timing.mcu_pix_total)
vop_mcu_mode(crtc);
vop_cfg_done(vop);