summaryrefslogtreecommitdiff
path: root/linux/radeon_state.c
diff options
context:
space:
mode:
authorMichel Daenzer <michel@daenzer.net>2002-06-02 16:00:45 +0000
committerMichel Daenzer <michel@daenzer.net>2002-06-02 16:00:45 +0000
commit5676a2a6105afdfc343e7f36f3c87e528a9d14b3 (patch)
tree4113a8b728fcc73ad0841bb0a83ae1beac5e4d2b /linux/radeon_state.c
parent6ac48cddd0a074c77de0ab3dfc1661352b6f0c26 (diff)
fixes for big endian in general and powerpc in particular
Diffstat (limited to 'linux/radeon_state.c')
-rw-r--r--linux/radeon_state.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/linux/radeon_state.c b/linux/radeon_state.c
index 79b29134..cc518a0e 100644
--- a/linux/radeon_state.c
+++ b/linux/radeon_state.c
@@ -1062,6 +1062,16 @@ static int radeon_cp_dispatch_texture( drm_device_t *dev,
ADVANCE_RING();
+#ifdef __BIG_ENDIAN
+ /* The Mesa texture functions provide the data in little endian as the
+ * chip wants it, but we need to compensate for the fact that the CP
+ * ring gets byte-swapped
+ */
+ BEGIN_RING( 2 );
+ OUT_RING_REG( RADEON_RBBM_GUICNTL, RADEON_HOST_DATA_SWAP_32BIT );
+ ADVANCE_RING();
+#endif
+
/* Make a copy of the parameters in case we have to update them
* for a multi-pass texture blit.
*/