]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
drm/amdgpu/gfx11: return early in preempt_ib()
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 14 Aug 2024 13:15:24 +0000 (09:15 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 29 Aug 2024 17:39:48 +0000 (13:39 -0400)
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>
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c

index ee8604722467244048d12492151f4d1418f7893a..aa7fdece8ad42975c9c9909bb6771ab1152b10c1 100644 (file)
@@ -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;