On Friday, August 28, 2026 4:11:47 PM Central European Summer Time Lazar, Lijo 
wrote:
> On 28-Aug-26 5:37 PM, Timur Kristóf wrote:
> > Avoid calling amdgpu_amdkfd_suspend() and amdgpu_amdkfd_resume()
> > when the KFD device is not initialized.
> > 
> > This allows the function to be used on GPUs where KFD is
> > not supported or the support is hidden behind an experimental
> > flag, such as CIK, in the future.
> > 
> > Signed-off-by: Timur Kristóf <[email protected]>
> > ---
> > 
> >   drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 9 +++++++--
> >   1 file changed, 7 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c index
> > 9eebd8380834..8798caed1ff1 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
> > @@ -664,9 +664,14 @@ int amdgpu_sdma_reset_queue_legacy(struct amdgpu_ring
> > *ring,> 
> >     amdgpu_ring_reset_helper_begin(ring, timedout_fence);
> > 
> > -   amdgpu_amdkfd_suspend(adev, true);
> > +   if (adev->kfd.dev)
> > +           amdgpu_amdkfd_suspend(adev, true);
> 
> The right place would have been suspend/resume functions and that check
> is already there.
> 
> Thanks,
> Lijo

I see. In that case we can just drop this patch.

> 
> > +
> > 
> >     r = amdgpu_sdma_reset_engine(adev, ring->me, true);
> > 
> > -   amdgpu_amdkfd_resume(adev, true);
> > +
> > +   if (adev->kfd.dev)
> > +           amdgpu_amdkfd_resume(adev, true);
> > +
> > 
> >     if (r)
> >     
> >             return r;




Reply via email to