summaryrefslogtreecommitdiff
path: root/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_macros.h
diff options
context:
space:
mode:
authordawes <dawes>2000-11-08 02:53:41 +0000
committerdawes <dawes>2000-11-08 02:53:41 +0000
commit23d67f1befe18a4aba21b7cae48f3d293cfed1ee (patch)
tree2cdf6024b3a671041104d5d95b909f6cfe1b751d /xc/programs/Xserver/hw/xfree86/drivers/mga/mga_macros.h
parentf93d27aa9ffc3e26ebb937ccd8dfe3319315c70c (diff)
Import of XFree86 4.0.1eX_4_0_1e
Diffstat (limited to 'xc/programs/Xserver/hw/xfree86/drivers/mga/mga_macros.h')
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/mga/mga_macros.h23
1 files changed, 18 insertions, 5 deletions
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_macros.h b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_macros.h
index c2a47eaf1..4aa48527b 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_macros.h
+++ b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_macros.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_macros.h,v 1.16 2000/10/24 22:45:07 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_macros.h,v 1.17 2000/11/02 02:51:20 dawes Exp $ */
#ifndef _MGA_MACROS_H_
#define _MGA_MACROS_H_
@@ -17,7 +17,7 @@
#define REPLICATE(r) /* */
#endif
-#define RGBEQUAL(c) (!((((c) >> 8) ^ (c)) & 0xffff))
+#define RGBEQUAL(c) (!((((c) >> 8) ^ (c)) & 0xffff))
#ifdef XF86DRI
#define MGA_SYNC_XTAG 0x275f4200
@@ -49,8 +49,7 @@ while(INREG(MGAREG_DWGSYNC) != MGA_SYNC_XTAG) ; \
( MAKEDMAINDEX(one) | \
(MAKEDMAINDEX(two) << 8) | \
(MAKEDMAINDEX(three) << 16) | \
- (MAKEDMAINDEX(four) << 24) )
-
+ (MAKEDMAINDEX(four) << 24) )
#if PSZ == 24
#define SET_PLANEMASK(p) /**/
@@ -63,7 +62,6 @@ while(INREG(MGAREG_DWGSYNC) != MGA_SYNC_XTAG) ; \
}
#endif
-
#define SET_FOREGROUND(c) \
if((c) != pMga->FgColor) { \
pMga->FgColor = (c); \
@@ -93,5 +91,20 @@ while(INREG(MGAREG_DWGSYNC) != MGA_SYNC_XTAG) ; \
#define CHECK_DMA_QUIESCENT(pMGA, pScrn)
#endif
+#ifdef USEMGAHAL
+#define HAL_CHIPSETS ((pMga->Chipset == PCI_CHIP_MGAG200_PCI) || \
+ (pMga->Chipset == PCI_CHIP_MGAG200) || \
+ (pMga->Chipset == PCI_CHIP_MGAG400))
+#define MGA_HAL(x) { \
+ MGAPtr pMga = MGAPTR(pScrn); \
+ if (HAL_CHIPSETS) { x; } \
+}
+#define MGA_NOT_HAL(x) { \
+ MGAPtr pMga = MGAPTR(pScrn); \
+ if (!HAL_CHIPSETS) { x; } \
+}
+#else
+#define MGA_NOT_HAL(x) { x; }
+#endif
#endif /* _MGA_MACROS_H_ */