summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/intel_fifo_underrun.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-09-30 12:56:48 +0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-10-24 18:33:54 +0400
commit1f7247c01c9d1bdc7b0e239a8f2e256972b9189b (patch)
treedf01af81c75b6c05339a8fbfc07135fa6037c64c /drivers/gpu/drm/i915/intel_fifo_underrun.c
parenta72e4c9f9a11d44458a12928cc776921ae43a616 (diff)
downloadlinux-1f7247c01c9d1bdc7b0e239a8f2e256972b9189b.tar.xz
drm/i915: Add wrappers to handle fifo underrun interrupts
Way too much copypasta all over. And this also clarifies a bit what's going on since it separates the "do we have an underrun irq" from the "should we report the underrun" check. v2: Fix excessively long lines. Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_fifo_underrun.c')
-rw-r--r--drivers/gpu/drm/i915/intel_fifo_underrun.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_fifo_underrun.c b/drivers/gpu/drm/i915/intel_fifo_underrun.c
index 0604a112a4ad..5d66b933a097 100644
--- a/drivers/gpu/drm/i915/intel_fifo_underrun.c
+++ b/drivers/gpu/drm/i915/intel_fifo_underrun.c
@@ -308,3 +308,20 @@ bool intel_set_pch_fifo_underrun_reporting(struct drm_i915_private *dev_priv,
spin_unlock_irqrestore(&dev_priv->irq_lock, flags);
return old;
}
+
+void intel_cpu_fifo_underrun_irq_handler(struct drm_i915_private *dev_priv,
+ enum pipe pipe)
+{
+ if (intel_set_cpu_fifo_underrun_reporting(dev_priv, pipe, false))
+ DRM_ERROR("CPU pipe %c FIFO underrun\n",
+ pipe_name(pipe));
+}
+
+void intel_pch_fifo_underrun_irq_handler(struct drm_i915_private *dev_priv,
+ enum transcoder pch_transcoder)
+{
+ if (intel_set_pch_fifo_underrun_reporting(dev_priv, pch_transcoder,
+ false))
+ DRM_ERROR("PCH transcoder %c FIFO underrun\n",
+ transcoder_name(pch_transcoder));
+}