Skip to content

Commit f76f83a

Browse files
vsyrjalajnikula
authored andcommitted
drm/i915: Also check for VGA converter in eDP probe
Unfortunately even the HPD based detection added in commit cfe5bdf ("drm/i915: Check HPD live state during eDP probe") fails to detect that the VBT's eDP/DDI-A is a ghost on Asus B360M-A (CFL+CNP). On that board eDP/DDI-A has its HPD asserted despite nothing being actually connected there :( The straps/fuses also indicate that the eDP port is present. So if one boots with a VGA monitor connected the eDP probe will mistake the DP->VGA converter hooked to DDI-E for an eDP panel on DDI-A. As a last resort check what kind of DP device we've detected, and if it looks like a DP->VGA converter then conclude that the eDP port should be ignored. Cc: [email protected] Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/9636 Fixes: cfe5bdf ("drm/i915: Check HPD live state during eDP probe") Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jani Nikula <[email protected]> (cherry picked from commit fcd479a) Signed-off-by: Jani Nikula <[email protected]>
1 parent 5035794 commit f76f83a

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

drivers/gpu/drm/i915/display/intel_dp.c

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6037,19 +6037,35 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
60376037
* (eg. Acer Chromebook C710), so we'll check it only if multiple
60386038
* ports are attempting to use the same AUX CH, according to VBT.
60396039
*/
6040-
if (intel_bios_dp_has_shared_aux_ch(encoder->devdata) &&
6041-
!intel_digital_port_connected(encoder)) {
6040+
if (intel_bios_dp_has_shared_aux_ch(encoder->devdata)) {
60426041
/*
60436042
* If this fails, presume the DPCD answer came
60446043
* from some other port using the same AUX CH.
60456044
*
60466045
* FIXME maybe cleaner to check this before the
60476046
* DPCD read? Would need sort out the VDD handling...
60486047
*/
6049-
drm_info(&dev_priv->drm,
6050-
"[ENCODER:%d:%s] HPD is down, disabling eDP\n",
6051-
encoder->base.base.id, encoder->base.name);
6052-
goto out_vdd_off;
6048+
if (!intel_digital_port_connected(encoder)) {
6049+
drm_info(&dev_priv->drm,
6050+
"[ENCODER:%d:%s] HPD is down, disabling eDP\n",
6051+
encoder->base.base.id, encoder->base.name);
6052+
goto out_vdd_off;
6053+
}
6054+
6055+
/*
6056+
* Unfortunately even the HPD based detection fails on
6057+
* eg. Asus B360M-A (CFL+CNP), so as a last resort fall
6058+
* back to checking for a VGA branch device. Only do this
6059+
* on known affected platforms to minimize false positives.
6060+
*/
6061+
if (DISPLAY_VER(dev_priv) == 9 && drm_dp_is_branch(intel_dp->dpcd) &&
6062+
(intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT] & DP_DWN_STRM_PORT_TYPE_MASK) ==
6063+
DP_DWN_STRM_PORT_TYPE_ANALOG) {
6064+
drm_info(&dev_priv->drm,
6065+
"[ENCODER:%d:%s] VGA converter detected, disabling eDP\n",
6066+
encoder->base.base.id, encoder->base.name);
6067+
goto out_vdd_off;
6068+
}
60536069
}
60546070

60556071
mutex_lock(&dev_priv->drm.mode_config.mutex);

0 commit comments

Comments
 (0)