drm/rockchip: vop2: Add vop2_standby

This is for mipi dsi on rk356x: there
is a hold signal from mipi dsi to
vop.

Mipi dsi may trigger the hold signal
when send dsi command or switch between
video mode and command mode.

vop may run into an unexpected situation if this hold
signal is rise when vop is running.

So when mipi dsi switch between video mode
or command mode, or send a dsi command, it
should set vop in stanby state.

Change-Id: I80e456d3416518436045ae8e0eec215c22b111a3
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
This commit is contained in:
Andy Yan
2021-03-30 16:10:16 +08:00
committed by Sandy Huang
parent 241f13f049
commit 3d6f4474dc
2 changed files with 15 additions and 0 deletions

View File

@@ -956,6 +956,7 @@ static inline int interpolate(int x1, int y1, int x2, int y2, int x)
return y1 + (y2 - y1) * (x - x1) / (x2 - x1);
}
extern void vop2_standby(struct drm_crtc *crtc, bool standby);
extern const struct component_ops vop_component_ops;
extern const struct component_ops vop2_component_ops;
#endif /* _ROCKCHIP_DRM_VOP_H */

View File

@@ -653,6 +653,20 @@ static uint64_t vop2_soc_id_fixup(uint64_t soc_id)
}
}
void vop2_standby(struct drm_crtc *crtc, bool standby)
{
struct vop2_video_port *vp = to_vop2_video_port(crtc);
struct vop2 *vop2 = vp->vop2;
if (standby) {
VOP_MODULE_SET(vop2, vp, standby, 1);
mdelay(20);
} else {
VOP_MODULE_SET(vop2, vp, standby, 0);
}
}
EXPORT_SYMBOL(vop2_standby);
static inline const struct vop2_win_regs *vop2_get_win_regs(struct vop2_win *win,
const struct vop_reg *reg)
{