]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amdgpu: revert to old status lock handling v3
authorChristian König <christian.koenig@amd.com>
Wed, 27 Aug 2025 09:45:45 +0000 (11:45 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 18 Sep 2025 20:59:14 +0000 (16:59 -0400)
commit59e4405e9ee2b318342d252422a82dd863b89ef4
tree674721daa682adb6c53df107cb326d120cc46a46
parent0aa09d8a6cab0f7d284e61eff28ac3be4d324c20
drm/amdgpu: revert to old status lock handling v3

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

Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Sunil Khatri <sunil.khatri@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@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