[PATCH] drm/amdkfd: only flush mes process context if mes support is there

Eric Huang jinhuieric.huang at amd.com
Thu Dec 14 19:02:59 UTC 2023


On 2023-12-13 22:19, Jonathan Kim wrote:
> Fix up on mes process context flush to prevent non-mes devices from
> spamming error messages or running into undefined behaviour during
> process termination.
>
> Fixes: 73204d028eb5 ("drm/amdkfd: fix mes set shader debugger process management")
> Signed-off-by: Jonathan Kim <jonathan.kim at amd.com>
Reviewed-by: Eric Huang <jinhuieric.huang at amd.com>
> ---
>   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;
>   }
>   



More information about the amd-gfx mailing list