diff mbox

[v2,4/4] drm/i915: Use WARN_RECUR for recurring warning messages

Message ID 1450436898-20408-5-git-send-email-joonas.lahtinen@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Joonas Lahtinen Dec. 18, 2015, 11:08 a.m. UTC
Avoid flooding end users kernel log with warnings and mark recurring
warnings as such. This is a case when multiple code paths trigger a
warning and only displaying it once masks multiple errors in CI but
displaying it each time would make end user system log overflow
easily.

v2:
- Rebase for new macro name
- Remove a hunk belonging to previous patch

Cc: Imre Deak <imre.deak@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_drv.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index d523ebb..baac83c 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -1434,7 +1434,7 @@  void intel_display_power_put(struct drm_i915_private *dev_priv,
 static inline void
 assert_rpm_device_not_suspended(struct drm_i915_private *dev_priv)
 {
-	WARN_ONCE(dev_priv->pm.suspended,
+	WARN_RECUR(dev_priv->pm.suspended,
 		  "Device suspended during HW access\n");
 }
 
@@ -1442,7 +1442,7 @@  static inline void
 assert_rpm_wakelock_held(struct drm_i915_private *dev_priv)
 {
 	assert_rpm_device_not_suspended(dev_priv);
-	WARN_ONCE(!atomic_read(&dev_priv->pm.wakeref_count),
+	WARN_RECUR(!atomic_read(&dev_priv->pm.wakeref_count),
 		  "RPM wakelock ref not held during HW access");
 }
 
@@ -1459,7 +1459,7 @@  assert_rpm_atomic_begin(struct drm_i915_private *dev_priv)
 static inline void
 assert_rpm_atomic_end(struct drm_i915_private *dev_priv, int begin_seq)
 {
-	WARN_ONCE(atomic_read(&dev_priv->pm.atomic_seq) != begin_seq,
+	WARN_RECUR(atomic_read(&dev_priv->pm.atomic_seq) != begin_seq,
 		  "HW access outside of RPM atomic section\n");
 }