drm/radeon: Writeback endian fixes
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 13 Jul 2011 06:28:17 +0000 (06:28 +0000)
committerDave Airlie <airlied@redhat.com>
Mon, 25 Jul 2011 11:14:56 +0000 (12:14 +0100)
commitdf07d6999e4e502ff474eeafe11ea0055f4cd68d
tree141b7203059cee94568e36505b3bc57376fc1689
parenta0533fbf8778991f9a978656cff0d301322d37e2
drm/radeon: Writeback endian fixes

The writeback ring pointer and IH ring pointer are read using le32_to_cpu
so we do not want the chip to byteswap them on big-endian.

We still want to byteswap the ring itself and the IBs, so we don't touch
that but we remove setting of the byteswap bits in CP_RB_RPTR_ADDR and
IH_CNTL.

In general, for things like that where we control all the accessors easily,
we are better off doing the swap in SW rather than HW. Paradoxally, it does
keep the code closer to x86 and avoid using poorly tested HW features.

I also changed the use of RADEON_ to R600_ in a couple of cases to be more
consistent with the surrounding code.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reviewed-by: Michel Dänzer <michel@daenzer.net>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/evergreen.c
drivers/gpu/drm/radeon/r600.c
drivers/gpu/drm/radeon/r600_cp.c