aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_sdvo.c
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 04:09:29 -0400
commitff04b35af0e40956764596e3d032f786e5451238 (patch)
tree5d8d46ac5c86144bc6e177ad848be48fecd9011a /drivers/gpu/drm/i915/intel_sdvo.c
parenta2c7f6fd4d8d6dff8a561e7bd76b951808143310 (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> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_sdvo.c')
-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 434b1d1d3c84..9a31211a60c6 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -2570,7 +2570,6 @@ bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg, bool is_sdvob)
2570 hotplug_mask = intel_sdvo->is_sdvob ? 2570 hotplug_mask = intel_sdvo->is_sdvob ?
2571 SDVOB_HOTPLUG_INT_STATUS_I915 : SDVOC_HOTPLUG_INT_STATUS_I915; 2571 SDVOB_HOTPLUG_INT_STATUS_I915 : SDVOC_HOTPLUG_INT_STATUS_I915;
2572 } 2572 }
2573 dev_priv->hotplug_supported_mask |= hotplug_mask;
2574 2573
2575 drm_encoder_helper_add(&intel_encoder->base, &intel_sdvo_helper_funcs); 2574 drm_encoder_helper_add(&intel_encoder->base, &intel_sdvo_helper_funcs);
2576 2575
@@ -2578,14 +2577,6 @@ bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg, bool is_sdvob)
2578 if (!intel_sdvo_get_capabilities(intel_sdvo, &intel_sdvo->caps)) 2577 if (!intel_sdvo_get_capabilities(intel_sdvo, &intel_sdvo->caps))
2579 goto err; 2578 goto err;
2580 2579
2581 /* Set up hotplug command - note paranoia about contents of reply.
2582 * We assume that the hardware is in a sane state, and only touch
2583 * the bits we think we understand.
2584 */
2585 intel_sdvo_get_value(intel_sdvo, SDVO_CMD_GET_ACTIVE_HOT_PLUG,
2586 &intel_sdvo->hotplug_active, 2);
2587 intel_sdvo->hotplug_active[0] &= ~0x3;
2588
2589 if (intel_sdvo_output_setup(intel_sdvo, 2580 if (intel_sdvo_output_setup(intel_sdvo,
2590 intel_sdvo->caps.output_flags) != true) { 2581 intel_sdvo->caps.output_flags) != true) {
2591 DRM_DEBUG_KMS("SDVO output failed to setup on %s\n", 2582 DRM_DEBUG_KMS("SDVO output failed to setup on %s\n",
@@ -2593,6 +2584,12 @@ bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg, bool is_sdvob)
2593 goto err; 2584 goto err;
2594 } 2585 }
2595 2586
2587 /* Only enable the hotplug irq if we need it, to work around noisy
2588 * hotplug lines.
2589 */
2590 if (intel_sdvo->hotplug_active[0])
2591 dev_priv->hotplug_supported_mask |= hotplug_mask;
2592
2596 intel_sdvo_select_ddc_bus(dev_priv, intel_sdvo, sdvo_reg); 2593 intel_sdvo_select_ddc_bus(dev_priv, intel_sdvo, sdvo_reg);
2597 2594
2598 /* Set the input timing to the screen. Assume always input 0. */ 2595 /* Set the input timing to the screen. Assume always input 0. */