From: Alex Deucher Date: Wed, 14 Aug 2024 13:15:24 +0000 (-0400) Subject: drm/amdgpu/gfx11: return early in preempt_ib() X-Git-Tag: v6.12-rc1~126^2~6^2~40 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1e487c9173ca12ae372f71a5f5c0eb57ce0ab108;p=thirdparty%2Fkernel%2Flinux.git 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. Acked-by: Srinivasan Shanmugam Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c index ee86047224672..aa7fdece8ad42 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c @@ -5923,6 +5923,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;