diff mbox series

drm/i915: Fix the HDMI hot plug disconnection failure (v3)

Message ID 1543439893-27350-1-git-send-email-guang.bai@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: Fix the HDMI hot plug disconnection failure (v3) | expand

Commit Message

Guang Bai Nov. 28, 2018, 9:18 p.m. UTC
On some GEN9 platforms, slowly unplugging (wiggling) the HDMI cable makes
the kernel to believe the HDMI display is still connected. This is because
the HDMI DDC lines are disconnected a little bit later after the hot-plug
interrupt triggered thus an immediate edid fetch can be made. Use digital
port live states to authorize the edid read.

v2: Fix the formatting issue
v3: Use digital port states to authorize the edid read

Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Chris Chiu <chiu@endlessm.com>
Signed-off-by: Guang Bai <guang.bai@intel.com>
---
 drivers/gpu/drm/i915/intel_hdmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Chris Wilson Nov. 28, 2018, 9:39 p.m. UTC | #1
Quoting Guang Bai (2018-11-28 21:18:13)
> On some GEN9 platforms, slowly unplugging (wiggling) the HDMI cable makes
> the kernel to believe the HDMI display is still connected. This is because
> the HDMI DDC lines are disconnected a little bit later after the hot-plug
> interrupt triggered thus an immediate edid fetch can be made. Use digital
> port live states to authorize the edid read.

You should at least comment upon why we don't historically do this and
why you now believe that it is safe.
-Chris
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index e2c6a2b3e8f2..8cf7c78b8cdd 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -1929,7 +1929,7 @@  intel_hdmi_detect(struct drm_connector *connector, bool force)
 
 	intel_display_power_get(dev_priv, POWER_DOMAIN_GMBUS);
 
-	if (IS_ICELAKE(dev_priv) &&
+	if ((IS_ICELAKE(dev_priv) || IS_GEN9_BC(dev_priv)) &&
 	    !intel_digital_port_connected(encoder))
 		goto out;