Commit 74d70e30 authored by Paul Hsieh's avatar Paul Hsieh Committed by Alex Deucher
Browse files

drm/amd/display: Add monitor patch to read psr cap again



[Why & How]
According to the vendor’s requirement, after each OUI write,
the PSR cap must be read; otherwise, the vendor will default
to using PSRSU. But its PSR cap indicates that it only supports
PSR1.

Reviewed-by: default avatarWenjing Liu <wenjing.liu@amd.com>
Signed-off-by: default avatarPaul Hsieh <Paul.Hsieh@amd.com>
Signed-off-by: default avatarIvan Lipski <ivan.lipski@amd.com>
Tested-by: default avatarDan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent c8bedab2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1217,6 +1217,7 @@ struct dc_panel_config {
		bool rc_disable;
		bool rc_allow_static_screen;
		bool rc_allow_fullscreen_VPB;
		bool read_psrcap_again;
		unsigned int replay_enable_option;
	} psr;
	/* ABM */
+14 −0
Original line number Diff line number Diff line
@@ -703,6 +703,20 @@ bool edp_setup_psr(struct dc_link *link,
	if (!link)
		return false;

	/* This is a workaround: some vendors require the source to
	 * read the PSR cap; otherwise, the vendor's PSR feature will
	 * fall back to its default behavior, causing a misconfiguration
	 * of this feature.
	 */
	if (link->panel_config.psr.read_psrcap_again) {
		dm_helpers_dp_read_dpcd(
			link->ctx,
			link,
			DP_PSR_SUPPORT,
			&link->dpcd_caps.psr_info.psr_version,
			sizeof(link->dpcd_caps.psr_info.psr_version));
	}

	//Clear PSR cfg
	memset(&psr_configuration, 0, sizeof(psr_configuration));
	dm_helpers_dp_write_dpcd(