diff options
Diffstat (limited to 'src/mga.h')
-rw-r--r-- | src/mga.h | 31 |
1 files changed, 18 insertions, 13 deletions
@@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga.h,v 1.87 2003/10/08 15:48:41 eich Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga.h,v 1.87tsi Exp $ */ /* * MGA Millennium (MGA2064W) functions * @@ -99,18 +99,23 @@ typedef enum { #define OUTREG16(addr, val) MMIO_OUT16(pMga->IOBase, addr, val) #define OUTREG(addr, val) MMIO_OUT32(pMga->IOBase, addr, val) #else /* !EXTRADEBUG */ -CARD8 dbg_inreg8(ScrnInfoPtr,int,int); -CARD16 dbg_inreg16(ScrnInfoPtr,int,int); -CARD32 dbg_inreg32(ScrnInfoPtr,int,int); -void dbg_outreg8(ScrnInfoPtr,int,int); -void dbg_outreg16(ScrnInfoPtr,int,int); -void dbg_outreg32(ScrnInfoPtr,int,int); -#define INREG8(addr) dbg_inreg8(pScrn,addr,1) -#define INREG16(addr) dbg_inreg16(pScrn,addr,1) -#define INREG(addr) dbg_inreg32(pScrn,addr,1) -#define OUTREG8(addr,val) dbg_outreg8(pScrn,addr,val) -#define OUTREG16(addr,val) dbg_outreg16(pScrn,addr,val) -#define OUTREG(addr,val) dbg_outreg32(pScrn,addr,val) +CARD8 MGAdbg_inreg8(ScrnInfoPtr, int, int, char*); +CARD16 MGAdbg_inreg16(ScrnInfoPtr, int, int, char*); +CARD32 MGAdbg_inreg32(ScrnInfoPtr, int, int, char*); +void MGAdbg_outreg8(ScrnInfoPtr, int, int, char*); +void MGAdbg_outreg16(ScrnInfoPtr, int,int, char*); +void MGAdbg_outreg32(ScrnInfoPtr, int,int, char*); +#ifndef __GNUC__ +# define MGA_STRINGIZE(x) #x +# define MGA_STRINGIFY(x) MGA_STRINGIZE(x) +# define __FUNCTION__ MGA_STRINGIFY(__FILE__) ", line " MGA_STRINGIFY(__LINE__) +#endif +#define INREG8(addr) MGAdbg_inreg8(pScrn, addr, 1, __FUNCTION__) +#define INREG16(addr) MGAdbg_inreg16(pScrn, addr, 1, __FUNCTION__) +#define INREG(addr) MGAdbg_inreg32(pScrn, addr, 1, __FUNCTION__) +#define OUTREG8(addr,val) MGAdbg_outreg8(pScrn, addr, val, __FUNCTION__) +#define OUTREG16(addr,val) MGAdbg_outreg16(pScrn, addr, val, __FUNCTION__) +#define OUTREG(addr,val) MGAdbg_outreg32(pScrn, addr, val, __FUNCTION__) #endif /* EXTRADEBUG */ /* |