From patchwork Wed Sep 5 19:24:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 1410811 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 927EADF28C for ; Wed, 5 Sep 2012 20:33:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9CD809E769 for ; Wed, 5 Sep 2012 13:33:09 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by gabe.freedesktop.org (Postfix) with ESMTP id F23F89E769 for ; Wed, 5 Sep 2012 13:32:03 -0700 (PDT) Received: by wibhq4 with SMTP id hq4so4404093wib.12 for ; Wed, 05 Sep 2012 13:32:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=e8TZEu0/kujBtc2tgVWilYjvwBPA2x4qs3hG20nHke0=; b=Or3Ovcc3O1T8s30MGskHORLXYmpDoSztRBimTPqkeNtU+p4XiYx84GItppibsa7ymL ummGoYm98jn4a5d9OM2+hCanZQ7aL/432z4yfvQyV3S2twfKy81jF0grhkmEuztBR4/H V9jmkkA7YQzAzUKG6Qu8za0fDvyn1I0KNh7f4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=e8TZEu0/kujBtc2tgVWilYjvwBPA2x4qs3hG20nHke0=; b=CdSRb6xYWDcRQ+FbJ/p99gVamRKFC0CZteo6W3fsu1pZCm7Z5gtpWc6MAQlRWinsOj mi0H7sk7NVcHy1Ffl+tRnauMDS5LswZfdIQCg3EpqF6uZoiiOPmphAHdTQ7z6XFh4mdd lnRJwP+LPgQxEjCbNUF42tXHzggp6LJ/yvjEGI8K4bj5U6xg89DNKbMBcKHFv1iDH+KW 55MAFmqhfejteF+dHcSHfwCkcxef1NC9XxusVHYEF3KiyAsAf9J2F72nm7nAS+dYtE7I rVqUl1PDyL+Dk5E45RkcLkkLR/Mu97/t5uXcaMc99scxbyWc7toDvwEAU9ToBwnTfwnh ntsQ== Received: by 10.216.85.130 with SMTP id u2mr13676791wee.202.1346877122988; Wed, 05 Sep 2012 13:32:02 -0700 (PDT) Received: from wespe.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPS id ef5sm80868wib.3.2012.09.05.13.32.01 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 05 Sep 2012 13:32:02 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Date: Wed, 5 Sep 2012 21:24:40 +0200 Message-Id: <1346873081-1305-2-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.11.2 In-Reply-To: <1346873081-1305-1-git-send-email-daniel.vetter@ffwll.ch> References: <1346873081-1305-1-git-send-email-daniel.vetter@ffwll.ch> X-Gm-Message-State: ALoCoQnyU85yrizwzm1I7DA8B6FKUw8Pen43XErYCEZtbVRplqLgcSIdiPAGY1W7HJoVUJwvD/0x Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH 2/3] drm/i915: wire up gmbus irq handler 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 Only enables the interrupt and puts a irq handler into place, doesn't do anything yet. Unfortunately there's no gmbus interrupt support for gen2/3 (safe for pnv, but there the irq is marked as "Test mode"). Signed-off-by: Daniel Vetter Reviewed-by: Chris Wilson --- drivers/gpu/drm/i915/i915_irq.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index a61b41a..8415fa6 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -596,6 +596,11 @@ out: return ret; } +static void gmbus_irq_handler(struct drm_device *dev) +{ + DRM_DEBUG_DRIVER("GMBUS interrupt\n"); +} + static void ibx_irq_handler(struct drm_device *dev, u32 pch_iir) { drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; @@ -607,7 +612,7 @@ static void ibx_irq_handler(struct drm_device *dev, u32 pch_iir) SDE_AUDIO_POWER_SHIFT); if (pch_iir & SDE_GMBUS) - DRM_DEBUG_DRIVER("PCH GMBUS interrupt\n"); + gmbus_irq_handler(dev); if (pch_iir & SDE_AUDIO_HDCP_MASK) DRM_DEBUG_DRIVER("PCH HDCP audio interrupt\n"); @@ -650,7 +655,7 @@ static void cpt_irq_handler(struct drm_device *dev, u32 pch_iir) DRM_DEBUG_DRIVER("AUX channel interrupt\n"); if (pch_iir & SDE_GMBUS_CPT) - DRM_DEBUG_DRIVER("PCH GMBUS interrupt\n"); + gmbus_irq_handler(dev); if (pch_iir & SDE_AUDIO_CP_REQ_CPT) DRM_DEBUG_DRIVER("Audio CP request interrupt\n"); @@ -1841,12 +1846,14 @@ static int ironlake_irq_postinstall(struct drm_device *dev) hotplug_mask = (SDE_CRT_HOTPLUG_CPT | SDE_PORTB_HOTPLUG_CPT | SDE_PORTC_HOTPLUG_CPT | - SDE_PORTD_HOTPLUG_CPT); + SDE_PORTD_HOTPLUG_CPT | + SDE_GMBUS_CPT); } else { hotplug_mask = (SDE_CRT_HOTPLUG | SDE_PORTB_HOTPLUG | SDE_PORTC_HOTPLUG | SDE_PORTD_HOTPLUG | + SDE_GMBUS | SDE_AUX_MASK); } @@ -1906,7 +1913,8 @@ static int ivybridge_irq_postinstall(struct drm_device *dev) hotplug_mask = (SDE_CRT_HOTPLUG_CPT | SDE_PORTB_HOTPLUG_CPT | SDE_PORTC_HOTPLUG_CPT | - SDE_PORTD_HOTPLUG_CPT); + SDE_PORTD_HOTPLUG_CPT | + SDE_GMBUS_CPT); dev_priv->pch_irq_mask = ~hotplug_mask; I915_WRITE(SDEIIR, I915_READ(SDEIIR)); @@ -1959,6 +1967,7 @@ static int valleyview_irq_postinstall(struct drm_device *dev) POSTING_READ(VLV_IER); i915_enable_pipestat(dev_priv, 0, pipestat_enable); + i915_enable_pipestat(dev_priv, 0, PIPE_GMBUS_INTERRUPT_STATUS); i915_enable_pipestat(dev_priv, 1, pipestat_enable); I915_WRITE(VLV_IIR, 0xffffffff); @@ -2454,6 +2463,7 @@ static int i965_irq_postinstall(struct drm_device *dev) dev_priv->pipestat[0] = 0; dev_priv->pipestat[1] = 0; + i915_enable_pipestat(dev_priv, 0, PIPE_GMBUS_INTERRUPT_STATUS); /* * Enable some error detection, note the instruction error mask