AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu/gfx11: return early in preempt_ib()
@ 2024-08-14 13:20 Alex Deucher
  0 siblings, 0 replies; only message in thread
From: Alex Deucher @ 2024-08-14 13:20 UTC (permalink / raw)
  To: amd-gfx; +Cc: Alex Deucher

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

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
index 22bb35278691..cbeddb88c936 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
@@ -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;
 
-- 
2.46.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-08-14 13:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-14 13:20 [PATCH] drm/amdgpu/gfx11: return early in preempt_ib() Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox