blob: d104fdee6d936435c8f95d72380316f947e1f155 [file] [log] [blame]
From 027ca0f4232095bc6c5399d210b3addf36e03d9c Mon Sep 17 00:00:00 2001
From: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Thu, 27 Jun 2013 17:52:13 +0200
Subject: drm/i915: fold the queue_work into intel_hpd_irq_handler
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 <eich@suse.de>
Reviewed-by: Egbert Eich <eich@suse.de>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit 5876fa0d9e9097d980a72152f4967a52b1adaaac)
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
---
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 779b40102b83..cddfe417d878 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -909,6 +909,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)
@@ -1017,8 +1020,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);
@@ -1047,7 +1048,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) >>
@@ -1151,7 +1151,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) >>
@@ -3274,8 +3273,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);
@@ -3515,8 +3512,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);
--
1.8.5.rc3