[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 <[email protected]> Sent: Monday, March 28, 2022 9:45 AM To: Russell, Kent <[email protected]>; [email protected] Subject: Re: [PATCH 1/2] drm/amdgpu: Change unique_id to use IP_VERSION [Public] Series is: Reviewed-by: Alex Deucher <[email protected]<mailto:[email protected]>> ________________________________ From: amd-gfx <[email protected]<mailto:[email protected]>> on behalf of Kent Russell <[email protected]<mailto:[email protected]>> Sent: Monday, March 28, 2022 9:06 AM To: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>> Cc: Russell, Kent <[email protected]<mailto:[email protected]>> 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 <[email protected]<mailto:[email protected]>> --- 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
