drm/i915: Provide a bit more info when pipestat bits are wrong
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 3 Apr 2014 10:28:33 +0000 (13:28 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 3 Apr 2014 15:23:47 +0000 (17:23 +0200)
Print the enable_mask and status_mask from
__i915_{enable,disable}_pipestat() when the caller has messed them up
somehow.

v2: Use pipe_name() (Damien)
    Fix a typo in the commit message

Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_irq.c

index 327d584e4353da62e4175cf08de07d899eedb3ee..bdda3b5561659adfb01d1a745243c02deb102c33 100644 (file)
@@ -531,8 +531,10 @@ __i915_enable_pipestat(struct drm_i915_private *dev_priv, enum pipe pipe,
 
        assert_spin_locked(&dev_priv->irq_lock);
 
-       if (WARN_ON_ONCE(enable_mask & ~PIPESTAT_INT_ENABLE_MASK ||
-                        status_mask & ~PIPESTAT_INT_STATUS_MASK))
+       if (WARN_ONCE(enable_mask & ~PIPESTAT_INT_ENABLE_MASK ||
+                     status_mask & ~PIPESTAT_INT_STATUS_MASK,
+                     "pipe %c: enable_mask=0x%x, status_mask=0x%x\n",
+                     pipe_name(pipe), enable_mask, status_mask))
                return;
 
        if ((pipestat & enable_mask) == enable_mask)
@@ -555,8 +557,10 @@ __i915_disable_pipestat(struct drm_i915_private *dev_priv, enum pipe pipe,
 
        assert_spin_locked(&dev_priv->irq_lock);
 
-       if (WARN_ON_ONCE(enable_mask & ~PIPESTAT_INT_ENABLE_MASK ||
-                        status_mask & ~PIPESTAT_INT_STATUS_MASK))
+       if (WARN_ONCE(enable_mask & ~PIPESTAT_INT_ENABLE_MASK ||
+                     status_mask & ~PIPESTAT_INT_STATUS_MASK,
+                     "pipe %c: enable_mask=0x%x, status_mask=0x%x\n",
+                     pipe_name(pipe), enable_mask, status_mask))
                return;
 
        if ((pipestat & enable_mask) == 0)