On Tue, 20 Sep 2011 15:17:38 +0100, Simon Farnsworth <[email protected]> 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.
--
[email protected]
pgpl8j4RElWYQ.pgp
Description: PGP signature
_______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
