Skip to content

Commit

Permalink
drm/amd/display: explicitly disable psr_feature_enable appropriately
Browse files Browse the repository at this point in the history
commit 6094b91 upstream.

[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: 8c32230 ("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+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Shirish S authored and gregkh committed Oct 21, 2022
1 parent a19d645 commit f98df27
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,15 @@ static bool link_supports_psrsu(struct dc_link *link)
*/
void amdgpu_dm_set_psr_caps(struct dc_link *link)
{
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 (link->dpcd_caps.psr_info.psr_version == 0) {
link->psr_settings.psr_version = DC_PSR_VERSION_UNSUPPORTED;
Expand Down

0 comments on commit f98df27

Please sign in to comment.