summaryrefslogtreecommitdiff
path: root/src/mga_esc.c
diff options
context:
space:
mode:
authorAdam Jackson <ajax@nwnk.net>2005-07-11 02:29:51 +0000
committerAdam Jackson <ajax@nwnk.net>2005-07-11 02:29:51 +0000
commit6030e8206db010f65199cbf5d332d2b47cdb3580 (patch)
tree7c0fb184152c473ca9a18e8cb0f26cc8a1862d22 /src/mga_esc.c
parentb52ca7871cb6cf7a01210ec21cd9c20e5453f4fd (diff)
Prep for modular builds by adding guarded #include "config.h" everywhere.XORG-6_8_99_16XORG-6_8_99_15
Diffstat (limited to 'src/mga_esc.c')
-rw-r--r--src/mga_esc.c41
1 files changed, 23 insertions, 18 deletions
diff --git a/src/mga_esc.c b/src/mga_esc.c
index dc0b7b3..3a72851 100644
--- a/src/mga_esc.c
+++ b/src/mga_esc.c
@@ -1,3 +1,4 @@
+/* $XFree86$ */
/****************************************************************************
* mga_esc.c
*
@@ -6,6 +7,10 @@
* (C) Matrox Graphics, Inc.
*****************************************************************************/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#ifdef USEMGAHAL
/* All drivers should typically include these */
@@ -216,23 +221,23 @@ static void EscRead(ScrnInfoPtr pScrn, unsigned long *param, char *sResult, Dis
break;
case 1:
ucIndex = INREG8(0x3c00);
- OUTREG(0x3c00, (UCHAR)ulAddr);
+ OUTREG8(0x3c00, (UCHAR)ulAddr);
ulData = (ULONG)INREG8(0x3c0a);
- OUTREG(0x3c00, ucIndex);
+ OUTREG8(0x3c00, ucIndex);
sprintf(sResult, "DAC[%02X] = 0x%02X", ulAddr, ulData);
break;
case 2:
ucIndex = INREG8(0x1fd4);
- OUTREG(0x1fd4, (UCHAR)ulAddr);
+ OUTREG8(0x1fd4, (UCHAR)ulAddr);
ulData = (ULONG)INREG8(0x1fd5);
- OUTREG(0x1fd4, ucIndex);
+ OUTREG8(0x1fd4, ucIndex);
sprintf(sResult, "CRTC[%02X] = 0x%02X", ulAddr, ulData);
break;
case 3:
ucIndex = INREG8(0x1fde);
- OUTREG(0x1fde, (UCHAR)ulAddr);
+ OUTREG8(0x1fde, (UCHAR)ulAddr);
ulData = (ULONG)INREG8(0x1fdf);
- OUTREG(0x1fde, ucIndex);
+ OUTREG8(0x1fde, ucIndex);
sprintf(sResult, "CRTCEXT[%02X] = 0x%02X", ulAddr, ulData);
break;
default:
@@ -266,23 +271,23 @@ static void EscWrite(ScrnInfoPtr pScrn, unsigned long *param, char *sResult, Di
break;
case 1:
ucIndex = INREG8(0x3c00);
- OUTREG(0x3c00, (UCHAR)ulAddr);
- OUTREG(0x3c0a, (UCHAR)ulData);
- OUTREG(0x3c00, ucIndex);
+ OUTREG8(0x3c00, (UCHAR)ulAddr);
+ OUTREG8(0x3c0a, (UCHAR)ulData);
+ OUTREG8(0x3c00, ucIndex);
strcpy(sResult, "OK");
break;
case 2:
ucIndex = INREG8(0x1fd4);
- OUTREG(0x1fd4, (UCHAR)ulAddr);
- OUTREG(0x1fd5, (UCHAR)ulData);
- OUTREG(0x1fd4, ucIndex);
+ OUTREG8(0x1fd4, (UCHAR)ulAddr);
+ OUTREG8(0x1fd5, (UCHAR)ulData);
+ OUTREG8(0x1fd4, ucIndex);
strcpy(sResult, "OK");
break;
case 3:
ucIndex = INREG8(0x1fde);
- OUTREG(0x1fde, (UCHAR)ulAddr);
- OUTREG(0x1fdf, (UCHAR)ulData);
- OUTREG(0x1fde, ucIndex);
+ OUTREG8(0x1fde, (UCHAR)ulAddr);
+ OUTREG8(0x1fdf, (UCHAR)ulData);
+ OUTREG8(0x1fde, ucIndex);
strcpy(sResult, "OK");
break;
default:
@@ -752,13 +757,13 @@ void MGAExecuteEscCmd(ScrnInfoPtr pScrn, char *cmdline , char *sResult, DisplayM
if (pMga->SecondCrtc)
{
- ulScreen = 1;
+ ulScreen = 1;
}
else
{
ulScreen = 0;
}
-
+
if (FunctionTable[0].function && GetEscCommand(cmdline, &EscCmd) )
{
@@ -773,7 +778,7 @@ void MGAExecuteEscCmd(ScrnInfoPtr pScrn, char *cmdline , char *sResult, DisplayM
{
EscCmd.parameters[0] &= 0xffff;
EscCmd.parameters[0] |= ulScreen << 16;
-
+
FunctionTable[i].funcptr(pScrn, EscCmd.parameters, sResult, pMode);
}
else