Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 318677
b: refs/heads/master
c: bf66625
h: refs/heads/master
i:
  318675: 8f4818c
v: v3
  • Loading branch information
Christian König committed Jul 17, 2012
1 parent 5445011 commit 29bc5ab
Show file tree
Hide file tree
Showing 2 changed files with 9 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: 07a713305a2b55d6ec424000f2c5bed1268ac56b
refs/heads/master: bf66625e02ac8e4535627394bcfb237bbf8a157f
14 changes: 8 additions & 6 deletions trunk/drivers/gpu/drm/radeon/radeon_fence.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,23 @@

static void radeon_fence_write(struct radeon_device *rdev, u32 seq, int ring)
{
if (rdev->wb.enabled) {
*rdev->fence_drv[ring].cpu_addr = cpu_to_le32(seq);
struct radeon_fence_driver *drv = &rdev->fence_drv[ring];
if (likely(rdev->wb.enabled || !drv->scratch_reg)) {
*drv->cpu_addr = cpu_to_le32(seq);
} else {
WREG32(rdev->fence_drv[ring].scratch_reg, seq);
WREG32(drv->scratch_reg, seq);
}
}

static u32 radeon_fence_read(struct radeon_device *rdev, int ring)
{
struct radeon_fence_driver *drv = &rdev->fence_drv[ring];
u32 seq = 0;

if (rdev->wb.enabled) {
seq = le32_to_cpu(*rdev->fence_drv[ring].cpu_addr);
if (likely(rdev->wb.enabled || !drv->scratch_reg)) {
seq = le32_to_cpu(*drv->cpu_addr);
} else {
seq = RREG32(rdev->fence_drv[ring].scratch_reg);
seq = RREG32(drv->scratch_reg);
}
return seq;
}
Expand Down

0 comments on commit 29bc5ab

Please sign in to comment.