Skip to content

Commit c6fbd2b

Browse files
committed
Merge tag 'drm-intel-fixes-2023-09-14' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
- Only check eDP HPD when AUX CH is shared. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/ZQL+NqtIZH5F/Nxr@intel.com
2 parents 1216d49 + 7c95ec3 commit c6fbd2b

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)