diff options
author | Likun Gao <Likun.Gao@amd.com> | 2021-12-10 15:05:57 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2022-04-28 17:46:28 -0400 |
commit | 1d5eee7dd6648865e041e09338cf85a154d2db80 (patch) | |
tree | cfe1761607711211c4f8fea98bb796509f611dff /drivers/gpu/drm/amd/amdgpu/amdgpu.h | |
parent | 3202c7e7826bb29dc253e29b595df36182feb42f (diff) | |
download | linux-1d5eee7dd6648865e041e09338cf85a154d2db80.tar.gz |
drm/amdgpu: add function to decode ip version
Add function to decode IP version.
Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 |
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; |