Skip to content

Commit 7c95ec3

Browse files
vsyrjalarodrigovivi
authored andcommitted
drm/i915: Only check eDP HPD when AUX CH is shared
Apparently Acer Chromebook C740 (BDW-ULT) doesn't have the eDP HPD line properly connected, and thus fails the new HPD check during eDP probe. The result is that we lose the eDP output. I suspect all such machines would be Chromebooks or other Linux exclusive systems as the Windows driver likely wouldn't work either. I did check a few other BDW machines here and those do have eDP HPD connected, one of them even is a different Chromebook (Samus). To account for these funky machines let's skip the HPD check when it looks like the eDP port is the only one using that specific AUX channel. In case of multiple ports sharing the same AUX CH (eg. on Asrock B250M-HDV) we still do the check and thus should correctly ignore the eDP port in favor of the other DP port (usually a DP->VGA converter). v2: Don't oops during list iteration Cc: [email protected] Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/9264 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: Luca Coelho <[email protected]> (cherry picked from commit 7005210) Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent 0bb80ec commit 7c95ec3

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3540,6 +3540,27 @@ enum aux_ch intel_bios_dp_aux_ch(const struct intel_bios_encoder_data *devdata)
35403540
return map_aux_ch(devdata->i915, devdata->child.aux_channel);
35413541
}
35423542

3543+
bool intel_bios_dp_has_shared_aux_ch(const struct intel_bios_encoder_data *devdata)
3544+
{
3545+
struct drm_i915_private *i915;
3546+
u8 aux_channel;
3547+
int count = 0;
3548+
3549+
if (!devdata || !devdata->child.aux_channel)
3550+
return false;
3551+
3552+
i915 = devdata->i915;
3553+
aux_channel = devdata->child.aux_channel;
3554+
3555+
list_for_each_entry(devdata, &i915->display.vbt.display_devices, node) {
3556+
if (intel_bios_encoder_supports_dp(devdata) &&
3557+
aux_channel == devdata->child.aux_channel)
3558+
count++;
3559+
}
3560+
3561+
return count > 1;
3562+
}
3563+
35433564
int intel_bios_dp_boost_level(const struct intel_bios_encoder_data *devdata)
35443565
{
35453566
if (!devdata || devdata->i915->display.vbt.version < 196 || !devdata->child.iboost)

drivers/gpu/drm/i915/display/intel_bios.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ enum aux_ch intel_bios_dp_aux_ch(const struct intel_bios_encoder_data *devdata);
273273
int intel_bios_dp_boost_level(const struct intel_bios_encoder_data *devdata);
274274
int intel_bios_dp_max_lane_count(const struct intel_bios_encoder_data *devdata);
275275
int intel_bios_dp_max_link_rate(const struct intel_bios_encoder_data *devdata);
276+
bool intel_bios_dp_has_shared_aux_ch(const struct intel_bios_encoder_data *devdata);
276277
int intel_bios_hdmi_boost_level(const struct intel_bios_encoder_data *devdata);
277278
int intel_bios_hdmi_ddc_pin(const struct intel_bios_encoder_data *devdata);
278279
int intel_bios_hdmi_level_shift(const struct intel_bios_encoder_data *devdata);

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5512,8 +5512,13 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
55125512
/*
55135513
* VBT and straps are liars. Also check HPD as that seems
55145514
* to be the most reliable piece of information available.
5515+
*
5516+
* ... expect on devices that forgot to hook HPD up for eDP
5517+
* (eg. Acer Chromebook C710), so we'll check it only if multiple
5518+
* ports are attempting to use the same AUX CH, according to VBT.
55155519
*/
5516-
if (!intel_digital_port_connected(encoder)) {
5520+
if (intel_bios_dp_has_shared_aux_ch(encoder->devdata) &&
5521+
!intel_digital_port_connected(encoder)) {
55175522
/*
55185523
* If this fails, presume the DPCD answer came
55195524
* from some other port using the same AUX CH.

0 commit comments

Comments
 (0)