Commit dc66b325 authored by Michel Dänzer's avatar Michel Dänzer Committed by Dave Airlie

radeon: Fix KMS CP writeback on big endian machines.

This is necessary even with PCI(e) GART, and it makes writeback work even with
AGP on my PowerBook. Might still be unreliable with older revisions of UniNorth
and other AGP bridges though.
Signed-off-by: default avatarMichel Dänzer <daenzer@vmware.com>
Reviewed-by: default avatarAlex Deucher <alex.deucher@gmail.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 0a0883c8
...@@ -79,7 +79,7 @@ static bool radeon_fence_poll_locked(struct radeon_device *rdev) ...@@ -79,7 +79,7 @@ static bool radeon_fence_poll_locked(struct radeon_device *rdev)
scratch_index = R600_WB_EVENT_OFFSET + rdev->fence_drv.scratch_reg - rdev->scratch.reg_base; scratch_index = R600_WB_EVENT_OFFSET + rdev->fence_drv.scratch_reg - rdev->scratch.reg_base;
else else
scratch_index = RADEON_WB_SCRATCH_OFFSET + rdev->fence_drv.scratch_reg - rdev->scratch.reg_base; scratch_index = RADEON_WB_SCRATCH_OFFSET + rdev->fence_drv.scratch_reg - rdev->scratch.reg_base;
seq = rdev->wb.wb[scratch_index/4]; seq = le32_to_cpu(rdev->wb.wb[scratch_index/4]);
} else } else
seq = RREG32(rdev->fence_drv.scratch_reg); seq = RREG32(rdev->fence_drv.scratch_reg);
if (seq != rdev->fence_drv.last_seq) { if (seq != rdev->fence_drv.last_seq) {
......
...@@ -248,7 +248,7 @@ void radeon_ib_pool_fini(struct radeon_device *rdev) ...@@ -248,7 +248,7 @@ void radeon_ib_pool_fini(struct radeon_device *rdev)
void radeon_ring_free_size(struct radeon_device *rdev) void radeon_ring_free_size(struct radeon_device *rdev)
{ {
if (rdev->wb.enabled) if (rdev->wb.enabled)
rdev->cp.rptr = rdev->wb.wb[RADEON_WB_CP_RPTR_OFFSET/4]; rdev->cp.rptr = le32_to_cpu(rdev->wb.wb[RADEON_WB_CP_RPTR_OFFSET/4]);
else { else {
if (rdev->family >= CHIP_R600) if (rdev->family >= CHIP_R600)
rdev->cp.rptr = RREG32(R600_CP_RB_RPTR); rdev->cp.rptr = RREG32(R600_CP_RB_RPTR);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment