Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 293655
b: refs/heads/master
c: cdac550
h: refs/heads/master
i:
  293653: 4631e1f
  293651: 003c795
  293647: fe820ad
v: v3
  • Loading branch information
Christian König authored and Dave Airlie committed Feb 29, 2012
1 parent 8f85c15 commit 781e802
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a02fa397b09cf1e02ecb922642b4ebb5e39f9234
refs/heads/master: cdac5504b2981520f993790f5d30c0cdc15c3214
1 change: 0 additions & 1 deletion trunk/drivers/gpu/drm/radeon/radeon.h
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,6 @@ struct radeon_cs_parser {
struct radeon_cs_reloc *relocs;
struct radeon_cs_reloc **relocs_ptr;
struct list_head validated;
bool sync_to_ring[RADEON_NUM_RINGS];
/* indices of various chunks */
int chunk_ib_idx;
int chunk_relocs_idx;
Expand Down
21 changes: 14 additions & 7 deletions trunk/drivers/gpu/drm/radeon/radeon_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,6 @@ int radeon_cs_parser_relocs(struct radeon_cs_parser *p)
radeon_bo_list_add_object(&p->relocs[i].lobj,
&p->validated);

if (p->relocs[i].robj->tbo.sync_obj && !(r->flags & RADEON_RELOC_DONT_SYNC)) {
struct radeon_fence *fence = p->relocs[i].robj->tbo.sync_obj;
if (!radeon_fence_signaled(fence)) {
p->sync_to_ring[fence->ring] = true;
}
}
} else
p->relocs[i].handle = 0;
}
Expand Down Expand Up @@ -118,11 +112,24 @@ 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)
{
bool sync_to_ring[RADEON_NUM_RINGS] = { };
int i, r;

for (i = 0; i < p->nrelocs; i++) {
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 (!radeon_fence_signaled(fence)) {
sync_to_ring[fence->ring] = true;
}
}
}

for (i = 0; i < RADEON_NUM_RINGS; ++i) {
/* no need to sync to our own or unused rings */
if (i == p->ring || !p->sync_to_ring[i] || !p->rdev->ring[i].ready)
if (i == p->ring || !sync_to_ring[i] || !p->rdev->ring[i].ready)
continue;

if (!p->ib->fence->semaphore) {
Expand Down

0 comments on commit 781e802

Please sign in to comment.