From: Chris Wilson Subject: Re: [PATCH 2/4] drm/i915/hdmi: Read the HPD status before trying to read the EDID Date: Thu, 13 Dec 2012 08:40:40 +0000 Message-ID: <6c3329$7ku15h@orsmga002.jf.intel.com> References: <1355341841-4595-1-git-send-email-damien.lespiau@gmail.com> <1355341841-4595-2-git-send-email-damien.lespiau@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 848A1E5DB0 for ; Thu, 13 Dec 2012 00:41:19 -0800 (PST) In-Reply-To: <1355341841-4595-2-git-send-email-damien.lespiau@gmail.com> 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: Damien Lespiau , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Wed, 12 Dec 2012 19:50:39 +0000, Damien Lespiau wrote: > From: Damien Lespiau > > If you unplug the hdmi connector slowly enough, the hotplug interrupt > fires but then the kernel code tries to read the EDID and succeeds > (because the connector is still half connected, the HPD pin is shorter > than the others, and DDC works). Since EDID succeeds it thinks the > monitor is still connected. > > To prevent that, read the live HPD status in the hotplug handler before > trying to read the EDID. > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55372 > Signed-off-by: Damien Lespiau > --- > drivers/gpu/drm/i915/intel_display.c | 33 +++++++++++++++++++++++++++++++++ > drivers/gpu/drm/i915/intel_drv.h | 3 +++ > drivers/gpu/drm/i915/intel_hdmi.c | 10 ++++++++-- > 3 files changed, 44 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c > index 115bf62..117d9e6 100644 > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -994,6 +994,39 @@ void intel_wait_for_pipe_off(struct drm_device *dev, int pipe) > } > } > > +/* > + * intel_ironlake_digital_port_connected - is the specified port connected? > + * @dev_priv: i915 private structure > + * @port: the port to test > + * > + * Returns true if @port is connected, false otherwise. > + */ > +bool intel_ironlake_digital_port_connected(struct drm_i915_private *dev_priv, > + struct intel_digital_port *port) intel_ironlake_digital_port_connected() is a horrible bastard of a naming scheme. ibx_digital_port_connected() please. ^intel_ -> applies to (nearly-)all display generations ^ilk_/ironlake_ -> applies to ironlake and maybe subsequent generations In this case since we are PCH specific, using the PCH chipset identifiers makes more sense. -Chris -- Chris Wilson, Intel Open Source Technology Centre