From: Shirish S Date: Fri, 7 Oct 2022 15:01:49 +0000 (+0530) Subject: drm/amd/display: explicitly disable psr_feature_enable appropriately X-Git-Tag: v5.15.79~270 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8576d7edeaa5553d95e9205ae76d894e087e3aed;p=platform%2Fkernel%2Flinux-rpi.git drm/amd/display: explicitly disable psr_feature_enable appropriately [ Upstream commit 6094b9136ca9038b61e9c4b5d25cd5512ce50b34 ] [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 Reviewed-by: Leo Li Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 5.15+ Signed-off-by: Sasha Levin --- diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c index 7072fb2..278ff28 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c @@ -36,10 +36,14 @@ void amdgpu_dm_set_psr_caps(struct dc_link *link) { uint8_t dpcd_data[EDP_PSR_RECEIVER_CAP_SIZE]; - if (!(link->connector_signal & SIGNAL_TYPE_EDP)) + if (!(link->connector_signal & SIGNAL_TYPE_EDP)) { + link->psr_settings.psr_feature_enabled = false; return; - if (link->type == dc_connection_none) + } + if (link->type == dc_connection_none) { + link->psr_settings.psr_feature_enabled = false; return; + } if (dm_helpers_dp_read_dpcd(NULL, link, DP_PSR_SUPPORT, dpcd_data, sizeof(dpcd_data))) { link->dpcd_caps.psr_caps.psr_version = dpcd_data[0];