]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
drm/amdgpu/gfx12: return early in preempt_ib()
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 15 Aug 2024 16:58:14 +0000 (12:58 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 29 Aug 2024 17:39:57 +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_v12_0.c

index 54059cbcfc08982c1c3e57ec86f96f5c77556527..6f700800f346bb121cb07191686834bc4c733634 100644 (file)
@@ -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;