<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Arial;font-size:10pt;color:#008000;margin:15pt;" align="Left">
[Public]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Series is:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Kent Russell <kent.russell@amd.com><br>
<b>Sent:</b> Monday, March 28, 2022 9:06 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Russell, Kent <Kent.Russell@amd.com><br>
<b>Subject:</b> [PATCH 1/2] drm/amdgpu: Change unique_id to use IP_VERSION</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">This is transitioning throughout amdgpu, so we may as well get it<br>
started now. This also cleans up the logic on what IP_VERSIONs do or<br>
don't support unique_id.<br>
<br>
Signed-off-by: Kent Russell <kent.russell@amd.com><br>
---<br>
 drivers/gpu/drm/amd/pm/amdgpu_pm.c | 12 ++++++++----<br>
 1 file changed, 8 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c<br>
index 5cd67ddf8495..a5216c0f5c2b 100644<br>
--- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c<br>
+++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c<br>
@@ -1987,11 +1987,15 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_<br>
                 if (adev->flags & AMD_IS_APU)<br>
                         *states = ATTR_STATE_UNSUPPORTED;<br>
         } else if (DEVICE_ATTR_IS(unique_id)) {<br>
-               if (asic_type != CHIP_VEGA10 &&<br>
-                   asic_type != CHIP_VEGA20 &&<br>
-                   asic_type != CHIP_ARCTURUS &&<br>
-                   asic_type != CHIP_ALDEBARAN)<br>
+               switch (adev->ip_versions[GC_HWIP][0]) {<br>
+               case IP_VERSION(9, 0, 1):<br>
+               case IP_VERSION(9, 4, 0):<br>
+               case IP_VERSION(9, 4, 1):<br>
+               case IP_VERSION(9, 4, 2):<br>
+                       *states = ATTR_STATE_SUPPORTED;<br>
+               default:<br>
                         *states = ATTR_STATE_UNSUPPORTED;<br>
+               }<br>
         } else if (DEVICE_ATTR_IS(pp_features)) {<br>
                 if (adev->flags & AMD_IS_APU || asic_type < CHIP_VEGA10)<br>
                         *states = ATTR_STATE_UNSUPPORTED;<br>
-- <br>
2.25.1<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>