summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
diff options
context:
space:
mode:
authorSean Paul <seanpaul@chromium.org>2016-08-18 12:01:46 -0700
committerSean Paul <seanpaul@chromium.org>2016-09-21 06:55:47 -0700
commitb883c9ba18a4d527fddc952a35565e34a5d22e15 (patch)
tree95c633828ad4820f668515525b4d5ee12e04419c /drivers/gpu/drm/rockchip/rockchip_drm_vop.c
parent52f13a02b7d5f26feb69bf955bef10fbfaafbd7c (diff)
downloadlwn-b883c9ba18a4d527fddc952a35565e34a5d22e15.tar.gz
lwn-b883c9ba18a4d527fddc952a35565e34a5d22e15.zip
drm/rockchip: Don't key off vblank for psr
Instead of keying off vblank for psr, just flush every time we get an atomic update. This ensures that cursor updates will properly disable psr (without turning vblank on/off), and unifies the paths between fb_dirty and atomic psr enable/disable. Reviewed-by: Yakir Yang <ykk@rock-chips.com> Signed-off-by: Sean Paul <seanpaul@chromium.org>
Diffstat (limited to 'drivers/gpu/drm/rockchip/rockchip_drm_vop.c')
-rw-r--r--drivers/gpu/drm/rockchip/rockchip_drm_vop.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
index d486049f9722..efb216005baa 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
@@ -569,6 +569,8 @@ static void vop_crtc_disable(struct drm_crtc *crtc)
WARN_ON(vop->event);
+ rockchip_drm_psr_deactivate(&vop->crtc);
+
/*
* We need to make sure that all windows are disabled before we
* disable that crtc. Otherwise we might try to scan from a destroyed
@@ -919,8 +921,6 @@ static int vop_crtc_enable_vblank(struct drm_crtc *crtc)
spin_unlock_irqrestore(&vop->irq_lock, flags);
- rockchip_drm_psr_disable(&vop->crtc);
-
return 0;
}
@@ -937,8 +937,6 @@ static void vop_crtc_disable_vblank(struct drm_crtc *crtc)
VOP_INTR_SET_TYPE(vop, enable, FS_INTR, 0);
spin_unlock_irqrestore(&vop->irq_lock, flags);
-
- rockchip_drm_psr_enable(&vop->crtc);
}
static void vop_crtc_wait_for_update(struct drm_crtc *crtc)
@@ -1072,6 +1070,8 @@ static void vop_crtc_enable(struct drm_crtc *crtc)
clk_set_rate(vop->dclk, adjusted_mode->clock * 1000);
VOP_CTRL_SET(vop, standby, 0);
+
+ rockchip_drm_psr_activate(&vop->crtc);
}
static void vop_crtc_atomic_flush(struct drm_crtc *crtc,
@@ -1094,6 +1094,8 @@ static void vop_crtc_atomic_begin(struct drm_crtc *crtc,
{
struct vop *vop = to_vop(crtc);
+ rockchip_drm_psr_flush(crtc);
+
spin_lock_irq(&crtc->dev->event_lock);
vop->vblank_active = true;
WARN_ON(drm_crtc_vblank_get(crtc) != 0);