diff options
Diffstat (limited to 'src/soc/rockchip/common/vop.c')
-rw-r--r-- | src/soc/rockchip/common/vop.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/soc/rockchip/common/vop.c b/src/soc/rockchip/common/vop.c index 629072e22e..70d59bd6a8 100644 --- a/src/soc/rockchip/common/vop.c +++ b/src/soc/rockchip/common/vop.c @@ -24,7 +24,6 @@ #include <soc/edp.h> #include <soc/vop.h> - static struct rockchip_vop_regs * const vop_regs[] = { (struct rockchip_vop_regs *)VOP_BIG_BASE, (struct rockchip_vop_regs *)VOP_LIT_BASE @@ -109,6 +108,7 @@ void rkvop_mode_set(u32 vop_id, const struct edid *edid, u32 mode) u32 vfront_porch = edid->mode.vso; u32 vsync_len = edid->mode.vspw; u32 vback_porch = edid->mode.vbl - edid->mode.vso - edid->mode.vspw; + u32 dsp_out_mode; struct rockchip_vop_regs *preg = vop_regs[vop_id]; switch (mode) { @@ -116,17 +116,25 @@ void rkvop_mode_set(u32 vop_id, const struct edid *edid, u32 mode) case VOP_MODE_HDMI: clrsetbits_le32(&preg->sys_ctrl, M_ALL_OUT_EN, V_HDMI_OUT_EN(1)); + dsp_out_mode = 15; + break; + case VOP_MODE_MIPI: + clrsetbits_le32(&preg->sys_ctrl, + M_ALL_OUT_EN, V_MIPI_OUT_EN(1)); + dsp_out_mode = 0; break; - case VOP_MODE_EDP: default: clrsetbits_le32(&preg->sys_ctrl, M_ALL_OUT_EN, V_EDP_OUT_EN(1)); + dsp_out_mode = 15; break; } + clrsetbits_le32(&preg->dsp_ctrl0, - M_DSP_OUT_MODE | M_DSP_VSYNC_POL | M_DSP_HSYNC_POL, - V_DSP_OUT_MODE(15) | + M_DSP_OUT_MODE | M_DSP_VSYNC_POL | + M_DSP_HSYNC_POL, + V_DSP_OUT_MODE(dsp_out_mode) | V_DSP_HSYNC_POL(edid->mode.phsync == '+') | V_DSP_VSYNC_POL(edid->mode.pvsync == '+')); |