Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/display: determine USB C DP2 mode only when USB DP Alt is enabled

[why]
When display is connected with a native DP port, DP2 mode register value
is a don't care. Driver mistakenly reduce max supported lane count to 2
lane based on the don't care value.

[how]
Add additional check only if USB C DP alt mode is enabled, we will
determine max lane count supported based on current mode.

Signed-off-by: Wenjing Liu <wenjing.liu@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Wenjing Liu and committed by
Alex Deucher
8ccf0e20 4404b478

+101 -64
+2 -2
drivers/gpu/drm/amd/display/dc/core/dc_link.c
··· 682 682 new_edid->raw_edid, new_edid->length) == 0); 683 683 } 684 684 685 - static bool wait_for_alt_mode(struct dc_link *link) 685 + static bool wait_for_entering_dp_alt_mode(struct dc_link *link) 686 686 { 687 687 /** 688 688 * something is terribly wrong if time out is > 200ms. (5Hz) ··· 836 836 /* wa HPD high coming too early*/ 837 837 if (link->link_enc->features.flags.bits.DP_IS_USB_C == 1) { 838 838 /* if alt mode times out, return false */ 839 - if (!wait_for_alt_mode(link)) 839 + if (!wait_for_entering_dp_alt_mode(link)) 840 840 return false; 841 841 } 842 842