Skip to content

Commit 775f3af

Browse files
George Shengregkh
authored andcommitted
drm/amd/display: Read LTTPR ALPM caps during link cap retrieval
[ Upstream commit de84d58 ] [Why] The latest DP spec requires the DP TX to read DPCD F0000h through F0009h when detecting LTTPR capabilities for the first time. [How] Update LTTPR cap retrieval to read up to F0009h (two more bytes than the previous F0007h), and store the LTTPR ALPM capabilities. Reviewed-by: Wenjing Liu <wenjing.liu@amd.com> Signed-off-by: George Shen <george.shen@amd.com> Signed-off-by: Roman Li <roman.li@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 1e826ac commit 775f3af

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

drivers/gpu/drm/amd/display/dc/dc_dp_types.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,14 @@ union dp_128b_132b_supported_lttpr_link_rates {
959959
uint8_t raw;
960960
};
961961

962+
union dp_alpm_lttpr_cap {
963+
struct {
964+
uint8_t AUX_LESS_ALPM_SUPPORTED :1;
965+
uint8_t RESERVED :7;
966+
} bits;
967+
uint8_t raw;
968+
};
969+
962970
union dp_sink_video_fallback_formats {
963971
struct {
964972
uint8_t dp_1024x768_60Hz_24bpp_support :1;
@@ -1103,6 +1111,7 @@ struct dc_lttpr_caps {
11031111
uint8_t max_ext_timeout;
11041112
union dp_main_link_channel_coding_lttpr_cap main_link_channel_coding;
11051113
union dp_128b_132b_supported_lttpr_link_rates supported_128b_132b_rates;
1114+
union dp_alpm_lttpr_cap alpm;
11061115
uint8_t aux_rd_interval[MAX_REPEATER_CNT - 1];
11071116
};
11081117

@@ -1352,6 +1361,9 @@ struct dp_trace {
13521361
#ifndef DPCD_MAX_UNCOMPRESSED_PIXEL_RATE_CAP
13531362
#define DPCD_MAX_UNCOMPRESSED_PIXEL_RATE_CAP 0x221c
13541363
#endif
1364+
#ifndef DP_LTTPR_ALPM_CAPABILITIES
1365+
#define DP_LTTPR_ALPM_CAPABILITIES 0xF0009
1366+
#endif
13551367
#ifndef DP_REPEATER_CONFIGURATION_AND_STATUS_SIZE
13561368
#define DP_REPEATER_CONFIGURATION_AND_STATUS_SIZE 0x50
13571369
#endif

drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1495,7 +1495,7 @@ static bool dpcd_read_sink_ext_caps(struct dc_link *link)
14951495

14961496
enum dc_status dp_retrieve_lttpr_cap(struct dc_link *link)
14971497
{
1498-
uint8_t lttpr_dpcd_data[8] = {0};
1498+
uint8_t lttpr_dpcd_data[10] = {0};
14991499
enum dc_status status;
15001500
bool is_lttpr_present;
15011501

@@ -1545,6 +1545,10 @@ enum dc_status dp_retrieve_lttpr_cap(struct dc_link *link)
15451545
lttpr_dpcd_data[DP_PHY_REPEATER_128B132B_RATES -
15461546
DP_LT_TUNABLE_PHY_REPEATER_FIELD_DATA_STRUCTURE_REV];
15471547

1548+
link->dpcd_caps.lttpr_caps.alpm.raw =
1549+
lttpr_dpcd_data[DP_LTTPR_ALPM_CAPABILITIES -
1550+
DP_LT_TUNABLE_PHY_REPEATER_FIELD_DATA_STRUCTURE_REV];
1551+
15481552
/* If this chip cap is set, at least one retimer must exist in the chain
15491553
* Override count to 1 if we receive a known bad count (0 or an invalid value) */
15501554
if ((link->chip_caps & EXT_DISPLAY_PATH_CAPS__DP_FIXED_VS_EN) &&

0 commit comments

Comments
 (0)