drm/radeon: allow concurrent buffer reads
authorChristian König <christian.koenig@amd.com>
Thu, 4 Sep 2014 18:01:54 +0000 (20:01 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 11 Sep 2014 14:46:02 +0000 (10:46 -0400)
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/radeon_cs.c

index ec4840cb8a07c0182f6a847302de1a1719002128..f662de41ba49b232e7cad9d07f22f9649d312142 100644 (file)
@@ -183,7 +183,7 @@ static int radeon_cs_parser_relocs(struct radeon_cs_parser *p)
                }
 
                p->relocs[i].tv.bo = &p->relocs[i].robj->tbo;
-               p->relocs[i].tv.shared = false;
+               p->relocs[i].tv.shared = !r->write_domain;
                p->relocs[i].handle = r->handle;
 
                radeon_cs_buckets_add(&buckets, &p->relocs[i].tv.head,
@@ -260,7 +260,8 @@ static void radeon_cs_sync_rings(struct radeon_cs_parser *p)
                        continue;
 
                resv = p->relocs[i].robj->tbo.resv;
-               radeon_semaphore_sync_resv(p->ib.semaphore, resv, false);
+               radeon_semaphore_sync_resv(p->ib.semaphore, resv,
+                                          p->relocs[i].tv.shared);
        }
 }