[Public]
Regards,
Prike
> -----Original Message-----
> From: Koenig, Christian <[email protected]>
> Sent: Monday, January 19, 2026 6:33 PM
> To: Liang, Prike <[email protected]>; Timur Kristóf
> <[email protected]>;
> [email protected]; Deucher, Alexander
> <[email protected]>; Limonciello, Mario
> <[email protected]>; Dan Carpenter <[email protected]>
> Subject: Re: [PATCH] drm/amdgpu: Fix validating flush_gpu_tlb_pasid()
>
> On 1/19/26 06:27, Liang, Prike wrote:
> > [Public]
> >
> > In order to avoid being blocked by the lock issue on some older GFX, I will
> > push
> the patch to amd-staging-drm-next.
> > If you have any concerns, please let me know.
>
> I only had a coding style comment on the patch and also gave my rb with that
> as
> well.
>
> So if you haven't pushed it yet please fix what I've pointed out. Otherwise
> it is not
> much of an issue.
>
> Regards,
> Christian.
The patch is still running in the CI pipeline. I’ll revise it to improve the
patch style.
> >
> > Regards,
> > Prike
> >
> >> -----Original Message-----
> >> From: amd-gfx <[email protected]> On Behalf Of
> >> Liang, Prike
> >> Sent: Monday, January 19, 2026 9:58 AM
> >> To: Timur Kristóf <[email protected]>;
> >> [email protected]; Deucher, Alexander
> >> <[email protected]>; Koenig, Christian
> >> <[email protected]>; Limonciello, Mario
> >> <[email protected]>; Dan Carpenter <[email protected]>
> >> Subject: RE: [PATCH] drm/amdgpu: Fix validating flush_gpu_tlb_pasid()
> >>
> >> [Public]
> >>
> >> Thank you for the fix. Could you please add the following the tags?
> >>
> >> | Reported-by: kernel test robot <[email protected]>
> >> | Reported-by: Dan Carpenter <[email protected]>
> >> | Closes:
> >> | https://lore.kernel.org/r/[email protected]/
> >>
> >> Reviewed-by: Prike Liang <[email protected]>
> >>
> >> Regards,
> >> Prike
> >>
> >>> -----Original Message-----
> >>> From: Timur Kristóf <[email protected]>
> >>> Sent: Sunday, January 18, 2026 8:58 PM
> >>> To: [email protected]; Deucher, Alexander
> >>> <[email protected]>; Koenig, Christian
> >>> <[email protected]>; Liang, Prike <[email protected]>;
> >>> Limonciello, Mario <[email protected]>
> >>> Cc: Timur Kristóf <[email protected]>
> >>> Subject: [PATCH] drm/amdgpu: Fix validating flush_gpu_tlb_pasid()
> >>>
> >>> When a function holds a lock and we return without unlocking it, it
> >>> deadlocks the kernel. We should always unlock before returning.
> >>>
> >>> This commit fixes suspend/resume on SI.
> >>> Tested on two Tahiti GPUs: FirePro W9000 and R9 280X.
> >>>
> >>> Fixes: bc2dea30038a ("drm/amdgpu: validate the
> >>> flush_gpu_tlb_pasid()")
> >>> Signed-off-by: Timur Kristóf <[email protected]>
> >>> ---
> >>> drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 5 ++---
> >>> 1 file changed, 2 insertions(+), 3 deletions(-)
> >>>
> >>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> >>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> >>> index 0e67fa4338ff..4fa24be1bf45 100644
> >>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> >>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> >>> @@ -769,7 +769,7 @@ int amdgpu_gmc_flush_gpu_tlb_pasid(struct
> >>> amdgpu_device *adev, uint16_t pasid,
> >>> struct amdgpu_ring *ring = &adev->gfx.kiq[inst].ring;
> >>> struct amdgpu_kiq *kiq = &adev->gfx.kiq[inst];
> >>> unsigned int ndw;
> >>> - int r, cnt = 0;
> >>> + int r = 0, cnt = 0;
> >>> uint32_t seq;
> >>>
> >>> /*
> >>> @@ -782,7 +782,7 @@ int amdgpu_gmc_flush_gpu_tlb_pasid(struct
> >>> amdgpu_device *adev, uint16_t pasid,
> >>> if (!adev->gmc.flush_pasid_uses_kiq || !ring->sched.ready) {
> >>>
> >>> if (!adev->gmc.gmc_funcs->flush_gpu_tlb_pasid)
> >>> - return 0;
> >>> + goto error_unlock_reset;
> >>>
> >>> if (adev->gmc.flush_tlb_needs_extra_type_2)
> >>> adev->gmc.gmc_funcs->flush_gpu_tlb_pasid(adev,
> >>> pasid, @@ -797,7 +797,6 @@ int amdgpu_gmc_flush_gpu_tlb_pasid(struct
> >>> amdgpu_device *adev, uint16_t pasid,
> >>> adev->gmc.gmc_funcs->flush_gpu_tlb_pasid(adev, pasid,
> >>> flush_type,
> >>> all_hub,
> >>> inst);
> >>> - r = 0;
> >>> } else {
> >>> /* 2 dwords flush + 8 dwords fence */
> >>> ndw = kiq->pmf->invalidate_tlbs_size + 8;
> >>> --
> >>> 2.52.0
> >