[PATCH 1/2] drm/amdkfd: Fix getting unique_id in topology

Russell, Kent Kent.Russell at amd.com
Wed Oct 28 16:18:30 UTC 2020


[AMD Public Use]

Right, will do!

 Kent

> -----Original Message-----
> From: Kuehling, Felix <Felix.Kuehling at amd.com>
> Sent: Wednesday, October 28, 2020 12:16 PM
> To: Russell, Kent <Kent.Russell at amd.com>; amd-gfx at lists.freedesktop.org
> Subject: Re: [PATCH 1/2] drm/amdkfd: Fix getting unique_id in topology
> 
> Please also remove the broken code that initializes gpu->unique_id and
> remove the unique_id field from the structure.
> 
> Regards,
>   Felix
> 
> Am 2020-10-28 um 11:22 a.m. schrieb Kent Russell:
> > Since the unique_id is now obtained in amdgpu in smu_late_init,
> > topology's device addition is now happening before the unique_id is
> > saved, thus topology misses it. To work around this, we use the
> > amdgpu_amdkfd_get_unique_id to get the unique_id at read time.
> >
> > Signed-off-by: Kent Russell <kent.russell 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 3f2aa055c32c..a3fc23873819 100644
> > --- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
> > +++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
> > @@ -1340,7 +1340,7 @@ int kfd_topology_add_device(struct kfd_dev *gpu)
> >  		dev->gpu->dqm->sched_policy != KFD_SCHED_POLICY_NO_HWS) ?
> >  		amdgpu_amdkfd_get_num_gws(dev->gpu->kgd) : 0;
> >  	dev->node_props.num_cp_queues = get_cp_queues_num(dev->gpu->dqm);
> > -	dev->node_props.unique_id = gpu->unique_id;
> > +	dev->node_props.unique_id = amdgpu_amdkfd_get_unique_id(dev->gpu->kgd);
> >
> >  	kfd_fill_mem_clk_max_info(dev);
> >  	kfd_fill_iolink_non_crat_info(dev);


More information about the amd-gfx mailing list