RE: [PATCH] drm/amdkfd: fix NULL ptr for debugger mes flush on non-mes asics

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[AMD Official Use Only - General]

Jon Kim sent out the same patch ("drm/amdkfd: only flush mes process context if mes support is there") yesterday.

> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of Eric
> Huang
> Sent: Thursday, December 14, 2023 1:39 PM
> To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> Cc: Huang, JinHuiEric <JinHuiEric.Huang@xxxxxxx>
> Subject: [PATCH] drm/amdkfd: fix NULL ptr for debugger mes flush on non-
> mes asics
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> 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 <jinhuieric.huang@xxxxxxx>
> ---
>  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;
>  }
>
> --
> 2.34.1





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux