diff options
author | Keith Packard <keithp@keithp.com> | 2009-05-06 11:48:58 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2009-06-18 15:54:06 -0700 |
commit | c31c4ba3437d98efa19710e30d694a1cfdf87aa5 (patch) | |
tree | 043b40a59404868cc2eee5db44599c0539f110ee /drivers/gpu/drm/i915/i915_irq.c | |
parent | 308cd3a2e505b0d15f2852e8db5d648b60a6313b (diff) | |
download | blackbird-op-linux-c31c4ba3437d98efa19710e30d694a1cfdf87aa5.tar.gz blackbird-op-linux-c31c4ba3437d98efa19710e30d694a1cfdf87aa5.zip |
drm/i915: add per-output hotplug callback for KMS
This allows each output to deal with plug/unplug events as needed.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_irq.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_irq.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index b86b7b7130c6..228546f6eaa4 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -232,7 +232,17 @@ static void i915_hotplug_work_func(struct work_struct *work) drm_i915_private_t *dev_priv = container_of(work, drm_i915_private_t, hotplug_work); struct drm_device *dev = dev_priv->dev; - + struct drm_mode_config *mode_config = &dev->mode_config; + struct drm_connector *connector; + + if (mode_config->num_connector) { + list_for_each_entry(connector, &mode_config->connector_list, head) { + struct intel_output *intel_output = to_intel_output(connector); + + if (intel_output->hot_plug) + (*intel_output->hot_plug) (intel_output); + } + } /* Just fire off a uevent and let userspace tell us what to do */ drm_sysfs_hotplug_event(dev); } |