[PATCH 1/2] drm/amdgpu: Change unique_id to use IP_VERSION
Deucher, Alexander
Alexander.Deucher at amd.com
Mon Mar 28 13:44:51 UTC 2022
[Public]
Series is:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
________________________________
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> on behalf of Kent Russell <kent.russell at amd.com>
Sent: Monday, March 28, 2022 9:06 AM
To: amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
Cc: Russell, Kent <Kent.Russell at amd.com>
Subject: [PATCH 1/2] drm/amdgpu: Change unique_id to use IP_VERSION
This is transitioning throughout amdgpu, so we may as well get it
started now. This also cleans up the logic on what IP_VERSIONs do or
don't support unique_id.
Signed-off-by: Kent Russell <kent.russell at amd.com>
---
drivers/gpu/drm/amd/pm/amdgpu_pm.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
index 5cd67ddf8495..a5216c0f5c2b 100644
--- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
@@ -1987,11 +1987,15 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_
if (adev->flags & AMD_IS_APU)
*states = ATTR_STATE_UNSUPPORTED;
} else if (DEVICE_ATTR_IS(unique_id)) {
- if (asic_type != CHIP_VEGA10 &&
- asic_type != CHIP_VEGA20 &&
- asic_type != CHIP_ARCTURUS &&
- asic_type != CHIP_ALDEBARAN)
+ switch (adev->ip_versions[GC_HWIP][0]) {
+ case IP_VERSION(9, 0, 1):
+ case IP_VERSION(9, 4, 0):
+ case IP_VERSION(9, 4, 1):
+ case IP_VERSION(9, 4, 2):
+ *states = ATTR_STATE_SUPPORTED;
+ default:
*states = ATTR_STATE_UNSUPPORTED;
+ }
} else if (DEVICE_ATTR_IS(pp_features)) {
if (adev->flags & AMD_IS_APU || asic_type < CHIP_VEGA10)
*states = ATTR_STATE_UNSUPPORTED;
--
2.25.1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20220328/8ac03d44/attachment-0001.htm>
More information about the amd-gfx
mailing list