diff options
author | Christian König <christian.koenig@amd.com> | 2014-11-26 16:29:33 +0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2014-12-03 20:26:45 +0100 |
commit | c1f0a9c2d461a50c1a4c36d01b73c1325519b5fa (patch) | |
tree | a6cc6683de4be34cc09b3de701bf6236610f7de6 /drivers/gpu/drm/radeon | |
parent | drm/radeon: Move hotspot handling out of radeon_set_cursor (diff) | |
download | linux-c1f0a9c2d461a50c1a4c36d01b73c1325519b5fa.tar.xz linux-c1f0a9c2d461a50c1a4c36d01b73c1325519b5fa.zip |
drm/radeon: sync all BOs involved in a CS
Not just the userspace relocs, otherwise we won't wait
for a swapped out page tables to be swapped in again.
Signed-off-by: Christian König <christian.koenig@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_cs.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c index 75f22e5e999f..f5e0a696d2fe 100644 --- a/drivers/gpu/drm/radeon/radeon_cs.c +++ b/drivers/gpu/drm/radeon/radeon_cs.c @@ -251,22 +251,20 @@ static int radeon_cs_get_ring(struct radeon_cs_parser *p, u32 ring, s32 priority static int radeon_cs_sync_rings(struct radeon_cs_parser *p) { - int i, r = 0; + struct radeon_cs_reloc *reloc; + int r; - for (i = 0; i < p->nrelocs; i++) { + list_for_each_entry(reloc, &p->validated, tv.head) { struct reservation_object *resv; - if (!p->relocs[i].robj) - continue; - - resv = p->relocs[i].robj->tbo.resv; + resv = reloc->robj->tbo.resv; r = radeon_sync_resv(p->rdev, &p->ib.sync, resv, - p->relocs[i].tv.shared); + reloc->tv.shared); if (r) - break; + return r; } - return r; + return 0; } /* XXX: note that this is called from the legacy UMS CS ioctl as well */ @@ -505,9 +503,6 @@ static int radeon_bo_vm_update_pte(struct radeon_cs_parser *p, if (r) return r; - radeon_sync_resv(p->rdev, &p->ib.sync, vm->page_directory->tbo.resv, - true); - r = radeon_vm_clear_freed(rdev, vm); if (r) return r; |