diff mbox series

[2/9,SRU,Jammy] UBUNTU: SAUCE: drm/amd/display: Fixup previous PSR policy commit

Message ID 20211215065730.390346-3-vicamo.yang@canonical.com
State New
Headers show
Series Support USB4 DP alt mode for AMD Yellow Carp graphics card | expand

Commit Message

You-Sheng Yang Dec. 15, 2021, 6:57 a.m. UTC
From: Mario Limonciello <mario.limonciello@amd.com>

BugLink: https://bugs.launchpad.net/bugs/1953008

Commit 9470620e99e9 ("drm/amd/display: Enable PSR by default on newer
DCN") relies upon IP version harvesting which isn't available until
5.16.  For the backport of this commit, modify it to instead use
chip types (matching Van Gogh and Yellow Carp).

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Change-Id: Ib50a2b278d644ad95c8cd7eeadcc496f6571c598
Signed-off-by: You-Sheng Yang <vicamo.yang@canonical.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 3819b0c1c1ec..353c38898d47 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -3971,9 +3971,9 @@  static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
 
 	/* Determine whether to enable PSR support by default. */
 	if (!(amdgpu_dc_debug_mask & DC_DISABLE_PSR)) {
-		switch (adev->ip_versions[DCE_HWIP][0]) {
-		case IP_VERSION(3, 1, 2):
-		case IP_VERSION(3, 1, 3):
+		switch (adev->asic_type) {
+		case CHIP_VANGOGH:
+		case CHIP_YELLOW_CARP:
 			psr_feature_enabled = true;
 			break;
 		default: