From patchwork Fri Dec 18 11:08:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joonas Lahtinen X-Patchwork-Id: 7882181 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 92AA69F1AF for ; Fri, 18 Dec 2015 11:08:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CF8EA20398 for ; Fri, 18 Dec 2015 11:08:35 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id DD7772035D for ; Fri, 18 Dec 2015 11:08:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5680D6EA5D; Fri, 18 Dec 2015 03:08:34 -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 632C86EA5D for ; Fri, 18 Dec 2015 03:08:32 -0800 (PST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP; 18 Dec 2015 03:08:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,445,1444719600"; d="scan'208";a="710335230" Received: from jlahtine-mobl1.ger.corp.intel.com ([10.252.3.214]) by orsmga003.jf.intel.com with ESMTP; 18 Dec 2015 03:08:28 -0800 From: Joonas Lahtinen To: Intel graphics driver community testing & development Date: Fri, 18 Dec 2015 13:08:18 +0200 Message-Id: <1450436898-20408-5-git-send-email-joonas.lahtinen@linux.intel.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1450436898-20408-1-git-send-email-joonas.lahtinen@linux.intel.com> References: <1450436898-20408-1-git-send-email-joonas.lahtinen@linux.intel.com> Subject: [Intel-gfx] [PATCH v2 4/4] drm/i915: Use 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 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 Cc: Chris Wilson Signed-off-by: Joonas Lahtinen --- drivers/gpu/drm/i915/intel_drv.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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"); }