[Intel-gfx] [PATCH] drm/i915: Enable SDVO hotplug interrupts for HDMI and DVI
Keith Packard
keithp at keithp.com
Tue Sep 20 18:27:46 CEST 2011
On Tue, 20 Sep 2011 15:17:38 +0100, Simon Farnsworth <simon.farnsworth at onelan.co.uk> wrote:
> - if (on) {
> - intel_sdvo_write_cmd(intel_sdvo, SDVO_CMD_GET_HOT_PLUG_SUPPORT, NULL, 0);
> - status = intel_sdvo_read_response(intel_sdvo, &response, 2);
> + intel_sdvo_write_cmd(intel_sdvo, SDVO_CMD_GET_HOT_PLUG_SUPPORT, NULL, 0);
> + status = intel_sdvo_read_response(intel_sdvo, &response, 2);
...
> + intel_sdvo_write_cmd(intel_sdvo, SDVO_CMD_SET_ACTIVE_HOT_PLUG, &response, 2);
You are unconditionally enabling hotplug on all devices, I think you
want to take the desired device as an argument to this function and add
it to the set of active hotplug devices instead. You've just gotten the
active hotplug value above, so removing the call to GET_HOT_PLUG_SUPPORT
and doing:
intel_sdvo_write_cmd(intel_sdvo, SDVO_CMD_GET_ACTIVE_HOT_PLUG, NULL, 0);
intel_sdvo_read_response(intel_sdvo, &response, 2);
response[0] |= (1 << device);
intel_sdvo_write_cmd(intel_sdvo, SDVO_CMD_SET_ACTIVE_HOT_PLUG, &response, 2);
should do what you want.
> @@ -2062,7 +2020,13 @@ 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;
> + intel_encoder->hot_plug = intel_sdvo_enable_hotplug;
The encoder->hot_plug function is what is called when the hotplug
interrupt is detected. The only current user is the DisplayPort driver
which uses this to signal link retraining. You definitely don't want or
need to call intel_sdvo_enable_hotplug at that point.
--
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/20110920/5e743ae3/attachment.sig>
More information about the Intel-gfx
mailing list