dsp_ctrl
static void vop2_dither_setup(struct drm_crtc *crtc, u32 *dsp_ctrl)
*dsp_ctrl |= RK3568_VP_DSP_CTRL__DITHER_DOWN_EN;
*dsp_ctrl |= RK3568_VP_DSP_CTRL__DITHER_DOWN_EN;
*dsp_ctrl |= RGB888_TO_RGB666;
*dsp_ctrl |= RK3568_VP_DSP_CTRL__PRE_DITHER_DOWN_EN;
*dsp_ctrl |= RK3568_VP_DSP_CTRL__PRE_DITHER_DOWN_EN;
*dsp_ctrl |= FIELD_PREP(RK3568_VP_DSP_CTRL__DITHER_DOWN_SEL,
u32 dsp_ctrl = 0;
dsp_ctrl |= FIELD_PREP(RK3568_VP_DSP_CTRL__OUT_MODE, out_mode);
dsp_ctrl |= RK3568_VP_DSP_CTRL__DSP_RB_SWAP;
dsp_ctrl |= RK3568_VP_DSP_CTRL__DSP_RG_SWAP;
dsp_ctrl |= RK3568_VP_DSP_CTRL__POST_DSP_OUT_R2Y;
vop2_dither_setup(crtc, &dsp_ctrl);
dsp_ctrl |= RK3568_VP_DSP_CTRL__DSP_INTERLACE;
dsp_ctrl |= RK3568_VP_DSP_CTRL__DSP_FILED_POL;
dsp_ctrl |= RK3568_VP_DSP_CTRL__P2I_EN;
dsp_ctrl |= RK3568_VP_DSP_CTRL__CORE_DCLK_DIV;
vop2_vp_write(vp, RK3568_VP_DSP_CTRL, dsp_ctrl);
u32 dsp_ctrl = vop2_vp_read(vp, RK3568_VP_DSP_CTRL);
return dsp_ctrl & RK3568_VP_DSP_CTRL__DSP_LUT_EN;
u32 dsp_ctrl = vop2_vp_read(vp, RK3568_VP_DSP_CTRL);
dsp_ctrl &= ~RK3568_VP_DSP_CTRL__DSP_LUT_EN;
vop2_vp_write(vp, RK3568_VP_DSP_CTRL, dsp_ctrl);
u32 dsp_ctrl;
int ret = readx_poll_timeout(vop2_vp_dsp_lut_is_enabled, vp, dsp_ctrl,
!dsp_ctrl, 5, 30 * 1000);
u32 dsp_ctrl = vop2_vp_read(vp, RK3568_VP_DSP_CTRL);
dsp_ctrl |= RK3568_VP_DSP_CTRL__DSP_LUT_EN;
vop2_vp_write(vp, RK3568_VP_DSP_CTRL, dsp_ctrl);
u32 dsp_ctrl = vop2_vp_read(vp, RK3568_VP_DSP_CTRL);
dsp_ctrl |= RK3588_VP_DSP_CTRL__GAMMA_UPDATE_EN;
vop2_vp_write(vp, RK3568_VP_DSP_CTRL, dsp_ctrl);
ndsp->ch.ctrl = dsp_ctrl;