aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2017-08-18 09:50:17 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-08-29 15:27:40 -0400
commitcf273a59ca3068caced2adaf2deeb44d2013c8a9 (patch)
tree1cff68f7bef6c0c112137954dafd259aff323764 /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
parent83e74db6a81daff277732bdd00b438ede2107c68 (diff)
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 <christian.koenig@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c8
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,
165 unsigned i; 165 unsigned i;
166 int r; 166 int r;
167 167
168 if (parent->bo->shadow) {
169 struct amdgpu_bo *shadow = parent->bo->shadow;
170
171 r = amdgpu_ttm_bind(&shadow->tbo, &shadow->tbo.mem);
172 if (r)
173 return r;
174 }
175
176 if (use_cpu_for_update) { 168 if (use_cpu_for_update) {
177 r = amdgpu_bo_kmap(parent->bo, NULL); 169 r = amdgpu_bo_kmap(parent->bo, NULL);
178 if (r) 170 if (r)