summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_display.c
diff options
context:
space:
mode:
authorVille Syrjälä2014-05-20 16:20:05 +0200
committerDaniel Vetter2014-05-21 11:50:25 +0200
commitd3eaf8843da6c3aa0d6b5b480820382c7bd1a89d (patch)
tree1f46aaf9f5955de73096df789f9d9b09ad0b57cf /drivers/gpu/drm/i915/intel_display.c
parentMerge branch 'topic/drm-vblank-rework' into drm-intel-next-queued (diff)
downloadkernel-qcow2-linux-d3eaf8843da6c3aa0d6b5b480820382c7bd1a89d.tar.gz
kernel-qcow2-linux-d3eaf8843da6c3aa0d6b5b480820382c7bd1a89d.tar.xz
kernel-qcow2-linux-d3eaf8843da6c3aa0d6b5b480820382c7bd1a89d.zip
drm/i915: Re-enable vblank irqs for already active pipes
If a pipe is already active when we init/resume there might not be a full modeset afterwards so drm_vblank_on() may not get called. In such a case if someone is holding a vblank reference across a suspend/resume cycle drm_vblank_get() called after resuming won't re-enable the vblank interrupts. So in order to make sure vblank interrupts get re-enabled post-resume, call drm_vblank_on() in intel_sanitize_crtc() if the crtc is already active. v2: Also drm_vblank_off() if the pipe got disabled magically Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Testecase: igt/kms_flip/vblank-vs-suspend Tested-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 5f803f436872..6c5db7c8caf4 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -11778,6 +11778,12 @@ static void intel_sanitize_crtc(struct intel_crtc *crtc)
reg = PIPECONF(crtc->config.cpu_transcoder);
I915_WRITE(reg, I915_READ(reg) & ~PIPECONF_FRAME_START_DELAY_MASK);
+ /* restore vblank interrupts to correct state */
+ if (crtc->active)
+ drm_vblank_on(dev, crtc->pipe);
+ else
+ drm_vblank_off(dev, crtc->pipe);
+
/* We need to sanitize the plane -> pipe mapping first because this will
* disable the crtc (and hence change the state) if it is wrong. Note
* that gen4+ has a fixed plane -> pipe mapping. */