[PATCH] drm/amdkfd: Add node_id to location_id generically

Kim, Jonathan Jonathan.Kim at amd.com
Thu Aug 8 14:34:58 UTC 2024


[Public]

> -----Original Message-----
> From: Lazar, Lijo <Lijo.Lazar at amd.com>
> Sent: Wednesday, August 7, 2024 12:17 PM
> To: amd-gfx at lists.freedesktop.org; brahma_sw_dev
> <brahma_sw_dev at amd.com>
> Cc: Zhang, Hawking <Hawking.Zhang at amd.com>; Deucher, Alexander
> <Alexander.Deucher at amd.com>; Kim, Jonathan <Jonathan.Kim at amd.com>;
> Kasiviswanathan, Harish <Harish.Kasiviswanathan at amd.com>
> Subject: [PATCH] drm/amdkfd: Add node_id to location_id generically
>
> If there are multiple nodes per kfd device, add nodeid to location_id to
> differentiate.
>
> Signed-off-by: Lijo Lazar <lijo.lazar at amd.com>

Reviewed-by: Jonathan Kim <jonathan.kim at amd.com>

> ---
>  drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
> b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
> index 40771f8752cb..e6caab75e863 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
> @@ -2079,7 +2079,7 @@ int kfd_topology_add_device(struct kfd_node
> *gpu)
>                       HSA_CAP_ASIC_REVISION_MASK);
>
>       dev->node_props.location_id = pci_dev_id(gpu->adev->pdev);
> -     if (KFD_GC_VERSION(dev->gpu->kfd) == IP_VERSION(9, 4, 3))
> +     if (gpu->kfd->num_nodes > 1)
>               dev->node_props.location_id |= dev->gpu->node_id;
>
>       dev->node_props.domain = pci_domain_nr(gpu->adev->pdev->bus);
> --
> 2.25.1



More information about the amd-gfx mailing list