|
@@ -306,6 +306,34 @@ static bool cpt_can_enable_serr_int(struct drm_device *dev)
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+void i9xx_check_fifo_underruns(struct drm_device *dev)
|
|
|
+{
|
|
|
+ struct drm_i915_private *dev_priv = dev->dev_private;
|
|
|
+ struct intel_crtc *crtc;
|
|
|
+ unsigned long flags;
|
|
|
+
|
|
|
+ spin_lock_irqsave(&dev_priv->irq_lock, flags);
|
|
|
+
|
|
|
+ for_each_intel_crtc(dev, crtc) {
|
|
|
+ u32 reg = PIPESTAT(crtc->pipe);
|
|
|
+ u32 pipestat;
|
|
|
+
|
|
|
+ if (crtc->cpu_fifo_underrun_disabled)
|
|
|
+ continue;
|
|
|
+
|
|
|
+ pipestat = I915_READ(reg) & 0xffff0000;
|
|
|
+ if ((pipestat & PIPE_FIFO_UNDERRUN_STATUS) == 0)
|
|
|
+ continue;
|
|
|
+
|
|
|
+ I915_WRITE(reg, pipestat | PIPE_FIFO_UNDERRUN_STATUS);
|
|
|
+ POSTING_READ(reg);
|
|
|
+
|
|
|
+ DRM_ERROR("pipe %c underrun\n", pipe_name(crtc->pipe));
|
|
|
+ }
|
|
|
+
|
|
|
+ spin_unlock_irqrestore(&dev_priv->irq_lock, flags);
|
|
|
+}
|
|
|
+
|
|
|
static void i9xx_set_fifo_underrun_reporting(struct drm_device *dev,
|
|
|
enum pipe pipe, bool enable)
|
|
|
{
|