OSDN Git Service

drm/amdgpu: Drop eviction lock when allocating PT BO
authorPhilip Yang <Philip.Yang@amd.com>
Wed, 2 Nov 2022 20:55:31 +0000 (16:55 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 9 Nov 2022 22:41:41 +0000 (17:41 -0500)
commit0bc71adc8b1b65a369d4b8ef098e74ed4aab62d9
tree48141bb2c79c9104a05ce5493bf23e04c4b20842
parentc70e2166967dc4ecb5e3a9b162741a9726755d9b
drm/amdgpu: Drop eviction lock when allocating PT BO

Re-take the eviction lock immediately again after the allocation is
completed, to fix circular locking warning with drm_buddy allocator.

Move amdgpu_vm_eviction_lock/unlock/trylock to amdgpu_vm.h as they are
called from multiple files.

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
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