From patchwork Tue Jan 26 19:36:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Konno X-Patchwork-Id: 8126961 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5A71CBEEE5 for ; Tue, 26 Jan 2016 19:37:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7D6F7202EB for ; Tue, 26 Jan 2016 19:37:04 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id A3104202E6 for ; Tue, 26 Jan 2016 19:37:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1CE596E296; Tue, 26 Jan 2016 11:37:03 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTP id 7CBFE6E23E for ; Tue, 26 Jan 2016 11:36:58 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP; 26 Jan 2016 11:36:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,351,1449561600"; d="scan'208";a="898791253" Received: from jbkonno-beef.jf.intel.com ([10.7.197.231]) by orsmga002.jf.intel.com with ESMTP; 26 Jan 2016 11:36:57 -0800 From: Joe Konno To: intel-gfx@lists.freedesktop.org Date: Tue, 26 Jan 2016 11:36:56 -0800 Message-Id: <1453837017-23209-3-git-send-email-joe.konno@linux.intel.com> X-Mailer: git-send-email 2.6.4 In-Reply-To: <1453837017-23209-1-git-send-email-joe.konno@linux.intel.com> References: <1453837017-23209-1-git-send-email-joe.konno@linux.intel.com> Subject: [Intel-gfx] [RFC 2/3] drm/i915: do not disable handler after underrun 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, 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 From: Joe Konno Previously, cpu and pch underrun reporting was done on a "report once and disable" basis to prevent interrupt/dmesg floods. With this change, do not disable the underrun interrupt handlers. Instead, use throttled (DRM_ERROR_RATELIMITED) dmesg output if dmesg underrun reporting enabled. Signed-off-by: Joe Konno --- drivers/gpu/drm/i915/intel_fifo_underrun.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_fifo_underrun.c b/drivers/gpu/drm/i915/intel_fifo_underrun.c index 9516bd416226..4a1a2781fc5e 100644 --- a/drivers/gpu/drm/i915/intel_fifo_underrun.c +++ b/drivers/gpu/drm/i915/intel_fifo_underrun.c @@ -393,26 +393,23 @@ bool intel_get_pch_fifo_underrun_reporting(struct drm_i915_private *dev_priv, * @pipe: (CPU) pipe to set state for * * This handles a CPU fifo underrun interrupt, generating an underrun warning - * into dmesg if underrun reporting is enabled and then disables the underrun - * interrupt to avoid an irq storm. + * into dmesg if underrun reporting is enabled. */ void intel_cpu_fifo_underrun_irq_handler(struct drm_i915_private *dev_priv, enum pipe pipe) { struct drm_crtc *crtc = dev_priv->pipe_to_crtc_mapping[pipe]; + bool report; /* We may be called too early in init, thanks BIOS! */ if (crtc == NULL) return; - /* GMCH can't disable fifo underruns, filter them. */ - if (HAS_GMCH_DISPLAY(dev_priv->dev) && - to_intel_crtc(crtc)->cpu_fifo_underrun_disabled) - return; + report = intel_get_cpu_fifo_underrun_reporting(dev_priv, pipe); - if (intel_set_cpu_fifo_underrun_reporting(dev_priv, pipe, false)) - DRM_ERROR("CPU pipe %c FIFO underrun\n", - pipe_name(pipe)); + if (report) + DRM_ERROR_RATELIMITED("CPU pipe %c FIFO underrun\n", + pipe_name(pipe)); } /** @@ -421,16 +418,18 @@ void intel_cpu_fifo_underrun_irq_handler(struct drm_i915_private *dev_priv, * @pch_transcoder: the PCH transcoder (same as pipe on IVB and older) * * This handles a PCH fifo underrun interrupt, generating an underrun warning - * into dmesg if underrun reporting is enabled and then disables the underrun - * interrupt to avoid an irq storm. + * into dmesg if underrun reporting is enabled. */ void intel_pch_fifo_underrun_irq_handler(struct drm_i915_private *dev_priv, enum transcoder pch_transcoder) { - if (intel_set_pch_fifo_underrun_reporting(dev_priv, pch_transcoder, - false)) - DRM_ERROR("PCH transcoder %c FIFO underrun\n", - transcoder_name(pch_transcoder)); + struct drm_crtc *crtc = dev_priv->pipe_to_crtc_mapping[pch_transcoder]; + bool report = intel_get_pch_fifo_underrun_reporting(dev_priv, + pch_transcoder); + + if (report) + DRM_ERROR_RATELIMITED("PCH transcoder %c FIFO underrun\n", + transcoder_name(pch_transcoder)); } /**