mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 04:34:03 +02:00
drm/amdgpu/mes: Fix hung_queue_db_array loop limit for multi-XCC
The loop iterated only AMDGPU_MAX_MES_PIPES times, leaving entries
uninitialized for multi-XCC GPUs. This causes null pointer dereferences
when accessing arrays indexed by XCC ID >= 2. Extend the loop to cover
all XCCs (AMDGPU_MAX_MES_PIPES * num_xcc), matching other per-XCC
arrays.
Fixes: a132fc9bc2 ("drm/amdgpu: Fixup boost mes detect hang array size")
Signed-off-by: Geoffrey McRae <geoffrey.mcrae@amd.com>
Reviewed-by: Amber Lin <amber.lin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
3d4e5f211e
commit
2c256086a3
|
|
@ -237,7 +237,7 @@ int amdgpu_mes_init(struct amdgpu_device *adev)
|
|||
}
|
||||
|
||||
if (adev->mes.hung_queue_db_array_size) {
|
||||
for (i = 0; i < AMDGPU_MAX_MES_PIPES; i++) {
|
||||
for (i = 0; i < AMDGPU_MAX_MES_PIPES * num_xcc; i++) {
|
||||
r = amdgpu_bo_create_kernel(adev,
|
||||
adev->mes.hung_queue_db_array_size * sizeof(u32),
|
||||
PAGE_SIZE,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user