Skip to content

Commit 2ec6c7f

Browse files
Michael Straussalexdeucher
authored andcommitted
drm/amd/display: Send DP_TOTAL_LTTPR_CNT during detection if LTTPR is present
[WHY] New register field added in DP2.1 SCR, needed for auxless ALPM [HOW] Echo value read from 0xF0007 back to sink Reviewed-by: Wenjing Liu <wenjing.liu@amd.com> Cc: Mario Limonciello <mario.limonciello@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Michael Strauss <michael.strauss@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 74fa02c commit 2ec6c7f

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1590,9 +1590,17 @@ static bool retrieve_link_cap(struct dc_link *link)
15901590
return false;
15911591
}
15921592

1593-
if (dp_is_lttpr_present(link))
1593+
if (dp_is_lttpr_present(link)) {
15941594
configure_lttpr_mode_transparent(link);
15951595

1596+
// Echo TOTAL_LTTPR_CNT back downstream
1597+
core_link_write_dpcd(
1598+
link,
1599+
DP_TOTAL_LTTPR_CNT,
1600+
&link->dpcd_caps.lttpr_caps.phy_repeater_cnt,
1601+
sizeof(link->dpcd_caps.lttpr_caps.phy_repeater_cnt));
1602+
}
1603+
15961604
/* Read DP tunneling information. */
15971605
status = dpcd_get_tunneling_device_data(link);
15981606

drivers/gpu/drm/amd/display/include/dpcd_defs.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,4 +177,9 @@ enum dpcd_psr_sink_states {
177177
#define DP_SINK_PR_PIXEL_DEVIATION_PER_LINE 0x379
178178
#define DP_SINK_PR_MAX_NUMBER_OF_DEVIATION_LINE 0x37A
179179

180+
/* Remove once drm_dp_helper.h is updated upstream */
181+
#ifndef DP_TOTAL_LTTPR_CNT
182+
#define DP_TOTAL_LTTPR_CNT 0xF000A /* 2.1 */
183+
#endif
184+
180185
#endif /* __DAL_DPCD_DEFS_H__ */

0 commit comments

Comments
 (0)