]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/radeon: sync all BOs involved in a CS v2
authorChristian König <christian.koenig@amd.com>
Thu, 27 Nov 2014 12:12:58 +0000 (13:12 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 16 Dec 2014 17:37:11 +0000 (09:37 -0800)
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>
drivers/gpu/drm/radeon/radeon_cs.c

index e244c2d727301120d0d9fc3b322846d9dda1ba50..67f91571ae79dee16b71b1a4c6f7a81b7a3466bf 100644 (file)
@@ -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);
        }
 }