From: Keith Packard <keithp@keithp.com>
To: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Enable SDVO hotplug interrupts for HDMI and DVI
Date: Tue, 20 Sep 2011 09:27:46 -0700 [thread overview]
Message-ID: <yunlitjfabh.fsf@aiko.keithp.com> (raw)
In-Reply-To: <1316528258-23006-1-git-send-email-simon.farnsworth@onelan.co.uk>
[-- Attachment #1.1: Type: text/plain, Size: 1832 bytes --]
On Tue, 20 Sep 2011 15:17:38 +0100, Simon Farnsworth <simon.farnsworth@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@intel.com
[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2011-09-20 16:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-20 14:17 [PATCH] drm/i915: Enable SDVO hotplug interrupts for HDMI and DVI Simon Farnsworth
2011-09-20 14:18 ` Simon Farnsworth
2011-09-20 16:27 ` Keith Packard [this message]
2011-09-20 16:38 ` Simon Farnsworth
2011-09-20 16:55 ` Keith Packard
2011-09-20 16:57 ` Simon Farnsworth
2011-09-20 17:05 ` Keith Packard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yunlitjfabh.fsf@aiko.keithp.com \
--to=keithp@keithp.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=simon.farnsworth@onelan.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.