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

drm/amd/display: explicitly disable psr_feature_enable appropriately

[Why]
If psr_feature_enable is set to true by default, it continues to be enabled
for non capable links.

[How]
explicitly disable the feature on links that are not capable of the same.

Fixes: 8c322309e48e9 ("drm/amd/display: Enable PSR")
Signed-off-by: Shirish S <shirish.s@amd.com>
Reviewed-by: Leo Li <sunpeng.li@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org # 5.15+

authored by

Shirish S and committed by
Alex Deucher
6094b913 17d819e2

+6 -2
+6 -2
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c
··· 60 60 */ 61 61 void amdgpu_dm_set_psr_caps(struct dc_link *link) 62 62 { 63 - if (!(link->connector_signal & SIGNAL_TYPE_EDP)) 63 + if (!(link->connector_signal & SIGNAL_TYPE_EDP)) { 64 + link->psr_settings.psr_feature_enabled = false; 64 65 return; 66 + } 65 67 66 - if (link->type == dc_connection_none) 68 + if (link->type == dc_connection_none) { 69 + link->psr_settings.psr_feature_enabled = false; 67 70 return; 71 + } 68 72 69 73 if (link->dpcd_caps.psr_info.psr_version == 0) { 70 74 link->psr_settings.psr_version = DC_PSR_VERSION_UNSUPPORTED;