From 49d12068b332a64a0b062cc75cf11fd29d72134a Mon Sep 17 00:00:00 2001 From: Zhang Yubing Date: Thu, 6 Apr 2023 11:23:16 +0800 Subject: [PATCH] drm/rockchip: drv: add a parameter to pass data for crtc loader protect Signed-off-by: Zhang Yubing Change-Id: I463766227e8bc1acc325831941bba2c44b1e8b6b --- drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_logo.c | 8 ++++---- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.h b/drivers/gpu/drm/rockchip/rockchip_drm_drv.h index 4030bfdb0efd..a450978f99b0 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.h +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.h @@ -431,7 +431,7 @@ struct next_hdr_sink_data { * @wait_vact_end: wait the last active line. */ struct rockchip_crtc_funcs { - int (*loader_protect)(struct drm_crtc *crtc, bool on); + int (*loader_protect)(struct drm_crtc *crtc, bool on, void *data); int (*enable_vblank)(struct drm_crtc *crtc); void (*disable_vblank)(struct drm_crtc *crtc); size_t (*bandwidth)(struct drm_crtc *crtc, diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_logo.c b/drivers/gpu/drm/rockchip/rockchip_drm_logo.c index 0c9d4ba21dcf..369a3dc76302 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_logo.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_logo.c @@ -746,7 +746,7 @@ static int setup_initial_state(struct drm_device *drm_dev, if (priv->crtc_funcs[pipe] && priv->crtc_funcs[pipe]->loader_protect) - priv->crtc_funcs[pipe]->loader_protect(crtc, true); + priv->crtc_funcs[pipe]->loader_protect(crtc, true, NULL); } if (!set->fb) { @@ -798,7 +798,7 @@ static int setup_initial_state(struct drm_device *drm_dev, error_crtc: if (priv->crtc_funcs[pipe] && priv->crtc_funcs[pipe]->loader_protect) - priv->crtc_funcs[pipe]->loader_protect(crtc, false); + priv->crtc_funcs[pipe]->loader_protect(crtc, false, NULL); error_conn: if (set->sub_dev->loader_protect) set->sub_dev->loader_protect(conn_state->best_encoder, false); @@ -994,11 +994,11 @@ void rockchip_drm_show_logo(struct drm_device *drm_dev) unset); if (priv->crtc_funcs[pipe] && priv->crtc_funcs[pipe]->loader_protect) - priv->crtc_funcs[pipe]->loader_protect(crtc, true); + priv->crtc_funcs[pipe]->loader_protect(crtc, true, NULL); priv->crtc_funcs[pipe]->crtc_close(crtc); if (priv->crtc_funcs[pipe] && priv->crtc_funcs[pipe]->loader_protect) - priv->crtc_funcs[pipe]->loader_protect(crtc, false); + priv->crtc_funcs[pipe]->loader_protect(crtc, false, NULL); } } diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index 20aa752d483a..39cc6ccc75ce 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -2516,7 +2516,7 @@ static void vop_crtc_cancel_pending_vblank(struct drm_crtc *crtc, spin_unlock_irqrestore(&drm->event_lock, flags); } -static int vop_crtc_loader_protect(struct drm_crtc *crtc, bool on) +static int vop_crtc_loader_protect(struct drm_crtc *crtc, bool on, void *data) { struct rockchip_drm_private *private = crtc->dev->dev_private; struct vop *vop = to_vop(crtc); diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c index a3da4822a92c..eb03d91fd5b1 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c @@ -5878,7 +5878,7 @@ static void vop2_crtc_disable_line_flag_event(struct drm_crtc *crtc) spin_unlock_irqrestore(&vop2->irq_lock, flags); } -static int vop2_crtc_loader_protect(struct drm_crtc *crtc, bool on) +static int vop2_crtc_loader_protect(struct drm_crtc *crtc, bool on, void *data) { struct vop2_video_port *vp = to_vop2_video_port(crtc); struct rockchip_crtc_state *vcstate = to_rockchip_crtc_state(crtc->state);