mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
drm/rockchip: drv: add a parameter to pass data for crtc loader protect
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com> Change-Id: I463766227e8bc1acc325831941bba2c44b1e8b6b
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user