: 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
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,
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
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
>
[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