aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xfree86')
-rw-r--r--xorg-server/hw/xfree86/common/fourcc.h3
-rw-r--r--xorg-server/hw/xfree86/common/xf86Bus.h32
-rw-r--r--xorg-server/hw/xfree86/common/xf86Config.h10
-rw-r--r--xorg-server/hw/xfree86/common/xf86DPMS.c68
-rw-r--r--xorg-server/hw/xfree86/common/xf86Events.c8
-rw-r--r--xorg-server/hw/xfree86/common/xf86InPriv.h86
-rw-r--r--xorg-server/hw/xfree86/common/xf86PciInfo.h23
-rw-r--r--xorg-server/hw/xfree86/common/xf86Privstr.h120
-rw-r--r--xorg-server/hw/xfree86/common/xf86VGAarbiter.h97
-rw-r--r--xorg-server/hw/xfree86/common/xf86Xinput.h3
-rw-r--r--xorg-server/hw/xfree86/common/xf86fbBus.c16
-rw-r--r--xorg-server/hw/xfree86/common/xf86noBus.c2
-rw-r--r--xorg-server/hw/xfree86/common/xf86pciBus.h90
-rw-r--r--xorg-server/hw/xfree86/common/xf86xvpriv.h176
-rw-r--r--xorg-server/hw/xfree86/common/xorgHelper.c1
-rw-r--r--xorg-server/hw/xfree86/common/xorgVersion.h26
-rw-r--r--xorg-server/hw/xfree86/dixmods/extmod/xvmod.c1
-rw-r--r--xorg-server/hw/xfree86/dixmods/extmod/xvmodproc.h8
-rw-r--r--xorg-server/hw/xfree86/dixmods/recordmod.c23
-rw-r--r--xorg-server/hw/xfree86/dixmods/xkbKillSrv.c2
-rw-r--r--xorg-server/hw/xfree86/dixmods/xkbPrivate.c19
-rw-r--r--xorg-server/hw/xfree86/dixmods/xkbVT.c8
-rw-r--r--xorg-server/hw/xfree86/dri/sarea.h33
-rw-r--r--xorg-server/hw/xfree86/fbdevhw/fbpriv.h330
-rw-r--r--xorg-server/hw/xfree86/i2c/bt829.h90
-rw-r--r--xorg-server/hw/xfree86/i2c/fi1236.h110
-rw-r--r--xorg-server/hw/xfree86/i2c/msp3430.h53
-rw-r--r--xorg-server/hw/xfree86/i2c/tda9850.h21
-rw-r--r--xorg-server/hw/xfree86/i2c/tda9885.h62
-rw-r--r--xorg-server/hw/xfree86/i2c/uda1380.h17
-rw-r--r--xorg-server/hw/xfree86/int10/stub.c2
-rw-r--r--xorg-server/hw/xfree86/int10/xf86x86emu.c38
-rw-r--r--xorg-server/hw/xfree86/loader/loader.h152
-rw-r--r--xorg-server/hw/xfree86/loader/loaderProcs.h188
-rw-r--r--xorg-server/hw/xfree86/loader/os.c2
-rw-r--r--xorg-server/hw/xfree86/modes/xf86Rename.h2
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/bsd_VTsw.c206
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/bsd_ev56.c30
-rw-r--r--xorg-server/hw/xfree86/os-support/bus/Pci.c2
-rw-r--r--xorg-server/hw/xfree86/os-support/bus/Pci.h5
-rw-r--r--xorg-server/hw/xfree86/os-support/bus/xf86Sbus.h2
-rw-r--r--xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c118
-rw-r--r--xorg-server/hw/xfree86/os-support/linux/lnx_bell.c2
-rw-r--r--xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c30
-rw-r--r--xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c127
-rw-r--r--xorg-server/hw/xfree86/os-support/shared/VTsw_noop.c120
-rw-r--r--xorg-server/hw/xfree86/os-support/shared/VTsw_usl.c172
-rw-r--r--xorg-server/hw/xfree86/os-support/shared/agp_noop.c23
-rw-r--r--xorg-server/hw/xfree86/os-support/shared/ioperm_noop.c5
-rw-r--r--xorg-server/hw/xfree86/os-support/shared/pm_noop.c4
-rw-r--r--xorg-server/hw/xfree86/os-support/shared/sigiostubs.c19
-rw-r--r--xorg-server/hw/xfree86/os-support/shared/xf86Axp.h37
-rw-r--r--xorg-server/hw/xfree86/os-support/solaris/sun_agp.c389
-rw-r--r--xorg-server/hw/xfree86/os-support/stub/stub_bios.c4
-rw-r--r--xorg-server/hw/xfree86/os-support/stub/stub_init.c2
-rw-r--r--xorg-server/hw/xfree86/os-support/stub/stub_video.c4
-rw-r--r--xorg-server/hw/xfree86/os-support/xf86OSpriv.h32
-rw-r--r--xorg-server/hw/xfree86/os-support/xf86_OSlib.h409
-rw-r--r--xorg-server/hw/xfree86/parser/xf86tokens.h19
-rw-r--r--xorg-server/hw/xfree86/ramdac/BTPriv.h8
-rw-r--r--xorg-server/hw/xfree86/ramdac/IBMPriv.h22
-rw-r--r--xorg-server/hw/xfree86/ramdac/TIPriv.h6
-rw-r--r--xorg-server/hw/xfree86/ramdac/xf86CursorPriv.h103
-rw-r--r--xorg-server/hw/xfree86/ramdac/xf86RamDac.c304
-rw-r--r--xorg-server/hw/xfree86/ramdac/xf86RamDacCmap.c24
-rw-r--r--xorg-server/hw/xfree86/ramdac/xf86RamDacPriv.h4
-rw-r--r--xorg-server/hw/xfree86/vgahw/vgaHWmodule.c20
-rw-r--r--xorg-server/hw/xfree86/x86emu/x86emu.h75
-rw-r--r--xorg-server/hw/xfree86/x86emu/x86emu/debug.h163
-rw-r--r--xorg-server/hw/xfree86/x86emu/x86emu/decode.h57
-rw-r--r--xorg-server/hw/xfree86/x86emu/x86emu/fpu.h23
-rw-r--r--xorg-server/hw/xfree86/x86emu/x86emu/fpu_regs.h44
-rw-r--r--xorg-server/hw/xfree86/x86emu/x86emu/ops.h6
-rw-r--r--xorg-server/hw/xfree86/x86emu/x86emu/prim_asm.h251
-rw-r--r--xorg-server/hw/xfree86/x86emu/x86emu/prim_ops.h189
-rw-r--r--xorg-server/hw/xfree86/x86emu/x86emu/regs.h101
-rw-r--r--xorg-server/hw/xfree86/x86emu/x86emu/types.h23
-rw-r--r--xorg-server/hw/xfree86/x86emu/x86emu/x86emui.h34
-rw-r--r--xorg-server/hw/xfree86/xaa/xaaBitOrder.c8
-rw-r--r--xorg-server/hw/xfree86/xaa/xaacexp.h95
-rw-r--r--xorg-server/hw/xfree86/xaa/xaawrap.h154
81 files changed, 2739 insertions, 2658 deletions
diff --git a/xorg-server/hw/xfree86/common/fourcc.h b/xorg-server/hw/xfree86/common/fourcc.h
index 853657e86..e6126b7fe 100644
--- a/xorg-server/hw/xfree86/common/fourcc.h
+++ b/xorg-server/hw/xfree86/common/fourcc.h
@@ -96,7 +96,6 @@
XvTopToBottom \
}
-
#define FOURCC_UYVY 0x59565955
#define XVIMAGE_UYVY \
{ \
@@ -157,4 +156,4 @@
XvTopToBottom \
}
-#endif /* _XF86_FOURCC_H_ */
+#endif /* _XF86_FOURCC_H_ */
diff --git a/xorg-server/hw/xfree86/common/xf86Bus.h b/xorg-server/hw/xfree86/common/xf86Bus.h
index 0b2ebdb44..abf2efd1a 100644
--- a/xorg-server/hw/xfree86/common/xf86Bus.h
+++ b/xorg-server/hw/xfree86/common/xf86Bus.h
@@ -44,20 +44,20 @@
#endif
typedef struct {
- DriverPtr driver;
- int chipset;
- int entityProp;
- EntityProc entityInit;
- EntityProc entityEnter;
- EntityProc entityLeave;
- pointer private;
- Bool active;
- Bool inUse;
- BusRec bus;
- int lastScrnFlag;
- DevUnion * entityPrivates;
- int numInstances;
- GDevPtr * devices;
+ DriverPtr driver;
+ int chipset;
+ int entityProp;
+ EntityProc entityInit;
+ EntityProc entityEnter;
+ EntityProc entityLeave;
+ pointer private;
+ Bool active;
+ Bool inUse;
+ BusRec bus;
+ int lastScrnFlag;
+ DevUnion *entityPrivates;
+ int numInstances;
+ GDevPtr *devices;
} EntityRec, *EntityPtr;
#define ACCEL_IS_SHARABLE 0x100
@@ -69,6 +69,6 @@ extern int xf86NumEntities;
extern BusRec primaryBus;
int xf86AllocateEntity(void);
-BusType StringToBusType(const char* busID, const char **retID);
+BusType StringToBusType(const char *busID, const char **retID);
-#endif /* _XF86_BUS_H */
+#endif /* _XF86_BUS_H */
diff --git a/xorg-server/hw/xfree86/common/xf86Config.h b/xorg-server/hw/xfree86/common/xf86Config.h
index 411fc2cc1..de06677c3 100644
--- a/xorg-server/hw/xfree86/common/xf86Config.h
+++ b/xorg-server/hw/xfree86/common/xf86Config.h
@@ -59,14 +59,14 @@ typedef struct _ModuleDefault {
/*
* prototypes
*/
-char ** xf86ModulelistFromConfig(pointer **);
-char ** xf86DriverlistFromConfig(void);
-char ** xf86DriverlistFromCompile(void);
-char ** xf86InputDriverlistFromConfig(void);
+char **xf86ModulelistFromConfig(pointer **);
+char **xf86DriverlistFromConfig(void);
+char **xf86DriverlistFromCompile(void);
+char **xf86InputDriverlistFromConfig(void);
Bool xf86BuiltinInputDriver(const char *);
ConfigStatus xf86HandleConfigFile(Bool);
Bool xf86AutoConfig(void);
GDevPtr autoConfigDevice(GDevPtr preconf_device);
-#endif /* _xf86_config_h */
+#endif /* _xf86_config_h */
diff --git a/xorg-server/hw/xfree86/common/xf86DPMS.c b/xorg-server/hw/xfree86/common/xf86DPMS.c
index 613c7cf73..75f034239 100644
--- a/xorg-server/hw/xfree86/common/xf86DPMS.c
+++ b/xorg-server/hw/xfree86/common/xf86DPMS.c
@@ -53,7 +53,6 @@ static Bool DPMSClose(int i, ScreenPtr pScreen);
static int DPMSCount = 0;
#endif
-
Bool
xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags)
{
@@ -65,28 +64,28 @@ xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags)
DPMSKey = &DPMSKeyRec;
- if (!dixRegisterPrivateKey(&DPMSKeyRec, PRIVATE_SCREEN, sizeof (DPMSRec)))
- return FALSE;
+ if (!dixRegisterPrivateKey(&DPMSKeyRec, PRIVATE_SCREEN, sizeof(DPMSRec)))
+ return FALSE;
pDPMS = dixLookupPrivate(&pScreen->devPrivates, DPMSKey);
pScrn->DPMSSet = set;
pDPMS->Flags = flags;
DPMSOpt = xf86FindOption(pScrn->options, "dpms");
if (DPMSDisabledSwitch) {
- enabled_from = X_CMDLINE;
- DPMSEnabled = FALSE;
+ enabled_from = X_CMDLINE;
+ DPMSEnabled = FALSE;
}
else if (DPMSOpt) {
- enabled_from = X_CONFIG;
- DPMSEnabled = xf86CheckBoolOption(pScrn->options, "dpms", FALSE);
- xf86MarkOptionUsed(DPMSOpt);
+ enabled_from = X_CONFIG;
+ DPMSEnabled = xf86CheckBoolOption(pScrn->options, "dpms", FALSE);
+ xf86MarkOptionUsed(DPMSOpt);
}
else {
- enabled_from = X_DEFAULT;
- DPMSEnabled = TRUE;
+ enabled_from = X_DEFAULT;
+ DPMSEnabled = TRUE;
}
if (DPMSEnabled)
- xf86DrvMsg(pScreen->myNum, enabled_from, "DPMS enabled\n");
+ xf86DrvMsg(pScreen->myNum, enabled_from, "DPMS enabled\n");
pDPMS->Enabled = DPMSEnabled;
pDPMS->CloseScreen = pScreen->CloseScreen;
pScreen->CloseScreen = DPMSClose;
@@ -97,7 +96,6 @@ xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags)
#endif
}
-
#ifdef DPMSExtension
static Bool
@@ -107,13 +105,13 @@ DPMSClose(int i, ScreenPtr pScreen)
/* This shouldn't happen */
if (DPMSKey == NULL)
- return FALSE;
+ return FALSE;
pDPMS = dixLookupPrivate(&pScreen->devPrivates, DPMSKey);
/* This shouldn't happen */
if (!pDPMS)
- return FALSE;
+ return FALSE;
pScreen->CloseScreen = pDPMS->CloseScreen;
@@ -124,15 +122,14 @@ DPMSClose(int i, ScreenPtr pScreen)
* to deal with this internally.
*/
if (xf86Screens[i]->vtSema && xf86Screens[i]->DPMSSet) {
- xf86Screens[i]->DPMSSet(xf86Screens[i],DPMSModeOn,0);
+ xf86Screens[i]->DPMSSet(xf86Screens[i], DPMSModeOn, 0);
}
-
+
if (--DPMSCount == 0)
- DPMSKey = NULL;
+ DPMSKey = NULL;
return pScreen->CloseScreen(i, pScreen);
}
-
/*
* DPMSSet --
* Device dependent DPMS mode setting hook. This is called whenever
@@ -148,28 +145,27 @@ DPMSSet(ClientPtr client, int level)
DPMSPowerLevel = level;
if (DPMSKey == NULL)
- return Success;
+ return Success;
if (level != DPMSModeOn) {
- rc = dixSaveScreens(client, SCREEN_SAVER_FORCER, ScreenSaverActive);
- if (rc != Success)
- return rc;
+ rc = dixSaveScreens(client, SCREEN_SAVER_FORCER, ScreenSaverActive);
+ if (rc != Success)
+ return rc;
}
/* For each screen, set the DPMS level */
for (i = 0; i < xf86NumScreens; i++) {
- pScrn = xf86Screens[i];
- pDPMS = dixLookupPrivate(&screenInfo.screens[i]->devPrivates, DPMSKey);
- if (pDPMS && pScrn->DPMSSet && pDPMS->Enabled && pScrn->vtSema) {
- xf86VGAarbiterLock(pScrn);
- pScrn->DPMSSet(pScrn, level, 0);
- xf86VGAarbiterUnlock(pScrn);
- }
+ pScrn = xf86Screens[i];
+ pDPMS = dixLookupPrivate(&screenInfo.screens[i]->devPrivates, DPMSKey);
+ if (pDPMS && pScrn->DPMSSet && pDPMS->Enabled && pScrn->vtSema) {
+ xf86VGAarbiterLock(pScrn);
+ pScrn->DPMSSet(pScrn, level, 0);
+ xf86VGAarbiterUnlock(pScrn);
+ }
}
return Success;
}
-
/*
* DPMSSupported --
* Return TRUE if any screen supports DPMS.
@@ -182,17 +178,17 @@ DPMSSupported(void)
ScrnInfoPtr pScrn;
if (DPMSKey == NULL) {
- return FALSE;
+ return FALSE;
}
/* For each screen, check if DPMS is supported */
for (i = 0; i < xf86NumScreens; i++) {
- pScrn = xf86Screens[i];
- pDPMS = dixLookupPrivate(&screenInfo.screens[i]->devPrivates, DPMSKey);
- if (pDPMS && pScrn->DPMSSet)
- return TRUE;
+ pScrn = xf86Screens[i];
+ pDPMS = dixLookupPrivate(&screenInfo.screens[i]->devPrivates, DPMSKey);
+ if (pDPMS && pScrn->DPMSSet)
+ return TRUE;
}
return FALSE;
}
-#endif /* DPMSExtension */
+#endif /* DPMSExtension */
diff --git a/xorg-server/hw/xfree86/common/xf86Events.c b/xorg-server/hw/xfree86/common/xf86Events.c
index 058057e92..5896f220c 100644
--- a/xorg-server/hw/xfree86/common/xf86Events.c
+++ b/xorg-server/hw/xfree86/common/xf86Events.c
@@ -449,6 +449,8 @@ xf86VTSwitch(void)
xf86DisableInputHandler(ih);
for (pInfo = xf86InputDevs; pInfo; pInfo = pInfo->next) {
if (pInfo->dev) {
+ if (!pInfo->dev->enabled)
+ pInfo->flags |= XI86_DEVICE_DISABLED;
xf86ReleaseKeys(pInfo->dev);
ProcessInputEvents();
DisableDevice(pInfo->dev, TRUE);
@@ -482,8 +484,9 @@ xf86VTSwitch(void)
pInfo = xf86InputDevs;
while (pInfo) {
- if (pInfo->dev)
+ if (pInfo->dev && (pInfo->flags & XI86_DEVICE_DISABLED) == 0)
EnableDevice(pInfo->dev, TRUE);
+ pInfo->flags &= ~XI86_DEVICE_DISABLED;
pInfo = pInfo->next;
}
for (ih = InputHandlers; ih; ih = ih->next)
@@ -537,8 +540,9 @@ xf86VTSwitch(void)
pInfo = xf86InputDevs;
while (pInfo) {
- if (pInfo->dev)
+ if (pInfo->dev && (pInfo->flags & XI86_DEVICE_DISABLED) == 0)
EnableDevice(pInfo->dev, TRUE);
+ pInfo->flags &= ~XI86_DEVICE_DISABLED;
pInfo = pInfo->next;
}
diff --git a/xorg-server/hw/xfree86/common/xf86InPriv.h b/xorg-server/hw/xfree86/common/xf86InPriv.h
index 15fef4320..5826ac388 100644
--- a/xorg-server/hw/xfree86/common/xf86InPriv.h
+++ b/xorg-server/hw/xfree86/common/xf86InPriv.h
@@ -1,43 +1,43 @@
-
-/*
- * Copyright (c) 1999 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of the copyright holder(s)
- * and author(s) shall not be used in advertising or otherwise to promote
- * the sale, use or other dealings in this Software without prior written
- * authorization from the copyright holder(s) and author(s).
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#ifndef _xf86InPriv_h
-#define _xf86InPriv_h
-
-/* xf86Globals.c */
-extern InputDriverPtr *xf86InputDriverList;
-extern int xf86NumInputDrivers;
-
-/* xf86Helper.c */
-InputDriverPtr xf86LookupInputDriver(const char *name);
-
-#endif /* _xf86InPriv_h */
+
+/*
+ * Copyright (c) 1999 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#ifndef _xf86InPriv_h
+#define _xf86InPriv_h
+
+/* xf86Globals.c */
+extern InputDriverPtr *xf86InputDriverList;
+extern int xf86NumInputDrivers;
+
+/* xf86Helper.c */
+InputDriverPtr xf86LookupInputDriver(const char *name);
+
+#endif /* _xf86InPriv_h */
diff --git a/xorg-server/hw/xfree86/common/xf86PciInfo.h b/xorg-server/hw/xfree86/common/xf86PciInfo.h
index e2d78627b..d6450e25c 100644
--- a/xorg-server/hw/xfree86/common/xf86PciInfo.h
+++ b/xorg-server/hw/xfree86/common/xf86PciInfo.h
@@ -101,7 +101,6 @@
#define PCI_VENDOR_INTEL 0x8086
#define PCI_VENDOR_ARK 0xEDD8
-
/* Generic */
#define PCI_CHIP_VGA 0x0000
#define PCI_CHIP_8514 0x0001
@@ -215,10 +214,10 @@
#define PCI_CHIP_R300_NE 0x4E45
#define PCI_CHIP_R300_NF 0x4E46
#define PCI_CHIP_R300_NG 0x4E47
-#define PCI_CHIP_R350_NH 0x4E48
-#define PCI_CHIP_R350_NI 0x4E49
-#define PCI_CHIP_R360_NJ 0x4E4A
-#define PCI_CHIP_R350_NK 0x4E4B
+#define PCI_CHIP_R350_NH 0x4E48
+#define PCI_CHIP_R350_NI 0x4E49
+#define PCI_CHIP_R360_NJ 0x4E4A
+#define PCI_CHIP_R350_NK 0x4E4B
#define PCI_CHIP_RV350_NP 0x4E50
#define PCI_CHIP_RV350_NQ 0x4E51
#define PCI_CHIP_RV350_NR 0x4E52
@@ -498,16 +497,16 @@
#define PCI_CHIP_SIS330 0x0330
#define PCI_CHIP_SIS630 0x6300
#define PCI_CHIP_SIS540 0x5300
-#define PCI_CHIP_SIS550 0x5315
-#define PCI_CHIP_SIS650 0x6325
+#define PCI_CHIP_SIS550 0x5315
+#define PCI_CHIP_SIS650 0x6325
#define PCI_CHIP_SIS730 0x7300
/* Hewlett-Packard */
#define PCI_CHIP_ELROY 0x1054
#define PCI_CHIP_ZX1_SBA 0x1229
#define PCI_CHIP_ZX1_IOC 0x122A
-#define PCI_CHIP_ZX1_LBA 0x122E /* a.k.a. Mercury */
-#define PCI_CHIP_ZX1_AGP8 0x12B4 /* a.k.a. QuickSilver */
+#define PCI_CHIP_ZX1_LBA 0x122E /* a.k.a. Mercury */
+#define PCI_CHIP_ZX1_AGP8 0x12B4 /* a.k.a. QuickSilver */
#define PCI_CHIP_ZX2_LBA 0x12EE
#define PCI_CHIP_ZX2_SBA 0x4030
#define PCI_CHIP_ZX2_IOC 0x4031
@@ -713,9 +712,9 @@
#define PCI_CHIP_I740_AGP 0x7800
#define PCI_CHIP_460GX_PXB 0x84CB
#define PCI_CHIP_460GX_SAC 0x84E0
-#define PCI_CHIP_460GX_GXB_2 0x84E2 /* PCI function 2 */
+#define PCI_CHIP_460GX_GXB_2 0x84E2 /* PCI function 2 */
#define PCI_CHIP_460GX_WXB 0x84E6
-#define PCI_CHIP_460GX_GXB_1 0x84EA /* PCI function 1 */
+#define PCI_CHIP_460GX_GXB_1 0x84EA /* PCI function 1 */
/* Silicon Motion Inc. */
#define PCI_CHIP_SMI910 0x0910
@@ -730,4 +729,4 @@
#define PCI_CHIP_VMWARE0405 0x0405
#define PCI_CHIP_VMWARE0710 0x0710
-#endif /* _XF86_PCIINFO_H */
+#endif /* _XF86_PCIINFO_H */
diff --git a/xorg-server/hw/xfree86/common/xf86Privstr.h b/xorg-server/hw/xfree86/common/xf86Privstr.h
index 79bc8a084..e78cd407d 100644
--- a/xorg-server/hw/xfree86/common/xf86Privstr.h
+++ b/xorg-server/hw/xfree86/common/xf86Privstr.h
@@ -29,7 +29,7 @@
/*
* This file contains definitions of the private XFree86 data structures/types.
* None of the data structures here should be used by video drivers.
- */
+ */
#ifndef _XF86PRIVSTR_H
#define _XF86PRIVSTR_H
@@ -55,90 +55,90 @@ typedef enum {
*/
typedef struct {
- int consoleFd;
- int vtno;
+ int consoleFd;
+ int vtno;
/* event handler part */
- int lastEventTime;
- Bool vtRequestsPending;
+ int lastEventTime;
+ Bool vtRequestsPending;
#ifdef sun
- int vtPendingNum;
+ int vtPendingNum;
#endif
- Bool dontVTSwitch;
- Bool autoVTSwitch;
- Bool ShareVTs;
- Bool dontZap;
- Bool dontZoom;
- Bool notrapSignals; /* don't exit cleanly - die at fault */
- Bool caughtSignal;
+ Bool dontVTSwitch;
+ Bool autoVTSwitch;
+ Bool ShareVTs;
+ Bool dontZap;
+ Bool dontZoom;
+ Bool notrapSignals; /* don't exit cleanly - die at fault */
+ Bool caughtSignal;
/* graphics part */
- ScreenPtr currentScreen;
+ ScreenPtr currentScreen;
#if defined(CSRG_BASED) || defined(__FreeBSD_kernel__)
- int consType; /* Which console driver? */
+ int consType; /* Which console driver? */
#endif
/* Other things */
- Bool allowMouseOpenFail;
- Bool vidModeEnabled; /* VidMode extension enabled */
- Bool vidModeAllowNonLocal; /* allow non-local VidMode
- * connections */
- Bool miscModInDevEnabled; /* Allow input devices to be
- * changed */
- Bool miscModInDevAllowNonLocal;
- Bool useSIGIO; /* Use SIGIO for handling
- input device events */
- Pix24Flags pixmap24;
- MessageType pix24From;
- Bool pmFlag;
- Log log;
- Bool disableRandR;
- MessageType randRFrom;
- Bool aiglx;
- MessageType aiglxFrom;
- XF86_GlxVisuals glxVisuals;
- MessageType glxVisualsFrom;
-
- Bool useDefaultFontPath;
- MessageType useDefaultFontPathFrom;
- Bool ignoreABI;
-
- Bool forceInputDevices; /* force xorg.conf or built-in input devices */
- Bool autoAddDevices; /* Whether to succeed NIDR, or ignore. */
- Bool autoEnableDevices; /* Whether to enable, or let the client
- * control. */
-
- Bool dri2;
- MessageType dri2From;
+ Bool allowMouseOpenFail;
+ Bool vidModeEnabled; /* VidMode extension enabled */
+ Bool vidModeAllowNonLocal; /* allow non-local VidMode
+ * connections */
+ Bool miscModInDevEnabled; /* Allow input devices to be
+ * changed */
+ Bool miscModInDevAllowNonLocal;
+ Bool useSIGIO; /* Use SIGIO for handling
+ input device events */
+ Pix24Flags pixmap24;
+ MessageType pix24From;
+ Bool pmFlag;
+ Log log;
+ Bool disableRandR;
+ MessageType randRFrom;
+ Bool aiglx;
+ MessageType aiglxFrom;
+ XF86_GlxVisuals glxVisuals;
+ MessageType glxVisualsFrom;
+
+ Bool useDefaultFontPath;
+ MessageType useDefaultFontPathFrom;
+ Bool ignoreABI;
+
+ Bool forceInputDevices; /* force xorg.conf or built-in input devices */
+ Bool autoAddDevices; /* Whether to succeed NIDR, or ignore. */
+ Bool autoEnableDevices; /* Whether to enable, or let the client
+ * control. */
+
+ Bool dri2;
+ MessageType dri2From;
} xf86InfoRec, *xf86InfoPtr;
#ifdef DPMSExtension
/* Private info for DPMS */
typedef struct {
- CloseScreenProcPtr CloseScreen;
- Bool Enabled;
- int Flags;
+ CloseScreenProcPtr CloseScreen;
+ Bool Enabled;
+ int Flags;
} DPMSRec, *DPMSPtr;
#endif
#ifdef XF86VIDMODE
/* Private info for Video Mode Extentsion */
typedef struct {
- DisplayModePtr First;
- DisplayModePtr Next;
- int Flags;
- CloseScreenProcPtr CloseScreen;
+ DisplayModePtr First;
+ DisplayModePtr Next;
+ int Flags;
+ CloseScreenProcPtr CloseScreen;
} VidModeRec, *VidModePtr;
#endif
/* Information for root window properties. */
typedef struct _RootWinProp {
- struct _RootWinProp * next;
- char * name;
- Atom type;
- short format;
- long size;
- pointer data;
+ struct _RootWinProp *next;
+ char *name;
+ Atom type;
+ short format;
+ long size;
+ pointer data;
} RootWinProp, *RootWinPropPtr;
/* ISC's cc can't handle ~ of UL constants, so explicitly type cast them. */
@@ -161,4 +161,4 @@ typedef struct _RootWinProp {
#define WSCONS 32
#endif
-#endif /* _XF86PRIVSTR_H */
+#endif /* _XF86PRIVSTR_H */
diff --git a/xorg-server/hw/xfree86/common/xf86VGAarbiter.h b/xorg-server/hw/xfree86/common/xf86VGAarbiter.h
index ae9c51dd2..bb52cf78a 100644
--- a/xorg-server/hw/xfree86/common/xf86VGAarbiter.h
+++ b/xorg-server/hw/xfree86/common/xf86VGAarbiter.h
@@ -1,48 +1,49 @@
-/*
- * Copyright (c) 2009 Tiago Vignatti
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following
- * conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef __XF86VGAARBITER_H
-#define __XF86VGAARBITER_H
-
-#include "screenint.h"
-#include "misc.h"
-#include "xf86.h"
-
-/* Functions */
-extern void xf86VGAarbiterInit(void);
-extern void xf86VGAarbiterFini(void);
-void xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn);
-extern Bool xf86VGAarbiterWrapFunctions(void);
-extern void xf86VGAarbiterLock(ScrnInfoPtr pScrn);
-extern void xf86VGAarbiterUnlock(ScrnInfoPtr pScrn);
-
-/* allow a driver to remove itself from arbiter - really should be
- * done in the kernel though */
-extern _X_EXPORT void xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn, int rsrc);
-/* DRI and arbiter are really not possible together,
- * you really want to remove the card from arbitration if you can */
-extern _X_EXPORT Bool xf86VGAarbiterAllowDRI(ScreenPtr pScreen);
-
-#endif /* __XF86VGAARBITER_H */
+/*
+ * Copyright (c) 2009 Tiago Vignatti
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef __XF86VGAARBITER_H
+#define __XF86VGAARBITER_H
+
+#include "screenint.h"
+#include "misc.h"
+#include "xf86.h"
+
+/* Functions */
+extern void xf86VGAarbiterInit(void);
+extern void xf86VGAarbiterFini(void);
+void xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn);
+extern Bool xf86VGAarbiterWrapFunctions(void);
+extern void xf86VGAarbiterLock(ScrnInfoPtr pScrn);
+extern void xf86VGAarbiterUnlock(ScrnInfoPtr pScrn);
+
+/* allow a driver to remove itself from arbiter - really should be
+ * done in the kernel though */
+extern _X_EXPORT void xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn, int rsrc);
+
+/* DRI and arbiter are really not possible together,
+ * you really want to remove the card from arbitration if you can */
+extern _X_EXPORT Bool xf86VGAarbiterAllowDRI(ScreenPtr pScreen);
+
+#endif /* __XF86VGAARBITER_H */
diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.h b/xorg-server/hw/xfree86/common/xf86Xinput.h
index 3731a34d5..1d4363a50 100644
--- a/xorg-server/hw/xfree86/common/xf86Xinput.h
+++ b/xorg-server/hw/xfree86/common/xf86Xinput.h
@@ -61,6 +61,9 @@
#define XI86_ALWAYS_CORE 0x04 /* device always controls the pointer */
/* the device sends Xinput and core pointer events */
#define XI86_SEND_CORE_EVENTS XI86_ALWAYS_CORE
+/* 0x08 is reserved for legacy XI86_SEND_DRAG_EVENTS, do not use for now */
+/* server-internal only */
+#define XI86_DEVICE_DISABLED 0x10 /* device was disabled before vt switch */
/* This holds the input driver entry and module information. */
typedef struct _InputDriverRec {
diff --git a/xorg-server/hw/xfree86/common/xf86fbBus.c b/xorg-server/hw/xfree86/common/xf86fbBus.c
index 45929804f..1e5162332 100644
--- a/xorg-server/hw/xfree86/common/xf86fbBus.c
+++ b/xorg-server/hw/xfree86/common/xf86fbBus.c
@@ -56,13 +56,13 @@ xf86ClaimFbSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active)
#ifdef XSERVER_LIBPCIACCESS
if (pciSlotClaimed)
- return -1;
+ return -1;
#endif
#if defined(__sparc__) || defined (__sparc64__)
if (sbusSlotClaimed)
- return -1;
+ return -1;
#endif
-
+
num = xf86AllocateEntity();
p = xf86Entities[num];
p->driver = drvp;
@@ -85,12 +85,12 @@ xf86GetFbInfoForScreen(int scrnIndex)
int num = 0;
int i;
EntityPtr p;
-
+
for (i = 0; i < xf86Screens[scrnIndex]->numEntities; i++) {
- p = xf86Entities[xf86Screens[scrnIndex]->entityList[i]];
- if (p->bus.type == BUS_NONE) {
- num++;
- }
+ p = xf86Entities[xf86Screens[scrnIndex]->entityList[i]];
+ if (p->bus.type == BUS_NONE) {
+ num++;
+ }
}
return num;
}
diff --git a/xorg-server/hw/xfree86/common/xf86noBus.c b/xorg-server/hw/xfree86/common/xf86noBus.c
index 0b9634918..4f55def7b 100644
--- a/xorg-server/hw/xfree86/common/xf86noBus.c
+++ b/xorg-server/hw/xfree86/common/xf86noBus.c
@@ -51,7 +51,7 @@ xf86ClaimNoSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active)
{
EntityPtr p;
int num;
-
+
num = xf86AllocateEntity();
p = xf86Entities[num];
p->driver = drvp;
diff --git a/xorg-server/hw/xfree86/common/xf86pciBus.h b/xorg-server/hw/xfree86/common/xf86pciBus.h
index a631fbffb..56ec6e9e7 100644
--- a/xorg-server/hw/xfree86/common/xf86pciBus.h
+++ b/xorg-server/hw/xfree86/common/xf86pciBus.h
@@ -1,45 +1,45 @@
-
-/*
- * Copyright (c) 1999-2003 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of the copyright holder(s)
- * and author(s) shall not be used in advertising or otherwise to promote
- * the sale, use or other dealings in this Software without prior written
- * authorization from the copyright holder(s) and author(s).
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#ifndef _XF86_PCI_BUS_H
-#define _XF86_PCI_BUS_H
-
-void xf86PciProbe(void);
-Bool xf86PciAddMatchingDev(DriverPtr drvp);
-Bool xf86PciProbeDev(DriverPtr drvp);
-void xf86PciIsolateDevice(char *argument);
-int xf86PciMatchDriver(char* matches[], int nmatches);
-Bool xf86PciConfigure(void *busData, struct pci_device *pDev);
-void xf86PciConfigureNewDev(void *busData, struct pci_device *pVideo,
- GDevRec *GDev, int *chipset);
-
-#endif /* _XF86_PCI_BUS_H */
+
+/*
+ * Copyright (c) 1999-2003 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#ifndef _XF86_PCI_BUS_H
+#define _XF86_PCI_BUS_H
+
+void xf86PciProbe(void);
+Bool xf86PciAddMatchingDev(DriverPtr drvp);
+Bool xf86PciProbeDev(DriverPtr drvp);
+void xf86PciIsolateDevice(char *argument);
+int xf86PciMatchDriver(char *matches[], int nmatches);
+Bool xf86PciConfigure(void *busData, struct pci_device *pDev);
+void xf86PciConfigureNewDev(void *busData, struct pci_device *pVideo,
+ GDevRec * GDev, int *chipset);
+
+#endif /* _XF86_PCI_BUS_H */
diff --git a/xorg-server/hw/xfree86/common/xf86xvpriv.h b/xorg-server/hw/xfree86/common/xf86xvpriv.h
index 7eb46e51f..289ca5843 100644
--- a/xorg-server/hw/xfree86/common/xf86xvpriv.h
+++ b/xorg-server/hw/xfree86/common/xf86xvpriv.h
@@ -1,88 +1,88 @@
-
-/*
- * Copyright (c) 2003 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of the copyright holder(s)
- * and author(s) shall not be used in advertising or otherwise to promote
- * the sale, use or other dealings in this Software without prior written
- * authorization from the copyright holder(s) and author(s).
- */
-
-#ifndef _XF86XVPRIV_H_
-#define _XF86XVPRIV_H_
-
-#include "xf86xv.h"
-#include "privates.h"
-
-/*** These are DDX layer privates ***/
-
-extern _X_EXPORT DevPrivateKey XF86XvScreenKey;
-
-typedef struct {
- DestroyWindowProcPtr DestroyWindow;
- ClipNotifyProcPtr ClipNotify;
- WindowExposuresProcPtr WindowExposures;
- PostValidateTreeProcPtr PostValidateTree;
- void (*AdjustFrame)(int, int, int, int);
- Bool (*EnterVT)(int, int);
- void (*LeaveVT)(int, int);
- xf86ModeSetProc *ModeSet;
-} XF86XVScreenRec, *XF86XVScreenPtr;
-
-typedef struct {
- int flags;
- PutVideoFuncPtr PutVideo;
- PutStillFuncPtr PutStill;
- GetVideoFuncPtr GetVideo;
- GetStillFuncPtr GetStill;
- StopVideoFuncPtr StopVideo;
- SetPortAttributeFuncPtr SetPortAttribute;
- GetPortAttributeFuncPtr GetPortAttribute;
- QueryBestSizeFuncPtr QueryBestSize;
- PutImageFuncPtr PutImage;
- ReputImageFuncPtr ReputImage;
- QueryImageAttributesFuncPtr QueryImageAttributes;
- ClipNotifyFuncPtr ClipNotify;
-} XvAdaptorRecPrivate, *XvAdaptorRecPrivatePtr;
-
-typedef struct {
- ScrnInfoPtr pScrn;
- DrawablePtr pDraw;
- unsigned char type;
- unsigned int subWindowMode;
- RegionPtr clientClip;
- RegionPtr ckeyFilled;
- RegionPtr pCompositeClip;
- Bool FreeCompositeClip;
- XvAdaptorRecPrivatePtr AdaptorRec;
- XvStatus isOn;
- Bool clipChanged;
- int vid_x, vid_y, vid_w, vid_h;
- int drw_x, drw_y, drw_w, drw_h;
- DevUnion DevPriv;
-} XvPortRecPrivate, *XvPortRecPrivatePtr;
-
-typedef struct _XF86XVWindowRec{
- XvPortRecPrivatePtr PortRec;
- struct _XF86XVWindowRec *next;
-} XF86XVWindowRec, *XF86XVWindowPtr;
-
-#endif /* _XF86XVPRIV_H_ */
+
+/*
+ * Copyright (c) 2003 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+#ifndef _XF86XVPRIV_H_
+#define _XF86XVPRIV_H_
+
+#include "xf86xv.h"
+#include "privates.h"
+
+/*** These are DDX layer privates ***/
+
+extern _X_EXPORT DevPrivateKey XF86XvScreenKey;
+
+typedef struct {
+ DestroyWindowProcPtr DestroyWindow;
+ ClipNotifyProcPtr ClipNotify;
+ WindowExposuresProcPtr WindowExposures;
+ PostValidateTreeProcPtr PostValidateTree;
+ void (*AdjustFrame) (int, int, int, int);
+ Bool (*EnterVT) (int, int);
+ void (*LeaveVT) (int, int);
+ xf86ModeSetProc *ModeSet;
+} XF86XVScreenRec, *XF86XVScreenPtr;
+
+typedef struct {
+ int flags;
+ PutVideoFuncPtr PutVideo;
+ PutStillFuncPtr PutStill;
+ GetVideoFuncPtr GetVideo;
+ GetStillFuncPtr GetStill;
+ StopVideoFuncPtr StopVideo;
+ SetPortAttributeFuncPtr SetPortAttribute;
+ GetPortAttributeFuncPtr GetPortAttribute;
+ QueryBestSizeFuncPtr QueryBestSize;
+ PutImageFuncPtr PutImage;
+ ReputImageFuncPtr ReputImage;
+ QueryImageAttributesFuncPtr QueryImageAttributes;
+ ClipNotifyFuncPtr ClipNotify;
+} XvAdaptorRecPrivate, *XvAdaptorRecPrivatePtr;
+
+typedef struct {
+ ScrnInfoPtr pScrn;
+ DrawablePtr pDraw;
+ unsigned char type;
+ unsigned int subWindowMode;
+ RegionPtr clientClip;
+ RegionPtr ckeyFilled;
+ RegionPtr pCompositeClip;
+ Bool FreeCompositeClip;
+ XvAdaptorRecPrivatePtr AdaptorRec;
+ XvStatus isOn;
+ Bool clipChanged;
+ int vid_x, vid_y, vid_w, vid_h;
+ int drw_x, drw_y, drw_w, drw_h;
+ DevUnion DevPriv;
+} XvPortRecPrivate, *XvPortRecPrivatePtr;
+
+typedef struct _XF86XVWindowRec {
+ XvPortRecPrivatePtr PortRec;
+ struct _XF86XVWindowRec *next;
+} XF86XVWindowRec, *XF86XVWindowPtr;
+
+#endif /* _XF86XVPRIV_H_ */
diff --git a/xorg-server/hw/xfree86/common/xorgHelper.c b/xorg-server/hw/xfree86/common/xorgHelper.c
index 7a8e5167d..174ca6bb7 100644
--- a/xorg-server/hw/xfree86/common/xorgHelper.c
+++ b/xorg-server/hw/xfree86/common/xorgHelper.c
@@ -15,7 +15,6 @@
#include "xf86Priv.h"
#include "xorgVersion.h"
-
CARD32
xorgGetVersion(void)
{
diff --git a/xorg-server/hw/xfree86/common/xorgVersion.h b/xorg-server/hw/xfree86/common/xorgVersion.h
index f627e87a5..e34ddecdf 100644
--- a/xorg-server/hw/xfree86/common/xorgVersion.h
+++ b/xorg-server/hw/xfree86/common/xorgVersion.h
@@ -27,23 +27,23 @@
*/
#ifndef XORG_VERSION_H
-# define XORG_VERSION_H
+#define XORG_VERSION_H
-# ifndef XORG_VERSION_CURRENT
-# error
-# endif
+#ifndef XORG_VERSION_CURRENT
+#error
+#endif
-# define XORG_VERSION_NUMERIC(major,minor,patch,snap,dummy) \
+#define XORG_VERSION_NUMERIC(major,minor,patch,snap,dummy) \
(((major) * 10000000) + ((minor) * 100000) + ((patch) * 1000) + snap)
-# define XORG_GET_MAJOR_VERSION(vers) ((vers) / 10000000)
-# define XORG_GET_MINOR_VERSION(vers) (((vers) % 10000000) / 100000)
-# define XORG_GET_PATCH_VERSION(vers) (((vers) % 100000) / 1000)
-# define XORG_GET_SNAP_VERSION(vers) ((vers) % 1000)
+#define XORG_GET_MAJOR_VERSION(vers) ((vers) / 10000000)
+#define XORG_GET_MINOR_VERSION(vers) (((vers) % 10000000) / 100000)
+#define XORG_GET_PATCH_VERSION(vers) (((vers) % 100000) / 1000)
+#define XORG_GET_SNAP_VERSION(vers) ((vers) % 1000)
-# define XORG_VERSION_MAJOR XORG_GET_MAJOR_VERSION(XORG_VERSION_CURRENT)
-# define XORG_VERSION_MINOR XORG_GET_MINOR_VERSION(XORG_VERSION_CURRENT)
-# define XORG_VERSION_PATCH XORG_GET_PATCH_VERSION(XORG_VERSION_CURRENT)
-# define XORG_VERSION_SNAP XORG_GET_SNAP_VERSION(XORG_VERSION_CURRENT)
+#define XORG_VERSION_MAJOR XORG_GET_MAJOR_VERSION(XORG_VERSION_CURRENT)
+#define XORG_VERSION_MINOR XORG_GET_MINOR_VERSION(XORG_VERSION_CURRENT)
+#define XORG_VERSION_PATCH XORG_GET_PATCH_VERSION(XORG_VERSION_CURRENT)
+#define XORG_VERSION_SNAP XORG_GET_SNAP_VERSION(XORG_VERSION_CURRENT)
#endif
diff --git a/xorg-server/hw/xfree86/dixmods/extmod/xvmod.c b/xorg-server/hw/xfree86/dixmods/extmod/xvmod.c
index 955104679..97616c705 100644
--- a/xorg-server/hw/xfree86/dixmods/extmod/xvmod.c
+++ b/xorg-server/hw/xfree86/dixmods/extmod/xvmod.c
@@ -20,4 +20,3 @@ XvRegister(void)
XvGetRTPortProc = XvGetRTPort;
XvMCScreenInitProc = XvMCScreenInit;
}
-
diff --git a/xorg-server/hw/xfree86/dixmods/extmod/xvmodproc.h b/xorg-server/hw/xfree86/dixmods/extmod/xvmodproc.h
index b39c915b4..be51e559d 100644
--- a/xorg-server/hw/xfree86/dixmods/extmod/xvmodproc.h
+++ b/xorg-server/hw/xfree86/dixmods/extmod/xvmodproc.h
@@ -5,9 +5,9 @@
#include "xvmcext.h"
-extern DevPrivateKey (*XvGetScreenKeyProc)(void);
-extern unsigned long (*XvGetRTPortProc)(void);
-extern int (*XvScreenInitProc)(ScreenPtr);
-extern int (*XvMCScreenInitProc)(ScreenPtr, int, XvMCAdaptorPtr);
+extern DevPrivateKey (*XvGetScreenKeyProc) (void);
+extern unsigned long (*XvGetRTPortProc) (void);
+extern int (*XvScreenInitProc) (ScreenPtr);
+extern int (*XvMCScreenInitProc) (ScreenPtr, int, XvMCAdaptorPtr);
extern void XvRegister(void);
diff --git a/xorg-server/hw/xfree86/dixmods/recordmod.c b/xorg-server/hw/xfree86/dixmods/recordmod.c
index 63d340e75..b75cc3fdb 100644
--- a/xorg-server/hw/xfree86/dixmods/recordmod.c
+++ b/xorg-server/hw/xfree86/dixmods/recordmod.c
@@ -19,16 +19,16 @@ static ExtensionModule recordExt = {
};
static XF86ModuleVersionInfo VersRec = {
- "record",
- MODULEVENDORSTRING,
- MODINFOSTRING1,
- MODINFOSTRING2,
- XORG_VERSION_CURRENT,
- 1, 13, 0,
- ABI_CLASS_EXTENSION,
- ABI_EXTENSION_VERSION,
- MOD_CLASS_EXTENSION,
- {0,0,0,0}
+ "record",
+ MODULEVENDORSTRING,
+ MODINFOSTRING1,
+ MODINFOSTRING2,
+ XORG_VERSION_CURRENT,
+ 1, 13, 0,
+ ABI_CLASS_EXTENSION,
+ ABI_EXTENSION_VERSION,
+ MOD_CLASS_EXTENSION,
+ {0, 0, 0, 0}
};
_X_EXPORT XF86ModuleData recordModuleData = { &VersRec, recordSetup, NULL };
@@ -39,6 +39,5 @@ recordSetup(pointer module, pointer opts, int *errmaj, int *errmin)
LoadExtension(&recordExt, FALSE);
/* Need a non-NULL return value to indicate success */
- return (pointer)1;
+ return (pointer) 1;
}
-
diff --git a/xorg-server/hw/xfree86/dixmods/xkbKillSrv.c b/xorg-server/hw/xfree86/dixmods/xkbKillSrv.c
index 0f4e25c0c..6dd21dd51 100644
--- a/xorg-server/hw/xfree86/dixmods/xkbKillSrv.c
+++ b/xorg-server/hw/xfree86/dixmods/xkbKillSrv.c
@@ -45,7 +45,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "xf86.h"
int
-XkbDDXTerminateServer(DeviceIntPtr dev,KeyCode key,XkbAction *act)
+XkbDDXTerminateServer(DeviceIntPtr dev, KeyCode key, XkbAction *act)
{
if (dev != inputInfo.keyboard)
xf86ProcessActionEvent(ACTION_TERMINATE, NULL);
diff --git a/xorg-server/hw/xfree86/dixmods/xkbPrivate.c b/xorg-server/hw/xfree86/dixmods/xkbPrivate.c
index 06d1c2b3d..574590f28 100644
--- a/xorg-server/hw/xfree86/dixmods/xkbPrivate.c
+++ b/xorg-server/hw/xfree86/dixmods/xkbPrivate.c
@@ -18,31 +18,32 @@
#include "xf86.h"
int
-XkbDDXPrivate(DeviceIntPtr dev,KeyCode key,XkbAction *act)
+XkbDDXPrivate(DeviceIntPtr dev, KeyCode key, XkbAction *act)
{
XkbAnyAction *xf86act = &(act->any);
- char msgbuf[XkbAnyActionDataSize+1];
+ char msgbuf[XkbAnyActionDataSize + 1];
if (xf86act->type == XkbSA_XFree86Private) {
memcpy(msgbuf, xf86act->data, XkbAnyActionDataSize);
- msgbuf[XkbAnyActionDataSize]= '\0';
- if (strcasecmp(msgbuf, "-vmode")==0)
+ msgbuf[XkbAnyActionDataSize] = '\0';
+ if (strcasecmp(msgbuf, "-vmode") == 0)
xf86ProcessActionEvent(ACTION_PREV_MODE, NULL);
- else if (strcasecmp(msgbuf, "+vmode")==0)
+ else if (strcasecmp(msgbuf, "+vmode") == 0)
xf86ProcessActionEvent(ACTION_NEXT_MODE, NULL);
- else if (strcasecmp(msgbuf, "prgrbs")==0) {
+ else if (strcasecmp(msgbuf, "prgrbs") == 0) {
DeviceIntPtr tmp;
+
xf86Msg(X_INFO, "Printing all currently active device grabs:\n");
for (tmp = inputInfo.devices; tmp; tmp = tmp->next)
if (tmp->deviceGrab.grab)
PrintDeviceGrabInfo(tmp);
xf86Msg(X_INFO, "End list of active device grabs\n");
}
- else if (strcasecmp(msgbuf, "ungrab")==0)
+ else if (strcasecmp(msgbuf, "ungrab") == 0)
UngrabAllDevices(FALSE);
- else if (strcasecmp(msgbuf, "clsgrb")==0)
+ else if (strcasecmp(msgbuf, "clsgrb") == 0)
UngrabAllDevices(TRUE);
- else if (strcasecmp(msgbuf, "prwins")==0)
+ else if (strcasecmp(msgbuf, "prwins") == 0)
PrintWindowTree();
}
diff --git a/xorg-server/hw/xfree86/dixmods/xkbVT.c b/xorg-server/hw/xfree86/dixmods/xkbVT.c
index 13bd6f41e..4ca4451d0 100644
--- a/xorg-server/hw/xfree86/dixmods/xkbVT.c
+++ b/xorg-server/hw/xfree86/dixmods/xkbVT.c
@@ -45,18 +45,18 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "xf86.h"
int
-XkbDDXSwitchScreen(DeviceIntPtr dev,KeyCode key,XkbAction *act)
+XkbDDXSwitchScreen(DeviceIntPtr dev, KeyCode key, XkbAction *act)
{
int scrnnum = XkbSAScreen(&act->screen);
if (act->screen.flags & XkbSA_SwitchApplication) {
if (act->screen.flags & XkbSA_SwitchAbsolute)
- xf86ProcessActionEvent(ACTION_SWITCHSCREEN,(void *) &scrnnum);
+ xf86ProcessActionEvent(ACTION_SWITCHSCREEN, (void *) &scrnnum);
else {
if (scrnnum < 0)
- xf86ProcessActionEvent(ACTION_SWITCHSCREEN_PREV,NULL);
+ xf86ProcessActionEvent(ACTION_SWITCHSCREEN_PREV, NULL);
else
- xf86ProcessActionEvent(ACTION_SWITCHSCREEN_NEXT,NULL);
+ xf86ProcessActionEvent(ACTION_SWITCHSCREEN_NEXT, NULL);
}
}
diff --git a/xorg-server/hw/xfree86/dri/sarea.h b/xorg-server/hw/xfree86/dri/sarea.h
index 1528cc191..7a55b49d6 100644
--- a/xorg-server/hw/xfree86/dri/sarea.h
+++ b/xorg-server/hw/xfree86/dri/sarea.h
@@ -33,7 +33,6 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-
#ifndef _SAREA_H_
#define _SAREA_H_
@@ -43,7 +42,7 @@
#if defined(__alpha__)
#define SAREA_MAX 0x2000
#elif defined(__ia64__)
-#define SAREA_MAX 0x10000 /* 64kB */
+#define SAREA_MAX 0x10000 /* 64kB */
#else
/* Intel 830M driver needs at least 8k SAREA */
#define SAREA_MAX 0x2000
@@ -59,8 +58,8 @@
* \sa _XF86DRISAREA.
*/
typedef struct _XF86DRISAREADrawable {
- unsigned int stamp;
- unsigned int flags;
+ unsigned int stamp;
+ unsigned int flags;
} XF86DRISAREADrawableRec, *XF86DRISAREADrawablePtr;
/**
@@ -69,11 +68,11 @@ typedef struct _XF86DRISAREADrawable {
* \sa _XF86DRISAREA.
*/
typedef struct _XF86DRISAREAFrame {
- unsigned int x;
- unsigned int y;
- unsigned int width;
- unsigned int height;
- unsigned int fullscreen;
+ unsigned int x;
+ unsigned int y;
+ unsigned int width;
+ unsigned int height;
+ unsigned int fullscreen;
} XF86DRISAREAFrameRec, *XF86DRISAREAFramePtr;
/**
@@ -81,17 +80,17 @@ typedef struct _XF86DRISAREAFrame {
*/
typedef struct _XF86DRISAREA {
/** first thing is always the DRM locking structure */
- drmLock lock;
+ drmLock lock;
/** \todo Use readers/writer lock for drawable_lock */
- drmLock drawable_lock;
- XF86DRISAREADrawableRec drawableTable[SAREA_MAX_DRAWABLES];
- XF86DRISAREAFrameRec frame;
- drm_context_t dummy_context;
+ drmLock drawable_lock;
+ XF86DRISAREADrawableRec drawableTable[SAREA_MAX_DRAWABLES];
+ XF86DRISAREAFrameRec frame;
+ drm_context_t dummy_context;
} XF86DRISAREARec, *XF86DRISAREAPtr;
-typedef struct _XF86DRILSAREA {
- drmLock lock;
- drmLock otherLocks[31];
+typedef struct _XF86DRILSAREA {
+ drmLock lock;
+ drmLock otherLocks[31];
} XF86DRILSAREARec, *XF86DRILSAREAPtr;
#endif
diff --git a/xorg-server/hw/xfree86/fbdevhw/fbpriv.h b/xorg-server/hw/xfree86/fbdevhw/fbpriv.h
index 4c08ec15d..340a4428c 100644
--- a/xorg-server/hw/xfree86/fbdevhw/fbpriv.h
+++ b/xorg-server/hw/xfree86/fbdevhw/fbpriv.h
@@ -16,8 +16,8 @@
#define FB_MAJOR 29
-#define FB_MODES_SHIFT 5 /* 32 modes per framebuffer */
-#define FB_NUM_MINORS 256 /* 256 Minors */
+#define FB_MODES_SHIFT 5 /* 32 modes per framebuffer */
+#define FB_NUM_MINORS 256 /* 256 Minors */
#define FB_MAX (FB_NUM_MINORS / (1 << FB_MODES_SHIFT))
#define GET_FB_IDX(node) (MINOR(node) >> FB_MODES_SHIFT)
@@ -37,75 +37,75 @@
#define FBIOPUT_CON2FBMAP 0x4610
#define FBIOBLANK 0x4611
-#define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */
-#define FB_TYPE_PLANES 1 /* Non interleaved planes */
-#define FB_TYPE_INTERLEAVED_PLANES 2 /* Interleaved planes */
-#define FB_TYPE_TEXT 3 /* Text/attributes */
-
-#define FB_AUX_TEXT_MDA 0 /* Monochrome text */
-#define FB_AUX_TEXT_CGA 1 /* CGA/EGA/VGA Color text */
-#define FB_AUX_TEXT_S3_MMIO 2 /* S3 MMIO fasttext */
-#define FB_AUX_TEXT_MGA_STEP16 3 /* MGA Millenium I: text, attr, 14 reserved bytes */
-#define FB_AUX_TEXT_MGA_STEP8 4 /* other MGAs: text, attr, 6 reserved bytes */
-
-#define FB_VISUAL_MONO01 0 /* Monochr. 1=Black 0=White */
-#define FB_VISUAL_MONO10 1 /* Monochr. 1=White 0=Black */
-#define FB_VISUAL_TRUECOLOR 2 /* True color */
-#define FB_VISUAL_PSEUDOCOLOR 3 /* Pseudo color (like atari) */
-#define FB_VISUAL_DIRECTCOLOR 4 /* Direct color */
-#define FB_VISUAL_STATIC_PSEUDOCOLOR 5 /* Pseudo color readonly */
-
-#define FB_ACCEL_NONE 0 /* no hardware accelerator */
-#define FB_ACCEL_ATARIBLITT 1 /* Atari Blitter */
-#define FB_ACCEL_AMIGABLITT 2 /* Amiga Blitter */
-#define FB_ACCEL_S3_TRIO64 3 /* Cybervision64 (S3 Trio64) */
-#define FB_ACCEL_NCR_77C32BLT 4 /* RetinaZ3 (NCR 77C32BLT) */
-#define FB_ACCEL_S3_VIRGE 5 /* Cybervision64/3D (S3 ViRGE) */
-#define FB_ACCEL_ATI_MACH64GX 6 /* ATI Mach 64GX family */
-#define FB_ACCEL_DEC_TGA 7 /* DEC 21030 TGA */
-#define FB_ACCEL_ATI_MACH64CT 8 /* ATI Mach 64CT family */
-#define FB_ACCEL_ATI_MACH64VT 9 /* ATI Mach 64CT family VT class */
-#define FB_ACCEL_ATI_MACH64GT 10 /* ATI Mach 64CT family GT class */
-#define FB_ACCEL_SUN_CREATOR 11 /* Sun Creator/Creator3D */
-#define FB_ACCEL_SUN_CGSIX 12 /* Sun cg6 */
-#define FB_ACCEL_SUN_LEO 13 /* Sun leo/zx */
-#define FB_ACCEL_IMS_TWINTURBO 14 /* IMS Twin Turbo */
-#define FB_ACCEL_3DLABS_PERMEDIA2 15 /* 3Dlabs Permedia 2 */
-#define FB_ACCEL_MATROX_MGA2064W 16 /* Matrox MGA2064W (Millenium) */
-#define FB_ACCEL_MATROX_MGA1064SG 17 /* Matrox MGA1064SG (Mystique) */
-#define FB_ACCEL_MATROX_MGA2164W 18 /* Matrox MGA2164W (Millenium II) */
-#define FB_ACCEL_MATROX_MGA2164W_AGP 19 /* Matrox MGA2164W (Millenium II) */
-#define FB_ACCEL_MATROX_MGAG100 20 /* Matrox G100 (Productiva G100) */
-#define FB_ACCEL_MATROX_MGAG200 21 /* Matrox G200 (Myst, Mill, ...) */
-#define FB_ACCEL_SUN_CG14 22 /* Sun cgfourteen */
-#define FB_ACCEL_SUN_BWTWO 23 /* Sun bwtwo */
-#define FB_ACCEL_SUN_CGTHREE 24 /* Sun cgthree */
-#define FB_ACCEL_SUN_TCX 25 /* Sun tcx */
-#define FB_ACCEL_MATROX_MGAG400 26 /* Matrox G400 */
-#define FB_ACCEL_NV3 27 /* nVidia RIVA 128 */
-#define FB_ACCEL_NV4 28 /* nVidia RIVA TNT */
-#define FB_ACCEL_NV5 29 /* nVidia RIVA TNT2 */
-#define FB_ACCEL_CT_6555x 30 /* C&T 6555x */
-#define FB_ACCEL_3DFX_BANSHEE 31 /* 3Dfx Banshee */
-#define FB_ACCEL_ATI_RAGE128 32 /* ATI Rage128 family */
+#define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */
+#define FB_TYPE_PLANES 1 /* Non interleaved planes */
+#define FB_TYPE_INTERLEAVED_PLANES 2 /* Interleaved planes */
+#define FB_TYPE_TEXT 3 /* Text/attributes */
+
+#define FB_AUX_TEXT_MDA 0 /* Monochrome text */
+#define FB_AUX_TEXT_CGA 1 /* CGA/EGA/VGA Color text */
+#define FB_AUX_TEXT_S3_MMIO 2 /* S3 MMIO fasttext */
+#define FB_AUX_TEXT_MGA_STEP16 3 /* MGA Millenium I: text, attr, 14 reserved bytes */
+#define FB_AUX_TEXT_MGA_STEP8 4 /* other MGAs: text, attr, 6 reserved bytes */
+
+#define FB_VISUAL_MONO01 0 /* Monochr. 1=Black 0=White */
+#define FB_VISUAL_MONO10 1 /* Monochr. 1=White 0=Black */
+#define FB_VISUAL_TRUECOLOR 2 /* True color */
+#define FB_VISUAL_PSEUDOCOLOR 3 /* Pseudo color (like atari) */
+#define FB_VISUAL_DIRECTCOLOR 4 /* Direct color */
+#define FB_VISUAL_STATIC_PSEUDOCOLOR 5 /* Pseudo color readonly */
+
+#define FB_ACCEL_NONE 0 /* no hardware accelerator */
+#define FB_ACCEL_ATARIBLITT 1 /* Atari Blitter */
+#define FB_ACCEL_AMIGABLITT 2 /* Amiga Blitter */
+#define FB_ACCEL_S3_TRIO64 3 /* Cybervision64 (S3 Trio64) */
+#define FB_ACCEL_NCR_77C32BLT 4 /* RetinaZ3 (NCR 77C32BLT) */
+#define FB_ACCEL_S3_VIRGE 5 /* Cybervision64/3D (S3 ViRGE) */
+#define FB_ACCEL_ATI_MACH64GX 6 /* ATI Mach 64GX family */
+#define FB_ACCEL_DEC_TGA 7 /* DEC 21030 TGA */
+#define FB_ACCEL_ATI_MACH64CT 8 /* ATI Mach 64CT family */
+#define FB_ACCEL_ATI_MACH64VT 9 /* ATI Mach 64CT family VT class */
+#define FB_ACCEL_ATI_MACH64GT 10 /* ATI Mach 64CT family GT class */
+#define FB_ACCEL_SUN_CREATOR 11 /* Sun Creator/Creator3D */
+#define FB_ACCEL_SUN_CGSIX 12 /* Sun cg6 */
+#define FB_ACCEL_SUN_LEO 13 /* Sun leo/zx */
+#define FB_ACCEL_IMS_TWINTURBO 14 /* IMS Twin Turbo */
+#define FB_ACCEL_3DLABS_PERMEDIA2 15 /* 3Dlabs Permedia 2 */
+#define FB_ACCEL_MATROX_MGA2064W 16 /* Matrox MGA2064W (Millenium) */
+#define FB_ACCEL_MATROX_MGA1064SG 17 /* Matrox MGA1064SG (Mystique) */
+#define FB_ACCEL_MATROX_MGA2164W 18 /* Matrox MGA2164W (Millenium II) */
+#define FB_ACCEL_MATROX_MGA2164W_AGP 19 /* Matrox MGA2164W (Millenium II) */
+#define FB_ACCEL_MATROX_MGAG100 20 /* Matrox G100 (Productiva G100) */
+#define FB_ACCEL_MATROX_MGAG200 21 /* Matrox G200 (Myst, Mill, ...) */
+#define FB_ACCEL_SUN_CG14 22 /* Sun cgfourteen */
+#define FB_ACCEL_SUN_BWTWO 23 /* Sun bwtwo */
+#define FB_ACCEL_SUN_CGTHREE 24 /* Sun cgthree */
+#define FB_ACCEL_SUN_TCX 25 /* Sun tcx */
+#define FB_ACCEL_MATROX_MGAG400 26 /* Matrox G400 */
+#define FB_ACCEL_NV3 27 /* nVidia RIVA 128 */
+#define FB_ACCEL_NV4 28 /* nVidia RIVA TNT */
+#define FB_ACCEL_NV5 29 /* nVidia RIVA TNT2 */
+#define FB_ACCEL_CT_6555x 30 /* C&T 6555x */
+#define FB_ACCEL_3DFX_BANSHEE 31 /* 3Dfx Banshee */
+#define FB_ACCEL_ATI_RAGE128 32 /* ATI Rage128 family */
struct fb_fix_screeninfo {
- char id[16]; /* identification string eg "TT Builtin" */
- char *smem_start; /* Start of frame buffer mem */
- /* (physical address) */
- __u32 smem_len; /* Length of frame buffer mem */
- __u32 type; /* see FB_TYPE_* */
- __u32 type_aux; /* Interleave for interleaved Planes */
- __u32 visual; /* see FB_VISUAL_* */
- __u16 xpanstep; /* zero if no hardware panning */
- __u16 ypanstep; /* zero if no hardware panning */
- __u16 ywrapstep; /* zero if no hardware ywrap */
- __u32 line_length; /* length of a line in bytes */
- char *mmio_start; /* Start of Memory Mapped I/O */
- /* (physical address) */
- __u32 mmio_len; /* Length of Memory Mapped I/O */
- __u32 accel; /* Type of acceleration available */
- __u16 reserved[3]; /* Reserved for future compatibility */
+ char id[16]; /* identification string eg "TT Builtin" */
+ char *smem_start; /* Start of frame buffer mem */
+ /* (physical address) */
+ __u32 smem_len; /* Length of frame buffer mem */
+ __u32 type; /* see FB_TYPE_* */
+ __u32 type_aux; /* Interleave for interleaved Planes */
+ __u32 visual; /* see FB_VISUAL_* */
+ __u16 xpanstep; /* zero if no hardware panning */
+ __u16 ypanstep; /* zero if no hardware panning */
+ __u16 ywrapstep; /* zero if no hardware ywrap */
+ __u32 line_length; /* length of a line in bytes */
+ char *mmio_start; /* Start of Memory Mapped I/O */
+ /* (physical address) */
+ __u32 mmio_len; /* Length of Memory Mapped I/O */
+ __u32 accel; /* Type of acceleration available */
+ __u16 reserved[3]; /* Reserved for future compatibility */
};
/* Interpretation of offset for color fields: All offsets are from the right,
@@ -115,101 +115,101 @@ struct fb_fix_screeninfo {
* big-endian byte order if bits_per_pixel is greater than 8.
*/
struct fb_bitfield {
- __u32 offset; /* beginning of bitfield */
- __u32 length; /* length of bitfield */
- __u32 msb_right; /* != 0 : Most significant bit is */
- /* right */
+ __u32 offset; /* beginning of bitfield */
+ __u32 length; /* length of bitfield */
+ __u32 msb_right; /* != 0 : Most significant bit is */
+ /* right */
};
-#define FB_NONSTD_HAM 1 /* Hold-And-Modify (HAM) */
+#define FB_NONSTD_HAM 1 /* Hold-And-Modify (HAM) */
-#define FB_ACTIVATE_NOW 0 /* set values immediately (or vbl)*/
-#define FB_ACTIVATE_NXTOPEN 1 /* activate on next open */
-#define FB_ACTIVATE_TEST 2 /* don't set, round up impossible */
+#define FB_ACTIVATE_NOW 0 /* set values immediately (or vbl) */
+#define FB_ACTIVATE_NXTOPEN 1 /* activate on next open */
+#define FB_ACTIVATE_TEST 2 /* don't set, round up impossible */
#define FB_ACTIVATE_MASK 15
- /* values */
-#define FB_ACTIVATE_VBL 16 /* activate values on next vbl */
-#define FB_CHANGE_CMAP_VBL 32 /* change colormap on vbl */
-#define FB_ACTIVATE_ALL 64 /* change all VCs on this fb */
-
-#define FB_ACCELF_TEXT 1 /* text mode acceleration */
-
-#define FB_SYNC_HOR_HIGH_ACT 1 /* horizontal sync high active */
-#define FB_SYNC_VERT_HIGH_ACT 2 /* vertical sync high active */
-#define FB_SYNC_EXT 4 /* external sync */
-#define FB_SYNC_COMP_HIGH_ACT 8 /* composite sync high active */
-#define FB_SYNC_BROADCAST 16 /* broadcast video timings */
- /* vtotal = 144d/288n/576i => PAL */
- /* vtotal = 121d/242n/484i => NTSC */
-#define FB_SYNC_ON_GREEN 32 /* sync on green */
-
-#define FB_VMODE_NONINTERLACED 0 /* non interlaced */
-#define FB_VMODE_INTERLACED 1 /* interlaced */
-#define FB_VMODE_DOUBLE 2 /* double scan */
+ /* values */
+#define FB_ACTIVATE_VBL 16 /* activate values on next vbl */
+#define FB_CHANGE_CMAP_VBL 32 /* change colormap on vbl */
+#define FB_ACTIVATE_ALL 64 /* change all VCs on this fb */
+
+#define FB_ACCELF_TEXT 1 /* text mode acceleration */
+
+#define FB_SYNC_HOR_HIGH_ACT 1 /* horizontal sync high active */
+#define FB_SYNC_VERT_HIGH_ACT 2 /* vertical sync high active */
+#define FB_SYNC_EXT 4 /* external sync */
+#define FB_SYNC_COMP_HIGH_ACT 8 /* composite sync high active */
+#define FB_SYNC_BROADCAST 16 /* broadcast video timings */
+ /* vtotal = 144d/288n/576i => PAL */
+ /* vtotal = 121d/242n/484i => NTSC */
+#define FB_SYNC_ON_GREEN 32 /* sync on green */
+
+#define FB_VMODE_NONINTERLACED 0 /* non interlaced */
+#define FB_VMODE_INTERLACED 1 /* interlaced */
+#define FB_VMODE_DOUBLE 2 /* double scan */
#define FB_VMODE_MASK 255
-#define FB_VMODE_YWRAP 256 /* ywrap instead of panning */
-#define FB_VMODE_SMOOTH_XPAN 512 /* smooth xpan possible (internally used) */
-#define FB_VMODE_CONUPDATE 512 /* don't update x/yoffset */
+#define FB_VMODE_YWRAP 256 /* ywrap instead of panning */
+#define FB_VMODE_SMOOTH_XPAN 512 /* smooth xpan possible (internally used) */
+#define FB_VMODE_CONUPDATE 512 /* don't update x/yoffset */
struct fb_var_screeninfo {
- __u32 xres; /* visible resolution */
- __u32 yres;
- __u32 xres_virtual; /* virtual resolution */
- __u32 yres_virtual;
- __u32 xoffset; /* offset from virtual to visible */
- __u32 yoffset; /* resolution */
-
- __u32 bits_per_pixel; /* guess what */
- __u32 grayscale; /* != 0 Graylevels instead of colors */
-
- struct fb_bitfield red; /* bitfield in fb mem if true color, */
- struct fb_bitfield green; /* else only length is significant */
- struct fb_bitfield blue;
- struct fb_bitfield transp; /* transparency */
-
- __u32 nonstd; /* != 0 Non standard pixel format */
-
- __u32 activate; /* see FB_ACTIVATE_* */
-
- __u32 height; /* height of picture in mm */
- __u32 width; /* width of picture in mm */
-
- __u32 accel_flags; /* acceleration flags (hints) */
-
- /* Timing: All values in pixclocks, except pixclock (of course) */
- __u32 pixclock; /* pixel clock in ps (pico seconds) */
- __u32 left_margin; /* time from sync to picture */
- __u32 right_margin; /* time from picture to sync */
- __u32 upper_margin; /* time from sync to picture */
- __u32 lower_margin;
- __u32 hsync_len; /* length of horizontal sync */
- __u32 vsync_len; /* length of vertical sync */
- __u32 sync; /* see FB_SYNC_* */
- __u32 vmode; /* see FB_VMODE_* */
- __u32 reserved[6]; /* Reserved for future compatibility */
+ __u32 xres; /* visible resolution */
+ __u32 yres;
+ __u32 xres_virtual; /* virtual resolution */
+ __u32 yres_virtual;
+ __u32 xoffset; /* offset from virtual to visible */
+ __u32 yoffset; /* resolution */
+
+ __u32 bits_per_pixel; /* guess what */
+ __u32 grayscale; /* != 0 Graylevels instead of colors */
+
+ struct fb_bitfield red; /* bitfield in fb mem if true color, */
+ struct fb_bitfield green; /* else only length is significant */
+ struct fb_bitfield blue;
+ struct fb_bitfield transp; /* transparency */
+
+ __u32 nonstd; /* != 0 Non standard pixel format */
+
+ __u32 activate; /* see FB_ACTIVATE_* */
+
+ __u32 height; /* height of picture in mm */
+ __u32 width; /* width of picture in mm */
+
+ __u32 accel_flags; /* acceleration flags (hints) */
+
+ /* Timing: All values in pixclocks, except pixclock (of course) */
+ __u32 pixclock; /* pixel clock in ps (pico seconds) */
+ __u32 left_margin; /* time from sync to picture */
+ __u32 right_margin; /* time from picture to sync */
+ __u32 upper_margin; /* time from sync to picture */
+ __u32 lower_margin;
+ __u32 hsync_len; /* length of horizontal sync */
+ __u32 vsync_len; /* length of vertical sync */
+ __u32 sync; /* see FB_SYNC_* */
+ __u32 vmode; /* see FB_VMODE_* */
+ __u32 reserved[6]; /* Reserved for future compatibility */
};
struct fb_cmap {
- __u32 start; /* First entry */
- __u32 len; /* Number of entries */
- __u16 *red; /* Red values */
- __u16 *green;
- __u16 *blue;
- __u16 *transp; /* transparency, can be NULL */
+ __u32 start; /* First entry */
+ __u32 len; /* Number of entries */
+ __u16 *red; /* Red values */
+ __u16 *green;
+ __u16 *blue;
+ __u16 *transp; /* transparency, can be NULL */
};
struct fb_con2fbmap {
- __u32 console;
- __u32 framebuffer;
+ __u32 console;
+ __u32 framebuffer;
};
struct fb_monspecs {
- __u32 hfmin; /* hfreq lower limit (Hz) */
- __u32 hfmax; /* hfreq upper limit (Hz) */
- __u16 vfmin; /* vfreq lower limit (Hz) */
- __u16 vfmax; /* vfreq upper limit (Hz) */
- unsigned dpms : 1; /* supports DPMS */
+ __u32 hfmin; /* hfreq lower limit (Hz) */
+ __u32 hfmax; /* hfreq upper limit (Hz) */
+ __u16 vfmin; /* vfreq lower limit (Hz) */
+ __u16 vfmax; /* vfreq upper limit (Hz) */
+ unsigned dpms:1; /* supports DPMS */
};
#if 1
@@ -219,8 +219,7 @@ struct fb_monspecs {
#endif
-
-#if 1 /* Preliminary */
+#if 1 /* Preliminary */
/*
* Hardware Cursor
@@ -232,34 +231,33 @@ struct fb_monspecs {
#define FBIOGET_CURSORSTATE 0x460A
#define FBIOPUT_CURSORSTATE 0x460B
-
struct fb_fix_cursorinfo {
- __u16 crsr_width; /* width and height of the cursor in */
- __u16 crsr_height; /* pixels (zero if no cursor) */
- __u16 crsr_xsize; /* cursor size in display pixels */
- __u16 crsr_ysize;
- __u16 crsr_color1; /* colormap entry for cursor color1 */
- __u16 crsr_color2; /* colormap entry for cursor color2 */
+ __u16 crsr_width; /* width and height of the cursor in */
+ __u16 crsr_height; /* pixels (zero if no cursor) */
+ __u16 crsr_xsize; /* cursor size in display pixels */
+ __u16 crsr_ysize;
+ __u16 crsr_color1; /* colormap entry for cursor color1 */
+ __u16 crsr_color2; /* colormap entry for cursor color2 */
};
struct fb_var_cursorinfo {
- __u16 width;
- __u16 height;
- __u16 xspot;
- __u16 yspot;
- __u8 data[1]; /* field with [height][width] */
+ __u16 width;
+ __u16 height;
+ __u16 xspot;
+ __u16 yspot;
+ __u8 data[1]; /* field with [height][width] */
};
struct fb_cursorstate {
- __s16 xoffset;
- __s16 yoffset;
- __u16 mode;
+ __s16 xoffset;
+ __s16 yoffset;
+ __u16 mode;
};
#define FB_CURSOR_OFF 0
#define FB_CURSOR_ON 1
#define FB_CURSOR_FLASH 2
-#endif /* Preliminary */
+#endif /* Preliminary */
-#endif /* _LINUX_FB_H */
+#endif /* _LINUX_FB_H */
diff --git a/xorg-server/hw/xfree86/i2c/bt829.h b/xorg-server/hw/xfree86/i2c/bt829.h
index 06e488f04..2709bee50 100644
--- a/xorg-server/hw/xfree86/i2c/bt829.h
+++ b/xorg-server/hw/xfree86/i2c/bt829.h
@@ -4,36 +4,36 @@
#include "xf86i2c.h"
typedef struct {
- int tunertype; /* Must be set before init */
- /* Private variables */
- I2CDevRec d;
-
- CARD8 brightness;
- CARD8 ccmode;
- CARD8 code;
- CARD16 contrast;
- CARD8 format;
- int height;
- CARD8 hue;
- CARD8 len;
- CARD8 mux;
- CARD8 out_en;
- CARD8 p_io;
- CARD16 sat_u;
- CARD16 sat_v;
- CARD8 vbien;
- CARD8 vbifmt;
- int width;
-
- CARD16 hdelay;
- CARD16 hscale;
- CARD16 vactive;
- CARD16 vdelay;
- CARD16 vscale;
-
- CARD16 htotal;
- CARD8 id;
- CARD8 svideo_mux;
+ int tunertype; /* Must be set before init */
+ /* Private variables */
+ I2CDevRec d;
+
+ CARD8 brightness;
+ CARD8 ccmode;
+ CARD8 code;
+ CARD16 contrast;
+ CARD8 format;
+ int height;
+ CARD8 hue;
+ CARD8 len;
+ CARD8 mux;
+ CARD8 out_en;
+ CARD8 p_io;
+ CARD16 sat_u;
+ CARD16 sat_v;
+ CARD8 vbien;
+ CARD8 vbifmt;
+ int width;
+
+ CARD16 hdelay;
+ CARD16 hscale;
+ CARD16 vactive;
+ CARD16 vdelay;
+ CARD16 vscale;
+
+ CARD16 htotal;
+ CARD8 id;
+ CARD8 svideo_mux;
} BT829Rec, *BT829Ptr;
#define xf86_bt829_Detect bt829_Detect
@@ -46,20 +46,20 @@ extern _X_EXPORT BT829Ptr bt829_Detect(I2CBusPtr b, I2CSlaveAddr addr);
#define xf86_bt829_ATIInit bt829_ATIInit
extern _X_EXPORT int bt829_ATIInit(BT829Ptr bt);
-#define BT829_NTSC 1 /* NTSC-M */
-#define BT829_NTSC_JAPAN 2 /* NTSC-Japan */
-#define BT829_PAL 3 /* PAL-B,D,G,H,I */
-#define BT829_PAL_M 4 /* PAL-M */
-#define BT829_PAL_N 5 /* PAL-N */
-#define BT829_SECAM 6 /* SECAM */
-#define BT829_PAL_N_COMB 7 /* PAL-N combination */
+#define BT829_NTSC 1 /* NTSC-M */
+#define BT829_NTSC_JAPAN 2 /* NTSC-Japan */
+#define BT829_PAL 3 /* PAL-B,D,G,H,I */
+#define BT829_PAL_M 4 /* PAL-M */
+#define BT829_PAL_N 5 /* PAL-N */
+#define BT829_SECAM 6 /* SECAM */
+#define BT829_PAL_N_COMB 7 /* PAL-N combination */
#define xf86_bt829_SetFormat bt829_SetFormat
extern _X_EXPORT int bt829_SetFormat(BT829Ptr bt, CARD8 format);
-#define BT829_MUX2 1 /* ATI -> composite video */
-#define BT829_MUX0 2 /* ATI -> tv tuner */
-#define BT829_MUX1 3 /* ATI -> s-video */
+#define BT829_MUX2 1 /* ATI -> composite video */
+#define BT829_MUX0 2 /* ATI -> tv tuner */
+#define BT829_MUX1 3 /* ATI -> s-video */
#define xf86_bt829_SetMux bt829_SetMux
extern _X_EXPORT int bt829_SetMux(BT829Ptr bt, CARD8 mux);
@@ -69,17 +69,21 @@ extern _X_EXPORT int bt829_SetCaptSize(BT829Ptr bt, int width, int height);
#define xf86_bt829_SetBrightness bt829_SetBrightness
extern _X_EXPORT void bt829_SetBrightness(BT829Ptr bt, int brightness);
+
#define xf86_bt829_SetContrast bt829_SetContrast
extern _X_EXPORT void bt829_SetContrast(BT829Ptr bt, int contrast);
+
#define xf86_bt829_SetSaturation bt829_SetSaturation
extern _X_EXPORT void bt829_SetSaturation(BT829Ptr bt, int saturation);
+
#define xf86_bt829_SetTint bt829_SetTint
-extern _X_EXPORT void bt829_SetTint(BT829Ptr bt, int hue); /* Hue */
+extern _X_EXPORT void bt829_SetTint(BT829Ptr bt, int hue); /* Hue */
#define xf86_bt829_SetOUT_EN bt829_SetOUT_EN
-extern _X_EXPORT void bt829_SetOUT_EN(BT829Ptr bt, BOOL out_en);/* VPOLE register */
+extern _X_EXPORT void bt829_SetOUT_EN(BT829Ptr bt, BOOL out_en); /* VPOLE register */
+
#define xf86_bt829_SetP_IO bt829_SetP_IO
-extern _X_EXPORT void bt829_SetP_IO(BT829Ptr bt, CARD8 p_io); /* P_IO register */
+extern _X_EXPORT void bt829_SetP_IO(BT829Ptr bt, CARD8 p_io); /* P_IO register */
extern _X_EXPORT int bt829_SetCC(BT829Ptr bt);
diff --git a/xorg-server/hw/xfree86/i2c/fi1236.h b/xorg-server/hw/xfree86/i2c/fi1236.h
index 8dd7e4fdb..053089277 100644
--- a/xorg-server/hw/xfree86/i2c/fi1236.h
+++ b/xorg-server/hw/xfree86/i2c/fi1236.h
@@ -7,64 +7,63 @@
#undef NUM
typedef struct {
- CARD32 fcar; /* 16 * fcar_Mhz */
- CARD32 min_freq; /* 16 * min_freq_Mhz */
- CARD32 max_freq; /* 16 * max_freq_Mhz */
-
- CARD32 threshold1; /* 16 * Value_Mhz */
- CARD32 threshold2; /* 16 * Value_Mhz */
-
- CARD8 band_low;
- CARD8 band_mid;
- CARD8 band_high;
- CARD8 control;
- } FI1236_parameters;
+ CARD32 fcar; /* 16 * fcar_Mhz */
+ CARD32 min_freq; /* 16 * min_freq_Mhz */
+ CARD32 max_freq; /* 16 * max_freq_Mhz */
+ CARD32 threshold1; /* 16 * Value_Mhz */
+ CARD32 threshold2; /* 16 * Value_Mhz */
+
+ CARD8 band_low;
+ CARD8 band_mid;
+ CARD8 band_high;
+ CARD8 control;
+} FI1236_parameters;
typedef struct {
- /* what we want */
- /* all frequencies are in Mhz */
- double f_rf; /* frequency to tune to */
- double f_if1; /* first intermediate frequency */
- double f_if2; /* second intermediate frequency */
- double f_ref; /* reference frequency */
- double f_ifbw; /* bandwidth */
- double f_step; /* step */
-
- /* what we compute */
- double f_lo1;
- double f_lo2;
- int LO1I;
- int LO2I;
- int SEL;
- int STEP;
- int NUM;
- } MT2032_parameters;
+ /* what we want */
+ /* all frequencies are in Mhz */
+ double f_rf; /* frequency to tune to */
+ double f_if1; /* first intermediate frequency */
+ double f_if2; /* second intermediate frequency */
+ double f_ref; /* reference frequency */
+ double f_ifbw; /* bandwidth */
+ double f_step; /* step */
+
+ /* what we compute */
+ double f_lo1;
+ double f_lo2;
+ int LO1I;
+ int LO2I;
+ int SEL;
+ int STEP;
+ int NUM;
+} MT2032_parameters;
typedef struct {
- I2CDevRec d;
- int type;
-
- void* afc_source; /* The AFC source may be another chip like TDA988x */
-
- int afc_delta;
- CARD32 original_frequency;
- Bool afc_timer_installed;
- int afc_count;
- int last_afc_hint;
-
- double video_if;
- FI1236_parameters parm;
- int xogc; /* for MT2032 */
-
- struct {
- CARD8 div1;
- CARD8 div2;
- CARD8 control;
- CARD8 band;
- CARD8 aux; /* this is for MK3 tuners */
- } tuner_data;
- } FI1236Rec, *FI1236Ptr;
+ I2CDevRec d;
+ int type;
+
+ void *afc_source; /* The AFC source may be another chip like TDA988x */
+
+ int afc_delta;
+ CARD32 original_frequency;
+ Bool afc_timer_installed;
+ int afc_count;
+ int last_afc_hint;
+
+ double video_if;
+ FI1236_parameters parm;
+ int xogc; /* for MT2032 */
+
+ struct {
+ CARD8 div1;
+ CARD8 div2;
+ CARD8 control;
+ CARD8 band;
+ CARD8 aux; /* this is for MK3 tuners */
+ } tuner_data;
+} FI1236Rec, *FI1236Ptr;
#define TUNER_TYPE_FI1236 0
#define TUNER_TYPE_FI1216 1
@@ -86,7 +85,6 @@ typedef struct {
#define TUNER_OFF 4
#define TUNER_STILL_TUNING 5
-
void FI1236_tune(FI1236Ptr f, CARD32 frequency);
#define FI1236SymbolsList \
@@ -96,15 +94,19 @@ void FI1236_tune(FI1236Ptr f, CARD32 frequency);
#define xf86_Detect_FI1236 Detect_FI1236
extern _X_EXPORT FI1236Ptr Detect_FI1236(I2CBusPtr b, I2CSlaveAddr addr);
+
#define xf86_FI1236_set_tuner_type FI1236_set_tuner_type
extern _X_EXPORT void FI1236_set_tuner_type(FI1236Ptr f, int type);
+
#define xf86_TUNER_set_frequency TUNER_set_frequency
extern _X_EXPORT void TUNER_set_frequency(FI1236Ptr f, CARD32 frequency);
#define xf86_FI1236_AFC FI1236_AFC
extern _X_EXPORT int FI1236_AFC(FI1236Ptr f);
+
#define xf86_TUNER_get_afc_hint TUNER_get_afc_hint
extern _X_EXPORT int TUNER_get_afc_hint(FI1236Ptr f);
+
#define xf86_fi1236_dump_status fi1236_dump_status
extern _X_EXPORT void fi1236_dump_status(FI1236Ptr f);
diff --git a/xorg-server/hw/xfree86/i2c/msp3430.h b/xorg-server/hw/xfree86/i2c/msp3430.h
index 8423d1411..ef66e1ed8 100644
--- a/xorg-server/hw/xfree86/i2c/msp3430.h
+++ b/xorg-server/hw/xfree86/i2c/msp3430.h
@@ -4,29 +4,28 @@
#include "xf86i2c.h"
typedef struct {
- I2CDevRec d;
-
- int standard;
- int connector;
- int mode;
+ I2CDevRec d;
- CARD8 hardware_version, major_revision, product_code, rom_version;
+ int standard;
+ int connector;
+ int mode;
+
+ CARD8 hardware_version, major_revision, product_code, rom_version;
#ifdef MSP_DEBUG
- CARD8 registers_present[256];
+ CARD8 registers_present[256];
#endif
- CARD16 chip_id;
- CARD8 chip_family;
- Bool recheck; /*reinitialization needed after channel change */
- CARD8 c_format; /*current state of audio format */
- CARD16 c_standard; /*current state of standard register */
- CARD8 c_source; /*current state of source register */
- CARD8 c_matrix; /*current state of matrix register */
- CARD8 c_fmmatrix; /*current state of fmmatrix register */
- int c_mode; /* current state of mode for autoswitchimg */
- CARD8 volume;
- } MSP3430Rec, * MSP3430Ptr;
-
+ CARD16 chip_id;
+ CARD8 chip_family;
+ Bool recheck; /*reinitialization needed after channel change */
+ CARD8 c_format; /*current state of audio format */
+ CARD16 c_standard; /*current state of standard register */
+ CARD8 c_source; /*current state of source register */
+ CARD8 c_matrix; /*current state of matrix register */
+ CARD8 c_fmmatrix; /*current state of fmmatrix register */
+ int c_mode; /* current state of mode for autoswitchimg */
+ CARD8 volume;
+} MSP3430Rec, *MSP3430Ptr;
#define MSP3430_ADDR_1 0x80
#define MSP3430_ADDR_2 0x84
@@ -37,9 +36,9 @@ typedef struct {
#define MSP3430_PAL_DK1 (0x100 | MSP3430_PAL)
#define MSP3430_SECAM 3
-#define MSP3430_CONNECTOR_1 1 /* tuner on AIW cards */
-#define MSP3430_CONNECTOR_2 2 /* SVideo on AIW cards */
-#define MSP3430_CONNECTOR_3 3 /* composite on AIW cards */
+#define MSP3430_CONNECTOR_1 1 /* tuner on AIW cards */
+#define MSP3430_CONNECTOR_2 2 /* SVideo on AIW cards */
+#define MSP3430_CONNECTOR_3 3 /* composite on AIW cards */
#define MSP3430_ADDR(a) ((a)->d.SlaveAddr)
@@ -50,7 +49,7 @@ typedef struct {
/*----------------------------------------------------------*/
/* MSP chip families */
-#define MSPFAMILY_UNKNOWN 0
+#define MSPFAMILY_UNKNOWN 0
#define MSPFAMILY_34x0D 1
#define MSPFAMILY_34x5D 2
#define MSPFAMILY_34x0G 3
@@ -94,14 +93,18 @@ typedef struct {
#define xf86_InitMSP3430 InitMSP3430
extern _X_EXPORT void InitMSP3430(MSP3430Ptr m);
+
#define xf86_DetectMSP3430 DetectMSP3430
extern _X_EXPORT MSP3430Ptr DetectMSP3430(I2CBusPtr b, I2CSlaveAddr addr);
+
#define xf86_ResetMSP3430 ResetMSP3430
extern _X_EXPORT void ResetMSP3430(MSP3430Ptr m);
+
#define xf86_MSP3430SetVolume MSP3430SetVolume
-extern _X_EXPORT void MSP3430SetVolume (MSP3430Ptr m, CARD8 value);
+extern _X_EXPORT void MSP3430SetVolume(MSP3430Ptr m, CARD8 value);
+
#define xf86_MSP3430SetSAP MSP3430SetSAP
-extern _X_EXPORT void MSP3430SetSAP (MSP3430Ptr m, int mode);
+extern _X_EXPORT void MSP3430SetSAP(MSP3430Ptr m, int mode);
#define MSP3430SymbolsList \
"InitMSP3430", \
diff --git a/xorg-server/hw/xfree86/i2c/tda9850.h b/xorg-server/hw/xfree86/i2c/tda9850.h
index d81679510..7d82095f0 100644
--- a/xorg-server/hw/xfree86/i2c/tda9850.h
+++ b/xorg-server/hw/xfree86/i2c/tda9850.h
@@ -4,27 +4,32 @@
#include "xf86i2c.h"
typedef struct {
- I2CDevRec d;
-
- int mux;
- int stereo;
- int sap;
- Bool mute;
- Bool sap_mute;
- } TDA9850Rec, *TDA9850Ptr;
+ I2CDevRec d;
+
+ int mux;
+ int stereo;
+ int sap;
+ Bool mute;
+ Bool sap_mute;
+} TDA9850Rec, *TDA9850Ptr;
#define TDA9850_ADDR_1 0xB4
#define xf86_Detect_tda9850 Detect_tda9850
extern _X_EXPORT TDA9850Ptr Detect_tda9850(I2CBusPtr b, I2CSlaveAddr addr);
+
#define xf86_tda9850_init tda9850_init
extern _X_EXPORT Bool tda9850_init(TDA9850Ptr t);
+
#define xf86_tda9850_setaudio tda9850_setaudio
extern _X_EXPORT void tda9850_setaudio(TDA9850Ptr t);
+
#define xf86_tda9850_mute tda9850_mute
extern _X_EXPORT void tda9850_mute(TDA9850Ptr t, Bool mute);
+
#define xf86_tda9850_sap_mute tda9850_sap_mute
extern _X_EXPORT void tda9850_sap_mute(TDA9850Ptr t, Bool sap_mute);
+
#define xf86_tda9850_getstatus tda9850_getstatus
extern _X_EXPORT CARD16 tda9850_getstatus(TDA9850Ptr t);
diff --git a/xorg-server/hw/xfree86/i2c/tda9885.h b/xorg-server/hw/xfree86/i2c/tda9885.h
index 004f43d5c..2d8a8af15 100644
--- a/xorg-server/hw/xfree86/i2c/tda9885.h
+++ b/xorg-server/hw/xfree86/i2c/tda9885.h
@@ -4,35 +4,35 @@
#include "xf86i2c.h"
typedef struct {
- I2CDevRec d;
-
- /* write-only parameters */
- /* B DATA */
- CARD8 sound_trap;
- CARD8 auto_mute_fm;
- CARD8 carrier_mode;
- CARD8 modulation;
- CARD8 forced_mute_audio;
- CARD8 port1;
- CARD8 port2;
- /* C DATA */
- CARD8 top_adjustment;
- CARD8 deemphasis;
- CARD8 audio_gain;
- /* E DATA */
- CARD8 standard_sound_carrier;
- CARD8 standard_video_if;
- CARD8 minimum_gain;
- CARD8 gating;
- CARD8 vif_agc;
- /* read-only values */
-
- CARD8 after_reset;
- CARD8 afc_status;
- CARD8 vif_level;
- CARD8 afc_win;
- CARD8 fm_carrier;
- } TDA9885Rec, *TDA9885Ptr;
+ I2CDevRec d;
+
+ /* write-only parameters */
+ /* B DATA */
+ CARD8 sound_trap;
+ CARD8 auto_mute_fm;
+ CARD8 carrier_mode;
+ CARD8 modulation;
+ CARD8 forced_mute_audio;
+ CARD8 port1;
+ CARD8 port2;
+ /* C DATA */
+ CARD8 top_adjustment;
+ CARD8 deemphasis;
+ CARD8 audio_gain;
+ /* E DATA */
+ CARD8 standard_sound_carrier;
+ CARD8 standard_video_if;
+ CARD8 minimum_gain;
+ CARD8 gating;
+ CARD8 vif_agc;
+ /* read-only values */
+
+ CARD8 after_reset;
+ CARD8 afc_status;
+ CARD8 vif_level;
+ CARD8 afc_win;
+ CARD8 fm_carrier;
+} TDA9885Rec, *TDA9885Ptr;
#define TDA9885_ADDR_1 0x86
#define TDA9885_ADDR_2 0x84
@@ -41,12 +41,16 @@ typedef struct {
#define xf86_Detect_tda9885 Detect_tda9885
extern _X_EXPORT TDA9885Ptr Detect_tda9885(I2CBusPtr b, I2CSlaveAddr addr);
+
#define xf86_tda9885_init tda9885_init
extern _X_EXPORT Bool tda9885_init(TDA9885Ptr t);
+
#define xf86_tda9885_setparameters tda9885_setparameters
extern _X_EXPORT void tda9885_setparameters(TDA9885Ptr t);
+
#define xf86_tda9885_getstatus tda9885_getstatus
extern _X_EXPORT void tda9885_getstatus(TDA9885Ptr t);
+
#define xf86_tda9885_dumpstatus tda9885_dumpstatus
extern _X_EXPORT void tda9885_dumpstatus(TDA9885Ptr t);
diff --git a/xorg-server/hw/xfree86/i2c/uda1380.h b/xorg-server/hw/xfree86/i2c/uda1380.h
index da232f90d..f0bc6167a 100644
--- a/xorg-server/hw/xfree86/i2c/uda1380.h
+++ b/xorg-server/hw/xfree86/i2c/uda1380.h
@@ -35,29 +35,36 @@
#include "xf86i2c.h"
typedef struct {
- I2CDevRec d;
-
- CARD16 analog_mixer_settings; /* register 0x03 */
-
- } UDA1380Rec, *UDA1380Ptr;
+ I2CDevRec d;
+
+ CARD16 analog_mixer_settings; /* register 0x03 */
+
+} UDA1380Rec, *UDA1380Ptr;
#define UDA1380_ADDR_1 0x30
#define UDA1380_ADDR_2 0x34
#define xf86_Detect_uda1380 Detect_uda1380
extern _X_EXPORT UDA1380Ptr Detect_uda1380(I2CBusPtr b, I2CSlaveAddr addr);
+
#define xf86_uda1380_init uda1380_init
extern _X_EXPORT Bool uda1380_init(UDA1380Ptr t);
+
#define xf86_uda1380_shutdown uda1380_shutdown
extern _X_EXPORT void uda1380_shutdown(UDA1380Ptr t);
+
#define xf86_uda1380_setvolume uda1380_setvolume
extern _X_EXPORT void uda1380_setvolume(UDA1380Ptr t, INT32);
+
#define xf86_uda1380_mute uda1380_mute
extern _X_EXPORT void uda1380_mute(UDA1380Ptr t, Bool);
+
#define xf86_uda1380_setparameters uda1380_setparameters
extern _X_EXPORT void uda1380_setparameters(UDA1380Ptr t);
+
#define xf86_uda1380_getstatus uda1380_getstatus
extern _X_EXPORT void uda1380_getstatus(UDA1380Ptr t);
+
#define xf86_uda1380_dumpstatus uda1380_dumpstatus
extern _X_EXPORT void uda1380_dumpstatus(UDA1380Ptr t);
diff --git a/xorg-server/hw/xfree86/int10/stub.c b/xorg-server/hw/xfree86/int10/stub.c
index 58b65782c..8fd079069 100644
--- a/xorg-server/hw/xfree86/int10/stub.c
+++ b/xorg-server/hw/xfree86/int10/stub.c
@@ -38,7 +38,7 @@ xf86FreeInt10(xf86Int10InfoPtr pInt)
}
void *
-xf86Int10AllocPages(xf86Int10InfoPtr pInt,int num, int *off)
+xf86Int10AllocPages(xf86Int10InfoPtr pInt, int num, int *off)
{
*off = 0;
return NULL;
diff --git a/xorg-server/hw/xfree86/int10/xf86x86emu.c b/xorg-server/hw/xfree86/int10/xf86x86emu.c
index 83663b0e6..0f8737b49 100644
--- a/xorg-server/hw/xfree86/int10/xf86x86emu.c
+++ b/xorg-server/hw/xfree86/int10/xf86x86emu.c
@@ -24,7 +24,7 @@ x86emu_do_int(int num)
Int10Current->num = num;
if (!int_handler(Int10Current)) {
- X86EMU_halt_sys();
+ X86EMU_halt_sys();
}
}
@@ -34,10 +34,10 @@ xf86ExecX86int10(xf86Int10InfoPtr pInt)
int sig = setup_int(pInt);
if (sig < 0)
- return;
+ return;
if (int_handler(pInt)) {
- X86EMU_exec();
+ X86EMU_exec();
}
finish_int(pInt, sig);
@@ -48,33 +48,34 @@ xf86Int10ExecSetup(xf86Int10InfoPtr pInt)
{
int i;
X86EMU_intrFuncs intFuncs[256];
+
X86EMU_pioFuncs pioFuncs = {
- (&x_inb),
- (&x_inw),
- (&x_inl),
- (&x_outb),
- (&x_outw),
- (&x_outl)
+ (&x_inb),
+ (&x_inw),
+ (&x_inl),
+ (&x_outb),
+ (&x_outw),
+ (&x_outl)
};
X86EMU_memFuncs memFuncs = {
- (&Mem_rb),
- (&Mem_rw),
- (&Mem_rl),
- (&Mem_wb),
- (&Mem_ww),
- (&Mem_wl)
+ (&Mem_rb),
+ (&Mem_rw),
+ (&Mem_rl),
+ (&Mem_wb),
+ (&Mem_ww),
+ (&Mem_wl)
};
X86EMU_setupMemFuncs(&memFuncs);
pInt->cpuRegs = &M;
M.mem_base = 0;
- M.mem_size = 1024*1024 + 1024;
+ M.mem_size = 1024 * 1024 + 1024;
X86EMU_setupPioFuncs(&pioFuncs);
- for (i=0;i<256;i++)
- intFuncs[i] = x86emu_do_int;
+ for (i = 0; i < 256; i++)
+ intFuncs[i] = x86emu_do_int;
X86EMU_setupIntrFuncs(intFuncs);
return TRUE;
}
@@ -83,6 +84,7 @@ void
printk(const char *fmt, ...)
{
va_list argptr;
+
va_start(argptr, fmt);
VErrorF(fmt, argptr);
va_end(argptr);
diff --git a/xorg-server/hw/xfree86/loader/loader.h b/xorg-server/hw/xfree86/loader/loader.h
index a53970b6e..5cadd5ad6 100644
--- a/xorg-server/hw/xfree86/loader/loader.h
+++ b/xorg-server/hw/xfree86/loader/loader.h
@@ -1,76 +1,76 @@
-/*
- * Copyright 1995-1998 by Metro Link, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Metro Link, Inc. not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Metro Link, Inc. makes no
- * representations about the suitability of this software for any purpose.
- * It is provided "as is" without express or implied warranty.
- *
- * METRO LINK, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL METRO LINK, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-/*
- * Copyright (c) 1997-2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of the copyright holder(s)
- * and author(s) shall not be used in advertising or otherwise to promote
- * the sale, use or other dealings in this Software without prior written
- * authorization from the copyright holder(s) and author(s).
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#ifndef _LOADER_H
-#define _LOADER_H
-
-#include <X11/Xosdefs.h>
-#include <X11/Xfuncproto.h>
-#include <X11/Xmd.h>
-
-/* Compiled-in version information */
-typedef struct {
- int xf86Version;
- int ansicVersion;
- int videodrvVersion;
- int xinputVersion;
- int extensionVersion;
- int fontVersion;
-} ModuleVersions;
-extern const ModuleVersions LoaderVersionInfo;
-
-extern unsigned long LoaderOptions;
-
-/* Internal Functions */
-void * LoaderOpen(const char *, int *, int *);
-
-#endif /* _LOADER_H */
+/*
+ * Copyright 1995-1998 by Metro Link, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Metro Link, Inc. not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Metro Link, Inc. makes no
+ * representations about the suitability of this software for any purpose.
+ * It is provided "as is" without express or implied warranty.
+ *
+ * METRO LINK, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL METRO LINK, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+/*
+ * Copyright (c) 1997-2001 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#ifndef _LOADER_H
+#define _LOADER_H
+
+#include <X11/Xosdefs.h>
+#include <X11/Xfuncproto.h>
+#include <X11/Xmd.h>
+
+/* Compiled-in version information */
+typedef struct {
+ int xf86Version;
+ int ansicVersion;
+ int videodrvVersion;
+ int xinputVersion;
+ int extensionVersion;
+ int fontVersion;
+} ModuleVersions;
+extern const ModuleVersions LoaderVersionInfo;
+
+extern unsigned long LoaderOptions;
+
+/* Internal Functions */
+void *LoaderOpen(const char *, int *, int *);
+
+#endif /* _LOADER_H */
diff --git a/xorg-server/hw/xfree86/loader/loaderProcs.h b/xorg-server/hw/xfree86/loader/loaderProcs.h
index 133d5aae9..a7b752b9a 100644
--- a/xorg-server/hw/xfree86/loader/loaderProcs.h
+++ b/xorg-server/hw/xfree86/loader/loaderProcs.h
@@ -1,94 +1,94 @@
-/*
- * Copyright 1995-1998 by Metro Link, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Metro Link, Inc. not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Metro Link, Inc. makes no
- * representations about the suitability of this software for any purpose.
- * It is provided "as is" without express or implied warranty.
- *
- * METRO LINK, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL METRO LINK, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-/*
- * Copyright (c) 1997-2002 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of the copyright holder(s)
- * and author(s) shall not be used in advertising or otherwise to promote
- * the sale, use or other dealings in this Software without prior written
- * authorization from the copyright holder(s) and author(s).
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#ifndef _LOADERPROCS_H
-#define _LOADERPROCS_H
-
-#include "xf86Module.h"
-
-typedef struct module_desc {
- struct module_desc *child;
- struct module_desc *sib;
- struct module_desc *parent;
- char *name;
- char *path;
- void *handle;
- ModuleSetupProc SetupProc;
- ModuleTearDownProc TearDownProc;
- void *TearDownData; /* returned from SetupProc */
- const XF86ModuleVersionInfo *VersionInfo;
-} ModuleDesc, *ModuleDescPtr;
-
-/* External API for the loader */
-
-void LoaderInit(void);
-
-ModuleDescPtr LoadDriver(const char *, const char *, int, pointer, int *,
- int *);
-ModuleDescPtr LoadModule(const char *, const char *, const char **,
- const char **, pointer, const XF86ModReqInfo *,
- int *, int *);
-ModuleDescPtr DuplicateModule(ModuleDescPtr mod, ModuleDescPtr parent);
-void UnloadDriver(ModuleDescPtr);
-void LoaderSetPath(const char *path);
-void LoaderSortExtensions(void);
-
-void LoaderUnload(const char *, void *);
-unsigned long LoaderGetModuleVersion(ModuleDescPtr mod);
-
-void LoaderResetOptions(void);
-void LoaderSetOptions(unsigned long);
-
-/* Options for LoaderSetOptions */
-#define LDR_OPT_ABI_MISMATCH_NONFATAL 0x0001
-
-#endif /* _LOADERPROCS_H */
+/*
+ * Copyright 1995-1998 by Metro Link, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Metro Link, Inc. not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Metro Link, Inc. makes no
+ * representations about the suitability of this software for any purpose.
+ * It is provided "as is" without express or implied warranty.
+ *
+ * METRO LINK, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL METRO LINK, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+/*
+ * Copyright (c) 1997-2002 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#ifndef _LOADERPROCS_H
+#define _LOADERPROCS_H
+
+#include "xf86Module.h"
+
+typedef struct module_desc {
+ struct module_desc *child;
+ struct module_desc *sib;
+ struct module_desc *parent;
+ char *name;
+ char *path;
+ void *handle;
+ ModuleSetupProc SetupProc;
+ ModuleTearDownProc TearDownProc;
+ void *TearDownData; /* returned from SetupProc */
+ const XF86ModuleVersionInfo *VersionInfo;
+} ModuleDesc, *ModuleDescPtr;
+
+/* External API for the loader */
+
+void LoaderInit(void);
+
+ModuleDescPtr LoadDriver(const char *, const char *, int, pointer, int *,
+ int *);
+ModuleDescPtr LoadModule(const char *, const char *, const char **,
+ const char **, pointer, const XF86ModReqInfo *,
+ int *, int *);
+ModuleDescPtr DuplicateModule(ModuleDescPtr mod, ModuleDescPtr parent);
+void UnloadDriver(ModuleDescPtr);
+void LoaderSetPath(const char *path);
+void LoaderSortExtensions(void);
+
+void LoaderUnload(const char *, void *);
+unsigned long LoaderGetModuleVersion(ModuleDescPtr mod);
+
+void LoaderResetOptions(void);
+void LoaderSetOptions(unsigned long);
+
+/* Options for LoaderSetOptions */
+#define LDR_OPT_ABI_MISMATCH_NONFATAL 0x0001
+
+#endif /* _LOADERPROCS_H */
diff --git a/xorg-server/hw/xfree86/loader/os.c b/xorg-server/hw/xfree86/loader/os.c
index 6b5ac7e86..e3a9ac448 100644
--- a/xorg-server/hw/xfree86/loader/os.c
+++ b/xorg-server/hw/xfree86/loader/os.c
@@ -66,7 +66,7 @@ void
LoaderGetOS(const char **name, int *major, int *minor, int *teeny)
{
if (name)
- *name = OSNAME;
+ *name = OSNAME;
/* reporting runtime versions isn't supported yet */
}
diff --git a/xorg-server/hw/xfree86/modes/xf86Rename.h b/xorg-server/hw/xfree86/modes/xf86Rename.h
index e3418caad..46690a8f6 100644
--- a/xorg-server/hw/xfree86/modes/xf86Rename.h
+++ b/xorg-server/hw/xfree86/modes/xf86Rename.h
@@ -91,4 +91,4 @@
#define xf86SetSingleMode XF86NAME(xf86SetSingleMode)
#define xf86SetDesiredModes XF86NAME(xf86SetDesiredModes)
-#endif /* _XF86RENAME_H_ */
+#endif /* _XF86RENAME_H_ */
diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_VTsw.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_VTsw.c
index 15220d743..0ee51de2f 100644
--- a/xorg-server/hw/xfree86/os-support/bsd/bsd_VTsw.c
+++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_VTsw.c
@@ -1,103 +1,103 @@
-/*
- * Derived from VTsw_usl.c which is
- * Copyright 1993 by David Wexelblat <dwex@goblin.org>
- * by S_ren Schmidt (sos@login.dkuug.dk)
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of David Wexelblat not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. David Wexelblat makes no representations
- * about the suitability of this software for any purpose. It is provided
- * "as is" without express or implied warranty.
- *
- * DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL DAVID WEXELBLAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- *
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "xf86.h"
-#include "xf86Priv.h"
-#include "xf86_OSlib.h"
-
-/*
- * Handle the VT-switching interface for OSs that use USL-style ioctl()s
- * (the bsd, sysv, sco, and linux subdirs).
- */
-
-/*
- * This function is the signal handler for the VT-switching signal. It
- * is only referenced inside the OS-support layer.
- */
-void
-xf86VTRequest(int sig)
-{
-#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
- if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) {
- xf86Info.vtRequestsPending = TRUE;
- }
-#endif
- return;
-}
-
-Bool
-xf86VTSwitchPending()
-{
-#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
- if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) {
- return xf86Info.vtRequestsPending ? TRUE : FALSE;
- }
-#endif
- return FALSE;
-}
-
-Bool
-xf86VTSwitchAway()
-{
-#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
- if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) {
- xf86Info.vtRequestsPending = FALSE;
- if (ioctl(xf86Info.consoleFd, VT_RELDISP, 1) < 0)
- return FALSE;
- else
- return TRUE;
- }
-#endif
- return FALSE;
-}
-
-Bool
-xf86VTSwitchTo()
-{
-#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
- if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) {
- xf86Info.vtRequestsPending = FALSE;
- if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ) < 0)
- return FALSE;
- else
- return TRUE;
- }
-#endif
- return TRUE;
-}
-
-Bool
-xf86VTActivate(int vtno)
-{
- if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vtno) < 0) {
- return FALSE;
- }
- return TRUE;
-}
+/*
+ * Derived from VTsw_usl.c which is
+ * Copyright 1993 by David Wexelblat <dwex@goblin.org>
+ * by S_ren Schmidt (sos@login.dkuug.dk)
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of David Wexelblat not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. David Wexelblat makes no representations
+ * about the suitability of this software for any purpose. It is provided
+ * "as is" without express or implied warranty.
+ *
+ * DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL DAVID WEXELBLAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include <X11/X.h>
+#include "xf86.h"
+#include "xf86Priv.h"
+#include "xf86_OSlib.h"
+
+/*
+ * Handle the VT-switching interface for OSs that use USL-style ioctl()s
+ * (the bsd, sysv, sco, and linux subdirs).
+ */
+
+/*
+ * This function is the signal handler for the VT-switching signal. It
+ * is only referenced inside the OS-support layer.
+ */
+void
+xf86VTRequest(int sig)
+{
+#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
+ if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) {
+ xf86Info.vtRequestsPending = TRUE;
+ }
+#endif
+ return;
+}
+
+Bool
+xf86VTSwitchPending()
+{
+#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
+ if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) {
+ return xf86Info.vtRequestsPending ? TRUE : FALSE;
+ }
+#endif
+ return FALSE;
+}
+
+Bool
+xf86VTSwitchAway()
+{
+#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
+ if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) {
+ xf86Info.vtRequestsPending = FALSE;
+ if (ioctl(xf86Info.consoleFd, VT_RELDISP, 1) < 0)
+ return FALSE;
+ else
+ return TRUE;
+ }
+#endif
+ return FALSE;
+}
+
+Bool
+xf86VTSwitchTo()
+{
+#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
+ if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) {
+ xf86Info.vtRequestsPending = FALSE;
+ if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ) < 0)
+ return FALSE;
+ else
+ return TRUE;
+ }
+#endif
+ return TRUE;
+}
+
+Bool
+xf86VTActivate(int vtno)
+{
+ if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vtno) < 0) {
+ return FALSE;
+ }
+ return TRUE;
+}
diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_ev56.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_ev56.c
index 31b364df3..645377ed6 100644
--- a/xorg-server/hw/xfree86/os-support/bsd/bsd_ev56.c
+++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_ev56.c
@@ -26,74 +26,74 @@ int readDense8(pointer Base, register unsigned long Offset);
int readDense16(pointer Base, register unsigned long Offset);
int readDense32(pointer Base, register unsigned long Offset);
void
-writeDenseNB8(int Value, pointer Base, register unsigned long Offset);
+ writeDenseNB8(int Value, pointer Base, register unsigned long Offset);
void
-writeDenseNB16(int Value, pointer Base, register unsigned long Offset);
+ writeDenseNB16(int Value, pointer Base, register unsigned long Offset);
void
-writeDenseNB32(int Value, pointer Base, register unsigned long Offset);
+ writeDenseNB32(int Value, pointer Base, register unsigned long Offset);
void
-writeDense8(int Value, pointer Base, register unsigned long Offset);
+ writeDense8(int Value, pointer Base, register unsigned long Offset);
void
-writeDense16(int Value, pointer Base, register unsigned long Offset);
+ writeDense16(int Value, pointer Base, register unsigned long Offset);
void
-writeDense32(int Value, pointer Base, register unsigned long Offset);
+ writeDense32(int Value, pointer Base, register unsigned long Offset);
int
readDense8(pointer Base, register unsigned long Offset)
{
mem_barrier();
- return (alpha_ldbu((pointer)((unsigned long)Base+(Offset))));
+ return (alpha_ldbu((pointer) ((unsigned long) Base + (Offset))));
}
int
readDense16(pointer Base, register unsigned long Offset)
{
mem_barrier();
- return (alpha_ldwu((pointer)((unsigned long)Base+(Offset))));
+ return (alpha_ldwu((pointer) ((unsigned long) Base + (Offset))));
}
int
readDense32(pointer Base, register unsigned long Offset)
{
mem_barrier();
- return *(volatile CARD32*)((unsigned long)Base+(Offset));
+ return *(volatile CARD32 *) ((unsigned long) Base + (Offset));
}
void
writeDenseNB8(int Value, pointer Base, register unsigned long Offset)
{
- alpha_stb((pointer)((unsigned long)Base+(Offset)), Value);
+ alpha_stb((pointer) ((unsigned long) Base + (Offset)), Value);
}
void
writeDenseNB16(int Value, pointer Base, register unsigned long Offset)
{
- alpha_stw((pointer)((unsigned long)Base + (Offset)), Value);
+ alpha_stw((pointer) ((unsigned long) Base + (Offset)), Value);
}
void
writeDenseNB32(int Value, pointer Base, register unsigned long Offset)
{
- *(volatile CARD32*)((unsigned long)Base+(Offset)) = Value;
+ *(volatile CARD32 *) ((unsigned long) Base + (Offset)) = Value;
}
void
writeDense8(int Value, pointer Base, register unsigned long Offset)
{
write_mem_barrier();
- alpha_stb((pointer)((unsigned long)Base+(Offset)), Value);
+ alpha_stb((pointer) ((unsigned long) Base + (Offset)), Value);
}
void
writeDense16(int Value, pointer Base, register unsigned long Offset)
{
write_mem_barrier();
- alpha_stw((pointer)((unsigned long)Base + (Offset)), Value);
+ alpha_stw((pointer) ((unsigned long) Base + (Offset)), Value);
}
void
writeDense32(int Value, pointer Base, register unsigned long Offset)
{
write_mem_barrier();
- *(volatile CARD32 *)((unsigned long)Base+(Offset)) = Value;
+ *(volatile CARD32 *) ((unsigned long) Base + (Offset)) = Value;
}
diff --git a/xorg-server/hw/xfree86/os-support/bus/Pci.c b/xorg-server/hw/xfree86/os-support/bus/Pci.c
index 0362a00e3..52d142fbf 100644
--- a/xorg-server/hw/xfree86/os-support/bus/Pci.c
+++ b/xorg-server/hw/xfree86/os-support/bus/Pci.c
@@ -129,7 +129,7 @@
Bool
xf86scanpci(void)
{
- Bool success = FALSE;
+ Bool success = FALSE;
success = (pci_system_init() == 0);
diff --git a/xorg-server/hw/xfree86/os-support/bus/Pci.h b/xorg-server/hw/xfree86/os-support/bus/Pci.h
index 5709bd841..776bb637c 100644
--- a/xorg-server/hw/xfree86/os-support/bus/Pci.h
+++ b/xorg-server/hw/xfree86/os-support/bus/Pci.h
@@ -95,7 +95,6 @@
* authorization from the copyright holder(s) and author(s).
*/
-
/*
* This file has the private Pci definitions. The public ones are imported
* from xf86Pci.h. Drivers should not use this file.
@@ -119,7 +118,7 @@
#endif
#ifndef PCI_DOM_MASK
-# define PCI_DOM_MASK 0x0ffu
+#define PCI_DOM_MASK 0x0ffu
#endif
#define PCI_DOMBUS_MASK (((PCI_DOM_MASK) << 8) | 0x0ffu)
@@ -146,4 +145,4 @@ extern void osPciInit(void);
#error No PCI support available for this architecture/OS combination
#endif
-#endif /* _PCI_H */
+#endif /* _PCI_H */
diff --git a/xorg-server/hw/xfree86/os-support/bus/xf86Sbus.h b/xorg-server/hw/xfree86/os-support/bus/xf86Sbus.h
index cff5e808a..8a10d64fe 100644
--- a/xorg-server/hw/xfree86/os-support/bus/xf86Sbus.h
+++ b/xorg-server/hw/xfree86/os-support/bus/xf86Sbus.h
@@ -66,4 +66,4 @@
#define FBTYPE_CREATOR -1
#endif
-#endif /* _XF86_SBUS_H */
+#endif /* _XF86_SBUS_H */
diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c b/xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c
index 5fad19451..d98efa247 100644
--- a/xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c
+++ b/xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c
@@ -14,7 +14,7 @@
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
-
+
#define ACPI_SOCKET "/var/run/acpid.socket"
#define ACPI_VIDEO_NOTIFY_SWITCH 0x80
@@ -43,8 +43,8 @@ static CARD32
lnxACPIReopen(OsTimerPtr timer, CARD32 time, pointer arg)
{
if (lnxACPIOpen()) {
- TimerFree(timer);
- return 0;
+ TimerFree(timer);
+ return 0;
}
return ACPI_REOPEN_DELAY;
@@ -53,7 +53,7 @@ lnxACPIReopen(OsTimerPtr timer, CARD32 time, pointer arg)
#define LINE_LENGTH 80
static int
-lnxACPIGetEventFromOs(int fd, pmEvent *events, int num)
+lnxACPIGetEventFromOs(int fd, pmEvent * events, int num)
{
char ev[LINE_LENGTH];
int n;
@@ -61,59 +61,59 @@ lnxACPIGetEventFromOs(int fd, pmEvent *events, int num)
memset(ev, 0, LINE_LENGTH);
do {
- n = read( fd, ev, LINE_LENGTH );
+ n = read(fd, ev, LINE_LENGTH);
} while ((n == -1) && (errno == EAGAIN || errno == EINTR));
if (n <= 0) {
- lnxCloseACPI();
- TimerSet(NULL, 0, ACPI_REOPEN_DELAY, lnxACPIReopen, NULL);
- return 0;
+ lnxCloseACPI();
+ TimerSet(NULL, 0, ACPI_REOPEN_DELAY, lnxACPIReopen, NULL);
+ return 0;
}
/* FIXME: this only processes the first read ACPI event & might break
* with interrupted reads. */
-
+
/* Check that we have a video event */
if (!strncmp(ev, "video", 5)) {
- char *video = NULL;
- char *GFX = NULL;
- char *notify = NULL;
- char *data = NULL; /* doesn't appear to be used in the kernel */
- unsigned long int notify_l, data_l;
+ char *video = NULL;
+ char *GFX = NULL;
+ char *notify = NULL;
+ char *data = NULL; /* doesn't appear to be used in the kernel */
+ unsigned long int notify_l, data_l;
- video = strtok(ev, " ");
+ video = strtok(ev, " ");
- GFX = strtok(NULL, " ");
+ GFX = strtok(NULL, " ");
#if 0
- ErrorF("GFX: %s\n",GFX);
+ ErrorF("GFX: %s\n", GFX);
#endif
- notify = strtok(NULL, " ");
- notify_l = strtoul(notify, NULL, 16);
+ notify = strtok(NULL, " ");
+ notify_l = strtoul(notify, NULL, 16);
#if 0
- ErrorF("notify: 0x%lx\n",notify_l);
+ ErrorF("notify: 0x%lx\n", notify_l);
#endif
- data = strtok(NULL, " ");
- data_l = strtoul(data, NULL, 16);
+ data = strtok(NULL, " ");
+ data_l = strtoul(data, NULL, 16);
#if 0
- ErrorF("data: 0x%lx\n",data_l);
+ ErrorF("data: 0x%lx\n", data_l);
#endif
- /* Differentiate between events */
- switch (notify_l) {
- case ACPI_VIDEO_NOTIFY_SWITCH:
- case ACPI_VIDEO_NOTIFY_CYCLE:
- case ACPI_VIDEO_NOTIFY_NEXT_OUTPUT:
- case ACPI_VIDEO_NOTIFY_PREV_OUTPUT:
- events[0] = XF86_APM_CAPABILITY_CHANGED;
- return 1;
- case ACPI_VIDEO_NOTIFY_PROBE:
- return 0;
- default:
- return 0;
- }
+ /* Differentiate between events */
+ switch (notify_l) {
+ case ACPI_VIDEO_NOTIFY_SWITCH:
+ case ACPI_VIDEO_NOTIFY_CYCLE:
+ case ACPI_VIDEO_NOTIFY_NEXT_OUTPUT:
+ case ACPI_VIDEO_NOTIFY_PREV_OUTPUT:
+ events[0] = XF86_APM_CAPABILITY_CHANGED;
+ return 1;
+ case ACPI_VIDEO_NOTIFY_PROBE:
+ return 0;
+ default:
+ return 0;
+ }
}
-
+
return 0;
}
@@ -123,42 +123,42 @@ lnxACPIConfirmEventToOs(int fd, pmEvent event)
/* No ability to send back to the kernel in ACPI */
switch (event) {
default:
- return PM_NONE;
+ return PM_NONE;
}
}
PMClose
lnxACPIOpen(void)
{
- int fd;
+ int fd;
struct sockaddr_un addr;
int r = -1;
static int warned = 0;
DebugF("ACPI: OSPMOpen called\n");
if (ACPIihPtr || !xf86Info.pmFlag)
- return NULL;
-
+ return NULL;
+
DebugF("ACPI: Opening device\n");
if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) > -1) {
- memset(&addr, 0, sizeof(addr));
- addr.sun_family = AF_UNIX;
- strcpy(addr.sun_path, ACPI_SOCKET);
- if ((r = connect(fd, (struct sockaddr*)&addr, sizeof(addr))) == -1) {
- if (!warned)
- xf86MsgVerb(X_WARNING,3,"Open ACPI failed (%s) (%s)\n",
- ACPI_SOCKET, strerror(errno));
- warned = 1;
- shutdown(fd, 2);
- close(fd);
- return NULL;
- }
+ memset(&addr, 0, sizeof(addr));
+ addr.sun_family = AF_UNIX;
+ strcpy(addr.sun_path, ACPI_SOCKET);
+ if ((r = connect(fd, (struct sockaddr *) &addr, sizeof(addr))) == -1) {
+ if (!warned)
+ xf86MsgVerb(X_WARNING, 3, "Open ACPI failed (%s) (%s)\n",
+ ACPI_SOCKET, strerror(errno));
+ warned = 1;
+ shutdown(fd, 2);
+ close(fd);
+ return NULL;
+ }
}
xf86PMGetEventFromOs = lnxACPIGetEventFromOs;
xf86PMConfirmEventToOs = lnxACPIConfirmEventToOs;
- ACPIihPtr = xf86AddGeneralHandler(fd,xf86HandlePMEvents,NULL);
- xf86MsgVerb(X_INFO,3,"Open ACPI successful (%s)\n", ACPI_SOCKET);
+ ACPIihPtr = xf86AddGeneralHandler(fd, xf86HandlePMEvents, NULL);
+ xf86MsgVerb(X_INFO, 3, "Open ACPI successful (%s)\n", ACPI_SOCKET);
warned = 0;
return lnxCloseACPI;
@@ -171,9 +171,9 @@ lnxCloseACPI(void)
DebugF("ACPI: Closing device\n");
if (ACPIihPtr) {
- fd = xf86RemoveGeneralHandler(ACPIihPtr);
- shutdown(fd, 2);
- close(fd);
- ACPIihPtr = NULL;
+ fd = xf86RemoveGeneralHandler(ACPIihPtr);
+ shutdown(fd, 2);
+ close(fd);
+ ACPIihPtr = NULL;
}
}
diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_bell.c b/xorg-server/hw/xfree86/os-support/linux/lnx_bell.c
index 75cdd3ebc..e1d3cbf17 100644
--- a/xorg-server/hw/xfree86/os-support/linux/lnx_bell.c
+++ b/xorg-server/hw/xfree86/os-support/linux/lnx_bell.c
@@ -42,5 +42,5 @@ xf86OSRingBell(int loudness, int pitch, int duration)
ioctl(xf86Info.consoleFd, KDMKTONE,
((1193190 / pitch) & 0xffff) |
- (((unsigned long)duration * loudness / 50) << 16));
+ (((unsigned long) duration * loudness / 50) << 16));
}
diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c b/xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c
index cb3460d29..49950705a 100644
--- a/xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c
+++ b/xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c
@@ -10,74 +10,74 @@ int readDense8(pointer Base, register unsigned long Offset);
int readDense16(pointer Base, register unsigned long Offset);
int readDense32(pointer Base, register unsigned long Offset);
void
-writeDenseNB8(int Value, pointer Base, register unsigned long Offset);
+ writeDenseNB8(int Value, pointer Base, register unsigned long Offset);
void
-writeDenseNB16(int Value, pointer Base, register unsigned long Offset);
+ writeDenseNB16(int Value, pointer Base, register unsigned long Offset);
void
-writeDenseNB32(int Value, pointer Base, register unsigned long Offset);
+ writeDenseNB32(int Value, pointer Base, register unsigned long Offset);
void
-writeDense8(int Value, pointer Base, register unsigned long Offset);
+ writeDense8(int Value, pointer Base, register unsigned long Offset);
void
-writeDense16(int Value, pointer Base, register unsigned long Offset);
+ writeDense16(int Value, pointer Base, register unsigned long Offset);
void
-writeDense32(int Value, pointer Base, register unsigned long Offset);
+ writeDense32(int Value, pointer Base, register unsigned long Offset);
int
readDense8(pointer Base, register unsigned long Offset)
{
mem_barrier();
- return *(volatile CARD8*) ((unsigned long)Base+(Offset));
+ return *(volatile CARD8 *) ((unsigned long) Base + (Offset));
}
int
readDense16(pointer Base, register unsigned long Offset)
{
mem_barrier();
- return *(volatile CARD16*) ((unsigned long)Base+(Offset));
+ return *(volatile CARD16 *) ((unsigned long) Base + (Offset));
}
int
readDense32(pointer Base, register unsigned long Offset)
{
mem_barrier();
- return *(volatile CARD32*)((unsigned long)Base+(Offset));
+ return *(volatile CARD32 *) ((unsigned long) Base + (Offset));
}
void
writeDenseNB8(int Value, pointer Base, register unsigned long Offset)
{
- *(volatile CARD8*)((unsigned long)Base+(Offset)) = Value;
+ *(volatile CARD8 *) ((unsigned long) Base + (Offset)) = Value;
}
void
writeDenseNB16(int Value, pointer Base, register unsigned long Offset)
{
- *(volatile CARD16*)((unsigned long)Base + (Offset)) = Value;
+ *(volatile CARD16 *) ((unsigned long) Base + (Offset)) = Value;
}
void
writeDenseNB32(int Value, pointer Base, register unsigned long Offset)
{
- *(volatile CARD32*)((unsigned long)Base+(Offset)) = Value;
+ *(volatile CARD32 *) ((unsigned long) Base + (Offset)) = Value;
}
void
writeDense8(int Value, pointer Base, register unsigned long Offset)
{
write_mem_barrier();
- *(volatile CARD8 *)((unsigned long)Base+(Offset)) = Value;
+ *(volatile CARD8 *) ((unsigned long) Base + (Offset)) = Value;
}
void
writeDense16(int Value, pointer Base, register unsigned long Offset)
{
write_mem_barrier();
- *(volatile CARD16 *)((unsigned long)Base+(Offset)) = Value;
+ *(volatile CARD16 *) ((unsigned long) Base + (Offset)) = Value;
}
void
writeDense32(int Value, pointer Base, register unsigned long Offset)
{
write_mem_barrier();
- *(volatile CARD32 *)((unsigned long)Base+(Offset)) = Value;
+ *(volatile CARD32 *) ((unsigned long) Base + (Offset)) = Value;
}
diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c b/xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c
index 0b9493d27..0a17c2a81 100644
--- a/xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c
+++ b/xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c
@@ -11,11 +11,9 @@
#include "xf86_OSlib.h"
#include "xf86.h"
-
#define MODPROBE_PATH_FILE "/proc/sys/kernel/modprobe"
#define MAX_PATH 1024
-
#if 0
/* XFree86 #defines execl to be the xf86execl() function which does
* a fork AND exec. We don't want that. We want the regular,
@@ -26,7 +24,6 @@
#endif
#endif
-
/*
* Load a Linux kernel module.
* This is used by the DRI/DRM to load a DRM kernel module when
@@ -39,74 +36,76 @@
int
xf86LoadKernelModule(const char *modName)
{
- char mpPath[MAX_PATH] = "";
- int fd = -1, status, n;
- pid_t pid;
+ char mpPath[MAX_PATH] = "";
+ int fd = -1, status, n;
+ pid_t pid;
+
+ /* get the path to the modprobe program */
+ fd = open(MODPROBE_PATH_FILE, O_RDONLY);
+ if (fd >= 0) {
+ int count = read(fd, mpPath, MAX_PATH - 1);
+
+ if (count <= 0) {
+ mpPath[0] = 0;
+ }
+ else if (mpPath[count - 1] == '\n') {
+ mpPath[count - 1] = 0; /* replaces \n with \0 */
+ }
+ close(fd);
+ /* if this worked, mpPath will be "/sbin/modprobe" or similar. */
+ }
- /* get the path to the modprobe program */
- fd = open(MODPROBE_PATH_FILE, O_RDONLY);
- if (fd >= 0) {
- int count = read(fd, mpPath, MAX_PATH - 1);
- if (count <= 0) {
- mpPath[0] = 0;
- }
- else if (mpPath[count - 1] == '\n') {
- mpPath[count - 1] = 0; /* replaces \n with \0 */
- }
- close(fd);
- /* if this worked, mpPath will be "/sbin/modprobe" or similar. */
- }
+ if (mpPath[0] == 0) {
+ /* we failed to get the path from the system, use a default */
+ strcpy(mpPath, "/sbin/modprobe");
+ }
- if (mpPath[0] == 0) {
- /* we failed to get the path from the system, use a default */
- strcpy(mpPath, "/sbin/modprobe");
- }
+ /* now fork/exec the modprobe command */
+ /*
+ * It would be good to capture stdout/stderr so that it can be directed
+ * to the log file. modprobe errors currently are missing from the log
+ * file.
+ */
+ switch (pid = fork()) {
+ case 0: /* child */
+ /* change real/effective user ID to 0/0 as we need to
+ * preinstall agpgart module for some DRM modules
+ */
+ if (setreuid(0, 0)) {
+ xf86Msg(X_WARNING, "LoadKernelModule: "
+ "Setting of real/effective user Id to 0/0 failed");
+ }
+ setenv("PATH", "/sbin", 1);
+ n = execl(mpPath, "modprobe", modName, NULL);
+ xf86Msg(X_WARNING, "LoadKernelModule %s\n", strerror(errno));
+ exit(EXIT_FAILURE); /* if we get here the child's exec failed */
+ break;
+ case -1: /* fork failed */
+ return 0;
+ default: /* fork worked */
+ {
+ /* XXX we loop over waitpid() because it sometimes fails on
+ * the first attempt. Don't know why!
+ */
+ int count = 0, p;
- /* now fork/exec the modprobe command */
- /*
- * It would be good to capture stdout/stderr so that it can be directed
- * to the log file. modprobe errors currently are missing from the log
- * file.
- */
- switch (pid = fork()) {
- case 0: /* child */
- /* change real/effective user ID to 0/0 as we need to
- * preinstall agpgart module for some DRM modules
- */
- if (setreuid(0,0)) {
- xf86Msg(X_WARNING,"LoadKernelModule: "
- "Setting of real/effective user Id to 0/0 failed");
- }
- setenv("PATH","/sbin",1);
- n = execl(mpPath, "modprobe", modName, NULL);
- xf86Msg(X_WARNING,"LoadKernelModule %s\n",strerror(errno));
- exit(EXIT_FAILURE); /* if we get here the child's exec failed */
- break;
- case -1: /* fork failed */
- return 0;
- default: /* fork worked */
- {
- /* XXX we loop over waitpid() because it sometimes fails on
- * the first attempt. Don't know why!
- */
- int count = 0, p;
- do {
+ do {
p = waitpid(pid, &status, 0);
- } while (p == -1 && count++ < 4);
+ } while (p == -1 && count++ < 4);
- if (p == -1) {
+ if (p == -1) {
return 0;
- }
+ }
- if (WIFEXITED(status) && WEXITSTATUS(status) == 0) {
- return 1; /* success! */
- }
- else {
+ if (WIFEXITED(status) && WEXITSTATUS(status) == 0) {
+ return 1; /* success! */
+ }
+ else {
return 0;
- }
- }
- }
+ }
+ }
+ }
- /* never get here */
- return 0;
+ /* never get here */
+ return 0;
}
diff --git a/xorg-server/hw/xfree86/os-support/shared/VTsw_noop.c b/xorg-server/hw/xfree86/os-support/shared/VTsw_noop.c
index be47cd681..a75d134b4 100644
--- a/xorg-server/hw/xfree86/os-support/shared/VTsw_noop.c
+++ b/xorg-server/hw/xfree86/os-support/shared/VTsw_noop.c
@@ -1,60 +1,60 @@
-/*
- * Copyright 1993 by David Wexelblat <dwex@XFree86.org>
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of David Wexelblat not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. David Wexelblat makes no representations
- * about the suitability of this software for any purpose. It is provided
- * "as is" without express or implied warranty.
- *
- * DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL DAVID WEXELBLAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- *
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-
-#include "xf86.h"
-#include "xf86Priv.h"
-#include "xf86_OSlib.h"
-
-/*
- * No-op functions for OSs without VTs
- */
-
-Bool
-xf86VTSwitchPending(void)
-{
- return FALSE;
-}
-
-Bool
-xf86VTSwitchAway(void)
-{
- return FALSE;
-}
-
-Bool
-xf86VTSwitchTo(void)
-{
- return TRUE;
-}
-
-Bool
-xf86VTActivate(int vtno)
-{
- return TRUE;
-}
+/*
+ * Copyright 1993 by David Wexelblat <dwex@XFree86.org>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of David Wexelblat not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. David Wexelblat makes no representations
+ * about the suitability of this software for any purpose. It is provided
+ * "as is" without express or implied warranty.
+ *
+ * DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL DAVID WEXELBLAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include <X11/X.h>
+
+#include "xf86.h"
+#include "xf86Priv.h"
+#include "xf86_OSlib.h"
+
+/*
+ * No-op functions for OSs without VTs
+ */
+
+Bool
+xf86VTSwitchPending(void)
+{
+ return FALSE;
+}
+
+Bool
+xf86VTSwitchAway(void)
+{
+ return FALSE;
+}
+
+Bool
+xf86VTSwitchTo(void)
+{
+ return TRUE;
+}
+
+Bool
+xf86VTActivate(int vtno)
+{
+ return TRUE;
+}
diff --git a/xorg-server/hw/xfree86/os-support/shared/VTsw_usl.c b/xorg-server/hw/xfree86/os-support/shared/VTsw_usl.c
index 769fa009c..f20106c90 100644
--- a/xorg-server/hw/xfree86/os-support/shared/VTsw_usl.c
+++ b/xorg-server/hw/xfree86/os-support/shared/VTsw_usl.c
@@ -1,86 +1,86 @@
-/*
- * Copyright 1993 by David Wexelblat <dwex@XFree86.org>
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of David Wexelblat not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. David Wexelblat makes no representations
- * about the suitability of this software for any purpose. It is provided
- * "as is" without express or implied warranty.
- *
- * DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL DAVID WEXELBLAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- *
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-
-#include "xf86.h"
-#include "xf86Priv.h"
-#include "xf86_OSlib.h"
-
-/*
- * Handle the VT-switching interface for OSs that use USL-style ioctl()s
- * (the sysv, sco, and linux subdirs).
- */
-
-/*
- * This function is the signal handler for the VT-switching signal. It
- * is only referenced inside the OS-support layer.
- */
-void
-xf86VTRequest(int sig)
-{
- signal(sig, (void(*)(int))xf86VTRequest);
- xf86Info.vtRequestsPending = TRUE;
- return;
-}
-
-Bool
-xf86VTSwitchPending(void)
-{
- return xf86Info.vtRequestsPending ? TRUE : FALSE;
-}
-
-Bool
-xf86VTSwitchAway(void)
-{
- xf86Info.vtRequestsPending = FALSE;
- if (ioctl(xf86Info.consoleFd, VT_RELDISP, 1) < 0)
- return FALSE;
- else
- return TRUE;
-}
-
-Bool
-xf86VTSwitchTo(void)
-{
- xf86Info.vtRequestsPending = FALSE;
- if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ) < 0)
- return FALSE;
- else
- return TRUE;
-}
-
-Bool
-xf86VTActivate(int vtno)
-{
-#ifdef VT_ACTIVATE
- if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vtno) < 0) {
- return FALSE;
- }
-#endif
- return TRUE;
-}
+/*
+ * Copyright 1993 by David Wexelblat <dwex@XFree86.org>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of David Wexelblat not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. David Wexelblat makes no representations
+ * about the suitability of this software for any purpose. It is provided
+ * "as is" without express or implied warranty.
+ *
+ * DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL DAVID WEXELBLAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include <X11/X.h>
+
+#include "xf86.h"
+#include "xf86Priv.h"
+#include "xf86_OSlib.h"
+
+/*
+ * Handle the VT-switching interface for OSs that use USL-style ioctl()s
+ * (the sysv, sco, and linux subdirs).
+ */
+
+/*
+ * This function is the signal handler for the VT-switching signal. It
+ * is only referenced inside the OS-support layer.
+ */
+void
+xf86VTRequest(int sig)
+{
+ signal(sig, (void (*)(int)) xf86VTRequest);
+ xf86Info.vtRequestsPending = TRUE;
+ return;
+}
+
+Bool
+xf86VTSwitchPending(void)
+{
+ return xf86Info.vtRequestsPending ? TRUE : FALSE;
+}
+
+Bool
+xf86VTSwitchAway(void)
+{
+ xf86Info.vtRequestsPending = FALSE;
+ if (ioctl(xf86Info.consoleFd, VT_RELDISP, 1) < 0)
+ return FALSE;
+ else
+ return TRUE;
+}
+
+Bool
+xf86VTSwitchTo(void)
+{
+ xf86Info.vtRequestsPending = FALSE;
+ if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ) < 0)
+ return FALSE;
+ else
+ return TRUE;
+}
+
+Bool
+xf86VTActivate(int vtno)
+{
+#ifdef VT_ACTIVATE
+ if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vtno) < 0) {
+ return FALSE;
+ }
+#endif
+ return TRUE;
+}
diff --git a/xorg-server/hw/xfree86/os-support/shared/agp_noop.c b/xorg-server/hw/xfree86/os-support/shared/agp_noop.c
index eda466a52..9c6ed4b8d 100644
--- a/xorg-server/hw/xfree86/os-support/shared/agp_noop.c
+++ b/xorg-server/hw/xfree86/os-support/shared/agp_noop.c
@@ -43,61 +43,60 @@
Bool
xf86GARTCloseScreen(int screenNum)
{
- return FALSE;
+ return FALSE;
}
Bool
xf86AgpGARTSupported()
{
- return FALSE;
+ return FALSE;
}
AgpInfoPtr
xf86GetAGPInfo(int screenNum)
{
- return NULL;
+ return NULL;
}
Bool
xf86AcquireGART(int screenNum)
{
- return FALSE;
+ return FALSE;
}
Bool
xf86ReleaseGART(int screenNum)
{
- return FALSE;
+ return FALSE;
}
int
xf86AllocateGARTMemory(int screenNum, unsigned long size, int type,
- unsigned long *physical)
+ unsigned long *physical)
{
- return -1;
+ return -1;
}
Bool
xf86DeallocateGARTMemory(int screenNum, int key)
{
- return FALSE;
+ return FALSE;
}
Bool
xf86BindGARTMemory(int screenNum, int key, unsigned long offset)
{
- return FALSE;
+ return FALSE;
}
-
Bool
xf86UnbindGARTMemory(int screenNum, int key)
{
- return FALSE;
+ return FALSE;
}
Bool
xf86EnableAGP(int screenNum, CARD32 mode)
{
- return FALSE;
+ return FALSE;
}
diff --git a/xorg-server/hw/xfree86/os-support/shared/ioperm_noop.c b/xorg-server/hw/xfree86/os-support/shared/ioperm_noop.c
index 805caccac..30688c0b5 100644
--- a/xorg-server/hw/xfree86/os-support/shared/ioperm_noop.c
+++ b/xorg-server/hw/xfree86/os-support/shared/ioperm_noop.c
@@ -38,12 +38,11 @@
Bool
xf86EnableIO()
{
- return TRUE;
+ return TRUE;
}
void
xf86DisableIO()
{
- return;
+ return;
}
-
diff --git a/xorg-server/hw/xfree86/os-support/shared/pm_noop.c b/xorg-server/hw/xfree86/os-support/shared/pm_noop.c
index bfac4b1c8..1d6f0789d 100644
--- a/xorg-server/hw/xfree86/os-support/shared/pm_noop.c
+++ b/xorg-server/hw/xfree86/os-support/shared/pm_noop.c
@@ -41,7 +41,5 @@
PMClose
xf86OSPMOpen(void)
{
- return NULL;
+ return NULL;
}
-
-
diff --git a/xorg-server/hw/xfree86/os-support/shared/sigiostubs.c b/xorg-server/hw/xfree86/os-support/shared/sigiostubs.c
index cecec37f7..ba8e234f4 100644
--- a/xorg-server/hw/xfree86/os-support/shared/sigiostubs.c
+++ b/xorg-server/hw/xfree86/os-support/shared/sigiostubs.c
@@ -29,13 +29,13 @@
#include <xorg-config.h>
#endif
-# include <X11/X.h>
-# include "xf86.h"
-# include "xf86Priv.h"
-# include "xf86_OSlib.h"
+#include <X11/X.h>
+#include "xf86.h"
+#include "xf86Priv.h"
+#include "xf86_OSlib.h"
int
-xf86InstallSIGIOHandler(int fd, void (*f)(int, void *), void *closure)
+xf86InstallSIGIOHandler(int fd, void (*f) (int, void *), void *closure)
{
return 0;
}
@@ -47,25 +47,24 @@ xf86RemoveSIGIOHandler(int fd)
}
int
-xf86BlockSIGIO (void)
+xf86BlockSIGIO(void)
{
return 0;
}
void
-xf86UnblockSIGIO (int wasset)
+xf86UnblockSIGIO(int wasset)
{
}
void
-xf86AssertBlockedSIGIO (char *where)
+xf86AssertBlockedSIGIO(char *where)
{
}
/* XXX This is a quick hack for the benefit of xf86SetSilkenMouse() */
Bool
-xf86SIGIOSupported ()
+xf86SIGIOSupported()
{
return FALSE;
}
-
diff --git a/xorg-server/hw/xfree86/os-support/shared/xf86Axp.h b/xorg-server/hw/xfree86/os-support/shared/xf86Axp.h
index 5e9d6284c..fded9d8c9 100644
--- a/xorg-server/hw/xfree86/os-support/shared/xf86Axp.h
+++ b/xorg-server/hw/xfree86/os-support/shared/xf86Axp.h
@@ -6,29 +6,28 @@
#define _XF86_AXP_H_
typedef enum {
- SYS_NONE,
- TSUNAMI,
- LCA,
- APECS,
- T2,
- T2_GAMMA,
- CIA,
- MCPCIA,
- JENSEN,
- POLARIS,
- PYXIS,
- PYXIS_CIA,
- IRONGATE
+ SYS_NONE,
+ TSUNAMI,
+ LCA,
+ APECS,
+ T2,
+ T2_GAMMA,
+ CIA,
+ MCPCIA,
+ JENSEN,
+ POLARIS,
+ PYXIS,
+ PYXIS_CIA,
+ IRONGATE
} axpDevice;
-
+
typedef struct {
- axpDevice id;
- unsigned long hae_thresh;
- unsigned long hae_mask;
- unsigned long size;
+ axpDevice id;
+ unsigned long hae_thresh;
+ unsigned long hae_mask;
+ unsigned long size;
} axpParams;
extern axpParams xf86AXPParams[];
#endif
-
diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_agp.c b/xorg-server/hw/xfree86/os-support/solaris/sun_agp.c
index 8c4e9f5c1..fb58eca81 100644
--- a/xorg-server/hw/xfree86/os-support/solaris/sun_agp.c
+++ b/xorg-server/hw/xfree86/os-support/solaris/sun_agp.c
@@ -51,6 +51,7 @@
static int gartFd = -1;
static int acquiredScreen = -1;
static Bool initDone = FALSE;
+
/*
* Close /dev/agpgart. This frees all associated memory allocated during
* this server generation.
@@ -58,17 +59,17 @@ static Bool initDone = FALSE;
Bool
xf86GARTCloseScreen(int screenNum)
{
- if (gartFd != -1) {
- close(gartFd);
- acquiredScreen = -1;
- gartFd = -1;
- initDone = FALSE;
+ if (gartFd != -1) {
+ close(gartFd);
+ acquiredScreen = -1;
+ gartFd = -1;
+ initDone = FALSE;
- xf86DrvMsg(screenNum, X_INFO,
- "xf86GARTCloseScreen: device closed successfully\n");
+ xf86DrvMsg(screenNum, X_INFO,
+ "xf86GARTCloseScreen: device closed successfully\n");
- }
- return TRUE;
+ }
+ return TRUE;
}
/*
@@ -77,251 +78,249 @@ xf86GARTCloseScreen(int screenNum)
static Bool
GARTInit(int screenNum)
{
- if (initDone)
- return gartFd != -1;
-
- if (gartFd == -1)
- gartFd = open(AGP_DEVICE, O_RDWR);
- else
- return FALSE;
-
- if (gartFd == -1) {
- xf86DrvMsg(screenNum, X_ERROR,
- "GARTInit: Unable to open " AGP_DEVICE " (%s)\n",
- strerror(errno));
- return FALSE;
- }
-
- initDone = TRUE;
- xf86DrvMsg(screenNum, X_INFO,
- "GARTInit: " AGP_DEVICE " opened successfully\n");
-
- return TRUE;
+ if (initDone)
+ return gartFd != -1;
+
+ if (gartFd == -1)
+ gartFd = open(AGP_DEVICE, O_RDWR);
+ else
+ return FALSE;
+
+ if (gartFd == -1) {
+ xf86DrvMsg(screenNum, X_ERROR,
+ "GARTInit: Unable to open " AGP_DEVICE " (%s)\n",
+ strerror(errno));
+ return FALSE;
+ }
+
+ initDone = TRUE;
+ xf86DrvMsg(screenNum, X_INFO,
+ "GARTInit: " AGP_DEVICE " opened successfully\n");
+
+ return TRUE;
}
Bool
xf86AgpGARTSupported(void)
{
- return (GARTInit(-1));
+ return (GARTInit(-1));
}
AgpInfoPtr
xf86GetAGPInfo(int screenNum)
{
- agp_info_t agpinf;
- AgpInfoPtr info;
-
- if (!GARTInit(screenNum))
- return NULL;
-
- if (ioctl(gartFd, AGPIOC_INFO, &agpinf) != 0) {
- xf86DrvMsg(screenNum, X_ERROR,
- "xf86GetAGPInfo: AGPIOC_INFO failed (%s)\n",
- strerror(errno));
- return NULL;
- }
-
- if ((info = calloc(sizeof(AgpInfo), 1)) == NULL) {
- xf86DrvMsg(screenNum, X_ERROR,
- "xf86GetAGPInfo: Failed to allocate AgpInfo\n");
- return NULL;
- }
-
- info->bridgeId = agpinf.agpi_devid;
- info->agpMode = agpinf.agpi_mode;
- info->base = agpinf.agpi_aperbase;
- info->size = agpinf.agpi_apersize;
- info->totalPages = (unsigned long)agpinf.agpi_pgtotal;
- info->systemPages = (unsigned long)agpinf.agpi_pgsystem;
- info->usedPages = (unsigned long)agpinf.agpi_pgused;
-
- return info;
+ agp_info_t agpinf;
+ AgpInfoPtr info;
+
+ if (!GARTInit(screenNum))
+ return NULL;
+
+ if (ioctl(gartFd, AGPIOC_INFO, &agpinf) != 0) {
+ xf86DrvMsg(screenNum, X_ERROR,
+ "xf86GetAGPInfo: AGPIOC_INFO failed (%s)\n",
+ strerror(errno));
+ return NULL;
+ }
+
+ if ((info = calloc(sizeof(AgpInfo), 1)) == NULL) {
+ xf86DrvMsg(screenNum, X_ERROR,
+ "xf86GetAGPInfo: Failed to allocate AgpInfo\n");
+ return NULL;
+ }
+
+ info->bridgeId = agpinf.agpi_devid;
+ info->agpMode = agpinf.agpi_mode;
+ info->base = agpinf.agpi_aperbase;
+ info->size = agpinf.agpi_apersize;
+ info->totalPages = (unsigned long) agpinf.agpi_pgtotal;
+ info->systemPages = (unsigned long) agpinf.agpi_pgsystem;
+ info->usedPages = (unsigned long) agpinf.agpi_pgused;
+
+ return info;
}
Bool
xf86AcquireGART(int screenNum)
{
- if (!GARTInit(screenNum))
- return FALSE;
-
- if (acquiredScreen != screenNum) {
- if (ioctl(gartFd, AGPIOC_ACQUIRE, 0) != 0) {
- xf86DrvMsg(screenNum, X_WARNING,
- "xf86AcquireGART: AGPIOC_ACQUIRE failed (%s)\n",
- strerror(errno));
- return FALSE;
- }
- acquiredScreen = screenNum;
- xf86DrvMsg(screenNum, X_INFO,
- "xf86AcquireGART: AGPIOC_ACQUIRE succeeded\n");
- }
- return TRUE;
+ if (!GARTInit(screenNum))
+ return FALSE;
+
+ if (acquiredScreen != screenNum) {
+ if (ioctl(gartFd, AGPIOC_ACQUIRE, 0) != 0) {
+ xf86DrvMsg(screenNum, X_WARNING,
+ "xf86AcquireGART: AGPIOC_ACQUIRE failed (%s)\n",
+ strerror(errno));
+ return FALSE;
+ }
+ acquiredScreen = screenNum;
+ xf86DrvMsg(screenNum, X_INFO,
+ "xf86AcquireGART: AGPIOC_ACQUIRE succeeded\n");
+ }
+ return TRUE;
}
Bool
xf86ReleaseGART(int screenNum)
{
- if (!GARTInit(screenNum))
- return FALSE;
-
- if (acquiredScreen == screenNum) {
- /*
- * The FreeBSD agp driver removes allocations on release.
- * The Solaris driver doesn't. xf86ReleaseGART() is expected
- * to give up access to the GART, but not to remove any
- * allocations.
- */
-
- if (ioctl(gartFd, AGPIOC_RELEASE, 0) != 0) {
- xf86DrvMsg(screenNum, X_WARNING,
- "xf86ReleaseGART: AGPIOC_RELEASE failed (%s)\n",
- strerror(errno));
- return FALSE;
- }
- acquiredScreen = -1;
- xf86DrvMsg(screenNum, X_INFO,
- "xf86ReleaseGART: AGPIOC_RELEASE succeeded\n");
- return TRUE;
- }
- return FALSE;
+ if (!GARTInit(screenNum))
+ return FALSE;
+
+ if (acquiredScreen == screenNum) {
+ /*
+ * The FreeBSD agp driver removes allocations on release.
+ * The Solaris driver doesn't. xf86ReleaseGART() is expected
+ * to give up access to the GART, but not to remove any
+ * allocations.
+ */
+
+ if (ioctl(gartFd, AGPIOC_RELEASE, 0) != 0) {
+ xf86DrvMsg(screenNum, X_WARNING,
+ "xf86ReleaseGART: AGPIOC_RELEASE failed (%s)\n",
+ strerror(errno));
+ return FALSE;
+ }
+ acquiredScreen = -1;
+ xf86DrvMsg(screenNum, X_INFO,
+ "xf86ReleaseGART: AGPIOC_RELEASE succeeded\n");
+ return TRUE;
+ }
+ return FALSE;
}
int
xf86AllocateGARTMemory(int screenNum, unsigned long size, int type,
- unsigned long *physical)
+ unsigned long *physical)
{
- agp_allocate_t alloc;
- int pages;
-
- /*
- * Allocates "size" bytes of GART memory (rounds up to the next
- * page multiple) or type "type". A handle (key) for the allocated
- * memory is returned. On error, the return value is -1.
- * "size" should be larger than 0, or AGPIOC_ALLOCATE ioctl will
- * return error.
- */
-
- if (!GARTInit(screenNum) || (acquiredScreen != screenNum))
- return -1;
-
- pages = (size / AGP_PAGE_SIZE);
- if (size % AGP_PAGE_SIZE != 0)
- pages++;
-
- alloc.agpa_pgcount = pages;
- alloc.agpa_type = type;
-
- if (ioctl(gartFd, AGPIOC_ALLOCATE, &alloc) != 0) {
- xf86DrvMsg(screenNum, X_WARNING, "xf86AllocateGARTMemory: "
- "allocation of %d pages failed\n\t(%s)\n", pages,
- strerror(errno));
- return -1;
- }
-
- if (physical)
- *physical = (unsigned long)alloc.agpa_physical;
-
- return alloc.agpa_key;
+ agp_allocate_t alloc;
+ int pages;
+
+ /*
+ * Allocates "size" bytes of GART memory (rounds up to the next
+ * page multiple) or type "type". A handle (key) for the allocated
+ * memory is returned. On error, the return value is -1.
+ * "size" should be larger than 0, or AGPIOC_ALLOCATE ioctl will
+ * return error.
+ */
+
+ if (!GARTInit(screenNum) || (acquiredScreen != screenNum))
+ return -1;
+
+ pages = (size / AGP_PAGE_SIZE);
+ if (size % AGP_PAGE_SIZE != 0)
+ pages++;
+
+ alloc.agpa_pgcount = pages;
+ alloc.agpa_type = type;
+
+ if (ioctl(gartFd, AGPIOC_ALLOCATE, &alloc) != 0) {
+ xf86DrvMsg(screenNum, X_WARNING, "xf86AllocateGARTMemory: "
+ "allocation of %d pages failed\n\t(%s)\n", pages,
+ strerror(errno));
+ return -1;
+ }
+
+ if (physical)
+ *physical = (unsigned long) alloc.agpa_physical;
+
+ return alloc.agpa_key;
}
Bool
xf86DeallocateGARTMemory(int screenNum, int key)
{
- if (!GARTInit(screenNum) || (acquiredScreen != screenNum))
- return FALSE;
+ if (!GARTInit(screenNum) || (acquiredScreen != screenNum))
+ return FALSE;
- if (ioctl(gartFd, AGPIOC_DEALLOCATE, (int *)(uintptr_t)key) != 0) {
- xf86DrvMsg(screenNum, X_WARNING, "xf86DeAllocateGARTMemory: "
- "deallocation of gart memory with key %d failed\n"
- "\t(%s)\n", key, strerror(errno));
- return FALSE;
- }
+ if (ioctl(gartFd, AGPIOC_DEALLOCATE, (int *) (uintptr_t) key) != 0) {
+ xf86DrvMsg(screenNum, X_WARNING, "xf86DeAllocateGARTMemory: "
+ "deallocation of gart memory with key %d failed\n"
+ "\t(%s)\n", key, strerror(errno));
+ return FALSE;
+ }
- return TRUE;
+ return TRUE;
}
/* Bind GART memory with "key" at "offset" */
Bool
xf86BindGARTMemory(int screenNum, int key, unsigned long offset)
{
- agp_bind_t bind;
- int pageOffset;
-
- if (!GARTInit(screenNum) || (acquiredScreen != screenNum))
- return FALSE;
-
- if (offset % AGP_PAGE_SIZE != 0) {
- xf86DrvMsg(screenNum, X_WARNING, "xf86BindGARTMemory: "
- "offset (0x%lx) is not page-aligned (%d)\n",
- offset, AGP_PAGE_SIZE);
- return FALSE;
- }
- pageOffset = offset / AGP_PAGE_SIZE;
-
- xf86DrvMsgVerb(screenNum, X_INFO, 3,
- "xf86BindGARTMemory: bind key %d at 0x%08lx "
- "(pgoffset %d)\n", key, offset, pageOffset);
-
- bind.agpb_pgstart = pageOffset;
- bind.agpb_key = key;
-
- if (ioctl(gartFd, AGPIOC_BIND, &bind) != 0) {
- xf86DrvMsg(screenNum, X_WARNING, "xf86BindGARTMemory: "
- "binding of gart memory with key %d\n"
- "\tat offset 0x%lx failed (%s)\n",
- key, offset, strerror(errno));
- return FALSE;
- }
-
- return TRUE;
+ agp_bind_t bind;
+ int pageOffset;
+
+ if (!GARTInit(screenNum) || (acquiredScreen != screenNum))
+ return FALSE;
+
+ if (offset % AGP_PAGE_SIZE != 0) {
+ xf86DrvMsg(screenNum, X_WARNING, "xf86BindGARTMemory: "
+ "offset (0x%lx) is not page-aligned (%d)\n",
+ offset, AGP_PAGE_SIZE);
+ return FALSE;
+ }
+ pageOffset = offset / AGP_PAGE_SIZE;
+
+ xf86DrvMsgVerb(screenNum, X_INFO, 3,
+ "xf86BindGARTMemory: bind key %d at 0x%08lx "
+ "(pgoffset %d)\n", key, offset, pageOffset);
+
+ bind.agpb_pgstart = pageOffset;
+ bind.agpb_key = key;
+
+ if (ioctl(gartFd, AGPIOC_BIND, &bind) != 0) {
+ xf86DrvMsg(screenNum, X_WARNING, "xf86BindGARTMemory: "
+ "binding of gart memory with key %d\n"
+ "\tat offset 0x%lx failed (%s)\n",
+ key, offset, strerror(errno));
+ return FALSE;
+ }
+
+ return TRUE;
}
/* Unbind GART memory with "key" */
Bool
xf86UnbindGARTMemory(int screenNum, int key)
{
- agp_unbind_t unbind;
+ agp_unbind_t unbind;
- if (!GARTInit(screenNum) || (acquiredScreen != screenNum))
- return FALSE;
+ if (!GARTInit(screenNum) || (acquiredScreen != screenNum))
+ return FALSE;
- unbind.agpu_pri = 0;
- unbind.agpu_key = key;
+ unbind.agpu_pri = 0;
+ unbind.agpu_key = key;
- if (ioctl(gartFd, AGPIOC_UNBIND, &unbind) != 0) {
- xf86DrvMsg(screenNum, X_WARNING, "xf86UnbindGARTMemory: "
- "unbinding of gart memory with key %d "
- "failed (%s)\n", key, strerror(errno));
- return FALSE;
- }
+ if (ioctl(gartFd, AGPIOC_UNBIND, &unbind) != 0) {
+ xf86DrvMsg(screenNum, X_WARNING, "xf86UnbindGARTMemory: "
+ "unbinding of gart memory with key %d "
+ "failed (%s)\n", key, strerror(errno));
+ return FALSE;
+ }
- xf86DrvMsgVerb(screenNum, X_INFO, 3,
- "xf86UnbindGARTMemory: unbind key %d\n", key);
+ xf86DrvMsgVerb(screenNum, X_INFO, 3,
+ "xf86UnbindGARTMemory: unbind key %d\n", key);
- return TRUE;
+ return TRUE;
}
-
/* XXX Interface may change. */
Bool
xf86EnableAGP(int screenNum, CARD32 mode)
{
- agp_setup_t setup;
+ agp_setup_t setup;
- if (!GARTInit(screenNum) || (acquiredScreen != screenNum))
- return FALSE;
+ if (!GARTInit(screenNum) || (acquiredScreen != screenNum))
+ return FALSE;
- setup.agps_mode = mode;
- if (ioctl(gartFd, AGPIOC_SETUP, &setup) != 0) {
- xf86DrvMsg(screenNum, X_WARNING, "xf86EnableAGP: "
- "AGPIOC_SETUP with mode %x failed (%s)\n",
- (unsigned int) mode, strerror(errno));
- return FALSE;
- }
+ setup.agps_mode = mode;
+ if (ioctl(gartFd, AGPIOC_SETUP, &setup) != 0) {
+ xf86DrvMsg(screenNum, X_WARNING, "xf86EnableAGP: "
+ "AGPIOC_SETUP with mode %x failed (%s)\n",
+ (unsigned int) mode, strerror(errno));
+ return FALSE;
+ }
- return TRUE;
+ return TRUE;
}
-
diff --git a/xorg-server/hw/xfree86/os-support/stub/stub_bios.c b/xorg-server/hw/xfree86/os-support/stub/stub_bios.c
index 8628316dd..dbc92fcdb 100644
--- a/xorg-server/hw/xfree86/os-support/stub/stub_bios.c
+++ b/xorg-server/hw/xfree86/os-support/stub/stub_bios.c
@@ -6,7 +6,7 @@
int
xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
- int Len)
+ int Len)
{
- return -1;
+ return -1;
}
diff --git a/xorg-server/hw/xfree86/os-support/stub/stub_init.c b/xorg-server/hw/xfree86/os-support/stub/stub_init.c
index 36fd2b818..629675d68 100644
--- a/xorg-server/hw/xfree86/os-support/stub/stub_init.c
+++ b/xorg-server/hw/xfree86/os-support/stub/stub_init.c
@@ -17,7 +17,7 @@ xf86CloseConsole()
int
xf86ProcessArgument(int argc, char *argv[], int i)
{
- return 0;
+ return 0;
}
void
diff --git a/xorg-server/hw/xfree86/os-support/stub/stub_video.c b/xorg-server/hw/xfree86/os-support/stub/stub_video.c
index 327496839..9771fcf6e 100644
--- a/xorg-server/hw/xfree86/os-support/stub/stub_video.c
+++ b/xorg-server/hw/xfree86/os-support/stub/stub_video.c
@@ -8,6 +8,6 @@
void
xf86OSInitVidMem(VidMemInfoPtr pVidMem)
{
- pVidMem->initialised = TRUE;
- return;
+ pVidMem->initialised = TRUE;
+ return;
}
diff --git a/xorg-server/hw/xfree86/os-support/xf86OSpriv.h b/xorg-server/hw/xfree86/os-support/xf86OSpriv.h
index 754128de9..65769c16f 100644
--- a/xorg-server/hw/xfree86/os-support/xf86OSpriv.h
+++ b/xorg-server/hw/xfree86/os-support/xf86OSpriv.h
@@ -32,25 +32,25 @@
#ifndef _XF86OSPRIV_H
#define _XF86OSPRIV_H
-typedef pointer (*MapMemProcPtr)(int, unsigned long, unsigned long, int);
-typedef void (*UnmapMemProcPtr)(int, pointer, unsigned long);
-typedef pointer (*SetWCProcPtr)(int, unsigned long, unsigned long, Bool,
- MessageType);
-typedef void (*ProtectMemProcPtr)(int, pointer, unsigned long, Bool);
-typedef void (*UndoWCProcPtr)(int, pointer);
-typedef void (*ReadSideEffectsProcPtr)(int, pointer, unsigned long);
+typedef pointer (*MapMemProcPtr) (int, unsigned long, unsigned long, int);
+typedef void (*UnmapMemProcPtr) (int, pointer, unsigned long);
+typedef pointer (*SetWCProcPtr) (int, unsigned long, unsigned long, Bool,
+ MessageType);
+typedef void (*ProtectMemProcPtr) (int, pointer, unsigned long, Bool);
+typedef void (*UndoWCProcPtr) (int, pointer);
+typedef void (*ReadSideEffectsProcPtr) (int, pointer, unsigned long);
typedef struct {
- Bool initialised;
- MapMemProcPtr mapMem;
- UnmapMemProcPtr unmapMem;
- ProtectMemProcPtr protectMem;
- SetWCProcPtr setWC;
- UndoWCProcPtr undoWC;
- ReadSideEffectsProcPtr readSideEffects;
- Bool linearSupported;
+ Bool initialised;
+ MapMemProcPtr mapMem;
+ UnmapMemProcPtr unmapMem;
+ ProtectMemProcPtr protectMem;
+ SetWCProcPtr setWC;
+ UndoWCProcPtr undoWC;
+ ReadSideEffectsProcPtr readSideEffects;
+ Bool linearSupported;
} VidMemInfo, *VidMemInfoPtr;
void xf86OSInitVidMem(VidMemInfoPtr);
-#endif /* _XF86OSPRIV_H */
+#endif /* _XF86OSPRIV_H */
diff --git a/xorg-server/hw/xfree86/os-support/xf86_OSlib.h b/xorg-server/hw/xfree86/os-support/xf86_OSlib.h
index 45500dbdb..9161e181e 100644
--- a/xorg-server/hw/xfree86/os-support/xf86_OSlib.h
+++ b/xorg-server/hw/xfree86/os-support/xf86_OSlib.h
@@ -85,152 +85,150 @@
/**************************************************************************/
#if (defined(SYSV) || defined(SVR4)) && \
(defined(sun) || defined(__i386__))
-# include <sys/ioctl.h>
-# include <signal.h>
-# include <termio.h>
-# include <sys/stat.h>
-# include <sys/types.h>
-
-
-# include <errno.h>
-
-# if defined(_NEED_SYSI86)
-# if !(defined (sun) && defined (SVR4))
-# include <sys/immu.h>
-# include <sys/region.h>
-# include <sys/proc.h>
-# endif
-# include <sys/tss.h>
-# include <sys/sysi86.h>
-# if defined(SVR4) && !defined(sun)
-# include <sys/seg.h>
-# endif /* SVR4 && !sun */
+#include <sys/ioctl.h>
+#include <signal.h>
+#include <termio.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+#include <errno.h>
+
+#if defined(_NEED_SYSI86)
+#if !(defined (sun) && defined (SVR4))
+#include <sys/immu.h>
+#include <sys/region.h>
+#include <sys/proc.h>
+#endif
+#include <sys/tss.h>
+#include <sys/sysi86.h>
+#if defined(SVR4) && !defined(sun)
+#include <sys/seg.h>
+#endif /* SVR4 && !sun */
/* V86SC_IOPL was moved to <sys/sysi86.h> on Solaris 7 and later */
-# if !defined(V86SC_IOPL) /* Solaris 7 or later? */
-# include <sys/v86.h> /* Nope */
-# endif
-# if defined(sun) && (defined (__i386__) || defined(__i386) || defined(__x86)) && defined (SVR4)
-# include <sys/psw.h>
-# endif
-# endif /* _NEED_SYSI86 */
-
-# if defined(HAS_SVR3_MMAPDRV)
-# include <sys/sysmacros.h>
-# if !defined(_NEED_SYSI86)
-# include <sys/immu.h>
-# include <sys/region.h>
-# endif
-# include <sys/mmap.h> /* MMAP driver header */
-# endif
-
-# if !defined(sun) || defined(HAVE_SYS_VT_H)
-# define HAS_USL_VTS
-# endif
-# if !defined(sun)
-# include <sys/emap.h>
-# endif
-# if defined(HAS_USL_VTS)
-# if !defined(sun)
-# include <sys/at_ansi.h>
-# endif
-# include <sys/kd.h>
-# include <sys/vt.h>
-# endif
-
-# if defined(sun)
-# include <sys/fbio.h>
-# include <sys/kbd.h>
-# include <sys/kbio.h>
-
-/* undefine symbols from <sys/kbd.h> we don't need that conflict with enum
- definitions in parser/xf86tokens.h */
-# undef STRING
-# undef LEFTALT
-# undef RIGHTALT
+#if !defined(V86SC_IOPL) /* Solaris 7 or later? */
+#include <sys/v86.h> /* Nope */
+#endif
+#if defined(sun) && (defined (__i386__) || defined(__i386) || defined(__x86)) && defined (SVR4)
+#include <sys/psw.h>
+#endif
+#endif /* _NEED_SYSI86 */
-# define LED_CAP LED_CAPS_LOCK
-# define LED_NUM LED_NUM_LOCK
-# define LED_SCR LED_SCROLL_LOCK
-# define LED_COMP LED_COMPOSE
-# endif /* sun */
+#if defined(HAS_SVR3_MMAPDRV)
+#include <sys/sysmacros.h>
+#if !defined(_NEED_SYSI86)
+#include <sys/immu.h>
+#include <sys/region.h>
+#endif
+#include <sys/mmap.h> /* MMAP driver header */
+#endif
-# if !defined(VT_ACKACQ)
-# define VT_ACKACQ 2
-# endif /* !VT_ACKACQ */
+#if !defined(sun) || defined(HAVE_SYS_VT_H)
+#define HAS_USL_VTS
+#endif
+#if !defined(sun)
+#include <sys/emap.h>
+#endif
+#if defined(HAS_USL_VTS)
+#if !defined(sun)
+#include <sys/at_ansi.h>
+#endif
+#include <sys/kd.h>
+#include <sys/vt.h>
+#endif
+#if defined(sun)
+#include <sys/fbio.h>
+#include <sys/kbd.h>
+#include <sys/kbio.h>
-# if defined(SVR4)
-# include <sys/mman.h>
-# if !(defined(sun) && defined (SVR4))
-# define DEV_MEM "/dev/pmem"
-# endif
-# define CLEARDTR_SUPPORT
-# define POSIX_TTY
-# endif /* SVR4 */
+/* undefine symbols from <sys/kbd.h> we don't need that conflict with enum
+ definitions in parser/xf86tokens.h */
+#undef STRING
+#undef LEFTALT
+#undef RIGHTALT
+
+#define LED_CAP LED_CAPS_LOCK
+#define LED_NUM LED_NUM_LOCK
+#define LED_SCR LED_SCROLL_LOCK
+#define LED_COMP LED_COMPOSE
+#endif /* sun */
+
+#if !defined(VT_ACKACQ)
+#define VT_ACKACQ 2
+#endif /* !VT_ACKACQ */
+
+#if defined(SVR4)
+#include <sys/mman.h>
+#if !(defined(sun) && defined (SVR4))
+#define DEV_MEM "/dev/pmem"
+#endif
+#define CLEARDTR_SUPPORT
+#define POSIX_TTY
+#endif /* SVR4 */
-#endif /* (SYSV || SVR4) */
+#endif /* (SYSV || SVR4) */
/**************************************************************************/
/* Linux or Glibc-based system */
/**************************************************************************/
#if defined(__linux__) || defined(__GLIBC__)
-# include <sys/ioctl.h>
-# include <signal.h>
-# include <stdlib.h>
-# include <sys/types.h>
-# include <assert.h>
-
-# ifdef __linux__
-# include <termio.h>
-# else /* __GLIBC__ */
-# include <termios.h>
-# endif
-# ifdef __sparc__
-# include <sys/param.h>
-# endif
-
-# include <errno.h>
-
-# include <sys/stat.h>
-
-# include <sys/mman.h>
-# ifdef __linux__
-# define HAS_USL_VTS
-# include <sys/kd.h>
-# include <sys/vt.h>
-# define LDGMAP GIO_SCRNMAP
-# define LDSMAP PIO_SCRNMAP
-# define LDNMAP LDSMAP
-# define CLEARDTR_SUPPORT
-# endif
-
-# define POSIX_TTY
-
-#endif /* __linux__ || __GLIBC__ */
+#include <sys/ioctl.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <assert.h>
+
+#ifdef __linux__
+#include <termio.h>
+#else /* __GLIBC__ */
+#include <termios.h>
+#endif
+#ifdef __sparc__
+#include <sys/param.h>
+#endif
+
+#include <errno.h>
+
+#include <sys/stat.h>
+
+#include <sys/mman.h>
+#ifdef __linux__
+#define HAS_USL_VTS
+#include <sys/kd.h>
+#include <sys/vt.h>
+#define LDGMAP GIO_SCRNMAP
+#define LDSMAP PIO_SCRNMAP
+#define LDNMAP LDSMAP
+#define CLEARDTR_SUPPORT
+#endif
+
+#define POSIX_TTY
+
+#endif /* __linux__ || __GLIBC__ */
/**************************************************************************/
/* 386BSD and derivatives, BSD/386 */
/**************************************************************************/
#if defined(__386BSD__) && (defined(__FreeBSD__) || defined(__NetBSD__))
-# undef __386BSD__
+#undef __386BSD__
#endif
#ifdef CSRG_BASED
-# include <sys/ioctl.h>
-# include <signal.h>
+#include <sys/ioctl.h>
+#include <signal.h>
-# include <termios.h>
-# define termio termios
-# define POSIX_TTY
+#include <termios.h>
+#define termio termios
+#define POSIX_TTY
-# include <errno.h>
+#include <errno.h>
-# include <sys/types.h>
-# include <sys/mman.h>
-# include <sys/stat.h>
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
-#endif /* CSRG_BASED */
+#endif /* CSRG_BASED */
/**************************************************************************/
/* Kernel of *BSD */
@@ -238,92 +236,92 @@
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \
defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
-# include <sys/param.h>
-# if defined(__FreeBSD_version) && !defined(__FreeBSD_kernel_version)
-# define __FreeBSD_kernel_version __FreeBSD_version
-# endif
+#include <sys/param.h>
+#if defined(__FreeBSD_version) && !defined(__FreeBSD_kernel_version)
+#define __FreeBSD_kernel_version __FreeBSD_version
+#endif
-# if !defined(LINKKIT)
+#if !defined(LINKKIT)
/* Don't need this stuff for the Link Kit */
-# ifdef SYSCONS_SUPPORT
-# define COMPAT_SYSCONS
-# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
-# if defined(__DragonFly__) || (__FreeBSD_kernel_version >= 410000)
-# include <sys/consio.h>
-# include <sys/kbio.h>
-# else
-# include <machine/console.h>
-# endif /* FreeBSD 4.1 RELEASE or lator */
-# else
-# include <sys/console.h>
-# endif
-# endif /* SYSCONS_SUPPORT */
-# if defined(PCVT_SUPPORT) && !defined(__NetBSD__) && !defined(__OpenBSD__)
-# if !defined(SYSCONS_SUPPORT)
+#ifdef SYSCONS_SUPPORT
+#define COMPAT_SYSCONS
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+#if defined(__DragonFly__) || (__FreeBSD_kernel_version >= 410000)
+#include <sys/consio.h>
+#include <sys/kbio.h>
+#else
+#include <machine/console.h>
+#endif /* FreeBSD 4.1 RELEASE or lator */
+#else
+#include <sys/console.h>
+#endif
+#endif /* SYSCONS_SUPPORT */
+#if defined(PCVT_SUPPORT) && !defined(__NetBSD__) && !defined(__OpenBSD__)
+#if !defined(SYSCONS_SUPPORT)
/* no syscons, so include pcvt specific header file */
-# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
-# include <machine/pcvt_ioctl.h>
-# else
-# include <sys/pcvt_ioctl.h>
-# endif /* __FreeBSD_kernel__ */
-# else /* pcvt and syscons: hard-code the ID magic */
-# define VGAPCVTID _IOWR('V',113, struct pcvtid)
- struct pcvtid {
- char name[16];
- int rmajor, rminor;
- };
-# endif /* PCVT_SUPPORT && SYSCONS_SUPPORT */
-# endif /* PCVT_SUPPORT */
-# ifdef WSCONS_SUPPORT
-# include <dev/wscons/wsconsio.h>
-# include <dev/wscons/wsdisplay_usl_io.h>
-# endif /* WSCONS_SUPPORT */
-# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
-# if defined(__FreeBSD_kernel_version) && (__FreeBSD_kernel_version >= 500013)
-# include <sys/mouse.h>
-# else
-# undef MOUSE_GETINFO
-# include <machine/mouse.h>
-# endif
-# endif
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#include <machine/pcvt_ioctl.h>
+#else
+#include <sys/pcvt_ioctl.h>
+#endif /* __FreeBSD_kernel__ */
+#else /* pcvt and syscons: hard-code the ID magic */
+#define VGAPCVTID _IOWR('V',113, struct pcvtid)
+struct pcvtid {
+ char name[16];
+ int rmajor, rminor;
+};
+#endif /* PCVT_SUPPORT && SYSCONS_SUPPORT */
+#endif /* PCVT_SUPPORT */
+#ifdef WSCONS_SUPPORT
+#include <dev/wscons/wsconsio.h>
+#include <dev/wscons/wsdisplay_usl_io.h>
+#endif /* WSCONS_SUPPORT */
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+#if defined(__FreeBSD_kernel_version) && (__FreeBSD_kernel_version >= 500013)
+#include <sys/mouse.h>
+#else
+#undef MOUSE_GETINFO
+#include <machine/mouse.h>
+#endif
+#endif
/* Include these definitions in case ioctl_pc.h didn't get included */
-# ifndef CONSOLE_X_MODE_ON
-# define CONSOLE_X_MODE_ON _IO('t',121)
-# endif
-# ifndef CONSOLE_X_MODE_OFF
-# define CONSOLE_X_MODE_OFF _IO('t',122)
-# endif
-# ifndef CONSOLE_X_BELL
-# define CONSOLE_X_BELL _IOW('t',123,int[2])
-# endif
-# ifndef CONSOLE_X_TV_ON
-# define CONSOLE_X_TV_ON _IOW('t',155,int)
-# define XMODE_RGB 0
-# define XMODE_NTSC 1
-# define XMODE_PAL 2
-# define XMODE_SECAM 3
-# endif
-# ifndef CONSOLE_X_TV_OFF
-# define CONSOLE_X_TV_OFF _IO('t',156)
-# endif
+#ifndef CONSOLE_X_MODE_ON
+#define CONSOLE_X_MODE_ON _IO('t',121)
+#endif
+#ifndef CONSOLE_X_MODE_OFF
+#define CONSOLE_X_MODE_OFF _IO('t',122)
+#endif
+#ifndef CONSOLE_X_BELL
+#define CONSOLE_X_BELL _IOW('t',123,int[2])
+#endif
+#ifndef CONSOLE_X_TV_ON
+#define CONSOLE_X_TV_ON _IOW('t',155,int)
+#define XMODE_RGB 0
+#define XMODE_NTSC 1
+#define XMODE_PAL 2
+#define XMODE_SECAM 3
+#endif
+#ifndef CONSOLE_X_TV_OFF
+#define CONSOLE_X_TV_OFF _IO('t',156)
+#endif
#ifndef CONSOLE_GET_LINEAR_INFO
-# define CONSOLE_GET_LINEAR_INFO _IOR('t',157,struct map_info)
+#define CONSOLE_GET_LINEAR_INFO _IOR('t',157,struct map_info)
#endif
-#ifndef CONSOLE_GET_IO_INFO
-# define CONSOLE_GET_IO_INFO _IOR('t',158,struct map_info)
+#ifndef CONSOLE_GET_IO_INFO
+#define CONSOLE_GET_IO_INFO _IOR('t',158,struct map_info)
#endif
-#ifndef CONSOLE_GET_MEM_INFO
-# define CONSOLE_GET_MEM_INFO _IOR('t',159,struct map_info)
+#ifndef CONSOLE_GET_MEM_INFO
+#define CONSOLE_GET_MEM_INFO _IOR('t',159,struct map_info)
#endif
-# endif /* !LINKKIT */
+#endif /* !LINKKIT */
#if defined(USE_I386_IOPL) || defined(USE_AMD64_IOPL)
#include <machine/sysarch.h>
#endif
-# define CLEARDTR_SUPPORT
+#define CLEARDTR_SUPPORT
-#endif /* __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __DragonFly__ */
+#endif /* __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __DragonFly__ */
/**************************************************************************/
/* IRIX */
@@ -333,7 +331,7 @@
/* Generic */
/**************************************************************************/
-#include <sys/wait.h> /* May need to adjust this for other OSs */
+#include <sys/wait.h> /* May need to adjust this for other OSs */
/* For PATH_MAX */
#include "misc.h"
@@ -343,21 +341,20 @@
* and it's safe, so just do it.
*/
#if !defined(O_NDELAY) && defined(O_NONBLOCK)
-# define O_NDELAY O_NONBLOCK
-#endif /* !O_NDELAY && O_NONBLOCK */
+#define O_NDELAY O_NONBLOCK
+#endif /* !O_NDELAY && O_NONBLOCK */
#if !defined(MAXHOSTNAMELEN)
-# define MAXHOSTNAMELEN 32
-#endif /* !MAXHOSTNAMELEN */
+#define MAXHOSTNAMELEN 32
+#endif /* !MAXHOSTNAMELEN */
#if defined(_POSIX_SOURCE)
-# include <limits.h>
+#include <limits.h>
#else
-# define _POSIX_SOURCE
-# include <limits.h>
-# undef _POSIX_SOURCE
-#endif /* _POSIX_SOURCE */
-
+#define _POSIX_SOURCE
+#include <limits.h>
+#undef _POSIX_SOURCE
+#endif /* _POSIX_SOURCE */
#ifndef DEV_MEM
#define DEV_MEM "/dev/mem"
@@ -376,4 +373,4 @@
#include "compiler.h"
#endif
-#endif /* _XF86_OSLIB_H */
+#endif /* _XF86_OSLIB_H */
diff --git a/xorg-server/hw/xfree86/parser/xf86tokens.h b/xorg-server/hw/xfree86/parser/xf86tokens.h
index a9856064e..f751b7b0e 100644
--- a/xorg-server/hw/xfree86/parser/xf86tokens.h
+++ b/xorg-server/hw/xfree86/parser/xf86tokens.h
@@ -52,7 +52,6 @@
* authorization from the copyright holder(s) and author(s).
*/
-
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
@@ -70,13 +69,13 @@
typedef enum {
/* errno-style tokens */
- OBSOLETE_TOKEN = -5,
- EOF_TOKEN = -4,
- LOCK_TOKEN = -3,
- ERROR_TOKEN = -2,
+ OBSOLETE_TOKEN = -5,
+ EOF_TOKEN = -4,
+ LOCK_TOKEN = -3,
+ ERROR_TOKEN = -2,
/* value type tokens */
- NUMBER = 1,
+ NUMBER = 1,
STRING,
/* Tokens that can appear in many sections */
@@ -148,7 +147,7 @@ typedef enum {
DEFAULTDEPTH,
DEFAULTBPP,
DEFAULTFBBPP,
-
+
/* VideoAdaptor tokens */
VIDEOADAPTOR,
@@ -170,7 +169,7 @@ typedef enum {
LOAD,
LOAD_DRIVER,
DISABLE,
-
+
/* Device tokens */
DRIVER,
CHIPSET,
@@ -251,7 +250,7 @@ typedef enum {
DEPTH,
BPP,
WEIGHT,
-
+
/* Layout Tokens */
SCREEN,
INACTIVE,
@@ -289,4 +288,4 @@ typedef enum {
MATCH_IS_TOUCHSCREEN
} ParserTokens;
-#endif /* _xf86_tokens_h */
+#endif /* _xf86_tokens_h */
diff --git a/xorg-server/hw/xfree86/ramdac/BTPriv.h b/xorg-server/hw/xfree86/ramdac/BTPriv.h
index 52737768f..95f288009 100644
--- a/xorg-server/hw/xfree86/ramdac/BTPriv.h
+++ b/xorg-server/hw/xfree86/ramdac/BTPriv.h
@@ -6,15 +6,15 @@
#include "BT.h"
typedef struct {
- const char *DeviceName;
+ const char *DeviceName;
} xf86BTramdacInfo;
extern xf86BTramdacInfo BTramdacDeviceInfo[];
#ifdef INIT_BT_RAMDAC_INFO
xf86BTramdacInfo BTramdacDeviceInfo[] = {
- {"AT&T 20C504"},
- {"AT&T 20C505"},
- {"BT485/484"}
+ {"AT&T 20C504"},
+ {"AT&T 20C505"},
+ {"BT485/484"}
};
#endif
diff --git a/xorg-server/hw/xfree86/ramdac/IBMPriv.h b/xorg-server/hw/xfree86/ramdac/IBMPriv.h
index 309a193ad..48588c851 100644
--- a/xorg-server/hw/xfree86/ramdac/IBMPriv.h
+++ b/xorg-server/hw/xfree86/ramdac/IBMPriv.h
@@ -6,22 +6,22 @@
#include "IBM.h"
typedef struct {
- const char *DeviceName;
+ const char *DeviceName;
} xf86IBMramdacInfo;
extern xf86IBMramdacInfo IBMramdacDeviceInfo[];
#ifdef INIT_IBM_RAMDAC_INFO
xf86IBMramdacInfo IBMramdacDeviceInfo[] = {
- {"IBM 524"},
- {"IBM 524A"},
- {"IBM 525"},
- {"IBM 526"},
- {"IBM 526DB(DoubleBuffer)"},
- {"IBM 528"},
- {"IBM 528A"},
- {"IBM 624"},
- {"IBM 624DB(DoubleBuffer)"},
- {"IBM 640"}
+ {"IBM 524"},
+ {"IBM 524A"},
+ {"IBM 525"},
+ {"IBM 526"},
+ {"IBM 526DB(DoubleBuffer)"},
+ {"IBM 528"},
+ {"IBM 528A"},
+ {"IBM 624"},
+ {"IBM 624DB(DoubleBuffer)"},
+ {"IBM 640"}
};
#endif
diff --git a/xorg-server/hw/xfree86/ramdac/TIPriv.h b/xorg-server/hw/xfree86/ramdac/TIPriv.h
index 20e07f5cc..ece03483b 100644
--- a/xorg-server/hw/xfree86/ramdac/TIPriv.h
+++ b/xorg-server/hw/xfree86/ramdac/TIPriv.h
@@ -6,15 +6,15 @@
#include "TI.h"
typedef struct {
- const char *DeviceName;
+ const char *DeviceName;
} xf86TIramdacInfo;
extern xf86TIramdacInfo TIramdacDeviceInfo[];
#ifdef INIT_TI_RAMDAC_INFO
xf86TIramdacInfo TIramdacDeviceInfo[] = {
- {"TI TVP3030"},
- {"TI TVP3026"}
+ {"TI TVP3030"},
+ {"TI TVP3026"}
};
#endif
diff --git a/xorg-server/hw/xfree86/ramdac/xf86CursorPriv.h b/xorg-server/hw/xfree86/ramdac/xf86CursorPriv.h
index 76e714b32..062b2eb7c 100644
--- a/xorg-server/hw/xfree86/ramdac/xf86CursorPriv.h
+++ b/xorg-server/hw/xfree86/ramdac/xf86CursorPriv.h
@@ -1,51 +1,52 @@
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#ifndef _XF86CURSORPRIV_H
-#define _XF86CURSORPRIV_H
-
-#include "xf86Cursor.h"
-#include "mipointrst.h"
-
-typedef struct {
- Bool SWCursor;
- Bool isUp;
- Bool showTransparent;
- short HotX;
- short HotY;
- short x;
- short y;
- CursorPtr CurrentCursor, CursorToRestore;
- xf86CursorInfoPtr CursorInfoPtr;
- CloseScreenProcPtr CloseScreen;
- RecolorCursorProcPtr RecolorCursor;
- InstallColormapProcPtr InstallColormap;
- QueryBestSizeProcPtr QueryBestSize;
- miPointerSpriteFuncPtr spriteFuncs;
- Bool PalettedCursor;
- ColormapPtr pInstalledMap;
- Bool (*SwitchMode)(int, DisplayModePtr,int);
- xf86EnableDisableFBAccessProc *EnableDisableFBAccess;
- CursorPtr SavedCursor;
-
- /* Number of requests to force HW cursor */
- int ForceHWCursorCount;
- Bool HWCursorForced;
-
- pointer transparentData;
-} xf86CursorScreenRec, *xf86CursorScreenPtr;
-
-void xf86SetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y);
-void xf86SetTransparentCursor(ScreenPtr pScreen);
-void xf86MoveCursor(ScreenPtr pScreen, int x, int y);
-void xf86RecolorCursor(ScreenPtr pScreen, CursorPtr pCurs, Bool displayed);
-Bool xf86InitHardwareCursor(ScreenPtr pScreen, xf86CursorInfoPtr infoPtr);
-
-CARD32 xf86ReverseBitOrder(CARD32 data);
-
-extern _X_EXPORT DevPrivateKeyRec xf86CursorScreenKeyRec;
-#define xf86CursorScreenKey (&xf86CursorScreenKeyRec)
-
-#endif /* _XF86CURSORPRIV_H */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#ifndef _XF86CURSORPRIV_H
+#define _XF86CURSORPRIV_H
+
+#include "xf86Cursor.h"
+#include "mipointrst.h"
+
+typedef struct {
+ Bool SWCursor;
+ Bool isUp;
+ Bool showTransparent;
+ short HotX;
+ short HotY;
+ short x;
+ short y;
+ CursorPtr CurrentCursor, CursorToRestore;
+ xf86CursorInfoPtr CursorInfoPtr;
+ CloseScreenProcPtr CloseScreen;
+ RecolorCursorProcPtr RecolorCursor;
+ InstallColormapProcPtr InstallColormap;
+ QueryBestSizeProcPtr QueryBestSize;
+ miPointerSpriteFuncPtr spriteFuncs;
+ Bool PalettedCursor;
+ ColormapPtr pInstalledMap;
+ Bool (*SwitchMode) (int, DisplayModePtr, int);
+ xf86EnableDisableFBAccessProc *EnableDisableFBAccess;
+ CursorPtr SavedCursor;
+
+ /* Number of requests to force HW cursor */
+ int ForceHWCursorCount;
+ Bool HWCursorForced;
+
+ pointer transparentData;
+} xf86CursorScreenRec, *xf86CursorScreenPtr;
+
+void xf86SetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y);
+void xf86SetTransparentCursor(ScreenPtr pScreen);
+void xf86MoveCursor(ScreenPtr pScreen, int x, int y);
+void xf86RecolorCursor(ScreenPtr pScreen, CursorPtr pCurs, Bool displayed);
+Bool xf86InitHardwareCursor(ScreenPtr pScreen, xf86CursorInfoPtr infoPtr);
+
+CARD32 xf86ReverseBitOrder(CARD32 data);
+
+extern _X_EXPORT DevPrivateKeyRec xf86CursorScreenKeyRec;
+
+#define xf86CursorScreenKey (&xf86CursorScreenKeyRec)
+
+#endif /* _XF86CURSORPRIV_H */
diff --git a/xorg-server/hw/xfree86/ramdac/xf86RamDac.c b/xorg-server/hw/xfree86/ramdac/xf86RamDac.c
index a170444a9..a67164917 100644
--- a/xorg-server/hw/xfree86/ramdac/xf86RamDac.c
+++ b/xorg-server/hw/xfree86/ramdac/xf86RamDac.c
@@ -1,152 +1,152 @@
-/*
- * Copyright 1998 by Alan Hourihane, Wigan, England.
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Alan Hourihane not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Alan Hourihane makes no representations
- * about the suitability of this software for any purpose. It is provided
- * "as is" without express or implied warranty.
- *
- * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL ALAN HOURIHANE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- *
- * Authors: Alan Hourihane, <alanh@fairlite.demon.co.uk>
- *
- * Generic RAMDAC access routines.
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include "xf86.h"
-#include "xf86_OSproc.h"
-
-#include "xf86RamDacPriv.h"
-
-int RamDacHWPrivateIndex = -1;
-int RamDacScreenPrivateIndex = -1;
-
-RamDacRecPtr
-RamDacCreateInfoRec(void)
-{
- RamDacRecPtr infoRec;
-
- infoRec = calloc(1, sizeof(RamDacRec));
-
- return infoRec;
-}
-
-RamDacHelperRecPtr
-RamDacHelperCreateInfoRec(void)
-{
- RamDacHelperRecPtr infoRec;
-
- infoRec = calloc(1, sizeof(RamDacHelperRec));
-
- return infoRec;
-}
-
-void
-RamDacDestroyInfoRec(RamDacRecPtr infoRec)
-{
- free(infoRec);
-}
-
-void
-RamDacHelperDestroyInfoRec(RamDacHelperRecPtr infoRec)
-{
- free(infoRec);
-}
-
-Bool
-RamDacInit(ScrnInfoPtr pScrn, RamDacRecPtr ramdacPriv)
-{
- RamDacScreenRecPtr ramdacScrPtr;
-
- /*
- * make sure the RamDacRec is allocated
- */
- if (!RamDacGetRec(pScrn))
- return FALSE;
- ramdacScrPtr =
- ((RamDacScreenRecPtr) (pScrn)->privates[RamDacGetScreenIndex()].ptr);
- ramdacScrPtr->RamDacRec = ramdacPriv;
-
- return TRUE;
-}
-
-void
-RamDacGetRecPrivate(void)
-{
- if (RamDacHWPrivateIndex < 0)
- RamDacHWPrivateIndex = xf86AllocateScrnInfoPrivateIndex();
- if (RamDacScreenPrivateIndex < 0)
- RamDacScreenPrivateIndex = xf86AllocateScrnInfoPrivateIndex();
- return;
-}
-
-Bool
-RamDacGetRec(ScrnInfoPtr scrp)
-{
- RamDacGetRecPrivate();
- /*
- * New privates are always set to NULL, so we can check if the allocation
- * has already been done.
- */
- if (scrp->privates[RamDacHWPrivateIndex].ptr != NULL)
- return TRUE;
- if (scrp->privates[RamDacScreenPrivateIndex].ptr != NULL)
- return TRUE;
-
- scrp->privates[RamDacHWPrivateIndex].ptr =
- xnfcalloc(sizeof(RamDacHWRec), 1);
- scrp->privates[RamDacScreenPrivateIndex].ptr =
- xnfcalloc(sizeof(RamDacScreenRec), 1);
-
- return TRUE;
-}
-
-void
-RamDacFreeRec(ScrnInfoPtr pScrn)
-{
- RamDacHWRecPtr ramdacHWPtr;
- RamDacScreenRecPtr ramdacScrPtr;
-
- if (RamDacHWPrivateIndex < 0)
- return;
-
- if (RamDacScreenPrivateIndex < 0)
- return;
-
- ramdacHWPtr = RAMDACHWPTR(pScrn);
- ramdacScrPtr = ((RamDacScreenRecPtr)
- (pScrn)->privates[RamDacGetScreenIndex()].ptr);
-
- free(ramdacHWPtr);
- ramdacHWPtr = NULL;
-
- free(ramdacScrPtr);
- ramdacScrPtr = NULL;
-}
-
-int
-RamDacGetHWIndex(void)
-{
- return RamDacHWPrivateIndex;
-}
-
-int
-RamDacGetScreenIndex(void)
-{
- return RamDacScreenPrivateIndex;
-}
+/*
+ * Copyright 1998 by Alan Hourihane, Wigan, England.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Alan Hourihane not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Alan Hourihane makes no representations
+ * about the suitability of this software for any purpose. It is provided
+ * "as is" without express or implied warranty.
+ *
+ * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL ALAN HOURIHANE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Authors: Alan Hourihane, <alanh@fairlite.demon.co.uk>
+ *
+ * Generic RAMDAC access routines.
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include "xf86.h"
+#include "xf86_OSproc.h"
+
+#include "xf86RamDacPriv.h"
+
+int RamDacHWPrivateIndex = -1;
+int RamDacScreenPrivateIndex = -1;
+
+RamDacRecPtr
+RamDacCreateInfoRec(void)
+{
+ RamDacRecPtr infoRec;
+
+ infoRec = calloc(1, sizeof(RamDacRec));
+
+ return infoRec;
+}
+
+RamDacHelperRecPtr
+RamDacHelperCreateInfoRec(void)
+{
+ RamDacHelperRecPtr infoRec;
+
+ infoRec = calloc(1, sizeof(RamDacHelperRec));
+
+ return infoRec;
+}
+
+void
+RamDacDestroyInfoRec(RamDacRecPtr infoRec)
+{
+ free(infoRec);
+}
+
+void
+RamDacHelperDestroyInfoRec(RamDacHelperRecPtr infoRec)
+{
+ free(infoRec);
+}
+
+Bool
+RamDacInit(ScrnInfoPtr pScrn, RamDacRecPtr ramdacPriv)
+{
+ RamDacScreenRecPtr ramdacScrPtr;
+
+ /*
+ * make sure the RamDacRec is allocated
+ */
+ if (!RamDacGetRec(pScrn))
+ return FALSE;
+ ramdacScrPtr =
+ ((RamDacScreenRecPtr) (pScrn)->privates[RamDacGetScreenIndex()].ptr);
+ ramdacScrPtr->RamDacRec = ramdacPriv;
+
+ return TRUE;
+}
+
+void
+RamDacGetRecPrivate(void)
+{
+ if (RamDacHWPrivateIndex < 0)
+ RamDacHWPrivateIndex = xf86AllocateScrnInfoPrivateIndex();
+ if (RamDacScreenPrivateIndex < 0)
+ RamDacScreenPrivateIndex = xf86AllocateScrnInfoPrivateIndex();
+ return;
+}
+
+Bool
+RamDacGetRec(ScrnInfoPtr scrp)
+{
+ RamDacGetRecPrivate();
+ /*
+ * New privates are always set to NULL, so we can check if the allocation
+ * has already been done.
+ */
+ if (scrp->privates[RamDacHWPrivateIndex].ptr != NULL)
+ return TRUE;
+ if (scrp->privates[RamDacScreenPrivateIndex].ptr != NULL)
+ return TRUE;
+
+ scrp->privates[RamDacHWPrivateIndex].ptr =
+ xnfcalloc(sizeof(RamDacHWRec), 1);
+ scrp->privates[RamDacScreenPrivateIndex].ptr =
+ xnfcalloc(sizeof(RamDacScreenRec), 1);
+
+ return TRUE;
+}
+
+void
+RamDacFreeRec(ScrnInfoPtr pScrn)
+{
+ RamDacHWRecPtr ramdacHWPtr;
+ RamDacScreenRecPtr ramdacScrPtr;
+
+ if (RamDacHWPrivateIndex < 0)
+ return;
+
+ if (RamDacScreenPrivateIndex < 0)
+ return;
+
+ ramdacHWPtr = RAMDACHWPTR(pScrn);
+ ramdacScrPtr = ((RamDacScreenRecPtr)
+ (pScrn)->privates[RamDacGetScreenIndex()].ptr);
+
+ free(ramdacHWPtr);
+ ramdacHWPtr = NULL;
+
+ free(ramdacScrPtr);
+ ramdacScrPtr = NULL;
+}
+
+int
+RamDacGetHWIndex(void)
+{
+ return RamDacHWPrivateIndex;
+}
+
+int
+RamDacGetScreenIndex(void)
+{
+ return RamDacScreenPrivateIndex;
+}
diff --git a/xorg-server/hw/xfree86/ramdac/xf86RamDacCmap.c b/xorg-server/hw/xfree86/ramdac/xf86RamDacCmap.c
index c6dc83157..7a903d8e4 100644
--- a/xorg-server/hw/xfree86/ramdac/xf86RamDacCmap.c
+++ b/xorg-server/hw/xfree86/ramdac/xf86RamDacCmap.c
@@ -40,32 +40,32 @@
#include "xf86RamDacPriv.h"
void
-RamDacLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO *colors,
- VisualPtr pVisual)
+RamDacLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO * colors,
+ VisualPtr pVisual)
{
RamDacRecPtr hwp = RAMDACSCRPTR(pScrn);
int i, index;
for (i = 0; i < numColors; i++) {
- index = indices[i];
- (*hwp->WriteAddress)(pScrn, index);
- (*hwp->WriteData)(pScrn, colors[index].red);
- (*hwp->WriteData)(pScrn, colors[index].green);
- (*hwp->WriteData)(pScrn, colors[index].blue);
+ index = indices[i];
+ (*hwp->WriteAddress) (pScrn, index);
+ (*hwp->WriteData) (pScrn, colors[index].red);
+ (*hwp->WriteData) (pScrn, colors[index].green);
+ (*hwp->WriteData) (pScrn, colors[index].blue);
}
}
Bool
RamDacHandleColormaps(ScreenPtr pScreen, int maxColors, int sigRGBbits,
- unsigned int flags)
+ unsigned int flags)
{
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
RamDacRecPtr hwp = RAMDACSCRPTR(pScrn);
if (hwp->LoadPalette == NULL)
- return xf86HandleColormaps(pScreen, maxColors, sigRGBbits,
- RamDacLoadPalette, NULL, flags);
+ return xf86HandleColormaps(pScreen, maxColors, sigRGBbits,
+ RamDacLoadPalette, NULL, flags);
else
- return xf86HandleColormaps(pScreen, maxColors, sigRGBbits,
- hwp->LoadPalette, NULL, flags);
+ return xf86HandleColormaps(pScreen, maxColors, sigRGBbits,
+ hwp->LoadPalette, NULL, flags);
}
diff --git a/xorg-server/hw/xfree86/ramdac/xf86RamDacPriv.h b/xorg-server/hw/xfree86/ramdac/xf86RamDacPriv.h
index f68e588f5..ae1c665de 100644
--- a/xorg-server/hw/xfree86/ramdac/xf86RamDacPriv.h
+++ b/xorg-server/hw/xfree86/ramdac/xf86RamDacPriv.h
@@ -8,6 +8,6 @@
void RamDacGetRecPrivate(void);
Bool RamDacGetRec(ScrnInfoPtr pScrn);
-int RamDacGetScreenIndex(void);
+int RamDacGetScreenIndex(void);
void RamDacLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices,
- LOCO *colors, VisualPtr pVisual);
+ LOCO * colors, VisualPtr pVisual);
diff --git a/xorg-server/hw/xfree86/vgahw/vgaHWmodule.c b/xorg-server/hw/xfree86/vgahw/vgaHWmodule.c
index d5c50d9ca..0c5a43aa6 100644
--- a/xorg-server/hw/xfree86/vgahw/vgaHWmodule.c
+++ b/xorg-server/hw/xfree86/vgahw/vgaHWmodule.c
@@ -9,16 +9,16 @@
#include "xf86Module.h"
static XF86ModuleVersionInfo VersRec = {
- "vgahw",
- MODULEVENDORSTRING,
- MODINFOSTRING1,
- MODINFOSTRING2,
- XORG_VERSION_CURRENT,
- 0, 1, 0,
- ABI_CLASS_VIDEODRV,
- ABI_VIDEODRV_VERSION,
- MOD_CLASS_NONE,
- {0, 0, 0, 0}
+ "vgahw",
+ MODULEVENDORSTRING,
+ MODINFOSTRING1,
+ MODINFOSTRING2,
+ XORG_VERSION_CURRENT,
+ 0, 1, 0,
+ ABI_CLASS_VIDEODRV,
+ ABI_VIDEODRV_VERSION,
+ MOD_CLASS_NONE,
+ {0, 0, 0, 0}
};
_X_EXPORT XF86ModuleData vgahwModuleData = { &VersRec, NULL, NULL };
diff --git a/xorg-server/hw/xfree86/x86emu/x86emu.h b/xorg-server/hw/xfree86/x86emu/x86emu.h
index 795e2d688..501dd913c 100644
--- a/xorg-server/hw/xfree86/x86emu/x86emu.h
+++ b/xorg-server/hw/xfree86/x86emu/x86emu.h
@@ -56,7 +56,7 @@ typedef int X86EMU_pioAddr;
/*---------------------- Macros and type definitions ----------------------*/
#ifdef PACK
-# pragma PACK /* Don't pack structs with function pointers! */
+#pragma PACK /* Don't pack structs with function pointers! */
#endif
/****************************************************************************
@@ -81,13 +81,13 @@ outw - Function to write a word to an I/O port
outl - Function to write a dword to an I/O port
****************************************************************************/
typedef struct {
- u8 (X86APIP inb)(X86EMU_pioAddr addr);
- u16 (X86APIP inw)(X86EMU_pioAddr addr);
- u32 (X86APIP inl)(X86EMU_pioAddr addr);
- void (X86APIP outb)(X86EMU_pioAddr addr, u8 val);
- void (X86APIP outw)(X86EMU_pioAddr addr, u16 val);
- void (X86APIP outl)(X86EMU_pioAddr addr, u32 val);
- } X86EMU_pioFuncs;
+ u8(X86APIP inb) (X86EMU_pioAddr addr);
+ u16(X86APIP inw) (X86EMU_pioAddr addr);
+ u32(X86APIP inl) (X86EMU_pioAddr addr);
+ void (X86APIP outb) (X86EMU_pioAddr addr, u8 val);
+ void (X86APIP outw) (X86EMU_pioAddr addr, u16 val);
+ void (X86APIP outl) (X86EMU_pioAddr addr, u32 val);
+} X86EMU_pioFuncs;
/****************************************************************************
REMARKS:
@@ -112,13 +112,13 @@ wrw - Function to write a word to an address
wrl - Function to write a dword to an address
****************************************************************************/
typedef struct {
- u8 (X86APIP rdb)(u32 addr);
- u16 (X86APIP rdw)(u32 addr);
- u32 (X86APIP rdl)(u32 addr);
- void (X86APIP wrb)(u32 addr, u8 val);
- void (X86APIP wrw)(u32 addr, u16 val);
- void (X86APIP wrl)(u32 addr, u32 val);
- } X86EMU_memFuncs;
+ u8(X86APIP rdb) (u32 addr);
+ u16(X86APIP rdw) (u32 addr);
+ u32(X86APIP rdl) (u32 addr);
+ void (X86APIP wrb) (u32 addr, u8 val);
+ void (X86APIP wrw) (u32 addr, u16 val);
+ void (X86APIP wrl) (u32 addr, u32 val);
+} X86EMU_memFuncs;
/****************************************************************************
Here are the default memory read and write
@@ -132,29 +132,29 @@ extern void X86API wrw(u32 addr, u16 val);
extern void X86API wrl(u32 addr, u32 val);
#ifdef END_PACK
-# pragma END_PACK
+#pragma END_PACK
#endif
/*--------------------- type definitions -----------------------------------*/
-typedef void (X86APIP X86EMU_intrFuncs)(int num);
+typedef void (X86APIP X86EMU_intrFuncs) (int num);
extern X86EMU_intrFuncs _X86EMU_intrTab[256];
/*-------------------------- Function Prototypes --------------------------*/
#ifdef __cplusplus
-extern "C" { /* Use "C" linkage when in C++ mode */
+extern "C" { /* Use "C" linkage when in C++ mode */
#endif
-void X86EMU_setupMemFuncs(X86EMU_memFuncs *funcs);
-void X86EMU_setupPioFuncs(X86EMU_pioFuncs *funcs);
-void X86EMU_setupIntrFuncs(X86EMU_intrFuncs funcs[]);
-void X86EMU_prepareForInt(int num);
+ void X86EMU_setupMemFuncs(X86EMU_memFuncs * funcs);
+ void X86EMU_setupPioFuncs(X86EMU_pioFuncs * funcs);
+ void X86EMU_setupIntrFuncs(X86EMU_intrFuncs funcs[]);
+ void X86EMU_prepareForInt(int num);
/* decode.c */
-void X86EMU_exec(void);
-void X86EMU_halt_sys(void);
+ void X86EMU_exec(void);
+ void X86EMU_halt_sys(void);
#ifdef DEBUG
#define HALT_SYS() \
@@ -166,8 +166,8 @@ void X86EMU_halt_sys(void);
/* Debug options */
-#define DEBUG_DECODE_F 0x000001 /* print decoded instruction */
-#define DEBUG_TRACE_F 0x000002 /* dump regs before/after execution */
+#define DEBUG_DECODE_F 0x000001 /* print decoded instruction */
+#define DEBUG_TRACE_F 0x000002 /* dump regs before/after execution */
#define DEBUG_STEP_F 0x000004
#define DEBUG_DISASSEMBLE_F 0x000008
#define DEBUG_BREAK_F 0x000010
@@ -175,24 +175,23 @@ void X86EMU_halt_sys(void);
#define DEBUG_SAVE_IP_CS_F 0x000040
#define DEBUG_FS_F 0x000080
#define DEBUG_PROC_F 0x000100
-#define DEBUG_SYSINT_F 0x000200 /* bios system interrupts. */
+#define DEBUG_SYSINT_F 0x000200 /* bios system interrupts. */
#define DEBUG_TRACECALL_F 0x000400
#define DEBUG_INSTRUMENT_F 0x000800
-#define DEBUG_MEM_TRACE_F 0x001000
-#define DEBUG_IO_TRACE_F 0x002000
+#define DEBUG_MEM_TRACE_F 0x001000
+#define DEBUG_IO_TRACE_F 0x002000
#define DEBUG_TRACECALL_REGS_F 0x004000
-#define DEBUG_DECODE_NOPRINT_F 0x008000
+#define DEBUG_DECODE_NOPRINT_F 0x008000
#define DEBUG_EXIT 0x010000
#define DEBUG_SYS_F (DEBUG_SVC_F|DEBUG_FS_F|DEBUG_PROC_F)
-void X86EMU_trace_regs(void);
-void X86EMU_trace_xregs(void);
-void X86EMU_dump_memory(u16 seg, u16 off, u32 amt);
-int X86EMU_trace_on(void);
-int X86EMU_trace_off(void);
+ void X86EMU_trace_regs(void);
+ void X86EMU_trace_xregs(void);
+ void X86EMU_dump_memory(u16 seg, u16 off, u32 amt);
+ int X86EMU_trace_on(void);
+ int X86EMU_trace_off(void);
#ifdef __cplusplus
-} /* End of "C" linkage for C++ */
+} /* End of "C" linkage for C++ */
#endif
-
-#endif /* __X86EMU_X86EMU_H */
+#endif /* __X86EMU_X86EMU_H */
diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/debug.h b/xorg-server/hw/xfree86/x86emu/x86emu/debug.h
index 5f78d0575..385b804dd 100644
--- a/xorg-server/hw/xfree86/x86emu/x86emu/debug.h
+++ b/xorg-server/hw/xfree86/x86emu/x86emu/debug.h
@@ -45,65 +45,65 @@
#define CHECK_IP_FETCH_F 0x1
#define CHECK_SP_ACCESS_F 0x2
-#define CHECK_MEM_ACCESS_F 0x4 /*using regular linear pointer */
-#define CHECK_DATA_ACCESS_F 0x8 /*using segment:offset*/
+#define CHECK_MEM_ACCESS_F 0x4 /*using regular linear pointer */
+#define CHECK_DATA_ACCESS_F 0x8 /*using segment:offset */
#ifdef DEBUG
-# define CHECK_IP_FETCH() (M.x86.check & CHECK_IP_FETCH_F)
-# define CHECK_SP_ACCESS() (M.x86.check & CHECK_SP_ACCESS_F)
-# define CHECK_MEM_ACCESS() (M.x86.check & CHECK_MEM_ACCESS_F)
-# define CHECK_DATA_ACCESS() (M.x86.check & CHECK_DATA_ACCESS_F)
+#define CHECK_IP_FETCH() (M.x86.check & CHECK_IP_FETCH_F)
+#define CHECK_SP_ACCESS() (M.x86.check & CHECK_SP_ACCESS_F)
+#define CHECK_MEM_ACCESS() (M.x86.check & CHECK_MEM_ACCESS_F)
+#define CHECK_DATA_ACCESS() (M.x86.check & CHECK_DATA_ACCESS_F)
#else
-# define CHECK_IP_FETCH()
-# define CHECK_SP_ACCESS()
-# define CHECK_MEM_ACCESS()
-# define CHECK_DATA_ACCESS()
+#define CHECK_IP_FETCH()
+#define CHECK_SP_ACCESS()
+#define CHECK_MEM_ACCESS()
+#define CHECK_DATA_ACCESS()
#endif
#ifdef DEBUG
-# define DEBUG_INSTRUMENT() (M.x86.debug & DEBUG_INSTRUMENT_F)
-# define DEBUG_DECODE() (M.x86.debug & DEBUG_DECODE_F)
-# define DEBUG_TRACE() (M.x86.debug & DEBUG_TRACE_F)
-# define DEBUG_STEP() (M.x86.debug & DEBUG_STEP_F)
-# define DEBUG_DISASSEMBLE() (M.x86.debug & DEBUG_DISASSEMBLE_F)
-# define DEBUG_BREAK() (M.x86.debug & DEBUG_BREAK_F)
-# define DEBUG_SVC() (M.x86.debug & DEBUG_SVC_F)
-# define DEBUG_SAVE_IP_CS() (M.x86.debug & DEBUG_SAVE_IP_CS_F)
-
-# define DEBUG_FS() (M.x86.debug & DEBUG_FS_F)
-# define DEBUG_PROC() (M.x86.debug & DEBUG_PROC_F)
-# define DEBUG_SYSINT() (M.x86.debug & DEBUG_SYSINT_F)
-# define DEBUG_TRACECALL() (M.x86.debug & DEBUG_TRACECALL_F)
-# define DEBUG_TRACECALLREGS() (M.x86.debug & DEBUG_TRACECALL_REGS_F)
-# define DEBUG_SYS() (M.x86.debug & DEBUG_SYS_F)
-# define DEBUG_MEM_TRACE() (M.x86.debug & DEBUG_MEM_TRACE_F)
-# define DEBUG_IO_TRACE() (M.x86.debug & DEBUG_IO_TRACE_F)
-# define DEBUG_DECODE_NOPRINT() (M.x86.debug & DEBUG_DECODE_NOPRINT_F)
+#define DEBUG_INSTRUMENT() (M.x86.debug & DEBUG_INSTRUMENT_F)
+#define DEBUG_DECODE() (M.x86.debug & DEBUG_DECODE_F)
+#define DEBUG_TRACE() (M.x86.debug & DEBUG_TRACE_F)
+#define DEBUG_STEP() (M.x86.debug & DEBUG_STEP_F)
+#define DEBUG_DISASSEMBLE() (M.x86.debug & DEBUG_DISASSEMBLE_F)
+#define DEBUG_BREAK() (M.x86.debug & DEBUG_BREAK_F)
+#define DEBUG_SVC() (M.x86.debug & DEBUG_SVC_F)
+#define DEBUG_SAVE_IP_CS() (M.x86.debug & DEBUG_SAVE_IP_CS_F)
+
+#define DEBUG_FS() (M.x86.debug & DEBUG_FS_F)
+#define DEBUG_PROC() (M.x86.debug & DEBUG_PROC_F)
+#define DEBUG_SYSINT() (M.x86.debug & DEBUG_SYSINT_F)
+#define DEBUG_TRACECALL() (M.x86.debug & DEBUG_TRACECALL_F)
+#define DEBUG_TRACECALLREGS() (M.x86.debug & DEBUG_TRACECALL_REGS_F)
+#define DEBUG_SYS() (M.x86.debug & DEBUG_SYS_F)
+#define DEBUG_MEM_TRACE() (M.x86.debug & DEBUG_MEM_TRACE_F)
+#define DEBUG_IO_TRACE() (M.x86.debug & DEBUG_IO_TRACE_F)
+#define DEBUG_DECODE_NOPRINT() (M.x86.debug & DEBUG_DECODE_NOPRINT_F)
#else
-# define DEBUG_INSTRUMENT() 0
-# define DEBUG_DECODE() 0
-# define DEBUG_TRACE() 0
-# define DEBUG_STEP() 0
-# define DEBUG_DISASSEMBLE() 0
-# define DEBUG_BREAK() 0
-# define DEBUG_SVC() 0
-# define DEBUG_SAVE_IP_CS() 0
-# define DEBUG_FS() 0
-# define DEBUG_PROC() 0
-# define DEBUG_SYSINT() 0
-# define DEBUG_TRACECALL() 0
-# define DEBUG_TRACECALLREGS() 0
-# define DEBUG_SYS() 0
-# define DEBUG_MEM_TRACE() 0
-# define DEBUG_IO_TRACE() 0
-# define DEBUG_DECODE_NOPRINT() 0
+#define DEBUG_INSTRUMENT() 0
+#define DEBUG_DECODE() 0
+#define DEBUG_TRACE() 0
+#define DEBUG_STEP() 0
+#define DEBUG_DISASSEMBLE() 0
+#define DEBUG_BREAK() 0
+#define DEBUG_SVC() 0
+#define DEBUG_SAVE_IP_CS() 0
+#define DEBUG_FS() 0
+#define DEBUG_PROC() 0
+#define DEBUG_SYSINT() 0
+#define DEBUG_TRACECALL() 0
+#define DEBUG_TRACECALLREGS() 0
+#define DEBUG_SYS() 0
+#define DEBUG_MEM_TRACE() 0
+#define DEBUG_IO_TRACE() 0
+#define DEBUG_DECODE_NOPRINT() 0
#endif
#ifdef DEBUG
-# define DECODE_PRINTF(x) if (DEBUG_DECODE()) \
+#define DECODE_PRINTF(x) if (DEBUG_DECODE()) \
x86emu_decode_printf(x)
-# define DECODE_PRINTF2(x,y) if (DEBUG_DECODE()) \
+#define DECODE_PRINTF2(x,y) if (DEBUG_DECODE()) \
x86emu_decode_printf2(x,y)
/*
@@ -123,10 +123,10 @@
M.x86.saved_ip = y; \
}
#else
-# define INC_DECODED_INST_LEN(x)
-# define DECODE_PRINTF(x)
-# define DECODE_PRINTF2(x,y)
-# define SAVE_IP_CS(x,y)
+#define INC_DECODED_INST_LEN(x)
+#define DECODE_PRINTF(x)
+#define DECODE_PRINTF2(x,y)
+#define SAVE_IP_CS(x,y)
#endif
#ifdef DEBUG
@@ -137,13 +137,13 @@
} \
if (DEBUG_TRACE() || DEBUG_DECODE()) X86EMU_trace_regs()
#else
-# define TRACE_REGS()
+#define TRACE_REGS()
#endif
#ifdef DEBUG
-# define SINGLE_STEP() if (DEBUG_STEP()) x86emu_single_step()
+#define SINGLE_STEP() if (DEBUG_STEP()) x86emu_single_step()
#else
-# define SINGLE_STEP()
+#define SINGLE_STEP()
#endif
#define TRACE_AND_STEP() \
@@ -151,29 +151,29 @@
SINGLE_STEP()
#ifdef DEBUG
-# define START_OF_INSTR()
-# define END_OF_INSTR() EndOfTheInstructionProcedure: x86emu_end_instr();
-# define END_OF_INSTR_NO_TRACE() x86emu_end_instr();
+#define START_OF_INSTR()
+#define END_OF_INSTR() EndOfTheInstructionProcedure: x86emu_end_instr();
+#define END_OF_INSTR_NO_TRACE() x86emu_end_instr();
#else
-# define START_OF_INSTR()
-# define END_OF_INSTR()
-# define END_OF_INSTR_NO_TRACE()
+#define START_OF_INSTR()
+#define END_OF_INSTR()
+#define END_OF_INSTR_NO_TRACE()
#endif
#ifdef DEBUG
-# define CALL_TRACE(u,v,w,x,s) \
+#define CALL_TRACE(u,v,w,x,s) \
if (DEBUG_TRACECALLREGS()) \
x86emu_dump_regs(); \
if (DEBUG_TRACECALL()) \
printk("%04x:%04x: CALL %s%04x:%04x\n", u , v, s, w, x);
-# define RETURN_TRACE(n,u,v) \
+#define RETURN_TRACE(n,u,v) \
if (DEBUG_TRACECALLREGS()) \
x86emu_dump_regs(); \
if (DEBUG_TRACECALL()) \
printk("%04x:%04x: %s\n",u,v,n);
#else
-# define CALL_TRACE(u,v,w,x,s)
-# define RETURN_TRACE(n,u,v)
+#define CALL_TRACE(u,v,w,x,s)
+#define RETURN_TRACE(n,u,v)
#endif
#ifdef DEBUG
@@ -185,26 +185,25 @@
/*-------------------------- Function Prototypes --------------------------*/
#ifdef __cplusplus
-extern "C" { /* Use "C" linkage when in C++ mode */
+extern "C" { /* Use "C" linkage when in C++ mode */
#endif
-extern void x86emu_inc_decoded_inst_len (int x);
-extern void x86emu_decode_printf (const char *x);
-extern void x86emu_decode_printf2 (const char *x, int y);
-extern void x86emu_just_disassemble (void);
-extern void x86emu_single_step (void);
-extern void x86emu_end_instr (void);
-extern void x86emu_dump_regs (void);
-extern void x86emu_dump_xregs (void);
-extern void x86emu_print_int_vect (u16 iv);
-extern void x86emu_instrument_instruction (void);
-extern void x86emu_check_ip_access (void);
-extern void x86emu_check_sp_access (void);
-extern void x86emu_check_mem_access (u32 p);
-extern void x86emu_check_data_access (uint s, uint o);
+ extern void x86emu_inc_decoded_inst_len(int x);
+ extern void x86emu_decode_printf(const char *x);
+ extern void x86emu_decode_printf2(const char *x, int y);
+ extern void x86emu_just_disassemble(void);
+ extern void x86emu_single_step(void);
+ extern void x86emu_end_instr(void);
+ extern void x86emu_dump_regs(void);
+ extern void x86emu_dump_xregs(void);
+ extern void x86emu_print_int_vect(u16 iv);
+ extern void x86emu_instrument_instruction(void);
+ extern void x86emu_check_ip_access(void);
+ extern void x86emu_check_sp_access(void);
+ extern void x86emu_check_mem_access(u32 p);
+ extern void x86emu_check_data_access(uint s, uint o);
#ifdef __cplusplus
-} /* End of "C" linkage for C++ */
+} /* End of "C" linkage for C++ */
#endif
-
-#endif /* __X86EMU_DEBUG_H */
+#endif /* __X86EMU_DEBUG_H */
diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/decode.h b/xorg-server/hw/xfree86/x86emu/x86emu/decode.h
index 61cd4dc10..49a1f7b54 100644
--- a/xorg-server/hw/xfree86/x86emu/x86emu/decode.h
+++ b/xorg-server/hw/xfree86/x86emu/x86emu/decode.h
@@ -52,37 +52,36 @@
/*-------------------------- Function Prototypes --------------------------*/
#ifdef __cplusplus
-extern "C" { /* Use "C" linkage when in C++ mode */
+extern "C" { /* Use "C" linkage when in C++ mode */
#endif
-void x86emu_intr_raise (u8 type);
-void fetch_decode_modrm (int *mod,int *regh,int *regl);
-u8 fetch_byte_imm (void);
-u16 fetch_word_imm (void);
-u32 fetch_long_imm (void);
-u8 fetch_data_byte (uint offset);
-u8 fetch_data_byte_abs (uint segment, uint offset);
-u16 fetch_data_word (uint offset);
-u16 fetch_data_word_abs (uint segment, uint offset);
-u32 fetch_data_long (uint offset);
-u32 fetch_data_long_abs (uint segment, uint offset);
-void store_data_byte (uint offset, u8 val);
-void store_data_byte_abs (uint segment, uint offset, u8 val);
-void store_data_word (uint offset, u16 val);
-void store_data_word_abs (uint segment, uint offset, u16 val);
-void store_data_long (uint offset, u32 val);
-void store_data_long_abs (uint segment, uint offset, u32 val);
-u8* decode_rm_byte_register(int reg);
-u16* decode_rm_word_register(int reg);
-u32* decode_rm_long_register(int reg);
-u16* decode_rm_seg_register(int reg);
-u32 decode_rm00_address(int rm);
-u32 decode_rm01_address(int rm);
-u32 decode_rm10_address(int rm);
-u32 decode_sib_address(int sib, int mod);
+ void x86emu_intr_raise(u8 type);
+ void fetch_decode_modrm(int *mod, int *regh, int *regl);
+ u8 fetch_byte_imm(void);
+ u16 fetch_word_imm(void);
+ u32 fetch_long_imm(void);
+ u8 fetch_data_byte(uint offset);
+ u8 fetch_data_byte_abs(uint segment, uint offset);
+ u16 fetch_data_word(uint offset);
+ u16 fetch_data_word_abs(uint segment, uint offset);
+ u32 fetch_data_long(uint offset);
+ u32 fetch_data_long_abs(uint segment, uint offset);
+ void store_data_byte(uint offset, u8 val);
+ void store_data_byte_abs(uint segment, uint offset, u8 val);
+ void store_data_word(uint offset, u16 val);
+ void store_data_word_abs(uint segment, uint offset, u16 val);
+ void store_data_long(uint offset, u32 val);
+ void store_data_long_abs(uint segment, uint offset, u32 val);
+ u8 *decode_rm_byte_register(int reg);
+ u16 *decode_rm_word_register(int reg);
+ u32 *decode_rm_long_register(int reg);
+ u16 *decode_rm_seg_register(int reg);
+ u32 decode_rm00_address(int rm);
+ u32 decode_rm01_address(int rm);
+ u32 decode_rm10_address(int rm);
+ u32 decode_sib_address(int sib, int mod);
#ifdef __cplusplus
-} /* End of "C" linkage for C++ */
+} /* End of "C" linkage for C++ */
#endif
-
-#endif /* __X86EMU_DECODE_H */
+#endif /* __X86EMU_DECODE_H */
diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/fpu.h b/xorg-server/hw/xfree86/x86emu/x86emu/fpu.h
index 5fb271463..1c114987f 100644
--- a/xorg-server/hw/xfree86/x86emu/x86emu/fpu.h
+++ b/xorg-server/hw/xfree86/x86emu/x86emu/fpu.h
@@ -40,22 +40,21 @@
#define __X86EMU_FPU_H
#ifdef __cplusplus
-extern "C" { /* Use "C" linkage when in C++ mode */
+extern "C" { /* Use "C" linkage when in C++ mode */
#endif
/* these have to be defined, whether 8087 support compiled in or not. */
-extern void x86emuOp_esc_coprocess_d8 (u8 op1);
-extern void x86emuOp_esc_coprocess_d9 (u8 op1);
-extern void x86emuOp_esc_coprocess_da (u8 op1);
-extern void x86emuOp_esc_coprocess_db (u8 op1);
-extern void x86emuOp_esc_coprocess_dc (u8 op1);
-extern void x86emuOp_esc_coprocess_dd (u8 op1);
-extern void x86emuOp_esc_coprocess_de (u8 op1);
-extern void x86emuOp_esc_coprocess_df (u8 op1);
+ extern void x86emuOp_esc_coprocess_d8(u8 op1);
+ extern void x86emuOp_esc_coprocess_d9(u8 op1);
+ extern void x86emuOp_esc_coprocess_da(u8 op1);
+ extern void x86emuOp_esc_coprocess_db(u8 op1);
+ extern void x86emuOp_esc_coprocess_dc(u8 op1);
+ extern void x86emuOp_esc_coprocess_dd(u8 op1);
+ extern void x86emuOp_esc_coprocess_de(u8 op1);
+ extern void x86emuOp_esc_coprocess_df(u8 op1);
#ifdef __cplusplus
-} /* End of "C" linkage for C++ */
+} /* End of "C" linkage for C++ */
#endif
-
-#endif /* __X86EMU_FPU_H */
+#endif /* __X86EMU_FPU_H */
diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/fpu_regs.h b/xorg-server/hw/xfree86/x86emu/x86emu/fpu_regs.h
index e59b80783..5a780e69c 100644
--- a/xorg-server/hw/xfree86/x86emu/x86emu/fpu_regs.h
+++ b/xorg-server/hw/xfree86/x86emu/x86emu/fpu_regs.h
@@ -42,23 +42,23 @@
#ifdef X86_FPU_SUPPORT
#ifdef PACK
-# pragma PACK
+#pragma PACK
#endif
/* Basic 8087 register can hold any of the following values: */
union x86_fpu_reg_u {
- s8 tenbytes[10];
- double dval;
- float fval;
- s16 sval;
- s32 lval;
- };
+ s8 tenbytes[10];
+ double dval;
+ float fval;
+ s16 sval;
+ s32 lval;
+};
struct x86_fpu_reg {
- union x86_fpu_reg_u reg;
- char tag;
- };
+ union x86_fpu_reg_u reg;
+ char tag;
+};
/*
* Since we are not going to worry about the problems of aliasing
@@ -83,14 +83,14 @@ struct x86_fpu_reg {
#define X86_FPU_STKTOP 0
struct x86_fpu_registers {
- struct x86_fpu_reg x86_fpu_stack[8];
- int x86_fpu_flags;
- int x86_fpu_config; /* rounding modes, etc. */
- short x86_fpu_tos, x86_fpu_bos;
- };
+ struct x86_fpu_reg x86_fpu_stack[8];
+ int x86_fpu_flags;
+ int x86_fpu_config; /* rounding modes, etc. */
+ short x86_fpu_tos, x86_fpu_bos;
+};
#ifdef END_PACK
-# pragma END_PACK
+#pragma END_PACK
#endif
/*
@@ -104,16 +104,16 @@ struct x86_fpu_registers {
* instructions.
*/
-#endif /* X86_FPU_SUPPORT */
+#endif /* X86_FPU_SUPPORT */
#ifdef DEBUG
-# define DECODE_PRINTINSTR32(t,mod,rh,rl) \
+#define DECODE_PRINTINSTR32(t,mod,rh,rl) \
DECODE_PRINTF(t[(mod<<3)+(rh)]);
-# define DECODE_PRINTINSTR256(t,mod,rh,rl) \
+#define DECODE_PRINTINSTR256(t,mod,rh,rl) \
DECODE_PRINTF(t[(mod<<6)+(rh<<3)+(rl)]);
#else
-# define DECODE_PRINTINSTR32(t,mod,rh,rl)
-# define DECODE_PRINTINSTR256(t,mod,rh,rl)
+#define DECODE_PRINTINSTR32(t,mod,rh,rl)
+#define DECODE_PRINTINSTR256(t,mod,rh,rl)
#endif
-#endif /* __X86EMU_FPU_REGS_H */
+#endif /* __X86EMU_FPU_REGS_H */
diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/ops.h b/xorg-server/hw/xfree86/x86emu/x86emu/ops.h
index 65ea67654..1bc07a4e1 100644
--- a/xorg-server/hw/xfree86/x86emu/x86emu/ops.h
+++ b/xorg-server/hw/xfree86/x86emu/x86emu/ops.h
@@ -39,7 +39,7 @@
#ifndef __X86EMU_OPS_H
#define __X86EMU_OPS_H
-extern void (*x86emu_optab[0x100])(u8 op1);
-extern void (*x86emu_optab2[0x100])(u8 op2);
+extern void (*x86emu_optab[0x100]) (u8 op1);
+extern void (*x86emu_optab2[0x100]) (u8 op2);
-#endif /* __X86EMU_OPS_H */
+#endif /* __X86EMU_OPS_H */
diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/prim_asm.h b/xorg-server/hw/xfree86/x86emu/x86emu/prim_asm.h
index e023cf88d..aca132bf1 100644
--- a/xorg-server/hw/xfree86/x86emu/x86emu/prim_asm.h
+++ b/xorg-server/hw/xfree86/x86emu/x86emu/prim_asm.h
@@ -49,14 +49,16 @@
#define __HAVE_INLINE_ASSEMBLER__
#endif
-u32 get_flags_asm(void);
+u32 get_flags_asm(void);
+
#pragma aux get_flags_asm = \
"pushf" \
"pop eax" \
value [eax] \
modify exact [eax];
-u16 aaa_word_asm(u32 *flags,u16 d);
+u16 aaa_word_asm(u32 * flags, u16 d);
+
#pragma aux aaa_word_asm = \
"push [edi]" \
"popf" \
@@ -67,7 +69,8 @@ u16 aaa_word_asm(u32 *flags,u16 d);
value [ax] \
modify exact [ax];
-u16 aas_word_asm(u32 *flags,u16 d);
+u16 aas_word_asm(u32 * flags, u16 d);
+
#pragma aux aas_word_asm = \
"push [edi]" \
"popf" \
@@ -78,7 +81,8 @@ u16 aas_word_asm(u32 *flags,u16 d);
value [ax] \
modify exact [ax];
-u16 aad_word_asm(u32 *flags,u16 d);
+u16 aad_word_asm(u32 * flags, u16 d);
+
#pragma aux aad_word_asm = \
"push [edi]" \
"popf" \
@@ -89,7 +93,8 @@ u16 aad_word_asm(u32 *flags,u16 d);
value [ax] \
modify exact [ax];
-u16 aam_word_asm(u32 *flags,u8 d);
+u16 aam_word_asm(u32 * flags, u8 d);
+
#pragma aux aam_word_asm = \
"push [edi]" \
"popf" \
@@ -100,7 +105,8 @@ u16 aam_word_asm(u32 *flags,u8 d);
value [ax] \
modify exact [ax];
-u8 adc_byte_asm(u32 *flags,u8 d, u8 s);
+u8 adc_byte_asm(u32 * flags, u8 d, u8 s);
+
#pragma aux adc_byte_asm = \
"push [edi]" \
"popf" \
@@ -111,7 +117,8 @@ u8 adc_byte_asm(u32 *flags,u8 d, u8 s);
value [al] \
modify exact [al bl];
-u16 adc_word_asm(u32 *flags,u16 d, u16 s);
+u16 adc_word_asm(u32 * flags, u16 d, u16 s);
+
#pragma aux adc_word_asm = \
"push [edi]" \
"popf" \
@@ -122,7 +129,8 @@ u16 adc_word_asm(u32 *flags,u16 d, u16 s);
value [ax] \
modify exact [ax bx];
-u32 adc_long_asm(u32 *flags,u32 d, u32 s);
+u32 adc_long_asm(u32 * flags, u32 d, u32 s);
+
#pragma aux adc_long_asm = \
"push [edi]" \
"popf" \
@@ -133,7 +141,8 @@ u32 adc_long_asm(u32 *flags,u32 d, u32 s);
value [eax] \
modify exact [eax ebx];
-u8 add_byte_asm(u32 *flags,u8 d, u8 s);
+u8 add_byte_asm(u32 * flags, u8 d, u8 s);
+
#pragma aux add_byte_asm = \
"push [edi]" \
"popf" \
@@ -144,7 +153,8 @@ u8 add_byte_asm(u32 *flags,u8 d, u8 s);
value [al] \
modify exact [al bl];
-u16 add_word_asm(u32 *flags,u16 d, u16 s);
+u16 add_word_asm(u32 * flags, u16 d, u16 s);
+
#pragma aux add_word_asm = \
"push [edi]" \
"popf" \
@@ -155,7 +165,8 @@ u16 add_word_asm(u32 *flags,u16 d, u16 s);
value [ax] \
modify exact [ax bx];
-u32 add_long_asm(u32 *flags,u32 d, u32 s);
+u32 add_long_asm(u32 * flags, u32 d, u32 s);
+
#pragma aux add_long_asm = \
"push [edi]" \
"popf" \
@@ -166,7 +177,8 @@ u32 add_long_asm(u32 *flags,u32 d, u32 s);
value [eax] \
modify exact [eax ebx];
-u8 and_byte_asm(u32 *flags,u8 d, u8 s);
+u8 and_byte_asm(u32 * flags, u8 d, u8 s);
+
#pragma aux and_byte_asm = \
"push [edi]" \
"popf" \
@@ -177,7 +189,8 @@ u8 and_byte_asm(u32 *flags,u8 d, u8 s);
value [al] \
modify exact [al bl];
-u16 and_word_asm(u32 *flags,u16 d, u16 s);
+u16 and_word_asm(u32 * flags, u16 d, u16 s);
+
#pragma aux and_word_asm = \
"push [edi]" \
"popf" \
@@ -188,7 +201,8 @@ u16 and_word_asm(u32 *flags,u16 d, u16 s);
value [ax] \
modify exact [ax bx];
-u32 and_long_asm(u32 *flags,u32 d, u32 s);
+u32 and_long_asm(u32 * flags, u32 d, u32 s);
+
#pragma aux and_long_asm = \
"push [edi]" \
"popf" \
@@ -199,7 +213,8 @@ u32 and_long_asm(u32 *flags,u32 d, u32 s);
value [eax] \
modify exact [eax ebx];
-u8 cmp_byte_asm(u32 *flags,u8 d, u8 s);
+u8 cmp_byte_asm(u32 * flags, u8 d, u8 s);
+
#pragma aux cmp_byte_asm = \
"push [edi]" \
"popf" \
@@ -210,7 +225,8 @@ u8 cmp_byte_asm(u32 *flags,u8 d, u8 s);
value [al] \
modify exact [al bl];
-u16 cmp_word_asm(u32 *flags,u16 d, u16 s);
+u16 cmp_word_asm(u32 * flags, u16 d, u16 s);
+
#pragma aux cmp_word_asm = \
"push [edi]" \
"popf" \
@@ -221,7 +237,8 @@ u16 cmp_word_asm(u32 *flags,u16 d, u16 s);
value [ax] \
modify exact [ax bx];
-u32 cmp_long_asm(u32 *flags,u32 d, u32 s);
+u32 cmp_long_asm(u32 * flags, u32 d, u32 s);
+
#pragma aux cmp_long_asm = \
"push [edi]" \
"popf" \
@@ -232,7 +249,8 @@ u32 cmp_long_asm(u32 *flags,u32 d, u32 s);
value [eax] \
modify exact [eax ebx];
-u8 daa_byte_asm(u32 *flags,u8 d);
+u8 daa_byte_asm(u32 * flags, u8 d);
+
#pragma aux daa_byte_asm = \
"push [edi]" \
"popf" \
@@ -243,7 +261,8 @@ u8 daa_byte_asm(u32 *flags,u8 d);
value [al] \
modify exact [al];
-u8 das_byte_asm(u32 *flags,u8 d);
+u8 das_byte_asm(u32 * flags, u8 d);
+
#pragma aux das_byte_asm = \
"push [edi]" \
"popf" \
@@ -254,7 +273,8 @@ u8 das_byte_asm(u32 *flags,u8 d);
value [al] \
modify exact [al];
-u8 dec_byte_asm(u32 *flags,u8 d);
+u8 dec_byte_asm(u32 * flags, u8 d);
+
#pragma aux dec_byte_asm = \
"push [edi]" \
"popf" \
@@ -265,7 +285,8 @@ u8 dec_byte_asm(u32 *flags,u8 d);
value [al] \
modify exact [al];
-u16 dec_word_asm(u32 *flags,u16 d);
+u16 dec_word_asm(u32 * flags, u16 d);
+
#pragma aux dec_word_asm = \
"push [edi]" \
"popf" \
@@ -276,7 +297,8 @@ u16 dec_word_asm(u32 *flags,u16 d);
value [ax] \
modify exact [ax];
-u32 dec_long_asm(u32 *flags,u32 d);
+u32 dec_long_asm(u32 * flags, u32 d);
+
#pragma aux dec_long_asm = \
"push [edi]" \
"popf" \
@@ -287,7 +309,8 @@ u32 dec_long_asm(u32 *flags,u32 d);
value [eax] \
modify exact [eax];
-u8 inc_byte_asm(u32 *flags,u8 d);
+u8 inc_byte_asm(u32 * flags, u8 d);
+
#pragma aux inc_byte_asm = \
"push [edi]" \
"popf" \
@@ -298,7 +321,8 @@ u8 inc_byte_asm(u32 *flags,u8 d);
value [al] \
modify exact [al];
-u16 inc_word_asm(u32 *flags,u16 d);
+u16 inc_word_asm(u32 * flags, u16 d);
+
#pragma aux inc_word_asm = \
"push [edi]" \
"popf" \
@@ -309,7 +333,8 @@ u16 inc_word_asm(u32 *flags,u16 d);
value [ax] \
modify exact [ax];
-u32 inc_long_asm(u32 *flags,u32 d);
+u32 inc_long_asm(u32 * flags, u32 d);
+
#pragma aux inc_long_asm = \
"push [edi]" \
"popf" \
@@ -320,7 +345,8 @@ u32 inc_long_asm(u32 *flags,u32 d);
value [eax] \
modify exact [eax];
-u8 or_byte_asm(u32 *flags,u8 d, u8 s);
+u8 or_byte_asm(u32 * flags, u8 d, u8 s);
+
#pragma aux or_byte_asm = \
"push [edi]" \
"popf" \
@@ -331,7 +357,8 @@ u8 or_byte_asm(u32 *flags,u8 d, u8 s);
value [al] \
modify exact [al bl];
-u16 or_word_asm(u32 *flags,u16 d, u16 s);
+u16 or_word_asm(u32 * flags, u16 d, u16 s);
+
#pragma aux or_word_asm = \
"push [edi]" \
"popf" \
@@ -342,7 +369,8 @@ u16 or_word_asm(u32 *flags,u16 d, u16 s);
value [ax] \
modify exact [ax bx];
-u32 or_long_asm(u32 *flags,u32 d, u32 s);
+u32 or_long_asm(u32 * flags, u32 d, u32 s);
+
#pragma aux or_long_asm = \
"push [edi]" \
"popf" \
@@ -353,7 +381,8 @@ u32 or_long_asm(u32 *flags,u32 d, u32 s);
value [eax] \
modify exact [eax ebx];
-u8 neg_byte_asm(u32 *flags,u8 d);
+u8 neg_byte_asm(u32 * flags, u8 d);
+
#pragma aux neg_byte_asm = \
"push [edi]" \
"popf" \
@@ -364,7 +393,8 @@ u8 neg_byte_asm(u32 *flags,u8 d);
value [al] \
modify exact [al];
-u16 neg_word_asm(u32 *flags,u16 d);
+u16 neg_word_asm(u32 * flags, u16 d);
+
#pragma aux neg_word_asm = \
"push [edi]" \
"popf" \
@@ -375,7 +405,8 @@ u16 neg_word_asm(u32 *flags,u16 d);
value [ax] \
modify exact [ax];
-u32 neg_long_asm(u32 *flags,u32 d);
+u32 neg_long_asm(u32 * flags, u32 d);
+
#pragma aux neg_long_asm = \
"push [edi]" \
"popf" \
@@ -386,7 +417,8 @@ u32 neg_long_asm(u32 *flags,u32 d);
value [eax] \
modify exact [eax];
-u8 not_byte_asm(u32 *flags,u8 d);
+u8 not_byte_asm(u32 * flags, u8 d);
+
#pragma aux not_byte_asm = \
"push [edi]" \
"popf" \
@@ -397,7 +429,8 @@ u8 not_byte_asm(u32 *flags,u8 d);
value [al] \
modify exact [al];
-u16 not_word_asm(u32 *flags,u16 d);
+u16 not_word_asm(u32 * flags, u16 d);
+
#pragma aux not_word_asm = \
"push [edi]" \
"popf" \
@@ -408,7 +441,8 @@ u16 not_word_asm(u32 *flags,u16 d);
value [ax] \
modify exact [ax];
-u32 not_long_asm(u32 *flags,u32 d);
+u32 not_long_asm(u32 * flags, u32 d);
+
#pragma aux not_long_asm = \
"push [edi]" \
"popf" \
@@ -419,7 +453,8 @@ u32 not_long_asm(u32 *flags,u32 d);
value [eax] \
modify exact [eax];
-u8 rcl_byte_asm(u32 *flags,u8 d, u8 s);
+u8 rcl_byte_asm(u32 * flags, u8 d, u8 s);
+
#pragma aux rcl_byte_asm = \
"push [edi]" \
"popf" \
@@ -430,7 +465,8 @@ u8 rcl_byte_asm(u32 *flags,u8 d, u8 s);
value [al] \
modify exact [al cl];
-u16 rcl_word_asm(u32 *flags,u16 d, u8 s);
+u16 rcl_word_asm(u32 * flags, u16 d, u8 s);
+
#pragma aux rcl_word_asm = \
"push [edi]" \
"popf" \
@@ -441,7 +477,8 @@ u16 rcl_word_asm(u32 *flags,u16 d, u8 s);
value [ax] \
modify exact [ax cl];
-u32 rcl_long_asm(u32 *flags,u32 d, u8 s);
+u32 rcl_long_asm(u32 * flags, u32 d, u8 s);
+
#pragma aux rcl_long_asm = \
"push [edi]" \
"popf" \
@@ -452,7 +489,8 @@ u32 rcl_long_asm(u32 *flags,u32 d, u8 s);
value [eax] \
modify exact [eax cl];
-u8 rcr_byte_asm(u32 *flags,u8 d, u8 s);
+u8 rcr_byte_asm(u32 * flags, u8 d, u8 s);
+
#pragma aux rcr_byte_asm = \
"push [edi]" \
"popf" \
@@ -463,7 +501,8 @@ u8 rcr_byte_asm(u32 *flags,u8 d, u8 s);
value [al] \
modify exact [al cl];
-u16 rcr_word_asm(u32 *flags,u16 d, u8 s);
+u16 rcr_word_asm(u32 * flags, u16 d, u8 s);
+
#pragma aux rcr_word_asm = \
"push [edi]" \
"popf" \
@@ -474,7 +513,8 @@ u16 rcr_word_asm(u32 *flags,u16 d, u8 s);
value [ax] \
modify exact [ax cl];
-u32 rcr_long_asm(u32 *flags,u32 d, u8 s);
+u32 rcr_long_asm(u32 * flags, u32 d, u8 s);
+
#pragma aux rcr_long_asm = \
"push [edi]" \
"popf" \
@@ -485,7 +525,8 @@ u32 rcr_long_asm(u32 *flags,u32 d, u8 s);
value [eax] \
modify exact [eax cl];
-u8 rol_byte_asm(u32 *flags,u8 d, u8 s);
+u8 rol_byte_asm(u32 * flags, u8 d, u8 s);
+
#pragma aux rol_byte_asm = \
"push [edi]" \
"popf" \
@@ -496,7 +537,8 @@ u8 rol_byte_asm(u32 *flags,u8 d, u8 s);
value [al] \
modify exact [al cl];
-u16 rol_word_asm(u32 *flags,u16 d, u8 s);
+u16 rol_word_asm(u32 * flags, u16 d, u8 s);
+
#pragma aux rol_word_asm = \
"push [edi]" \
"popf" \
@@ -507,7 +549,8 @@ u16 rol_word_asm(u32 *flags,u16 d, u8 s);
value [ax] \
modify exact [ax cl];
-u32 rol_long_asm(u32 *flags,u32 d, u8 s);
+u32 rol_long_asm(u32 * flags, u32 d, u8 s);
+
#pragma aux rol_long_asm = \
"push [edi]" \
"popf" \
@@ -518,7 +561,8 @@ u32 rol_long_asm(u32 *flags,u32 d, u8 s);
value [eax] \
modify exact [eax cl];
-u8 ror_byte_asm(u32 *flags,u8 d, u8 s);
+u8 ror_byte_asm(u32 * flags, u8 d, u8 s);
+
#pragma aux ror_byte_asm = \
"push [edi]" \
"popf" \
@@ -529,7 +573,8 @@ u8 ror_byte_asm(u32 *flags,u8 d, u8 s);
value [al] \
modify exact [al cl];
-u16 ror_word_asm(u32 *flags,u16 d, u8 s);
+u16 ror_word_asm(u32 * flags, u16 d, u8 s);
+
#pragma aux ror_word_asm = \
"push [edi]" \
"popf" \
@@ -540,7 +585,8 @@ u16 ror_word_asm(u32 *flags,u16 d, u8 s);
value [ax] \
modify exact [ax cl];
-u32 ror_long_asm(u32 *flags,u32 d, u8 s);
+u32 ror_long_asm(u32 * flags, u32 d, u8 s);
+
#pragma aux ror_long_asm = \
"push [edi]" \
"popf" \
@@ -551,7 +597,8 @@ u32 ror_long_asm(u32 *flags,u32 d, u8 s);
value [eax] \
modify exact [eax cl];
-u8 shl_byte_asm(u32 *flags,u8 d, u8 s);
+u8 shl_byte_asm(u32 * flags, u8 d, u8 s);
+
#pragma aux shl_byte_asm = \
"push [edi]" \
"popf" \
@@ -562,7 +609,8 @@ u8 shl_byte_asm(u32 *flags,u8 d, u8 s);
value [al] \
modify exact [al cl];
-u16 shl_word_asm(u32 *flags,u16 d, u8 s);
+u16 shl_word_asm(u32 * flags, u16 d, u8 s);
+
#pragma aux shl_word_asm = \
"push [edi]" \
"popf" \
@@ -573,7 +621,8 @@ u16 shl_word_asm(u32 *flags,u16 d, u8 s);
value [ax] \
modify exact [ax cl];
-u32 shl_long_asm(u32 *flags,u32 d, u8 s);
+u32 shl_long_asm(u32 * flags, u32 d, u8 s);
+
#pragma aux shl_long_asm = \
"push [edi]" \
"popf" \
@@ -584,7 +633,8 @@ u32 shl_long_asm(u32 *flags,u32 d, u8 s);
value [eax] \
modify exact [eax cl];
-u8 shr_byte_asm(u32 *flags,u8 d, u8 s);
+u8 shr_byte_asm(u32 * flags, u8 d, u8 s);
+
#pragma aux shr_byte_asm = \
"push [edi]" \
"popf" \
@@ -595,7 +645,8 @@ u8 shr_byte_asm(u32 *flags,u8 d, u8 s);
value [al] \
modify exact [al cl];
-u16 shr_word_asm(u32 *flags,u16 d, u8 s);
+u16 shr_word_asm(u32 * flags, u16 d, u8 s);
+
#pragma aux shr_word_asm = \
"push [edi]" \
"popf" \
@@ -606,7 +657,8 @@ u16 shr_word_asm(u32 *flags,u16 d, u8 s);
value [ax] \
modify exact [ax cl];
-u32 shr_long_asm(u32 *flags,u32 d, u8 s);
+u32 shr_long_asm(u32 * flags, u32 d, u8 s);
+
#pragma aux shr_long_asm = \
"push [edi]" \
"popf" \
@@ -617,7 +669,8 @@ u32 shr_long_asm(u32 *flags,u32 d, u8 s);
value [eax] \
modify exact [eax cl];
-u8 sar_byte_asm(u32 *flags,u8 d, u8 s);
+u8 sar_byte_asm(u32 * flags, u8 d, u8 s);
+
#pragma aux sar_byte_asm = \
"push [edi]" \
"popf" \
@@ -628,7 +681,8 @@ u8 sar_byte_asm(u32 *flags,u8 d, u8 s);
value [al] \
modify exact [al cl];
-u16 sar_word_asm(u32 *flags,u16 d, u8 s);
+u16 sar_word_asm(u32 * flags, u16 d, u8 s);
+
#pragma aux sar_word_asm = \
"push [edi]" \
"popf" \
@@ -639,7 +693,8 @@ u16 sar_word_asm(u32 *flags,u16 d, u8 s);
value [ax] \
modify exact [ax cl];
-u32 sar_long_asm(u32 *flags,u32 d, u8 s);
+u32 sar_long_asm(u32 * flags, u32 d, u8 s);
+
#pragma aux sar_long_asm = \
"push [edi]" \
"popf" \
@@ -650,7 +705,8 @@ u32 sar_long_asm(u32 *flags,u32 d, u8 s);
value [eax] \
modify exact [eax cl];
-u16 shld_word_asm(u32 *flags,u16 d, u16 fill, u8 s);
+u16 shld_word_asm(u32 * flags, u16 d, u16 fill, u8 s);
+
#pragma aux shld_word_asm = \
"push [edi]" \
"popf" \
@@ -661,7 +717,8 @@ u16 shld_word_asm(u32 *flags,u16 d, u16 fill, u8 s);
value [ax] \
modify exact [ax dx cl];
-u32 shld_long_asm(u32 *flags,u32 d, u32 fill, u8 s);
+u32 shld_long_asm(u32 * flags, u32 d, u32 fill, u8 s);
+
#pragma aux shld_long_asm = \
"push [edi]" \
"popf" \
@@ -672,7 +729,8 @@ u32 shld_long_asm(u32 *flags,u32 d, u32 fill, u8 s);
value [eax] \
modify exact [eax edx cl];
-u16 shrd_word_asm(u32 *flags,u16 d, u16 fill, u8 s);
+u16 shrd_word_asm(u32 * flags, u16 d, u16 fill, u8 s);
+
#pragma aux shrd_word_asm = \
"push [edi]" \
"popf" \
@@ -683,7 +741,8 @@ u16 shrd_word_asm(u32 *flags,u16 d, u16 fill, u8 s);
value [ax] \
modify exact [ax dx cl];
-u32 shrd_long_asm(u32 *flags,u32 d, u32 fill, u8 s);
+u32 shrd_long_asm(u32 * flags, u32 d, u32 fill, u8 s);
+
#pragma aux shrd_long_asm = \
"push [edi]" \
"popf" \
@@ -694,7 +753,8 @@ u32 shrd_long_asm(u32 *flags,u32 d, u32 fill, u8 s);
value [eax] \
modify exact [eax edx cl];
-u8 sbb_byte_asm(u32 *flags,u8 d, u8 s);
+u8 sbb_byte_asm(u32 * flags, u8 d, u8 s);
+
#pragma aux sbb_byte_asm = \
"push [edi]" \
"popf" \
@@ -705,7 +765,8 @@ u8 sbb_byte_asm(u32 *flags,u8 d, u8 s);
value [al] \
modify exact [al bl];
-u16 sbb_word_asm(u32 *flags,u16 d, u16 s);
+u16 sbb_word_asm(u32 * flags, u16 d, u16 s);
+
#pragma aux sbb_word_asm = \
"push [edi]" \
"popf" \
@@ -716,7 +777,8 @@ u16 sbb_word_asm(u32 *flags,u16 d, u16 s);
value [ax] \
modify exact [ax bx];
-u32 sbb_long_asm(u32 *flags,u32 d, u32 s);
+u32 sbb_long_asm(u32 * flags, u32 d, u32 s);
+
#pragma aux sbb_long_asm = \
"push [edi]" \
"popf" \
@@ -727,7 +789,8 @@ u32 sbb_long_asm(u32 *flags,u32 d, u32 s);
value [eax] \
modify exact [eax ebx];
-u8 sub_byte_asm(u32 *flags,u8 d, u8 s);
+u8 sub_byte_asm(u32 * flags, u8 d, u8 s);
+
#pragma aux sub_byte_asm = \
"push [edi]" \
"popf" \
@@ -738,7 +801,8 @@ u8 sub_byte_asm(u32 *flags,u8 d, u8 s);
value [al] \
modify exact [al bl];
-u16 sub_word_asm(u32 *flags,u16 d, u16 s);
+u16 sub_word_asm(u32 * flags, u16 d, u16 s);
+
#pragma aux sub_word_asm = \
"push [edi]" \
"popf" \
@@ -749,7 +813,8 @@ u16 sub_word_asm(u32 *flags,u16 d, u16 s);
value [ax] \
modify exact [ax bx];
-u32 sub_long_asm(u32 *flags,u32 d, u32 s);
+u32 sub_long_asm(u32 * flags, u32 d, u32 s);
+
#pragma aux sub_long_asm = \
"push [edi]" \
"popf" \
@@ -760,7 +825,8 @@ u32 sub_long_asm(u32 *flags,u32 d, u32 s);
value [eax] \
modify exact [eax ebx];
-void test_byte_asm(u32 *flags,u8 d, u8 s);
+void test_byte_asm(u32 * flags, u8 d, u8 s);
+
#pragma aux test_byte_asm = \
"push [edi]" \
"popf" \
@@ -770,7 +836,8 @@ void test_byte_asm(u32 *flags,u8 d, u8 s);
parm [edi] [al] [bl] \
modify exact [al bl];
-void test_word_asm(u32 *flags,u16 d, u16 s);
+void test_word_asm(u32 * flags, u16 d, u16 s);
+
#pragma aux test_word_asm = \
"push [edi]" \
"popf" \
@@ -780,7 +847,8 @@ void test_word_asm(u32 *flags,u16 d, u16 s);
parm [edi] [ax] [bx] \
modify exact [ax bx];
-void test_long_asm(u32 *flags,u32 d, u32 s);
+void test_long_asm(u32 * flags, u32 d, u32 s);
+
#pragma aux test_long_asm = \
"push [edi]" \
"popf" \
@@ -790,7 +858,8 @@ void test_long_asm(u32 *flags,u32 d, u32 s);
parm [edi] [eax] [ebx] \
modify exact [eax ebx];
-u8 xor_byte_asm(u32 *flags,u8 d, u8 s);
+u8 xor_byte_asm(u32 * flags, u8 d, u8 s);
+
#pragma aux xor_byte_asm = \
"push [edi]" \
"popf" \
@@ -801,7 +870,8 @@ u8 xor_byte_asm(u32 *flags,u8 d, u8 s);
value [al] \
modify exact [al bl];
-u16 xor_word_asm(u32 *flags,u16 d, u16 s);
+u16 xor_word_asm(u32 * flags, u16 d, u16 s);
+
#pragma aux xor_word_asm = \
"push [edi]" \
"popf" \
@@ -812,7 +882,8 @@ u16 xor_word_asm(u32 *flags,u16 d, u16 s);
value [ax] \
modify exact [ax bx];
-u32 xor_long_asm(u32 *flags,u32 d, u32 s);
+u32 xor_long_asm(u32 * flags, u32 d, u32 s);
+
#pragma aux xor_long_asm = \
"push [edi]" \
"popf" \
@@ -823,7 +894,8 @@ u32 xor_long_asm(u32 *flags,u32 d, u32 s);
value [eax] \
modify exact [eax ebx];
-void imul_byte_asm(u32 *flags,u16 *ax,u8 d,u8 s);
+void imul_byte_asm(u32 * flags, u16 * ax, u8 d, u8 s);
+
#pragma aux imul_byte_asm = \
"push [edi]" \
"popf" \
@@ -834,7 +906,8 @@ void imul_byte_asm(u32 *flags,u16 *ax,u8 d,u8 s);
parm [edi] [esi] [al] [bl] \
modify exact [esi ax bl];
-void imul_word_asm(u32 *flags,u16 *ax,u16 *dx,u16 d,u16 s);
+void imul_word_asm(u32 * flags, u16 * ax, u16 * dx, u16 d, u16 s);
+
#pragma aux imul_word_asm = \
"push [edi]" \
"popf" \
@@ -846,7 +919,8 @@ void imul_word_asm(u32 *flags,u16 *ax,u16 *dx,u16 d,u16 s);
parm [edi] [esi] [ecx] [ax] [bx]\
modify exact [esi edi ax bx dx];
-void imul_long_asm(u32 *flags,u32 *eax,u32 *edx,u32 d,u32 s);
+void imul_long_asm(u32 * flags, u32 * eax, u32 * edx, u32 d, u32 s);
+
#pragma aux imul_long_asm = \
"push [edi]" \
"popf" \
@@ -858,7 +932,8 @@ void imul_long_asm(u32 *flags,u32 *eax,u32 *edx,u32 d,u32 s);
parm [edi] [esi] [ecx] [eax] [ebx] \
modify exact [esi edi eax ebx edx];
-void mul_byte_asm(u32 *flags,u16 *ax,u8 d,u8 s);
+void mul_byte_asm(u32 * flags, u16 * ax, u8 d, u8 s);
+
#pragma aux mul_byte_asm = \
"push [edi]" \
"popf" \
@@ -869,7 +944,8 @@ void mul_byte_asm(u32 *flags,u16 *ax,u8 d,u8 s);
parm [edi] [esi] [al] [bl] \
modify exact [esi ax bl];
-void mul_word_asm(u32 *flags,u16 *ax,u16 *dx,u16 d,u16 s);
+void mul_word_asm(u32 * flags, u16 * ax, u16 * dx, u16 d, u16 s);
+
#pragma aux mul_word_asm = \
"push [edi]" \
"popf" \
@@ -881,7 +957,8 @@ void mul_word_asm(u32 *flags,u16 *ax,u16 *dx,u16 d,u16 s);
parm [edi] [esi] [ecx] [ax] [bx]\
modify exact [esi edi ax bx dx];
-void mul_long_asm(u32 *flags,u32 *eax,u32 *edx,u32 d,u32 s);
+void mul_long_asm(u32 * flags, u32 * eax, u32 * edx, u32 d, u32 s);
+
#pragma aux mul_long_asm = \
"push [edi]" \
"popf" \
@@ -893,7 +970,8 @@ void mul_long_asm(u32 *flags,u32 *eax,u32 *edx,u32 d,u32 s);
parm [edi] [esi] [ecx] [eax] [ebx] \
modify exact [esi edi eax ebx edx];
-void idiv_byte_asm(u32 *flags,u8 *al,u8 *ah,u16 d,u8 s);
+void idiv_byte_asm(u32 * flags, u8 * al, u8 * ah, u16 d, u8 s);
+
#pragma aux idiv_byte_asm = \
"push [edi]" \
"popf" \
@@ -905,7 +983,8 @@ void idiv_byte_asm(u32 *flags,u8 *al,u8 *ah,u16 d,u8 s);
parm [edi] [esi] [ecx] [ax] [bl]\
modify exact [esi edi ax bl];
-void idiv_word_asm(u32 *flags,u16 *ax,u16 *dx,u16 dlo,u16 dhi,u16 s);
+void idiv_word_asm(u32 * flags, u16 * ax, u16 * dx, u16 dlo, u16 dhi, u16 s);
+
#pragma aux idiv_word_asm = \
"push [edi]" \
"popf" \
@@ -917,7 +996,8 @@ void idiv_word_asm(u32 *flags,u16 *ax,u16 *dx,u16 dlo,u16 dhi,u16 s);
parm [edi] [esi] [ecx] [ax] [dx] [bx]\
modify exact [esi edi ax dx bx];
-void idiv_long_asm(u32 *flags,u32 *eax,u32 *edx,u32 dlo,u32 dhi,u32 s);
+void idiv_long_asm(u32 * flags, u32 * eax, u32 * edx, u32 dlo, u32 dhi, u32 s);
+
#pragma aux idiv_long_asm = \
"push [edi]" \
"popf" \
@@ -929,7 +1009,8 @@ void idiv_long_asm(u32 *flags,u32 *eax,u32 *edx,u32 dlo,u32 dhi,u32 s);
parm [edi] [esi] [ecx] [eax] [edx] [ebx]\
modify exact [esi edi eax edx ebx];
-void div_byte_asm(u32 *flags,u8 *al,u8 *ah,u16 d,u8 s);
+void div_byte_asm(u32 * flags, u8 * al, u8 * ah, u16 d, u8 s);
+
#pragma aux div_byte_asm = \
"push [edi]" \
"popf" \
@@ -941,7 +1022,8 @@ void div_byte_asm(u32 *flags,u8 *al,u8 *ah,u16 d,u8 s);
parm [edi] [esi] [ecx] [ax] [bl]\
modify exact [esi edi ax bl];
-void div_word_asm(u32 *flags,u16 *ax,u16 *dx,u16 dlo,u16 dhi,u16 s);
+void div_word_asm(u32 * flags, u16 * ax, u16 * dx, u16 dlo, u16 dhi, u16 s);
+
#pragma aux div_word_asm = \
"push [edi]" \
"popf" \
@@ -953,7 +1035,8 @@ void div_word_asm(u32 *flags,u16 *ax,u16 *dx,u16 dlo,u16 dhi,u16 s);
parm [edi] [esi] [ecx] [ax] [dx] [bx]\
modify exact [esi edi ax dx bx];
-void div_long_asm(u32 *flags,u32 *eax,u32 *edx,u32 dlo,u32 dhi,u32 s);
+void div_long_asm(u32 * flags, u32 * eax, u32 * edx, u32 dlo, u32 dhi, u32 s);
+
#pragma aux div_long_asm = \
"push [edi]" \
"popf" \
@@ -967,4 +1050,4 @@ void div_long_asm(u32 *flags,u32 *eax,u32 *edx,u32 dlo,u32 dhi,u32 s);
#endif
-#endif /* __X86EMU_PRIM_ASM_H */
+#endif /* __X86EMU_PRIM_ASM_H */
diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/prim_ops.h b/xorg-server/hw/xfree86/x86emu/x86emu/prim_ops.h
index 6ac2a29f6..0f0e78d71 100644
--- a/xorg-server/hw/xfree86/x86emu/x86emu/prim_ops.h
+++ b/xorg-server/hw/xfree86/x86emu/x86emu/prim_ops.h
@@ -40,103 +40,102 @@
#define __X86EMU_PRIM_OPS_H
#ifdef __cplusplus
-extern "C" { /* Use "C" linkage when in C++ mode */
+extern "C" { /* Use "C" linkage when in C++ mode */
#endif
-u16 aaa_word (u16 d);
-u16 aas_word (u16 d);
-u16 aad_word (u16 d);
-u16 aam_word (u8 d);
-u8 adc_byte (u8 d, u8 s);
-u16 adc_word (u16 d, u16 s);
-u32 adc_long (u32 d, u32 s);
-u8 add_byte (u8 d, u8 s);
-u16 add_word (u16 d, u16 s);
-u32 add_long (u32 d, u32 s);
-u8 and_byte (u8 d, u8 s);
-u16 and_word (u16 d, u16 s);
-u32 and_long (u32 d, u32 s);
-u8 cmp_byte (u8 d, u8 s);
-u16 cmp_word (u16 d, u16 s);
-u32 cmp_long (u32 d, u32 s);
-u8 daa_byte (u8 d);
-u8 das_byte (u8 d);
-u8 dec_byte (u8 d);
-u16 dec_word (u16 d);
-u32 dec_long (u32 d);
-u8 inc_byte (u8 d);
-u16 inc_word (u16 d);
-u32 inc_long (u32 d);
-u8 or_byte (u8 d, u8 s);
-u16 or_word (u16 d, u16 s);
-u32 or_long (u32 d, u32 s);
-u8 neg_byte (u8 s);
-u16 neg_word (u16 s);
-u32 neg_long (u32 s);
-u8 not_byte (u8 s);
-u16 not_word (u16 s);
-u32 not_long (u32 s);
-u8 rcl_byte (u8 d, u8 s);
-u16 rcl_word (u16 d, u8 s);
-u32 rcl_long (u32 d, u8 s);
-u8 rcr_byte (u8 d, u8 s);
-u16 rcr_word (u16 d, u8 s);
-u32 rcr_long (u32 d, u8 s);
-u8 rol_byte (u8 d, u8 s);
-u16 rol_word (u16 d, u8 s);
-u32 rol_long (u32 d, u8 s);
-u8 ror_byte (u8 d, u8 s);
-u16 ror_word (u16 d, u8 s);
-u32 ror_long (u32 d, u8 s);
-u8 shl_byte (u8 d, u8 s);
-u16 shl_word (u16 d, u8 s);
-u32 shl_long (u32 d, u8 s);
-u8 shr_byte (u8 d, u8 s);
-u16 shr_word (u16 d, u8 s);
-u32 shr_long (u32 d, u8 s);
-u8 sar_byte (u8 d, u8 s);
-u16 sar_word (u16 d, u8 s);
-u32 sar_long (u32 d, u8 s);
-u16 shld_word (u16 d, u16 fill, u8 s);
-u32 shld_long (u32 d, u32 fill, u8 s);
-u16 shrd_word (u16 d, u16 fill, u8 s);
-u32 shrd_long (u32 d, u32 fill, u8 s);
-u8 sbb_byte (u8 d, u8 s);
-u16 sbb_word (u16 d, u16 s);
-u32 sbb_long (u32 d, u32 s);
-u8 sub_byte (u8 d, u8 s);
-u16 sub_word (u16 d, u16 s);
-u32 sub_long (u32 d, u32 s);
-void test_byte (u8 d, u8 s);
-void test_word (u16 d, u16 s);
-void test_long (u32 d, u32 s);
-u8 xor_byte (u8 d, u8 s);
-u16 xor_word (u16 d, u16 s);
-u32 xor_long (u32 d, u32 s);
-void imul_byte (u8 s);
-void imul_word (u16 s);
-void imul_long (u32 s);
-void imul_long_direct(u32 *res_lo, u32* res_hi,u32 d, u32 s);
-void mul_byte (u8 s);
-void mul_word (u16 s);
-void mul_long (u32 s);
-void idiv_byte (u8 s);
-void idiv_word (u16 s);
-void idiv_long (u32 s);
-void div_byte (u8 s);
-void div_word (u16 s);
-void div_long (u32 s);
-void ins (int size);
-void outs (int size);
-u16 mem_access_word (int addr);
-void push_word (u16 w);
-void push_long (u32 w);
-u16 pop_word (void);
-u32 pop_long (void);
-void cpuid (void);
+ u16 aaa_word(u16 d);
+ u16 aas_word(u16 d);
+ u16 aad_word(u16 d);
+ u16 aam_word(u8 d);
+ u8 adc_byte(u8 d, u8 s);
+ u16 adc_word(u16 d, u16 s);
+ u32 adc_long(u32 d, u32 s);
+ u8 add_byte(u8 d, u8 s);
+ u16 add_word(u16 d, u16 s);
+ u32 add_long(u32 d, u32 s);
+ u8 and_byte(u8 d, u8 s);
+ u16 and_word(u16 d, u16 s);
+ u32 and_long(u32 d, u32 s);
+ u8 cmp_byte(u8 d, u8 s);
+ u16 cmp_word(u16 d, u16 s);
+ u32 cmp_long(u32 d, u32 s);
+ u8 daa_byte(u8 d);
+ u8 das_byte(u8 d);
+ u8 dec_byte(u8 d);
+ u16 dec_word(u16 d);
+ u32 dec_long(u32 d);
+ u8 inc_byte(u8 d);
+ u16 inc_word(u16 d);
+ u32 inc_long(u32 d);
+ u8 or_byte(u8 d, u8 s);
+ u16 or_word(u16 d, u16 s);
+ u32 or_long(u32 d, u32 s);
+ u8 neg_byte(u8 s);
+ u16 neg_word(u16 s);
+ u32 neg_long(u32 s);
+ u8 not_byte(u8 s);
+ u16 not_word(u16 s);
+ u32 not_long(u32 s);
+ u8 rcl_byte(u8 d, u8 s);
+ u16 rcl_word(u16 d, u8 s);
+ u32 rcl_long(u32 d, u8 s);
+ u8 rcr_byte(u8 d, u8 s);
+ u16 rcr_word(u16 d, u8 s);
+ u32 rcr_long(u32 d, u8 s);
+ u8 rol_byte(u8 d, u8 s);
+ u16 rol_word(u16 d, u8 s);
+ u32 rol_long(u32 d, u8 s);
+ u8 ror_byte(u8 d, u8 s);
+ u16 ror_word(u16 d, u8 s);
+ u32 ror_long(u32 d, u8 s);
+ u8 shl_byte(u8 d, u8 s);
+ u16 shl_word(u16 d, u8 s);
+ u32 shl_long(u32 d, u8 s);
+ u8 shr_byte(u8 d, u8 s);
+ u16 shr_word(u16 d, u8 s);
+ u32 shr_long(u32 d, u8 s);
+ u8 sar_byte(u8 d, u8 s);
+ u16 sar_word(u16 d, u8 s);
+ u32 sar_long(u32 d, u8 s);
+ u16 shld_word(u16 d, u16 fill, u8 s);
+ u32 shld_long(u32 d, u32 fill, u8 s);
+ u16 shrd_word(u16 d, u16 fill, u8 s);
+ u32 shrd_long(u32 d, u32 fill, u8 s);
+ u8 sbb_byte(u8 d, u8 s);
+ u16 sbb_word(u16 d, u16 s);
+ u32 sbb_long(u32 d, u32 s);
+ u8 sub_byte(u8 d, u8 s);
+ u16 sub_word(u16 d, u16 s);
+ u32 sub_long(u32 d, u32 s);
+ void test_byte(u8 d, u8 s);
+ void test_word(u16 d, u16 s);
+ void test_long(u32 d, u32 s);
+ u8 xor_byte(u8 d, u8 s);
+ u16 xor_word(u16 d, u16 s);
+ u32 xor_long(u32 d, u32 s);
+ void imul_byte(u8 s);
+ void imul_word(u16 s);
+ void imul_long(u32 s);
+ void imul_long_direct(u32 * res_lo, u32 * res_hi, u32 d, u32 s);
+ void mul_byte(u8 s);
+ void mul_word(u16 s);
+ void mul_long(u32 s);
+ void idiv_byte(u8 s);
+ void idiv_word(u16 s);
+ void idiv_long(u32 s);
+ void div_byte(u8 s);
+ void div_word(u16 s);
+ void div_long(u32 s);
+ void ins(int size);
+ void outs(int size);
+ u16 mem_access_word(int addr);
+ void push_word(u16 w);
+ void push_long(u32 w);
+ u16 pop_word(void);
+ u32 pop_long(void);
+ void cpuid(void);
#ifdef __cplusplus
-} /* End of "C" linkage for C++ */
+} /* End of "C" linkage for C++ */
#endif
-
-#endif /* __X86EMU_PRIM_OPS_H */
+#endif /* __X86EMU_PRIM_OPS_H */
diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/regs.h b/xorg-server/hw/xfree86/x86emu/x86emu/regs.h
index 52cf8e41b..6bd061166 100644
--- a/xorg-server/hw/xfree86/x86emu/x86emu/regs.h
+++ b/xorg-server/hw/xfree86/x86emu/x86emu/regs.h
@@ -42,7 +42,7 @@
/*---------------------- Macros and type definitions ----------------------*/
#ifdef PACK
-# pragma PACK
+#pragma PACK
#endif
/*
@@ -64,48 +64,48 @@
typedef struct {
u32 e_reg;
- } I32_reg_t;
+} I32_reg_t;
typedef struct {
- u16 filler0, x_reg;
- } I16_reg_t;
+ u16 filler0, x_reg;
+} I16_reg_t;
typedef struct {
- u8 filler0, filler1, h_reg, l_reg;
- } I8_reg_t;
+ u8 filler0, filler1, h_reg, l_reg;
+} I8_reg_t;
-#else /* !__BIG_ENDIAN__ */
+#else /* !__BIG_ENDIAN__ */
typedef struct {
u32 e_reg;
- } I32_reg_t;
+} I32_reg_t;
typedef struct {
- u16 x_reg;
- } I16_reg_t;
+ u16 x_reg;
+} I16_reg_t;
typedef struct {
- u8 l_reg, h_reg;
- } I8_reg_t;
+ u8 l_reg, h_reg;
+} I8_reg_t;
-#endif /* BIG_ENDIAN */
+#endif /* BIG_ENDIAN */
typedef union {
- I32_reg_t I32_reg;
- I16_reg_t I16_reg;
- I8_reg_t I8_reg;
- } i386_general_register;
+ I32_reg_t I32_reg;
+ I16_reg_t I16_reg;
+ I8_reg_t I8_reg;
+} i386_general_register;
struct i386_general_regs {
- i386_general_register A, B, C, D;
- };
+ i386_general_register A, B, C, D;
+};
typedef struct i386_general_regs Gen_reg_t;
struct i386_special_regs {
- i386_general_register SP, BP, SI, DI, IP;
- u32 FLAGS;
- };
+ i386_general_register SP, BP, SI, DI, IP;
+ u32 FLAGS;
+};
/*
* Segment registers here represent the 16 bit quantities
@@ -114,7 +114,7 @@ struct i386_special_regs {
struct i386_segment_regs {
u16 CS, DS, SS, ES, FS, GS;
- };
+};
/* 8 bit registers */
#define R_AH gen.A.I8_reg.h_reg
@@ -258,9 +258,9 @@ struct i386_segment_regs {
#define INTR_HALTED 0x4
typedef struct {
- struct i386_general_regs gen;
- struct i386_special_regs spc;
- struct i386_segment_regs seg;
+ struct i386_general_regs gen;
+ struct i386_special_regs spc;
+ struct i386_segment_regs seg;
/*
* MODE contains information on:
* REPE prefix 2 bits repe,repne
@@ -273,21 +273,21 @@ typedef struct {
* Extern interrupt 1 bits
* Halted 1 bits
*/
- u32 mode;
- volatile int intr; /* mask of pending interrupts */
- int debug;
+ u32 mode;
+ volatile int intr; /* mask of pending interrupts */
+ int debug;
#ifdef DEBUG
- int check;
- u16 saved_ip;
- u16 saved_cs;
- int enc_pos;
- int enc_str_pos;
- char decode_buf[32]; /* encoded byte stream */
- char decoded_buf[256]; /* disassembled strings */
+ int check;
+ u16 saved_ip;
+ u16 saved_cs;
+ int enc_pos;
+ int enc_str_pos;
+ char decode_buf[32]; /* encoded byte stream */
+ char decoded_buf[256]; /* disassembled strings */
#endif
- u8 intno;
- u8 __pad[3];
- } X86EMU_regs;
+ u8 intno;
+ u8 __pad[3];
+} X86EMU_regs;
/****************************************************************************
REMARKS:
@@ -300,20 +300,20 @@ private - private data pointer
x86 - X86 registers
****************************************************************************/
typedef struct {
- unsigned long mem_base;
- unsigned long mem_size;
- void* private;
- X86EMU_regs x86;
- } X86EMU_sysEnv;
+ unsigned long mem_base;
+ unsigned long mem_size;
+ void *private;
+ X86EMU_regs x86;
+} X86EMU_sysEnv;
#ifdef END_PACK
-# pragma END_PACK
+#pragma END_PACK
#endif
/*----------------------------- Global Variables --------------------------*/
#ifdef __cplusplus
-extern "C" { /* Use "C" linkage when in C++ mode */
+extern "C" { /* Use "C" linkage when in C++ mode */
#endif
/* Global emulator machine state.
@@ -321,17 +321,16 @@ extern "C" { /* Use "C" linkage when in C++ mode */
* We keep it global to avoid pointer dereferences in the code for speed.
*/
-extern X86EMU_sysEnv _X86EMU_env;
+ extern X86EMU_sysEnv _X86EMU_env;
#define M _X86EMU_env
/*-------------------------- Function Prototypes --------------------------*/
/* Function to log information at runtime */
-void printk(const char *fmt, ...);
+ void printk(const char *fmt, ...);
#ifdef __cplusplus
-} /* End of "C" linkage for C++ */
+} /* End of "C" linkage for C++ */
#endif
-
-#endif /* __X86EMU_REGS_H */
+#endif /* __X86EMU_REGS_H */
diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/types.h b/xorg-server/hw/xfree86/x86emu/x86emu/types.h
index fa23800d0..5a6ef01f8 100644
--- a/xorg-server/hw/xfree86/x86emu/x86emu/types.h
+++ b/xorg-server/hw/xfree86/x86emu/x86emu/types.h
@@ -36,7 +36,6 @@
*
****************************************************************************/
-
#ifndef __X86EMU_TYPES_H
#define __X86EMU_TYPES_H
@@ -63,19 +62,19 @@
#include <stdint.h>
-typedef uint8_t u8;
-typedef uint16_t u16;
-typedef uint32_t u32;
-typedef uint64_t u64;
+typedef uint8_t u8;
+typedef uint16_t u16;
+typedef uint32_t u32;
+typedef uint64_t u64;
-typedef int8_t s8;
-typedef int16_t s16;
-typedef int32_t s32;
-typedef int64_t s64;
+typedef int8_t s8;
+typedef int16_t s16;
+typedef int32_t s32;
+typedef int64_t s64;
-typedef unsigned int uint;
-typedef int sint;
+typedef unsigned int uint;
+typedef int sint;
typedef u16 X86EMU_pioAddr;
-#endif /* __X86EMU_TYPES_H */
+#endif /* __X86EMU_TYPES_H */
diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/x86emui.h b/xorg-server/hw/xfree86/x86emu/x86emu/x86emui.h
index 112ee366f..f11dc102f 100644
--- a/xorg-server/hw/xfree86/x86emu/x86emu/x86emui.h
+++ b/xorg-server/hw/xfree86/x86emu/x86emu/x86emui.h
@@ -38,7 +38,6 @@
*
****************************************************************************/
-
#ifndef __X86EMU_X86EMUI_H
#define __X86EMU_X86EMUI_H
@@ -74,29 +73,28 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#endif
+#endif
/*--------------------------- Inline Functions ----------------------------*/
#ifdef __cplusplus
-extern "C" { /* Use "C" linkage when in C++ mode */
+extern "C" { /* Use "C" linkage when in C++ mode */
#endif
-extern u8 (X86APIP sys_rdb)(u32 addr);
-extern u16 (X86APIP sys_rdw)(u32 addr);
-extern u32 (X86APIP sys_rdl)(u32 addr);
-extern void (X86APIP sys_wrb)(u32 addr,u8 val);
-extern void (X86APIP sys_wrw)(u32 addr,u16 val);
-extern void (X86APIP sys_wrl)(u32 addr,u32 val);
+ extern u8(X86APIP sys_rdb) (u32 addr);
+ extern u16(X86APIP sys_rdw) (u32 addr);
+ extern u32(X86APIP sys_rdl) (u32 addr);
+ extern void (X86APIP sys_wrb) (u32 addr, u8 val);
+ extern void (X86APIP sys_wrw) (u32 addr, u16 val);
+ extern void (X86APIP sys_wrl) (u32 addr, u32 val);
-extern u8 (X86APIP sys_inb)(X86EMU_pioAddr addr);
-extern u16 (X86APIP sys_inw)(X86EMU_pioAddr addr);
-extern u32 (X86APIP sys_inl)(X86EMU_pioAddr addr);
-extern void (X86APIP sys_outb)(X86EMU_pioAddr addr,u8 val);
-extern void (X86APIP sys_outw)(X86EMU_pioAddr addr,u16 val);
-extern void (X86APIP sys_outl)(X86EMU_pioAddr addr,u32 val);
+ extern u8(X86APIP sys_inb) (X86EMU_pioAddr addr);
+ extern u16(X86APIP sys_inw) (X86EMU_pioAddr addr);
+ extern u32(X86APIP sys_inl) (X86EMU_pioAddr addr);
+ extern void (X86APIP sys_outb) (X86EMU_pioAddr addr, u8 val);
+ extern void (X86APIP sys_outw) (X86EMU_pioAddr addr, u16 val);
+ extern void (X86APIP sys_outl) (X86EMU_pioAddr addr, u32 val);
#ifdef __cplusplus
-} /* End of "C" linkage for C++ */
+} /* End of "C" linkage for C++ */
#endif
-
-#endif /* __X86EMU_X86EMUI_H */
+#endif /* __X86EMU_X86EMUI_H */
diff --git a/xorg-server/hw/xfree86/xaa/xaaBitOrder.c b/xorg-server/hw/xfree86/xaa/xaaBitOrder.c
index 9b124670d..3d9b980e1 100644
--- a/xorg-server/hw/xfree86/xaa/xaaBitOrder.c
+++ b/xorg-server/hw/xfree86/xaa/xaaBitOrder.c
@@ -9,8 +9,8 @@
CARD32
XAAReverseBitOrder(CARD32 v)
{
- return (((0x01010101 & v) << 7) | ((0x02020202 & v) << 5) |
- ((0x04040404 & v) << 3) | ((0x08080808 & v) << 1) |
- ((0x10101010 & v) >> 1) | ((0x20202020 & v) >> 3) |
- ((0x40404040 & v) >> 5) | ((0x80808080 & v) >> 7));
+ return (((0x01010101 & v) << 7) | ((0x02020202 & v) << 5) |
+ ((0x04040404 & v) << 3) | ((0x08080808 & v) << 1) |
+ ((0x10101010 & v) >> 1) | ((0x20202020 & v) >> 3) |
+ ((0x40404040 & v) >> 5) | ((0x80808080 & v) >> 7));
}
diff --git a/xorg-server/hw/xfree86/xaa/xaacexp.h b/xorg-server/hw/xfree86/xaa/xaacexp.h
index 56bcda69a..6fde54c65 100644
--- a/xorg-server/hw/xfree86/xaa/xaacexp.h
+++ b/xorg-server/hw/xfree86/xaa/xaacexp.h
@@ -1,5 +1,4 @@
-
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
@@ -13,76 +12,76 @@
#endif
#if X_BYTE_ORDER == X_BIG_ENDIAN
-# define SHIFT_L(value, shift) ((value) >> (shift))
-# define SHIFT_R(value, shift) ((value) << (shift))
+#define SHIFT_L(value, shift) ((value) >> (shift))
+#define SHIFT_R(value, shift) ((value) << (shift))
#else
-# define SHIFT_L(value, shift) ((value) << (shift))
-# define SHIFT_R(value, shift) ((value) >> (shift))
+#define SHIFT_L(value, shift) ((value) << (shift))
+#define SHIFT_R(value, shift) ((value) >> (shift))
#endif
#ifndef MSBFIRST
-# ifdef FIXEDBASE
-# define WRITE_IN_BITORDER(dest, offset, data) *(dest) = data;
-# else
-# define WRITE_IN_BITORDER(dest, offset, data) *(dest + offset) = data;
-# endif
-#else
-# ifdef FIXEDBASE
-# define WRITE_IN_BITORDER(dest, offset, data) *(dest) = SWAP_BITS_IN_BYTES(data);
-# else
-# define WRITE_IN_BITORDER(dest, offset, data) *(dest + offset) = SWAP_BITS_IN_BYTES(data)
-# endif
+#ifdef FIXEDBASE
+#define WRITE_IN_BITORDER(dest, offset, data) *(dest) = data;
+#else
+#define WRITE_IN_BITORDER(dest, offset, data) *(dest + offset) = data;
+#endif
+#else
+#ifdef FIXEDBASE
+#define WRITE_IN_BITORDER(dest, offset, data) *(dest) = SWAP_BITS_IN_BYTES(data);
+#else
+#define WRITE_IN_BITORDER(dest, offset, data) *(dest + offset) = SWAP_BITS_IN_BYTES(data)
+#endif
#endif
#ifdef FIXEDBASE
-# ifdef MSBFIRST
-# define WRITE_BITS(b) *base = SWAP_BITS_IN_BYTES(b)
-# define WRITE_BITS1(b) { \
+#ifdef MSBFIRST
+#define WRITE_BITS(b) *base = SWAP_BITS_IN_BYTES(b)
+#define WRITE_BITS1(b) { \
*base = byte_reversed_expand3[(b) & 0xFF] | \
byte_reversed_expand3[((b) & 0xFF00) >> 8] << 24; }
-# define WRITE_BITS2(b) { \
+#define WRITE_BITS2(b) { \
*base = byte_reversed_expand3[(b) & 0xFF] | \
byte_reversed_expand3[((b) & 0xFF00) >> 8] << 24; \
*base = byte_reversed_expand3[((b) & 0xFF00) >> 8] >> 8 | \
byte_reversed_expand3[((b) & 0xFF0000) >> 16] << 16; }
-# define WRITE_BITS3(b) { \
+#define WRITE_BITS3(b) { \
*base = byte_reversed_expand3[(b) & 0xFF] | \
byte_reversed_expand3[((b) & 0xFF00) >> 8] << 24; \
*base = byte_reversed_expand3[((b) & 0xFF00) >> 8] >> 8 | \
byte_reversed_expand3[((b) & 0xFF0000) >> 16] << 16; \
*base = byte_reversed_expand3[((b) & 0xFF0000) >> 16] >> 16 | \
byte_reversed_expand3[((b) & 0xFF000000) >> 24] << 8; }
-# else
-# define WRITE_BITS(b) *base = (b)
-# define WRITE_BITS1(b) { \
+#else
+#define WRITE_BITS(b) *base = (b)
+#define WRITE_BITS1(b) { \
*base = byte_expand3[(b) & 0xFF] | \
byte_expand3[((b) & 0xFF00) >> 8] << 24; }
-# define WRITE_BITS2(b) { \
+#define WRITE_BITS2(b) { \
*base = byte_expand3[(b) & 0xFF] | \
byte_expand3[((b) & 0xFF00) >> 8] << 24; \
*base = byte_expand3[((b) & 0xFF00) >> 8] >> 8 | \
byte_expand3[((b) & 0xFF0000) >> 16] << 16; }
-# define WRITE_BITS3(b) { \
+#define WRITE_BITS3(b) { \
*base = byte_expand3[(b) & 0xFF] | \
byte_expand3[((b) & 0xFF00) >> 8] << 24; \
*base = byte_expand3[((b) & 0xFF00) >> 8] >> 8 | \
byte_expand3[((b) & 0xFF0000) >> 16] << 16; \
*base = byte_expand3[((b) & 0xFF0000) >> 16] >> 16 | \
byte_expand3[((b) & 0xFF000000) >> 24] << 8; }
-# endif
+#endif
#else
-# ifdef MSBFIRST
-# define WRITE_BITS(b) *(base++) = SWAP_BITS_IN_BYTES(b)
-# define WRITE_BITS1(b) { \
+#ifdef MSBFIRST
+#define WRITE_BITS(b) *(base++) = SWAP_BITS_IN_BYTES(b)
+#define WRITE_BITS1(b) { \
*(base++) = byte_reversed_expand3[(b) & 0xFF] | \
byte_reversed_expand3[((b) & 0xFF00) >> 8] << 24; }
-# define WRITE_BITS2(b) { \
+#define WRITE_BITS2(b) { \
*(base) = byte_reversed_expand3[(b) & 0xFF] | \
byte_reversed_expand3[((b) & 0xFF00) >> 8] << 24; \
*(base + 1) = byte_reversed_expand3[((b) & 0xFF00) >> 8] >> 8 | \
byte_reversed_expand3[((b) & 0xFF0000) >> 16] << 16; \
base += 2; }
-# define WRITE_BITS3(b) { \
+#define WRITE_BITS3(b) { \
*(base) = byte_reversed_expand3[(b) & 0xFF] | \
byte_reversed_expand3[((b) & 0xFF00) >> 8] << 24; \
*(base + 1) = byte_reversed_expand3[((b) & 0xFF00) >> 8] >> 8 | \
@@ -90,18 +89,18 @@
*(base + 2) = byte_reversed_expand3[((b) & 0xFF0000) >> 16] >> 16 | \
byte_reversed_expand3[((b) & 0xFF000000) >> 24] << 8; \
base += 3; }
-# else
-# define WRITE_BITS(b) *(base++) = (b)
-# define WRITE_BITS1(b) { \
+#else
+#define WRITE_BITS(b) *(base++) = (b)
+#define WRITE_BITS1(b) { \
*(base++) = byte_expand3[(b) & 0xFF] | \
byte_expand3[((b) & 0xFF00) >> 8] << 24; }
-# define WRITE_BITS2(b) { \
+#define WRITE_BITS2(b) { \
*(base) = byte_expand3[(b) & 0xFF] | \
byte_expand3[((b) & 0xFF00) >> 8] << 24; \
*(base + 1) = byte_expand3[((b) & 0xFF00) >> 8] >> 8 | \
byte_expand3[((b) & 0xFF0000) >> 16] << 16; \
base += 2; }
-# define WRITE_BITS3(b) { \
+#define WRITE_BITS3(b) { \
*(base) = byte_expand3[(b) & 0xFF] | \
byte_expand3[((b) & 0xFF00) >> 8] << 24; \
*(base + 1) = byte_expand3[((b) & 0xFF00) >> 8] >> 8 | \
@@ -109,19 +108,19 @@
*(base + 2) = byte_expand3[((b) & 0xFF0000) >> 16] >> 16 | \
byte_expand3[((b) & 0xFF000000) >> 24] << 8; \
base += 3; }
-# endif
+#endif
#endif
#ifdef FIXEDBASE
-# ifdef MSBFIRST
-# define EXPNAME(x) x##MSBFirstFixedBase
-# else
-# define EXPNAME(x) x##LSBFirstFixedBase
-# endif
+#ifdef MSBFIRST
+#define EXPNAME(x) x##MSBFirstFixedBase
#else
-# ifdef MSBFIRST
-# define EXPNAME(x) x##MSBFirst
-# else
-# define EXPNAME(x) x##LSBFirst
-# endif
+#define EXPNAME(x) x##LSBFirstFixedBase
+#endif
+#else
+#ifdef MSBFIRST
+#define EXPNAME(x) x##MSBFirst
+#else
+#define EXPNAME(x) x##LSBFirst
+#endif
#endif
diff --git a/xorg-server/hw/xfree86/xaa/xaawrap.h b/xorg-server/hw/xfree86/xaa/xaawrap.h
index 1b7595e95..2d2d7881a 100644
--- a/xorg-server/hw/xfree86/xaa/xaawrap.h
+++ b/xorg-server/hw/xfree86/xaa/xaawrap.h
@@ -1,79 +1,75 @@
-
-#define XAA_SCREEN_PROLOGUE(pScreen, field)\
- ((pScreen)->field = \
- ((XAAScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAGetScreenKey()))->field)
-
-#define XAA_SCREEN_EPILOGUE(pScreen, field, wrapper)\
- ((pScreen)->field = wrapper)
-
-
-#define XAA_GC_FUNC_PROLOGUE(pGC)\
- XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
- (pGC)->funcs = pGCPriv->wrapFuncs;\
- if(pGCPriv->flags)\
- (pGC)->ops = pGCPriv->wrapOps
-
-#define XAA_GC_FUNC_EPILOGUE(pGC)\
- pGCPriv->wrapFuncs = (pGC)->funcs;\
- (pGC)->funcs = &XAAGCFuncs;\
- if(pGCPriv->flags) {\
- pGCPriv->wrapOps = (pGC)->ops;\
- (pGC)->ops = (pGCPriv->flags & OPS_ARE_ACCEL) ? pGCPriv->XAAOps :\
- &XAAPixmapOps;\
- }
-
-
-#define XAA_GC_OP_PROLOGUE(pGC)\
- XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
- GCFuncs *oldFuncs = pGC->funcs;\
- pGC->funcs = pGCPriv->wrapFuncs;\
- pGC->ops = pGCPriv->wrapOps
-
-#define XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC)\
- XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
- GCFuncs *oldFuncs = pGC->funcs;\
- if(!RegionNumRects(pGC->pCompositeClip)) return; \
- pGC->funcs = pGCPriv->wrapFuncs;\
- pGC->ops = pGCPriv->wrapOps
-
-
-#define XAA_GC_OP_EPILOGUE(pGC)\
- pGCPriv->wrapOps = pGC->ops;\
- pGC->funcs = oldFuncs;\
- pGC->ops = pGCPriv->XAAOps
-
-
-#define XAA_PIXMAP_OP_PROLOGUE(pGC, pDraw)\
- XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
- XAAPixmapPtr pixPriv = XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pDraw));\
- GCFuncs *oldFuncs = pGC->funcs;\
- pGC->funcs = pGCPriv->wrapFuncs;\
- pGC->ops = pGCPriv->wrapOps; \
- SYNC_CHECK(pGC)
-
-#define XAA_PIXMAP_OP_EPILOGUE(pGC)\
- pGCPriv->wrapOps = pGC->ops;\
- pGC->funcs = oldFuncs;\
- pGC->ops = &XAAPixmapOps;\
- pixPriv->flags |= DIRTY
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#define XAA_RENDER_PROLOGUE(pScreen,field)\
- (GetPictureScreen(pScreen)->field = \
- ((XAAScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAGetScreenKey()))->field)
-
-#define XAA_RENDER_EPILOGUE(pScreen, field, wrapper)\
- (GetPictureScreen(pScreen)->field = wrapper)
-
-/* This also works fine for drawables */
-
-#define SYNC_CHECK(pGC) {\
- XAAInfoRecPtr infoRec =\
-((XAAScreenPtr)dixLookupPrivate(&(pGC)->pScreen->devPrivates, XAAGetScreenKey()))->AccelInfoRec; \
- if(infoRec->NeedToSync) {\
- (*infoRec->Sync)(infoRec->pScrn);\
- infoRec->NeedToSync = FALSE;\
- }}
+
+#define XAA_SCREEN_PROLOGUE(pScreen, field)\
+ ((pScreen)->field = \
+ ((XAAScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAGetScreenKey()))->field)
+
+#define XAA_SCREEN_EPILOGUE(pScreen, field, wrapper)\
+ ((pScreen)->field = wrapper)
+
+#define XAA_GC_FUNC_PROLOGUE(pGC)\
+ XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
+ (pGC)->funcs = pGCPriv->wrapFuncs;\
+ if(pGCPriv->flags)\
+ (pGC)->ops = pGCPriv->wrapOps
+
+#define XAA_GC_FUNC_EPILOGUE(pGC)\
+ pGCPriv->wrapFuncs = (pGC)->funcs;\
+ (pGC)->funcs = &XAAGCFuncs;\
+ if(pGCPriv->flags) {\
+ pGCPriv->wrapOps = (pGC)->ops;\
+ (pGC)->ops = (pGCPriv->flags & OPS_ARE_ACCEL) ? pGCPriv->XAAOps :\
+ &XAAPixmapOps;\
+ }
+
+#define XAA_GC_OP_PROLOGUE(pGC)\
+ XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
+ GCFuncs *oldFuncs = pGC->funcs;\
+ pGC->funcs = pGCPriv->wrapFuncs;\
+ pGC->ops = pGCPriv->wrapOps
+
+#define XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC)\
+ XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
+ GCFuncs *oldFuncs = pGC->funcs;\
+ if(!RegionNumRects(pGC->pCompositeClip)) return; \
+ pGC->funcs = pGCPriv->wrapFuncs;\
+ pGC->ops = pGCPriv->wrapOps
+
+#define XAA_GC_OP_EPILOGUE(pGC)\
+ pGCPriv->wrapOps = pGC->ops;\
+ pGC->funcs = oldFuncs;\
+ pGC->ops = pGCPriv->XAAOps
+
+#define XAA_PIXMAP_OP_PROLOGUE(pGC, pDraw)\
+ XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
+ XAAPixmapPtr pixPriv = XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pDraw));\
+ GCFuncs *oldFuncs = pGC->funcs;\
+ pGC->funcs = pGCPriv->wrapFuncs;\
+ pGC->ops = pGCPriv->wrapOps; \
+ SYNC_CHECK(pGC)
+
+#define XAA_PIXMAP_OP_EPILOGUE(pGC)\
+ pGCPriv->wrapOps = pGC->ops;\
+ pGC->funcs = oldFuncs;\
+ pGC->ops = &XAAPixmapOps;\
+ pixPriv->flags |= DIRTY
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#define XAA_RENDER_PROLOGUE(pScreen,field)\
+ (GetPictureScreen(pScreen)->field = \
+ ((XAAScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAGetScreenKey()))->field)
+
+#define XAA_RENDER_EPILOGUE(pScreen, field, wrapper)\
+ (GetPictureScreen(pScreen)->field = wrapper)
+
+/* This also works fine for drawables */
+
+#define SYNC_CHECK(pGC) {\
+ XAAInfoRecPtr infoRec =\
+((XAAScreenPtr)dixLookupPrivate(&(pGC)->pScreen->devPrivates, XAAGetScreenKey()))->AccelInfoRec; \
+ if(infoRec->NeedToSync) {\
+ (*infoRec->Sync)(infoRec->pScrn);\
+ infoRec->NeedToSync = FALSE;\
+ }}