[Intel-gfx] [PATCH 2/4] drm/i915/hdmi: Read the HPD status before trying to read the EDID

Chris Wilson chris at chris-wilson.co.uk
Thu Dec 13 09:40:40 CET 2012


On Wed, 12 Dec 2012 19:50:39 +0000, Damien Lespiau <damien.lespiau at gmail.com> wrote:
> From: Damien Lespiau <damien.lespiau at intel.com>
> 
> 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 <damien.lespiau at intel.com>
> ---
>  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



More information about the Intel-gfx mailing list