]> git.baikalelectronics.ru Git - kernel.git/commit
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 23:06:04 +0000 (18:06 -0500)
commit39ed0bebed868bc49a2a98e74c2a9f2802ccbf11
tree2efee71104df4c61240ca8ac26e40ef6f17d0ae0
parentc601b2ed46f3a1725d7e8221e59269e4a7b446cc
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