RE: [PATCH] drm/amdgpu/gfx11: need acquire mutex before access CP_VMID_RESET

2023-12-21 Thread Xiao, Jack
: Wednesday, December 20, 2023 10:06 PM To: Xiao, Jack ; Alex Deucher Cc: Deucher, Alexander ; amd-gfx@lists.freedesktop.org; Zhang, Hawking Subject: Re: [PATCH] drm/amdgpu/gfx11: need acquire mutex before access CP_VMID_RESET Well not the reset lock, but there should only be a single reset queue

Re: [PATCH] drm/amdgpu/gfx11: need acquire mutex before access CP_VMID_RESET

2023-12-20 Thread Christian König
allel. Regards, Jack -Original Message- From: Alex Deucher Sent: Wednesday, December 20, 2023 1:04 AM To: Xiao, Jack Cc: amd-gfx@lists.freedesktop.org; Deucher, Alexander ; Zhang, Hawking Subject: Re: [PATCH] drm/amdgpu/gfx11: need acquire mutex before access CP_VMID_RESET On Tue, Dec 19,

RE: [PATCH] drm/amdgpu/gfx11: need acquire mutex before access CP_VMID_RESET

2023-12-20 Thread Xiao, Jack
p.org; Deucher, Alexander ; Zhang, Hawking Subject: Re: [PATCH] drm/amdgpu/gfx11: need acquire mutex before access CP_VMID_RESET On Tue, Dec 19, 2023 at 4:30 AM Jack Xiao wrote: > > It's required to take the gfx mutex before access to CP_VMID_RESET, > for there is a race condition

Re: [PATCH] drm/amdgpu/gfx11: need acquire mutex before access CP_VMID_RESET

2023-12-19 Thread Alex Deucher
On Tue, Dec 19, 2023 at 4:30 AM Jack Xiao wrote: > > It's required to take the gfx mutex before access to CP_VMID_RESET, > for there is a race condition with CP firmware to write the register. > > Signed-off-by: Jack Xiao > --- > drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 20 >

RE: [PATCH] drm/amdgpu/gfx11: need acquire mutex before access CP_VMID_RESET

2023-12-19 Thread Zhang, Hawking
[AMD Official Use Only - General] + /* release the gfx mutex */ + tmp = REG_SET_FIELD(tmp, CP_GFX_INDEX_MUTEX, REQUEST, 0); + WREG32_SOC15(GC, 0, regCP_GFX_INDEX_MUTEX, tmp); Shall we add a check by reading back CP_GFX_INDEX_MUTEX to ensure the release is done correctly? Regar