[Intel-gfx] [PATCH 08/17] drm/i915: add per-output hotplug callback

Eric Anholt eric at anholt.net
Fri Jun 5 15:15:24 CEST 2009


On Sat, 2009-05-30 at 20:42 -0700, Keith Packard wrote:
> This allows each output to deal with plug/unplug events as needed
> (cherry picked from commit 08d57f21d1042153ebc26465be85d7e166008a14)

s-o-b?  also, a weird cherry-pick message here.

> ---
>  drivers/gpu/drm/i915/i915_irq.c  |    8 ++++++++
>  drivers/gpu/drm/i915/intel_drv.h |    1 +
>  2 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 98bb4c8..43745ff 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -191,7 +191,15 @@ 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;
>  
> +	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);
>  }
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index d89a2fe..c585879 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -83,6 +83,7 @@ struct intel_output {
>  	bool load_detect_temp;
>  	bool needs_tv_clock;
>  	void *dev_priv;
> +	void (*hot_plug)(struct intel_output *);
>  };
>  
>  struct intel_crtc {
-- 
Eric Anholt
eric at anholt.net                         eric.anholt at intel.com


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20090605/8a84dbb9/attachment.sig>


More information about the Intel-gfx mailing list