Fetch the full version of IP including variant and subrevision.

Signed-off-by: Lijo Lazar <lijo.la...@amd.com>
Reviewed-by: Hawking Zhang <hawking.zh...@amd.com>
Reviewed-by: Le Ma <le...@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h 
b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 65440537def3..5d4995627939 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -1122,6 +1122,13 @@ static inline uint32_t amdgpu_ip_version(const struct 
amdgpu_device *adev,
        return adev->ip_versions[ip][inst] & ~0xFFU;
 }
 
+static inline uint32_t amdgpu_ip_version_full(const struct amdgpu_device *adev,
+                                             uint8_t ip, uint8_t inst)
+{
+       /* This returns full version - major/minor/rev/variant/subrevision */
+       return adev->ip_versions[ip][inst];
+}
+
 #ifdef CONFIG_DEV_COREDUMP
 struct amdgpu_coredump_info {
        struct amdgpu_device            *adev;
-- 
2.25.1

Reply via email to