aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_sprite.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/intel_sprite.c')
-rw-r--r--drivers/gpu/drm/i915/intel_sprite.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index 344c0e709b19..4990d6e84ddf 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -107,13 +107,21 @@ void intel_pipe_update_start(const struct intel_crtc_state *new_crtc_state)
107 VBLANK_EVASION_TIME_US); 107 VBLANK_EVASION_TIME_US);
108 max = vblank_start - 1; 108 max = vblank_start - 1;
109 109
110 local_irq_disable();
111
112 if (min <= 0 || max <= 0) 110 if (min <= 0 || max <= 0)
113 return; 111 goto irq_disable;
114 112
115 if (WARN_ON(drm_crtc_vblank_get(&crtc->base))) 113 if (WARN_ON(drm_crtc_vblank_get(&crtc->base)))
116 return; 114 goto irq_disable;
115
116 /*
117 * Wait for psr to idle out after enabling the VBL interrupts
118 * VBL interrupts will start the PSR exit and prevent a PSR
119 * re-entry as well.
120 */
121 if (CAN_PSR(dev_priv) && intel_psr_wait_for_idle(dev_priv))
122 DRM_ERROR("PSR idle timed out, atomic update may fail\n");
123
124 local_irq_disable();
117 125
118 crtc->debug.min_vbl = min; 126 crtc->debug.min_vbl = min;
119 crtc->debug.max_vbl = max; 127 crtc->debug.max_vbl = max;
@@ -171,6 +179,10 @@ void intel_pipe_update_start(const struct intel_crtc_state *new_crtc_state)
171 crtc->debug.start_vbl_count = intel_crtc_get_vblank_counter(crtc); 179 crtc->debug.start_vbl_count = intel_crtc_get_vblank_counter(crtc);
172 180
173 trace_i915_pipe_update_vblank_evaded(crtc); 181 trace_i915_pipe_update_vblank_evaded(crtc);
182 return;
183
184irq_disable:
185 local_irq_disable();
174} 186}
175 187
176/** 188/**