diff options
Diffstat (limited to 'src/mga_macros.h')
-rw-r--r-- | src/mga_macros.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mga_macros.h b/src/mga_macros.h index 1b913a8..3de9618 100644 --- a/src/mga_macros.h +++ b/src/mga_macros.h @@ -3,6 +3,20 @@ #ifndef _MGA_MACROS_H_ #define _MGA_MACROS_H_ +#ifdef PCIACCESS +#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 |