diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi2-rockchip.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi2-rockchip.c index c178588c3f8c..878bab6b5600 100644 --- a/drivers/gpu/drm/rockchip/dw-mipi-dsi2-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi2-rockchip.c @@ -448,12 +448,12 @@ static void dw_mipi_dsi2_encoder_disable(struct drm_encoder *encoder) drm_panel_disable(dsi2->panel); if (!(dsi2->mode_flags & MIPI_DSI_MODE_VIDEO)) - vop2_standby(encoder->crtc, 1); + rockchip_drm_crtc_standby(encoder->crtc, 1); dw_mipi_dsi2_disable(dsi2); if (!(dsi2->mode_flags & MIPI_DSI_MODE_VIDEO)) - vop2_standby(encoder->crtc, 0); + rockchip_drm_crtc_standby(encoder->crtc, 0); if (dsi2->panel) drm_panel_unprepare(dsi2->panel); diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c index 0dc44b37e813..9d7c160b60f5 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c @@ -919,6 +919,17 @@ void rockchip_drm_dma_detach_device(struct drm_device *drm_dev, iommu_detach_device(domain, dev); } +void rockchip_drm_crtc_standby(struct drm_crtc *crtc, bool standby) +{ + struct rockchip_drm_private *priv = crtc->dev->dev_private; + int pipe = drm_crtc_index(crtc); + + if (pipe < ROCKCHIP_MAX_CRTC && + priv->crtc_funcs[pipe] && + priv->crtc_funcs[pipe]->crtc_standby) + priv->crtc_funcs[pipe]->crtc_standby(crtc, standby); +} + int rockchip_register_crtc_funcs(struct drm_crtc *crtc, const struct rockchip_crtc_funcs *crtc_funcs) { diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.h b/drivers/gpu/drm/rockchip/rockchip_drm_drv.h index 383bfd8737fc..a3c324ce7d12 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.h +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.h @@ -369,6 +369,7 @@ struct rockchip_crtc_funcs { void (*crtc_send_mcu_cmd)(struct drm_crtc *crtc, u32 type, u32 value); void (*te_handler)(struct drm_crtc *crtc); int (*wait_vact_end)(struct drm_crtc *crtc, unsigned int mstimeout); + void (*crtc_standby)(struct drm_crtc *crtc, bool standby); }; struct rockchip_dclk_pll { @@ -443,6 +444,7 @@ int rockchip_drm_wait_vact_end(struct drm_crtc *crtc, unsigned int mstimeout); int rockchip_register_crtc_funcs(struct drm_crtc *crtc, const struct rockchip_crtc_funcs *crtc_funcs); void rockchip_unregister_crtc_funcs(struct drm_crtc *crtc); +void rockchip_drm_crtc_standby(struct drm_crtc *crtc, bool standby); void rockchip_drm_register_sub_dev(struct rockchip_drm_sub_dev *sub_dev); void rockchip_drm_unregister_sub_dev(struct rockchip_drm_sub_dev *sub_dev); diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h index 8c2b38419242..be9dbd221181 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h @@ -1353,7 +1353,6 @@ 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 */ diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c index 3badca7817a4..ff9d670ed00e 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c @@ -920,7 +920,7 @@ static uint64_t vop2_soc_id_fixup(uint64_t soc_id) } } -void vop2_standby(struct drm_crtc *crtc, bool standby) +static void vop2_crtc_standby(struct drm_crtc *crtc, bool standby) { struct vop2_video_port *vp = to_vop2_video_port(crtc); struct vop2 *vop2 = vp->vop2; @@ -932,7 +932,6 @@ void vop2_standby(struct drm_crtc *crtc, bool standby) 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) @@ -5493,6 +5492,7 @@ static const struct rockchip_crtc_funcs private_crtc_funcs = { .crtc_close = vop2_crtc_close, .te_handler = vop2_crtc_te_handler, .wait_vact_end = vop2_crtc_wait_vact_end, + .crtc_standby = vop2_crtc_standby, }; static bool vop2_crtc_mode_fixup(struct drm_crtc *crtc,