RE: [PATCH 5/6] drm/amdkfd: always keep trap enabled for GC v9.4.3

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

 



[Public]

If we implement this in the GC 9.4.3 KGD disable call in patch 1 (see comments for that one), then it will look less awkward and we can drop this.

Thanks,

Jon

> -----Original Message-----
> From: Huang, JinHuiEric <JinHuiEric.Huang@xxxxxxx>
> Sent: Thursday, July 6, 2023 2:19 PM
> To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> Cc: Kim, Jonathan <Jonathan.Kim@xxxxxxx>; Huang, JinHuiEric
> <JinHuiEric.Huang@xxxxxxx>
> Subject: [PATCH 5/6] drm/amdkfd: always keep trap enabled for GC v9.4.3
>
> To set TTMP setup on by default.
>
> Signed-off-by: Eric Huang <jinhuieric.huang@xxxxxxx>
> ---
>  drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 +-
>  drivers/gpu/drm/amd/amdkfd/kfd_debug.c   | 3 ++-
>  drivers/gpu/drm/amd/amdkfd/kfd_process.c | 6 +++---
>  3 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
> b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
> index cf1db0ab3471..47c5d16677d6 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
> @@ -2842,7 +2842,7 @@ static int runtime_disable(struct kfd_process *p)
>                       pdd->spi_dbg_override =
>                                       pdd->dev->kfd2kgd-
> >disable_debug_trap(
>                                       pdd->dev->adev,
> -                                     false,
> +                                     KFD_GC_VERSION(pdd->dev) ==
> IP_VERSION(9, 4, 3),
>                                       pdd->dev->vm_info.last_vmid_kfd);
>
>                       if (!pdd->dev->kfd->shared_resources.enable_mes)
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_debug.c
> b/drivers/gpu/drm/amd/amdkfd/kfd_debug.c
> index 190b03efe5ff..4cb9b3b18065 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_debug.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_debug.c
> @@ -591,7 +591,8 @@ void kfd_dbg_trap_deactivate(struct kfd_process
> *target, bool unwind, int unwind
>               pdd->spi_dbg_override =
>                               pdd->dev->kfd2kgd->disable_debug_trap(
>                               pdd->dev->adev,
> -                             target->runtime_info.ttmp_setup,
> +                             KFD_GC_VERSION(pdd->dev) ==
> IP_VERSION(9, 4, 3) ?
> +                                     true : target-
> >runtime_info.ttmp_setup,
>                               pdd->dev->vm_info.last_vmid_kfd);
>               amdgpu_gfx_off_ctrl(pdd->dev->adev, true);
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
> b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
> index ba04a4baecf2..91ae9121e2bf 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
> @@ -1644,9 +1644,9 @@ struct kfd_process_device
> *kfd_create_process_device_data(struct kfd_node *dev,
>       p->pdds[p->n_pdds++] = pdd;
>       if (kfd_dbg_is_per_vmid_supported(pdd->dev))
>               pdd->spi_dbg_override = pdd->dev->kfd2kgd-
> >disable_debug_trap(
> -                                                     pdd->dev->adev,
> -                                                     false,
> -                                                     0);
> +                             pdd->dev->adev,
> +                             KFD_GC_VERSION(dev) == IP_VERSION(9, 4,
> 3),
> +                             0);
>
>       /* Init idr used for memory handle translation */
>       idr_init(&pdd->alloc_idr);
> --
> 2.34.1





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

  Powered by Linux