diff options
| author | Christian König <[email protected]> | 2017-08-18 13:50:17 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2017-08-24 15:48:42 +0000 |
| commit | 2e8f9fbe985e930055eb55323b8491cc668b178f (patch) | |
| tree | 00bef81123e581ae3b780287560156a80e2bddb3 /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |
| parent | drm/amdgpu: add automatic per asic settings for gart_size (diff) | |
| download | kernel-2e8f9fbe985e930055eb55323b8491cc668b178f.tar.gz kernel-2e8f9fbe985e930055eb55323b8491cc668b178f.zip | |
drm/amdgpu: fix and cleanup shadow handling
Set the shadow flag on the shadow and not the parent, always bind shadow BOs
during allocation instead of manually, use the reservation_object wrappers
to grab the lock.
This fixes a couple of issues with binding the shadow BOs as well as correctly
evicting them when memory becomes tight.
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Chunming Zhou <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index ba475af99332..96ec4e2b56e9 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -165,14 +165,6 @@ static int amdgpu_vm_validate_level(struct amdgpu_vm_pt *parent, unsigned i; int r; - if (parent->bo->shadow) { - struct amdgpu_bo *shadow = parent->bo->shadow; - - r = amdgpu_ttm_bind(&shadow->tbo, &shadow->tbo.mem); - if (r) - return r; - } - if (use_cpu_for_update) { r = amdgpu_bo_kmap(parent->bo, NULL); if (r) |
