mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-27 11:58:32 -04:00
drm/amdgpu: move VM eviction decision into amdgpu_vm.c
When a page tables needs to be evicted the VM code should decide if that is possible or not. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
4b4c5638c0
commit
6ceeb144b1
@@ -1489,11 +1489,8 @@ static bool amdgpu_ttm_bo_eviction_valuable(struct ttm_buffer_object *bo,
|
||||
struct dma_fence *f;
|
||||
int i;
|
||||
|
||||
/* Don't evict VM page tables while they are busy, otherwise we can't
|
||||
* cleanly handle page faults.
|
||||
*/
|
||||
if (bo->type == ttm_bo_type_kernel &&
|
||||
!dma_resv_test_signaled_rcu(bo->base.resv, true))
|
||||
!amdgpu_vm_evictable(ttm_to_amdgpu_bo(bo)))
|
||||
return false;
|
||||
|
||||
/* If bo is a KFD BO, check if the bo belongs to the current process.
|
||||
|
||||
Reference in New Issue
Block a user