summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_cs.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2014-07-18 08:56:40 +0200
committerAlex Deucher <alexander.deucher@amd.com>2014-07-21 13:17:38 -0400
commit036bf46a3962c87fc6ab5e6dbc65f469730b4cf0 (patch)
treef104f7912d7127ebfd81362c9194a5c2ddfc83a2 /drivers/gpu/drm/radeon/radeon_cs.c
parent20b2656d7e644c8673f2b9944a0e65249e0ae555 (diff)
downloadtalos-obmc-linux-036bf46a3962c87fc6ab5e6dbc65f469730b4cf0.tar.gz
talos-obmc-linux-036bf46a3962c87fc6ab5e6dbc65f469730b4cf0.zip
drm/radeon: fix handling of radeon_vm_bo_rmv v3
v3: completely rewritten. We now just remember which areas of the PT to clear and do so on the next command submission. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=79980 Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_cs.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_cs.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
index 71a143461478..09fcf4dcdfdb 100644
--- a/drivers/gpu/drm/radeon/radeon_cs.c
+++ b/drivers/gpu/drm/radeon/radeon_cs.c
@@ -461,14 +461,24 @@ static int radeon_bo_vm_update_pte(struct radeon_cs_parser *p,
struct radeon_vm *vm)
{
struct radeon_device *rdev = p->rdev;
+ struct radeon_bo_va *bo_va;
int i, r;
r = radeon_vm_update_page_directory(rdev, vm);
if (r)
return r;
- r = radeon_vm_bo_update(rdev, vm, rdev->ring_tmp_bo.bo,
- &rdev->ring_tmp_bo.bo->tbo.mem);
+ r = radeon_vm_clear_freed(rdev, vm);
+ if (r)
+ return r;
+
+ bo_va = radeon_vm_bo_find(vm, rdev->ring_tmp_bo.bo);
+ if (bo_va == NULL) {
+ DRM_ERROR("Tmp BO not in VM!\n");
+ return -EINVAL;
+ }
+
+ r = radeon_vm_bo_update(rdev, bo_va, &rdev->ring_tmp_bo.bo->tbo.mem);
if (r)
return r;
@@ -480,7 +490,13 @@ static int radeon_bo_vm_update_pte(struct radeon_cs_parser *p,
continue;
bo = p->relocs[i].robj;
- r = radeon_vm_bo_update(rdev, vm, bo, &bo->tbo.mem);
+ bo_va = radeon_vm_bo_find(vm, bo);
+ if (bo_va == NULL) {
+ dev_err(rdev->dev, "bo %p not in vm %p\n", bo, vm);
+ return -EINVAL;
+ }
+
+ r = radeon_vm_bo_update(rdev, bo_va, &bo->tbo.mem);
if (r)
return r;
}
OpenPOWER on IntegriCloud