Skip to contentSkip to conversation

drm/amdgpu/gfx11: return early in preempt_ib()

PATCH New Alex Deucher 1 participant 1 message Aug 14, 2024

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/1 drm/amdgpu/gfx11: return early in preempt_ib()

When MES is enabled KIQ is not available. Return an error when someone uses the debugfs preempt test interface in that case.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +3 -0
index 22bb35278691..cbeddb88c936 100644
@@ -5920,6 +5920,9 @@ static int gfx_v11_0_ring_preempt_ib(struct amdgpu_ring *ring)
 	struct amdgpu_ring *kiq_ring = &kiq->ring;
 	unsigned long flags;
 
+	if (adev->enable_mes)
+		return -EINVAL;
+
 	if (!kiq->pmf || !kiq->pmf->kiq_unmap_queues)
 		return -EINVAL;
 
Signature · 1 line
2.46.0