aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu.h
diff options
context:
space:
mode:
authorLikun Gao <[email protected]>2021-12-10 07:05:57 +0000
committerAlex Deucher <[email protected]>2022-04-28 21:46:28 +0000
commit1d5eee7dd6648865e041e09338cf85a154d2db80 (patch)
treecfe1761607711211c4f8fea98bb796509f611dff /drivers/gpu/drm/amd/amdgpu/amdgpu.h
parentdrm/amdgpu: increase HWIP MAX INSTANCE (diff)
downloadkernel-1d5eee7dd6648865e041e09338cf85a154d2db80.tar.gz
kernel-1d5eee7dd6648865e041e09338cf85a154d2db80.zip
drm/amdgpu: add function to decode ip version
Add function to decode IP version. Signed-off-by: Likun Gao <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index f26c3320ae97..d557f4db2565 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -670,6 +670,9 @@ enum amd_hw_ip_block_type {
#define HW_ID_MAX 300
#define IP_VERSION(mj, mn, rv) (((mj) << 16) | ((mn) << 8) | (rv))
+#define IP_VERSION_MAJ(ver) ((ver) >> 16)
+#define IP_VERSION_MIN(ver) (((ver) >> 8) & 0xFF)
+#define IP_VERSION_REV(ver) ((ver) & 0xFF)
struct amd_powerplay {
void *pp_handle;