@@ -3101,9 +3101,11 @@ static int i915_display_info(struct seq_file *m, void *unused)
intel_plane_info(m, crtc);
}
- seq_printf(m, "\tunderrun reporting: cpu=%s pch=%s \n",
+ seq_printf(m, "\tunderrun reporting: cpu=%s (%d) pch=%s (%d) \n",
yesno(!crtc->cpu_fifo_underrun_disabled),
- yesno(!crtc->pch_fifo_underrun_disabled));
+ atomic_read(&crtc->cpu_fifo_underrun_count),
+ yesno(!crtc->pch_fifo_underrun_disabled),
+ atomic_read(&crtc->pch_fifo_underrun_count));
}
seq_printf(m, "\n");
@@ -589,6 +589,10 @@ struct intel_crtc {
/* reset counter value when the last flip was submitted */
unsigned int reset_counter;
+ /* fifo_underrun counters, used in debugfs only */
+ atomic_t cpu_fifo_underrun_count;
+ atomic_t pch_fifo_underrun_count;
+
/* Access to these should be protected by dev_priv->irq_lock. */
bool cpu_fifo_underrun_disabled;
bool pch_fifo_underrun_disabled;
@@ -407,6 +407,9 @@ void intel_cpu_fifo_underrun_irq_handler(struct drm_i915_private *dev_priv,
report = intel_get_cpu_fifo_underrun_reporting(dev_priv, pipe);
+ /* Increment the debugfs underrun counter */
+ atomic_inc(&to_intel_crtc(crtc)->cpu_fifo_underrun_count);
+
if (report)
DRM_ERROR_RATELIMITED("CPU pipe %c FIFO underrun\n",
pipe_name(pipe));
@@ -427,6 +430,9 @@ void intel_pch_fifo_underrun_irq_handler(struct drm_i915_private *dev_priv,
bool report = intel_get_pch_fifo_underrun_reporting(dev_priv,
pch_transcoder);
+ /* Increment the debugfs underrun counter */
+ atomic_inc(&to_intel_crtc(crtc)->pch_fifo_underrun_count);
+
if (report)
DRM_ERROR_RATELIMITED("PCH transcoder %c FIFO underrun\n",
transcoder_name(pch_transcoder));