<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 2023-12-14 13:38, Eric Huang wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:20231214183839.129977-1-jinhuieric.huang@amd.com">
      <pre class="moz-quote-pre" wrap="">The field adev->mes.funcs is NULL in function amdgpu_mes_flush_shader_debugger
on non-mes asics, add mes enabling check for call this func to
resolve the error.

Signed-off-by: Eric Huang <a class="moz-txt-link-rfc2396E" href="mailto:jinhuieric.huang@amd.com"><jinhuieric.huang@amd.com></a>
---</pre>
    </blockquote>
    Reviewed-by: Philip Yang <a class="moz-txt-link-rfc2396E" href="mailto:philip.yang@amd.com"><philip.yang@amd.com></a><br>
    <blockquote type="cite" cite="mid:20231214183839.129977-1-jinhuieric.huang@amd.com">
      <pre class="moz-quote-pre" wrap="">
 drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
index 8e55e78fce4e..43eff221eae5 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
+++ b/drivers/gpu/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;
 }
 
</pre>
    </blockquote>
  </body>
</html>