From patchwork Thu Jun 27 15:52:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 2794191 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0C28ABF4A1 for ; Thu, 27 Jun 2013 15:55:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CB5C6203E9 for ; Thu, 27 Jun 2013 15:55:26 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 95D77203EA for ; Thu, 27 Jun 2013 15:55:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5FFD7E65ED for ; Thu, 27 Jun 2013 08:55:25 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-ea0-f179.google.com (mail-ea0-f179.google.com [209.85.215.179]) by gabe.freedesktop.org (Postfix) with ESMTP id DB18CE65ED for ; Thu, 27 Jun 2013 08:52:27 -0700 (PDT) Received: by mail-ea0-f179.google.com with SMTP id b15so492087eae.38 for ; Thu, 27 Jun 2013 08:52:27 -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=feNMWFficf0l+60Z1TgvFT0PC6yA9PFGy2v0eN9utxM=; b=IKiBqiCpaJBVmeoSMRfMGCY99LIAAfhI22iWngcTfjZkG0vzRfEPXTtugkXs0yXIYG SN1Orh/6KF3AjpNgoM/3RNB53NxW3d6HKi4sL0Rcaf2Jzbop1+KWou4kiM8WQexD6eXF 1oM0vfGGRDPbClFTcTP9es/4gqjxK4gCveK30= 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=feNMWFficf0l+60Z1TgvFT0PC6yA9PFGy2v0eN9utxM=; b=H0JeupxhTWtlhP2wnKd84BIdynQOHOR24TrrYddVRGSKXeS8NHZHfj2gs1hLt/GptM UfhfeLr5zJA3fUARbXn3oTYYDsNq7RFI6KXCJGhZTvDPrijez65Etgz3d1HYCSZ8iZyI FEY1AxQcB/ssHQXpwB1v8T4qP9JhB8sDC1JRWhhv/ljwk8TqVP7qJktI1DW/8Na1d7Ae to83zzZyoUI36GEQ1VJkDWc2QfV0toilvolGR/uE8Waqg//6/Q3OvB4Pbcu6lB7qP6n0 kVjsC9IRJ+ullBGBTyb/isQgUWBFX66BHWjdsH7VDnqlZjZeu0k6EqbUpYcRq81PIbKr WXAA== X-Received: by 10.14.204.137 with SMTP id h9mr9813557eeo.13.1372348347228; Thu, 27 Jun 2013 08:52:27 -0700 (PDT) Received: from natalie.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPSA id e44sm4619476eeh.11.2013.06.27.08.52.25 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 27 Jun 2013 08:52:26 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Date: Thu, 27 Jun 2013 17:52:13 +0200 Message-Id: <1372348335-6824-4-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1372348335-6824-1-git-send-email-daniel.vetter@ffwll.ch> References: <1372348335-6824-1-git-send-email-daniel.vetter@ffwll.ch> X-Gm-Message-State: ALoCoQka0JcWX3e+jnQk/OylPdb9PVtxSvpTgIOXj7lUOdIyJN9qwR6aav24FzG0rdRhrC9BIDuI Cc: Egbert Eich , Daniel Vetter Subject: [Intel-gfx] [PATCH 4/6] drm/i915: fold the queue_work into intel_hpd_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 X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,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 Everywhere the same. Note that this patch leaves unnecessary braces behind, but the next patch will kill those all anyway (including the if itself) so I've figured I can keep the diff a bit smaller. v2: Rebase on top of the i965g/gm sdvo hpd fix. Cc: Egbert Eich Reviewed-by: Egbert Eich Reviewed-by: Paulo Zanoni Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/i915_irq.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index b9e6628..cfe280e 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -913,6 +913,9 @@ static inline void intel_hpd_irq_handler(struct drm_device *dev, if (storm_detected) dev_priv->display.hpd_irq_setup(dev); + + queue_work(dev_priv->wq, + &dev_priv->hotplug_work); } static void gmbus_irq_handler(struct drm_device *dev) @@ -1021,8 +1024,6 @@ static irqreturn_t valleyview_irq_handler(int irq, void *arg) hotplug_status); if (hotplug_trigger) { intel_hpd_irq_handler(dev, hotplug_trigger, hpd_status_i915); - queue_work(dev_priv->wq, - &dev_priv->hotplug_work); } I915_WRITE(PORT_HOTPLUG_STAT, hotplug_status); I915_READ(PORT_HOTPLUG_STAT); @@ -1051,7 +1052,6 @@ static void ibx_irq_handler(struct drm_device *dev, u32 pch_iir) if (hotplug_trigger) { intel_hpd_irq_handler(dev, hotplug_trigger, hpd_ibx); - queue_work(dev_priv->wq, &dev_priv->hotplug_work); } if (pch_iir & SDE_AUDIO_POWER_MASK) { int port = ffs((pch_iir & SDE_AUDIO_POWER_MASK) >> @@ -1155,7 +1155,6 @@ static void cpt_irq_handler(struct drm_device *dev, u32 pch_iir) if (hotplug_trigger) { intel_hpd_irq_handler(dev, hotplug_trigger, hpd_cpt); - queue_work(dev_priv->wq, &dev_priv->hotplug_work); } if (pch_iir & SDE_AUDIO_POWER_MASK_CPT) { int port = ffs((pch_iir & SDE_AUDIO_POWER_MASK_CPT) >> @@ -3238,8 +3237,6 @@ static irqreturn_t i915_irq_handler(int irq, void *arg) hotplug_status); if (hotplug_trigger) { intel_hpd_irq_handler(dev, hotplug_trigger, hpd_status_i915); - queue_work(dev_priv->wq, - &dev_priv->hotplug_work); } I915_WRITE(PORT_HOTPLUG_STAT, hotplug_status); POSTING_READ(PORT_HOTPLUG_STAT); @@ -3484,8 +3481,6 @@ static irqreturn_t i965_irq_handler(int irq, void *arg) if (hotplug_trigger) { intel_hpd_irq_handler(dev, hotplug_trigger, IS_G4X(dev) ? hpd_status_gen4 : hpd_status_i915); - queue_work(dev_priv->wq, - &dev_priv->hotplug_work); } I915_WRITE(PORT_HOTPLUG_STAT, hotplug_status); I915_READ(PORT_HOTPLUG_STAT);