aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2012-08-29 07:08:42 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-09-03 03:43:36 -0400
commitfcbc50da7753b210b4442ca9abc4efbd4e481f6e (patch)
tree78d9788d5c25678372baec7f4264c438182e67dc /drivers
parentc1f05264d834e9fb9a4ebfd36dbd86172ac7107a (diff)
drm/i915: only enable sdvo hotplug irq if needed
Avoid constant wakeups caused by noisy irq lines when we don't even care about the irq. This should be particularly useful for i945g/gm where the hotplug has been disabled: commit 768b107e4b3be0acf6f58e914afe4f337c00932b Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Fri May 4 11:29:56 2012 +0200 drm/i915: disable sdvo hotplug on i945g/gm v2: While at it, remove the bogus hotplug_active read, and do not mask hotplug_active[0] before checking whether the irq is needed, per discussion with Daniel on IRC. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=38442 Tested-by: Dominik Köppl <dominik@devwork.org> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/i915/intel_sdvo.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index d81bb0bf288..123afd35761 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -2573,7 +2573,6 @@ bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg, bool is_sdvob)
2573 hotplug_mask = intel_sdvo->is_sdvob ? 2573 hotplug_mask = intel_sdvo->is_sdvob ?
2574 SDVOB_HOTPLUG_INT_STATUS_I915 : SDVOC_HOTPLUG_INT_STATUS_I915; 2574 SDVOB_HOTPLUG_INT_STATUS_I915 : SDVOC_HOTPLUG_INT_STATUS_I915;
2575 } 2575 }
2576 dev_priv->hotplug_supported_mask |= hotplug_mask;
2577 2576
2578 drm_encoder_helper_add(&intel_encoder->base, &intel_sdvo_helper_funcs); 2577 drm_encoder_helper_add(&intel_encoder->base, &intel_sdvo_helper_funcs);
2579 2578
@@ -2581,14 +2580,6 @@ bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg, bool is_sdvob)
2581 if (!intel_sdvo_get_capabilities(intel_sdvo, &intel_sdvo->caps)) 2580 if (!intel_sdvo_get_capabilities(intel_sdvo, &intel_sdvo->caps))
2582 goto err; 2581 goto err;
2583 2582
2584 /* Set up hotplug command - note paranoia about contents of reply.
2585 * We assume that the hardware is in a sane state, and only touch
2586 * the bits we think we understand.
2587 */
2588 intel_sdvo_get_value(intel_sdvo, SDVO_CMD_GET_ACTIVE_HOT_PLUG,
2589 &intel_sdvo->hotplug_active, 2);
2590 intel_sdvo->hotplug_active[0] &= ~0x3;
2591
2592 if (intel_sdvo_output_setup(intel_sdvo, 2583 if (intel_sdvo_output_setup(intel_sdvo,
2593 intel_sdvo->caps.output_flags) != true) { 2584 intel_sdvo->caps.output_flags) != true) {
2594 DRM_DEBUG_KMS("SDVO output failed to setup on %s\n", 2585 DRM_DEBUG_KMS("SDVO output failed to setup on %s\n",
@@ -2596,6 +2587,12 @@ bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg, bool is_sdvob)
2596 goto err; 2587 goto err;
2597 } 2588 }
2598 2589
2590 /* Only enable the hotplug irq if we need it, to work around noisy
2591 * hotplug lines.
2592 */
2593 if (intel_sdvo->hotplug_active[0])
2594 dev_priv->hotplug_supported_mask |= hotplug_mask;
2595
2599 intel_sdvo_select_ddc_bus(dev_priv, intel_sdvo, sdvo_reg); 2596 intel_sdvo_select_ddc_bus(dev_priv, intel_sdvo, sdvo_reg);
2600 2597
2601 /* Set the input timing to the screen. Assume always input 0. */ 2598 /* Set the input timing to the screen. Assume always input 0. */