]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/amdgpu: revert to old status lock handling v4
authorChristian König <christian.koenig@amd.com>
Tue, 20 Jan 2026 12:09:52 +0000 (13:09 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 11 Mar 2026 17:58:08 +0000 (13:58 -0400)
commit7a9419ab42699fd3d4c857ef81ae097d8d8d5899
tree0f2a52b6a28054b71112b0345b1020c293c658f3
parentfae5984296b981c8cc3acca35b701c1f332a6cd8
drm/amdgpu: revert to old status lock handling v4

It turned out that protecting the status of each bo_va with a
spinlock was just hiding problems instead of solving them.

Revert the whole approach, add a separate stats_lock and lockdep
assertions that the correct reservation lock is held all over the place.

This not only allows for better checks if a state transition is properly
protected by a lock, but also switching back to using list macros to
iterate over the state of lists protected by the dma_resv lock of the
root PD.

v2: re-add missing check
v3: split into two patches
v4: re-apply by fixing holding the VM lock at the right places.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Sunil Khatri <sunil.khatri@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c