drm/amdgpu: Use MAX_HWIP instead of HW_ID_MAX
authorLijo Lazar <lijo.lazar@amd.com>
Fri, 26 Nov 2021 06:32:37 +0000 (14:32 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Dec 2021 21:04:10 +0000 (16:04 -0500)
HW_ID_MAX considers HWID of all IPs, far more than what amdgpu uses.
amdgpu tracks only the IPs defined by amd_hw_ip_block_type whose max
is MAX_HWIP.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Guchun Chen <guchun.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h

index b85b67a88a3d3f0089ba5f9b8026aa53fcc67461..c5cfe2926ca182b9c1157a9e4c026b183b7d9740 100644 (file)
@@ -1096,7 +1096,7 @@ struct amdgpu_device {
        pci_channel_state_t             pci_channel_state;
 
        struct amdgpu_reset_control     *reset_cntl;
-       uint32_t                        ip_versions[HW_ID_MAX][HWIP_MAX_INSTANCE];
+       uint32_t                        ip_versions[MAX_HWIP][HWIP_MAX_INSTANCE];
 };
 
 static inline struct amdgpu_device *drm_to_adev(struct drm_device *ddev)