[PATCH 2/4] drm/amdgpu/gfx12: properly reference EOP interrupts for userqs
Alex Deucher
alexander.deucher at amd.com
Sun Apr 13 16:06:06 UTC 2025
Regardless of whether we disable kernel queues, we need
to take an extra reference to the pipe interrupts for
user queues to make sure they stay enabled in case we
disable them for kernel queues.
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
index acfbf48482ef0..ff56368df66ea 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
@@ -3684,10 +3684,10 @@ static int gfx_v12_0_hw_init(struct amdgpu_ip_block *ip_block)
static int gfx_v12_0_set_userq_eop_interrupts(struct amdgpu_device *adev,
bool enable)
{
- if (adev->gfx.disable_kq) {
- unsigned int irq_type;
- int m, p, r;
+ unsigned int irq_type;
+ int m, p, r;
+ if (adev->userq_funcs[AMDGPU_HW_IP_GFX]) {
for (m = 0; m < adev->gfx.me.num_me; m++) {
for (p = 0; p < adev->gfx.me.num_pipe_per_me; p++) {
irq_type = AMDGPU_CP_IRQ_GFX_ME0_PIPE0_EOP + p;
@@ -3701,7 +3701,9 @@ static int gfx_v12_0_set_userq_eop_interrupts(struct amdgpu_device *adev,
return r;
}
}
+ }
+ if (adev->userq_funcs[AMDGPU_HW_IP_COMPUTE]) {
for (m = 0; m < adev->gfx.mec.num_mec; ++m) {
for (p = 0; p < adev->gfx.mec.num_pipe_per_mec; p++) {
irq_type = AMDGPU_CP_IRQ_COMPUTE_MEC1_PIPE0_EOP
@@ -3718,6 +3720,7 @@ static int gfx_v12_0_set_userq_eop_interrupts(struct amdgpu_device *adev,
}
}
}
+
return 0;
}
--
2.49.0
More information about the amd-gfx
mailing list