[PATCH 3/6] drm/radeon: Writeback endian fixes

Michel Dänzer michel at daenzer.net
Thu Jul 14 08:19:24 PDT 2011

On Mit, 2011-07-13 at 16:28 +1000, Benjamin Herrenschmidt wrote:
> 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
> 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.

Absolutely. Unfortunately, when I fixed the CP writeback code to use
le32_to_cpu(), I didn't realize the code for some GPU families was
already using HW swappers for this. 

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

That should probably be in a separate patch. Either way, though:

Reviewed-by: Michel Dänzer <michel at daenzer.net>

Earthling Michel Dänzer           |                   http://www.amd.com
Libre software enthusiast         |          Debian, X and DRI developer

More information about the xorg-driver-ati mailing list