RE: [PATCH 1/2] drm/amdgpu: Change unique_id to use IP_VERSION

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[Public]


Thanks Alex. Sending out a 3rd version shortly with a couple style fixes due to rebasing onto Lijo’s work.

 

Kent

 

From: Deucher, Alexander <Alexander.Deucher@xxxxxxx>
Sent: Monday, March 28, 2022 9:45 AM
To: Russell, Kent <Kent.Russell@xxxxxxx>; amd-gfx@xxxxxxxxxxxxxxxxxxxxx
Subject: Re: [PATCH 1/2] drm/amdgpu: Change unique_id to use IP_VERSION

 

[Public]

 

Series is:

Reviewed-by: Alex Deucher <alexander.deucher@xxxxxxx>


From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> on behalf of Kent Russell <kent.russell@xxxxxxx>
Sent: Monday, March 28, 2022 9:06 AM
To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx <amd-gfx@xxxxxxxxxxxxxxxxxxxxx>
Cc: Russell, Kent <Kent.Russell@xxxxxxx>
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@xxxxxxx>
---
 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


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux