From patchwork Fri Feb 8 19:35:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 2118321 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id C5F043FD56 for ; Fri, 8 Feb 2013 19:39:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B4FC5E5EC0 for ; Fri, 8 Feb 2013 11:39:25 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-gh0-f179.google.com (mail-gh0-f179.google.com [209.85.160.179]) by gabe.freedesktop.org (Postfix) with ESMTP id A6032E62C5 for ; Fri, 8 Feb 2013 11:36:07 -0800 (PST) Received: by mail-gh0-f179.google.com with SMTP id r14so954314ghr.24 for ; Fri, 08 Feb 2013 11:36:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=anqGFeBBVWAJ2OuEDgq2+yI5bE2tAesXJK29WACRO8Y=; b=0O0b3fbgrbj0woqkZMSq5UAWJPJ3jO5ARY5DWpraoQQZIQ/s3sE9V4ueErpDVQI9P2 Y88opRo6giPmrMum8Wn6Y0zgtZbajC3M20YYHpmu8LjFrePA7W7albaGR0TqD1ELQBHU Ps6c5fVKT1MrZDAQd7GDZN0pf5IuNwDWg0g6EN8i20Exq3aTO6MQfwDJ+H+G9n7W739e wenkWBz4NUHge1oGAzBW+1swaryracmsPQMboJvatOeoL8gLmCPAXTdKcuF1Vb7cBAPV OqN/AyKKivz1TBzROSu+2h0gdlDrt29cBKRI05f+uJwurxcPbGfRwg8QK1pOliTdc/7F qWHQ== X-Received: by 10.236.138.109 with SMTP id z73mr7518558yhi.72.1360352167229; Fri, 08 Feb 2013 11:36:07 -0800 (PST) Received: from localhost.localdomain ([177.42.11.215]) by mx.google.com with ESMTPS id h38sm29419521ani.7.2013.02.08.11.36.05 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 08 Feb 2013 11:36:06 -0800 (PST) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Fri, 8 Feb 2013 17:35:17 -0200 Message-Id: <1360352121-3989-7-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1360352121-3989-1-git-send-email-przanoni@gmail.com> References: <1360352121-3989-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 06/10] drm/i915: print PCH poison interrupts X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org From: Paulo Zanoni This is bad news and shouldn't be happening. Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/i915_irq.c | 29 +++++++++++++++++++++++++---- drivers/gpu/drm/i915/i915_reg.h | 4 ++++ 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 500fd65..10aec0e 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -665,6 +665,17 @@ static void ibx_irq_handler(struct drm_device *dev, u32 pch_iir) DRM_DEBUG_DRIVER("PCH transcoder A underrun interrupt\n"); } +static void serr_int_handler(struct drm_device *dev) +{ + drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; + u32 serr_int = I915_READ(SERR_INT); + + if (serr_int & SERR_INT_POISON) + DRM_ERROR("PCH poison interrupt\n"); + + I915_WRITE(SERR_INT, serr_int); +} + static void cpt_irq_handler(struct drm_device *dev, u32 pch_iir) { drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; @@ -695,6 +706,9 @@ static void cpt_irq_handler(struct drm_device *dev, u32 pch_iir) DRM_DEBUG_DRIVER(" pipe %c FDI IIR: 0x%08x\n", pipe_name(pipe), I915_READ(FDI_RX_IIR(pipe))); + + if (pch_iir & SDE_ERROR_CPT) + serr_int_handler(dev); } static irqreturn_t ivybridge_irq_handler(int irq, void *arg) @@ -1943,14 +1957,19 @@ static void ibx_irq_postinstall(struct drm_device *dev) drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; u32 mask; - if (HAS_PCH_IBX(dev)) + if (HAS_PCH_IBX(dev)) { mask = SDE_HOTPLUG_MASK | SDE_GMBUS | - SDE_AUX_MASK; - else + SDE_AUX_MASK | + SDE_POISON; + } else { mask = SDE_HOTPLUG_MASK_CPT | SDE_GMBUS_CPT | - SDE_AUX_MASK_CPT; + SDE_AUX_MASK_CPT | + SDE_ERROR_CPT; + + I915_WRITE(SERR_INT, I915_READ(SERR_INT)); + } I915_WRITE(SDEIIR, I915_READ(SDEIIR)); I915_WRITE(SDEIMR, ~mask); @@ -2180,6 +2199,8 @@ static void ironlake_irq_uninstall(struct drm_device *dev) I915_WRITE(SDEIMR, 0xffffffff); I915_WRITE(SDEIER, 0x0); I915_WRITE(SDEIIR, I915_READ(SDEIIR)); + if (HAS_PCH_CPT(dev) || HAS_PCH_LPT(dev)) + I915_WRITE(SERR_INT, I915_READ(SERR_INT)); } static void i8xx_irq_preinstall(struct drm_device * dev) diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 663b5c1..9cd59f7 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -3528,6 +3528,7 @@ SDE_PORTC_HOTPLUG_CPT | \ SDE_PORTB_HOTPLUG_CPT) #define SDE_GMBUS_CPT (1 << 17) +#define SDE_ERROR_CPT (1 << 16) #define SDE_AUDIO_CP_REQ_C_CPT (1 << 10) #define SDE_AUDIO_CP_CHG_C_CPT (1 << 9) #define SDE_FDI_RXC_CPT (1 << 8) @@ -3552,6 +3553,9 @@ #define SDEIIR 0xc4008 #define SDEIER 0xc400c +#define SERR_INT 0xc4040 +#define SERR_INT_POISON (1 << 31) + /* digital port hotplug */ #define PCH_PORT_HOTPLUG 0xc4030 /* SHOTPLUG_CTL */ #define PORTD_HOTPLUG_ENABLE (1 << 20)