Skip to contentSkip to conversation

drm/amd/amdgpu: Increase HWIP_MAX_INSTANCE to 10

PATCH New Ernst Sjöstrand 1 participant 1 message Sep 2, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/amdgpu: Increase HWIP_MAX_INSTANCE to 10

Seems like newer cards can have even more instances now. Found by UBSAN: array-index-out-of-bounds in drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c:318:29 index 8 is out of range for type 'uint32_t *[8]'

---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 -1
index dc3c6b3a00e5..d356e329e6f8 100644
@@ -758,7 +758,7 @@ enum amd_hw_ip_block_type {
 	MAX_HWIP
 };
 
-#define HWIP_MAX_INSTANCE	8
+#define HWIP_MAX_INSTANCE	10
 
 struct amd_powerplay {
 	void *pp_handle;
Signature · 1 line
2.30.2