aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/i915/i915_irq.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index d6f827ab8f01..f43dae9a9735 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -387,17 +387,14 @@ static void cpt_set_fifo_underrun_reporting(struct drm_device *dev,
387 * 387 *
388 * Returns the previous state of underrun reporting. 388 * Returns the previous state of underrun reporting.
389 */ 389 */
390bool intel_set_cpu_fifo_underrun_reporting(struct drm_device *dev, 390bool __intel_set_cpu_fifo_underrun_reporting(struct drm_device *dev,
391 enum pipe pipe, bool enable) 391 enum pipe pipe, bool enable)
392{ 392{
393 struct drm_i915_private *dev_priv = dev->dev_private; 393 struct drm_i915_private *dev_priv = dev->dev_private;
394 struct drm_crtc *crtc = dev_priv->pipe_to_crtc_mapping[pipe]; 394 struct drm_crtc *crtc = dev_priv->pipe_to_crtc_mapping[pipe];
395 struct intel_crtc *intel_crtc = to_intel_crtc(crtc); 395 struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
396 unsigned long flags;
397 bool ret; 396 bool ret;
398 397
399 spin_lock_irqsave(&dev_priv->irq_lock, flags);
400
401 ret = !intel_crtc->cpu_fifo_underrun_disabled; 398 ret = !intel_crtc->cpu_fifo_underrun_disabled;
402 399
403 if (enable == ret) 400 if (enable == ret)
@@ -415,7 +412,20 @@ bool intel_set_cpu_fifo_underrun_reporting(struct drm_device *dev,
415 broadwell_set_fifo_underrun_reporting(dev, pipe, enable); 412 broadwell_set_fifo_underrun_reporting(dev, pipe, enable);
416 413
417done: 414done:
415 return ret;
416}
417
418bool intel_set_cpu_fifo_underrun_reporting(struct drm_device *dev,
419 enum pipe pipe, bool enable)
420{
421 struct drm_i915_private *dev_priv = dev->dev_private;
422 unsigned long flags;
423 bool ret;
424
425 spin_lock_irqsave(&dev_priv->irq_lock, flags);
426 ret = __intel_set_cpu_fifo_underrun_reporting(dev, pipe, enable);
418 spin_unlock_irqrestore(&dev_priv->irq_lock, flags); 427 spin_unlock_irqrestore(&dev_priv->irq_lock, flags);
428
419 return ret; 429 return ret;
420} 430}
421 431