From df159b7f3d56a1d4b673f707914dab871c216a1c Mon Sep 17 00:00:00 2001 From: jsg Date: Tue, 6 Feb 2024 04:05:39 +0000 Subject: [PATCH] drm/amdkfd: only flush mes process context if mes support is there 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/amd/amdkfd/kfd_process_queue_manager.c b/sys/dev/pci/drm/amd/amdkfd/kfd_process_queue_manager.c index 8e55e78fce4..43eff221eae 100644 --- a/sys/dev/pci/drm/amd/amdkfd/kfd_process_queue_manager.c +++ b/sys/dev/pci/drm/amd/amdkfd/kfd_process_queue_manager.c @@ -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; } -- 2.20.1