drm/amdgpu/gfx11: need acquire mutex before access CP_VMID_RESET v2
authorJack Xiao <Jack.Xiao@amd.com>
Tue, 19 Dec 2023 09:10:34 +0000 (17:10 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 3 Jan 2024 15:46:52 +0000 (10:46 -0500)
commit4b5c5f5ad38b9435518730cc7f8f1e8de9c5cb2f
tree0c2a4e075f043bf70e47425f4ee448afc91b6214
parent60d5d1e76270bac910f9596799cbd831fe09c489
drm/amdgpu/gfx11: need acquire mutex before access CP_VMID_RESET v2

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.

v2: add extra code to ensure the mutex releasing is successful.

Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c