]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/radeon: fix possible lack of synchronization btw ttm and other ring
authorJerome Glisse <jglisse@redhat.com>
Wed, 9 May 2012 13:34:44 +0000 (15:34 +0200)
committerDave Airlie <airlied@redhat.com>
Wed, 9 May 2012 16:22:12 +0000 (17:22 +0100)
We need to sync with the GFX ring as ttm might have schedule bo move
on it and new command scheduled for other ring need to wait for bo
data to be in place.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Reviewed by: Christian König <christian.koenig@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/radeon_cs.c
include/drm/radeon_drm.h

index c66beb1662b5aa041568c9990398ecfe692fd3d7..289b0d786e973c472e028f2f90437d4778da563a 100644 (file)
@@ -122,15 +122,15 @@ static int radeon_cs_sync_rings(struct radeon_cs_parser *p)
        int i, r;
 
        for (i = 0; i < p->nrelocs; i++) {
+               struct radeon_fence *fence;
+
                if (!p->relocs[i].robj || !p->relocs[i].robj->tbo.sync_obj)
                        continue;
 
-               if (!(p->relocs[i].flags & RADEON_RELOC_DONT_SYNC)) {
-                       struct radeon_fence *fence = p->relocs[i].robj->tbo.sync_obj;
-                       if (fence->ring != p->ring && !radeon_fence_signaled(fence)) {
-                               sync_to_ring[fence->ring] = true;
-                               need_sync = true;
-                       }
+               fence = p->relocs[i].robj->tbo.sync_obj;
+               if (fence->ring != p->ring && !radeon_fence_signaled(fence)) {
+                       sync_to_ring[fence->ring] = true;
+                       need_sync = true;
                }
        }
 
index 7c491b4bcf65d2b2682cbb0bed67ee6817ed3abe..58056865b8e9601bc40da73198a82d0bcb406960 100644 (file)
@@ -926,7 +926,6 @@ struct drm_radeon_cs_chunk {
 };
 
 /* drm_radeon_cs_reloc.flags */
-#define RADEON_RELOC_DONT_SYNC         0x01
 
 struct drm_radeon_cs_reloc {
        uint32_t                handle;