Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 329546
b: refs/heads/master
c: f82cbdd
h: refs/heads/master
v: v3
  • Loading branch information
Christian König authored and Alex Deucher committed Sep 20, 2012
1 parent 9a729a3 commit 37d0712
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 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: d66a76269a57f84b785f7449818b843de1f07915
refs/heads/master: f82cbddddbd368f391d45738601fa29a75cfbe3b
20 changes: 14 additions & 6 deletions trunk/drivers/gpu/drm/radeon/radeon_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,19 +115,27 @@ static int radeon_cs_get_ring(struct radeon_cs_parser *p, u32 ring, s32 priority
return 0;
}

static void radeon_cs_sync_to(struct radeon_cs_parser *p,
struct radeon_fence *fence)
{
struct radeon_fence *other;

if (!fence)
return;

other = p->ib.sync_to[fence->ring];
p->ib.sync_to[fence->ring] = radeon_fence_later(fence, other);
}

static void radeon_cs_sync_rings(struct radeon_cs_parser *p)
{
int i;

for (i = 0; i < p->nrelocs; i++) {
struct radeon_fence *a, *b;

if (!p->relocs[i].robj || !p->relocs[i].robj->tbo.sync_obj)
if (!p->relocs[i].robj)
continue;

a = p->relocs[i].robj->tbo.sync_obj;
b = p->ib.sync_to[a->ring];
p->ib.sync_to[a->ring] = radeon_fence_later(a, b);
radeon_cs_sync_to(p, p->relocs[i].robj->tbo.sync_obj);
}
}

Expand Down

0 comments on commit 37d0712

Please sign in to comment.