summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu.h
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2021-07-20 16:01:41 -0400
committerAlex Deucher <alexander.deucher@amd.com>2021-10-04 15:22:58 -0400
commit5f52e9a78061cbced92ed5c64d70f342f5c9b68c (patch)
treec144c1a1934bcddfa4b61808454e875c42121d7d /drivers/gpu/drm/amd/amdgpu/amdgpu.h
parent81d1bf01e4820962d6ea218ff5b9719e81e5812d (diff)
drm/amdgpu: store HW IP versions in the driver structure
So we can check the IP versions directly rather than using asic type. Reviewed-by: Christian König <christian.koenig@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.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index cdb963b9bea0..61ef0d81a957 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -760,6 +760,9 @@ enum amd_hw_ip_block_type {
#define HWIP_MAX_INSTANCE 10
+#define HW_ID_MAX 300
+#define IP_VERSION(mj, mn, rv) (((mj) << 16) | ((mn) << 8) | (rv))
+
struct amd_powerplay {
void *pp_handle;
const struct amd_pm_funcs *pp_funcs;
@@ -1090,6 +1093,7 @@ struct amdgpu_device {
struct pci_saved_state *pci_state;
struct amdgpu_reset_control *reset_cntl;
+ uint32_t ip_versions[HW_ID_MAX];
};
static inline struct amdgpu_device *drm_to_adev(struct drm_device *ddev)