Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Packard <keithp@keithp.com>
To: Simon Farnsworth <simon.farnsworth@onelan.co.uk>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] i915: Enable SDVO hotplug interrupts for HDMI and DVI
Date: Mon, 19 Sep 2011 21:24:08 -0700	[thread overview]
Message-ID: <yun8vpjhmdz.fsf@aiko.keithp.com> (raw)
In-Reply-To: <1313574741-31193-1-git-send-email-simon.farnsworth@onelan.co.uk>


[-- Attachment #1.1: Type: text/plain, Size: 1347 bytes --]

On Wed, 17 Aug 2011 10:52:21 +0100, Simon Farnsworth <simon.farnsworth@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@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

  parent reply	other threads:[~2011-09-20  4:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-17  9:52 [PATCH] i915: Enable SDVO hotplug interrupts for HDMI and DVI Simon Farnsworth
2011-09-19  9:41 ` Simon Farnsworth
2011-09-19 15:03   ` Keith Packard
2011-09-19 17:23     ` Adam Jackson
2011-09-20  4:24 ` Keith Packard [this message]
2011-09-20  9:38   ` Simon Farnsworth

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=yun8vpjhmdz.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox