[Intel-gfx] [PATCH] i915: Enable SDVO hotplug interrupts for HDMI and DVI

Keith Packard keithp at keithp.com
Tue Sep 20 06:24:08 CEST 2011


On Wed, 17 Aug 2011 10:52:21 +0100, Simon Farnsworth <simon.farnsworth at onelan.co.uk> wrote:

>  static bool
>  intel_sdvo_multifunc_encoder(struct intel_sdvo *intel_sdvo)
> @@ -2062,7 +2053,10 @@ intel_sdvo_dvi_init(struct intel_sdvo *intel_sdvo, int device)
>  
>  	intel_connector = &intel_sdvo_connector->base;
>  	connector = &intel_connector->base;
> -	connector->polled = DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT;
> +	if (intel_sdvo_supports_hotplug(intel_sdvo) & (1 << device))
> +		connector->polled = DRM_CONNECTOR_POLL_HPD;
> +	else
> +		connector->polled = DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT;
>  	encoder->encoder_type = DRM_MODE_ENCODER_TMDS;
>  	connector->connector_type = DRM_MODE_CONNECTOR_DVID;
>  
> @@ -2587,6 +2581,11 @@ bool intel_sdvo_init(struct drm_device *dev, int sdvo_reg)
>  						    &intel_sdvo->pixel_clock_max))
>  		goto err;
>  
> +        if (intel_sdvo_supports_hotplug(intel_sdvo)) {
> +		intel_encoder->hot_plug = intel_sdvo_do_hotplug;
> +		intel_sdvo_set_hotplug(intel_sdvo);
> +	}
> +

This all looks quite reasonable, about the only thing I would suggest is
that you avoid calling intel_sdvo_supports_hotplug twice in
intel_sdvo_init and simply look at connector->polled to see if the HPD
bit is set.

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20110919/c4c1ea14/attachment.sig>


More information about the Intel-gfx mailing list