drm/amdkfd: only flush mes process context if mes support is there
authorjsg <jsg@openbsd.org>
Tue, 6 Feb 2024 04:05:39 +0000 (04:05 +0000)
committerjsg <jsg@openbsd.org>
Tue, 6 Feb 2024 04:05:39 +0000 (04:05 +0000)
From Jonathan Kim
3c0a7eac9e7883317e2010bc525a3f1c4847587c in linux-6.6.y/6.6.16
24149412dfc71f7f4a54868702e9145e396263d3 in mainline linux

sys/dev/pci/drm/amd/amdkfd/kfd_process_queue_manager.c

index 8e55e78..43eff22 100644 (file)
@@ -87,7 +87,8 @@ void kfd_process_dequeue_from_device(struct kfd_process_device *pdd)
                return;
 
        dev->dqm->ops.process_termination(dev->dqm, &pdd->qpd);
-       amdgpu_mes_flush_shader_debugger(dev->adev, pdd->proc_ctx_gpu_addr);
+       if (dev->kfd->shared_resources.enable_mes)
+               amdgpu_mes_flush_shader_debugger(dev->adev, pdd->proc_ctx_gpu_addr);
        pdd->already_dequeued = true;
 }