From: Simon Farnsworth Subject: Re: [PATCHv5] drm/i915: Enable SDVO hotplug interrupts for HDMI and DVI Date: Wed, 21 Sep 2011 16:18:55 +0100 Message-ID: <201109211618.55592.simon.farnsworth@onelan.co.uk> References: <1316539885-3196-1-git-send-email-simon.farnsworth@onelan.co.uk> <201109211008.14518.simon.farnsworth@onelan.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from claranet-outbound-smtp03.uk.clara.net (claranet-outbound-smtp03.uk.clara.net [195.8.89.36]) by gabe.freedesktop.org (Postfix) with ESMTP id 7EE519E74F for ; Wed, 21 Sep 2011 08:19:01 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Keith Packard Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Wednesday 21 September 2011, Keith Packard wrote: > On Wed, 21 Sep 2011 10:08:13 +0100, Simon Farnsworth wrote: > > I'm clearing the bits (&= not |=). I could respin setting it to 0, but > > that takes me even further from the old (commented out) code, and I'd > > really want someone to check SDVO specs before doing that. > > What I see the code doing is asking whether devices 0 and 1 *could* > support hotplug and then unconditionally setting the devices for which > we *want* hotplug to that. > > I think you should set the list of devices requesting hotplug to be the > intersection of the set of devices which *could* do hotplug and the > set of devices for which we *want* hotplug. > > That seems like it would be achieved by just clearing the set of devices > that we will request hotplug for and then checking which ones are > supported and incrementally adding those to the hotplug_active set. I think I see my mistake - but I'd like to check before I do a v6 of this patch. I'm ANDing the value returned by hardware with 3 - I should be ANDing it with an appropriate ~3. The rest of the code (setting those bits in intel_sdvo_dvi_init based on what functions I have) should be OK. Essentially, I'm fairly confident based on empirical evidence that bit 0 is HPD for device 0 (as my SDVO devices both return 0x01 in that byte). I don't know what the rest of the bits mean, but it seems like a reasonable guess that bit 1 is HPD for device 1, so I'm acting accordingly. I would still like someone with the spec to go over what I'm doing - this seems appropriate, but *all* I have to test against are two different motherboards with "integrated" DVI-D that turns out to be an SDVO device. I have no documentation for SDVO - all of this is based on the existing code with hints from ajax; it could be complete nonsense for anything other than the two devices I have. -- Simon Farnsworth Software Engineer ONELAN Limited http://www.onelan.com/