[Intel-gfx] [PATCH] drm/i915: use delayed work for resume hotplug v4

Chris Wilson chris at chris-wilson.co.uk
Fri Oct 10 08:09:09 CEST 2014


On Thu, Oct 09, 2014 at 08:13:18AM -0700, Jesse Barnes wrote:
> Gets the detect code (which may take awhile) out of the resume path,
> speeding things up a bit.
> 
> v2: use a delayed work queue instead (Daniel)
> v3: cancel delayed work at unload and suspend time (Jesse)
> v4: make delayed work comment less scary (Chris)
> 
> Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>

Comment inline, but still
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>

>  static int i915_load_modeset_init(struct drm_device *dev)
>  {
>  	struct drm_i915_private *dev_priv = dev->dev_private;
> @@ -1364,6 +1373,7 @@ static int i915_load_modeset_init(struct drm_device *dev)
>  
>  	/* Only enable hotplug handling once the fbdev is fully set up. */
>  	intel_hpd_init(dev_priv);
> +	INIT_DELAYED_WORK(&dev_priv->hotplug_resume_work, intel_resume_hotplug);
>  
>  	/*
>  	 * Some ports require correctly set-up hpd registers for detection to
> @@ -1854,6 +1864,8 @@ int i915_driver_unload(struct drm_device *dev)
>  	acpi_video_unregister();
>  
>  	if (drm_core_check_feature(dev, DRIVER_MODESET)) {
> +		cancel_delayed_work(&dev_priv->hotplug_resume_work);
> +

I would have put this in modeset_cleanup so that it was symmetric with
modeset_init.

>  		intel_fbdev_fini(dev);
>  		intel_modeset_cleanup(dev);
>  

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list