diff options
author | Hawking Zhang <Hawking.Zhang@amd.com> | 2023-03-06 15:59:27 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2023-03-15 18:45:27 -0400 |
commit | dabc114e4bac903c365bfe6d7b6e8ed7fa38f8ad (patch) | |
tree | 2fd95073f858960b249054156951e770fc7a4db8 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
parent | 65ba96e91b689c23d6fa99c11cfd65965dcddc47 (diff) |
drm/amdgpu: Move to common helper to query soc rev_id
Replace soc15, nv, soc21 get_rev_id callback with common
helper so we don't need to duplicate code when introduce
new asics.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Likun Gao <Likun.Gao@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index d35d50287a44..6298e3c1de39 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -808,6 +808,18 @@ void amdgpu_device_indirect_wreg64(struct amdgpu_device *adev, } /** + * amdgpu_device_get_rev_id - query device rev_id + * + * @adev: amdgpu_device pointer + * + * Return device rev_id + */ +u32 amdgpu_device_get_rev_id(struct amdgpu_device *adev) +{ + return adev->nbio.funcs->get_rev_id(adev); +} + +/** * amdgpu_invalid_rreg - dummy reg read function * * @adev: amdgpu_device pointer |