summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
diff options
context:
space:
mode:
authorLijo Lazar <lijo.lazar@amd.com>2023-05-29 19:18:54 +0530
committerAlex Deucher <alexander.deucher@amd.com>2023-06-09 12:31:35 -0400
commitb695c97b580a1949d0dd96aa17b01d4de738eda3 (patch)
treeca165aedd89ba7a332eaf47670f32a0ea986f64c /drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
parent07a1475279244cd8eea81bec44fd5f0a9d6871f8 (diff)
drm/amdkfd: Fix MEC pipe interrupt enablement
for_each_inst modifies xcc_mask and therefore the loop doesn't initialize properly interrupts on all pipes. Keep looping through xcc as the outer loop to fix this issue. Fixes: c4050ff1a43e ("drm/amdkfd: Use xcc mask for identifying xcc") Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c')
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
index 493b4b66f180..80cddb46657f 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
@@ -1274,11 +1274,12 @@ static void init_interrupts(struct device_queue_manager *dqm)
uint32_t xcc_mask = dqm->dev->xcc_mask;
unsigned int i, xcc_id;
- for (i = 0 ; i < get_pipes_per_mec(dqm) ; i++) {
- if (is_pipe_enabled(dqm, 0, i)) {
- for_each_inst(xcc_id, xcc_mask)
+ for_each_inst(xcc_id, xcc_mask) {
+ for (i = 0 ; i < get_pipes_per_mec(dqm) ; i++) {
+ if (is_pipe_enabled(dqm, 0, i)) {
dqm->dev->kfd2kgd->init_interrupts(
dqm->dev->adev, i, xcc_id);
+ }
}
}
}