summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2014-11-27 13:12:58 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-12-16 09:37:11 -0800
commita3e97a494e017670a29973f2c610ff68897beca4 (patch)
tree6bba838a36b8de4177f8e5c75063e0861c52217b
parent1c9e23ba8ed175ebe9a48366a276bc3ac493506c (diff)
drm/radeon: sync all BOs involved in a CS v2
commit 86b276385c6a986872e4cd144f5940b156053c3f upstream. Not just the userspace relocs, otherwise we won't wait for a swapped out page tables to be swapped in again. v2: rebased on Alex current drm-fixes-3.18 Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/gpu/drm/radeon/radeon_cs.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
index e244c2d72730..67f91571ae79 100644
--- a/drivers/gpu/drm/radeon/radeon_cs.c
+++ b/drivers/gpu/drm/radeon/radeon_cs.c
@@ -226,14 +226,11 @@ static int radeon_cs_get_ring(struct radeon_cs_parser *p, u32 ring, s32 priority
static void radeon_cs_sync_rings(struct radeon_cs_parser *p)
{
- int i;
-
- for (i = 0; i < p->nrelocs; i++) {
- if (!p->relocs[i].robj)
- continue;
+ struct radeon_cs_reloc *reloc;
+ list_for_each_entry(reloc, &p->validated, tv.head) {
radeon_semaphore_sync_to(p->ib.semaphore,
- p->relocs[i].robj->tbo.sync_obj);
+ reloc->robj->tbo.sync_obj);
}
}