summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2024-08-15 12:58:14 -0400
committerAlex Deucher <alexander.deucher@amd.com>2024-08-29 13:39:57 -0400
commit1125f95cd2455b51ad1c16d7f96ae39117083d20 (patch)
treed9b640315a113a89c215238d9d81569727dc63fe /drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
parent1e487c9173ca12ae372f71a5f5c0eb57ce0ab108 (diff)
downloadlinux-1125f95cd2455b51ad1c16d7f96ae39117083d20.tar.gz
linux-1125f95cd2455b51ad1c16d7f96ae39117083d20.tar.bz2
linux-1125f95cd2455b51ad1c16d7f96ae39117083d20.zip
drm/amdgpu/gfx12: 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. Acked-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
index 54059cbcfc08..6f700800f346 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
@@ -4501,6 +4501,9 @@ static int gfx_v12_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;