On Sat, 12 Feb 2005 15:04:29 -0500, Michel Dänzer <[EMAIL PROTECTED]> wrote: > On Sat, 2005-02-12 at 21:00 +0100, Jerome Glisse wrote: > > Yes as a hack we could redefine this. > > Please, let's get a proper fix into Mesa instead. Have you tried my > cleaned up patch?
Not right now, gmail seems buggy with your mail (i can't dl your patch don't know why, first time i see a such stupid trouble with gmail). I get it with mailing list archive. You made a little cut & paste error : + read_MMIO_LE32(base, offset) insted of : + read_MMIO_LE32(RADEONMMIO, addr) No ? The corrected patch work. I attach it. If you could push it to mesa cvs :) So Vlad texture are working on x86, looks like i will have to track down why we have only noise over here :( Jerome Glisse
Index: src/mesa/drivers/dri/radeon/server/radeon_macros.h =================================================================== RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/radeon/server/radeon_macros.h,v retrieving revision 1.2 diff -p -u -r1.2 radeon_macros.h --- src/mesa/drivers/dri/radeon/server/radeon_macros.h 6 Aug 2003 18:11:00 -0000 1.2 +++ src/mesa/drivers/dri/radeon/server/radeon_macros.h 12 Feb 2005 17:40:48 -0000 @@ -40,28 +40,22 @@ #ifndef _RADEON_MACROS_H_ #define _RADEON_MACROS_H_ - +#include <mmio.h> # define MMIO_IN8(base, offset) \ *(volatile unsigned char *)(((unsigned char*)(base)) + (offset)) -# define MMIO_IN16(base, offset) \ - *(volatile unsigned short *)(void *)(((unsigned char*)(base)) + (offset)) # define MMIO_IN32(base, offset) \ - *(volatile unsigned int *)(void *)(((unsigned char*)(base)) + (offset)) + read_MMIO_LE32(base, offset) # define MMIO_OUT8(base, offset, val) \ *(volatile unsigned char *)(((unsigned char*)(base)) + (offset)) = (val) -# define MMIO_OUT16(base, offset, val) \ - *(volatile unsigned short *)(void *)(((unsigned char*)(base)) + (offset)) = (val) # define MMIO_OUT32(base, offset, val) \ - *(volatile unsigned int *)(void *)(((unsigned char*)(base)) + (offset)) = (val) + *(volatile unsigned int *)(void *)(((unsigned char*)(base)) + (offset)) = CPU_TO_LE32(val) /* Memory mapped register access macros */ #define INREG8(addr) MMIO_IN8(RADEONMMIO, addr) -#define INREG16(addr) MMIO_IN16(RADEONMMIO, addr) #define INREG(addr) MMIO_IN32(RADEONMMIO, addr) #define OUTREG8(addr, val) MMIO_OUT8(RADEONMMIO, addr, val) -#define OUTREG16(addr, val) MMIO_OUT16(RADEONMMIO, addr, val) #define OUTREG(addr, val) MMIO_OUT32(RADEONMMIO, addr, val) #define ADDRREG(addr) ((volatile GLuint *)(pointer)(RADEONMMIO + (addr))) Index: src/mesa/drivers/dri/common/mmio.h =================================================================== RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/common/mmio.h,v retrieving revision 1.2 diff -p -u -r1.2 mmio.h --- src/mesa/drivers/dri/common/mmio.h 14 Dec 2004 09:11:52 -0000 1.2 +++ src/mesa/drivers/dri/common/mmio.h 12 Feb 2005 17:40:48 -0000 @@ -38,12 +38,11 @@ static __inline__ u_int32_t read_MMIO_LE32( volatile void * base, unsigned long offset ) { - volatile void * p = ((volatile char *) base) + offset; u_int32_t val; - + __asm__ __volatile__( "lwbrx %0, %1, %2 ; eieio" : "=r" (val) - : "b" (base), "r" (offset), "m" (p) ); + : "b" (base), "r" (offset) ); return val; }