From patchwork Thu Dec 17 19:25:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joonas Lahtinen X-Patchwork-Id: 7876491 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 52DDB9F32E for ; Thu, 17 Dec 2015 19:26:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 808AD20445 for ; Thu, 17 Dec 2015 19:26:24 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 613BD20416 for ; Thu, 17 Dec 2015 19:26:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DD9187A088; Thu, 17 Dec 2015 11:26:21 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id 33AD07A086 for ; Thu, 17 Dec 2015 11:26:19 -0800 (PST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP; 17 Dec 2015 11:26:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,442,1444719600"; d="scan'208";a="709869336" Received: from jlahtine-mobl1.ger.corp.intel.com ([10.252.27.127]) by orsmga003.jf.intel.com with ESMTP; 17 Dec 2015 11:26:02 -0800 From: Joonas Lahtinen To: Intel graphics driver community testing & development Date: Thu, 17 Dec 2015 21:25:51 +0200 Message-Id: <1450380351-28397-7-git-send-email-joonas.lahtinen@linux.intel.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1450380351-28397-1-git-send-email-joonas.lahtinen@linux.intel.com> References: <1450380351-28397-1-git-send-email-joonas.lahtinen@linux.intel.com> Subject: [Intel-gfx] [PATCH 6/6] drm/i915: Use I915_WARN_RECUR for recurring warning messages X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. Cc: Imre Deak Signed-off-by: Joonas Lahtinen --- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/intel_drv.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 07240af..20306e3 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -133,7 +133,7 @@ if (WARN(unlikely(!__warned || i915.debug), format)) \ __warned = true; \ } \ - unlikely(__ret_debug_on); \ + unlikely(__ret_warn_on); \ }) static inline const char *yesno(bool v) diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index d523ebb..c9e9f42 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, + I915_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), + I915_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, + I915_WARN_RECUR(atomic_read(&dev_priv->pm.atomic_seq) != begin_seq, "HW access outside of RPM atomic section\n"); }