diff options
author | James Cloos <cloos@jhcloos.com> | 2007-09-03 06:07:32 -0400 |
---|---|---|
committer | James Cloos <cloos@jhcloos.com> | 2007-09-03 06:07:32 -0400 |
commit | 6fde3fd6d34e7252ee16422b19896d71b1622039 (patch) | |
tree | f14ab2b9dd93d9097d5f2c8a4085ee2b81a6f7fc /src/mga_macros.h | |
parent | 4bfc1e1ea11604e3af150a4228663cb1cb1bf9f3 (diff) | |
parent | 923176f5aad777b4023003a457bb77da21373389 (diff) |
Merge branch 'master' of ssh://git.freedesktop.org/git/xorg/driver/xf86-video-mga
Diffstat (limited to 'src/mga_macros.h')
-rw-r--r-- | src/mga_macros.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/mga_macros.h b/src/mga_macros.h index 8a3221d..69dc8e3 100644 --- a/src/mga_macros.h +++ b/src/mga_macros.h @@ -3,6 +3,20 @@ #ifndef _MGA_MACROS_H_ #define _MGA_MACROS_H_ +#ifdef XSERVER_LIBPCIACCESS +#define MGA_IO_ADDRESS(p) (p)->PciInfo->regions[(p)->io_bar].base_addr +#define VENDOR_ID(p) (p)->vendor_id +#define DEVICE_ID(p) (p)->device_id +#define SUBSYS_ID(p) (p)->subdevice_id +#define CHIP_REVISION(p) (p)->revision +#else +#define MGA_IO_ADDRESS(p) (p)->IOAddress +#define VENDOR_ID(p) (p)->vendor +#define DEVICE_ID(p) (p)->chipType +#define SUBSYS_ID(p) (p)->subsysCard +#define CHIP_REVISION(p) (p)->chipRev +#endif + #define RGBEQUAL(c) (!((((c) >> 8) ^ (c)) & 0xffff)) #ifdef XF86DRI @@ -63,15 +77,13 @@ while(INREG(MGAREG_DWGSYNC) != MGA_SYNC_XTAG) ; \ #endif #ifdef USEMGAHAL -#define HAL_CHIPSETS (pMga->is_HAL_chipset) - #define MGA_HAL(x) { \ MGAPtr pMga = MGAPTR(pScrn); \ - if (pMga->HALLoaded && HAL_CHIPSETS) { x; } \ + if (pMga->HALLoaded && pMga->chip_attribs->HAL_chipset) { x; } \ } #define MGA_NOT_HAL(x) { \ MGAPtr pMga = MGAPTR(pScrn); \ - if (!pMga->HALLoaded || !HAL_CHIPSETS) { x; } \ + if (!pMga->HALLoaded || !pMga->chip_attribs->HAL_chipset) { x; } \ } #else #define MGA_NOT_HAL(x) { x; } |