[PATCH] drm/amdkfd: Fix MEC pipe interrupt enablement
Zhang, Hawking
Hawking.Zhang at amd.com
Tue May 30 01:53:05 UTC 2023
[AMD Official Use Only - General]
Reviewed-by: Hawking Zhang <Hawking.Zhang at amd.com>
Regards,
Hawking
-----Original Message-----
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Lijo Lazar
Sent: Monday, May 29, 2023 21:58
To: amd-gfx at lists.freedesktop.org
Cc: Deucher, Alexander <Alexander.Deucher at amd.com>; Joshi, Mukul <Mukul.Joshi at amd.com>; Zhang, Hawking <Hawking.Zhang at amd.com>
Subject: [PATCH] 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: 7b04c90a48b1 ("drm/amdkfd: Use xcc mask for identifying xcc")
Signed-off-by: Lijo Lazar <lijo.lazar at amd.com>
---
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 7 ++++---
1 file 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);
+ }
}
}
}
--
2.25.1
More information about the amd-gfx
mailing list