Commit 2ec6c7f8 authored by Michael Strauss's avatar Michael Strauss Committed by Alex Deucher
Browse files

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: default avatarWenjing 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: default avatarAlex Hung <alex.hung@amd.com>
Signed-off-by: default avatarMichael Strauss <michael.strauss@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 74fa02c4
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -1590,9 +1590,17 @@ static bool retrieve_link_cap(struct dc_link *link)
			return false;
	}

	if (dp_is_lttpr_present(link))
	if (dp_is_lttpr_present(link)) {
		configure_lttpr_mode_transparent(link);

		// Echo TOTAL_LTTPR_CNT back downstream
		core_link_write_dpcd(
				link,
				DP_TOTAL_LTTPR_CNT,
				&link->dpcd_caps.lttpr_caps.phy_repeater_cnt,
				sizeof(link->dpcd_caps.lttpr_caps.phy_repeater_cnt));
	}

	/* Read DP tunneling information. */
	status = dpcd_get_tunneling_device_data(link);

+5 −0
Original line number Diff line number Diff line
@@ -177,4 +177,9 @@ enum dpcd_psr_sink_states {
#define DP_SINK_PR_PIXEL_DEVIATION_PER_LINE     0x379
#define DP_SINK_PR_MAX_NUMBER_OF_DEVIATION_LINE 0x37A

/* Remove once drm_dp_helper.h is updated upstream */
#ifndef DP_TOTAL_LTTPR_CNT
#define DP_TOTAL_LTTPR_CNT                                  0xF000A /* 2.1 */
#endif

#endif /* __DAL_DPCD_DEFS_H__ */