From 5676a2a6105afdfc343e7f36f3c87e528a9d14b3 Mon Sep 17 00:00:00 2001 From: Michel Daenzer Date: Sun, 2 Jun 2002 16:00:45 +0000 Subject: fixes for big endian in general and powerpc in particular --- linux/radeon_state.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'linux/radeon_state.c') 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. */ -- cgit v1.2.3