aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/ramdac
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-04-16 09:17:34 +0200
committermarha <marha@users.sourceforge.net>2012-04-16 09:17:34 +0200
commitd6d3999ccb2cb72d55820770260172eccbbb68d7 (patch)
tree568ce82dd1a8e2edbbe8cd4cb5ab5b14157f34f6 /xorg-server/hw/xfree86/ramdac
parentfffd436e9c2ec6f5aa501ee57d0e4ade7293ee60 (diff)
downloadvcxsrv-d6d3999ccb2cb72d55820770260172eccbbb68d7.tar.gz
vcxsrv-d6d3999ccb2cb72d55820770260172eccbbb68d7.tar.bz2
vcxsrv-d6d3999ccb2cb72d55820770260172eccbbb68d7.zip
libX11 xserver pixman mesa git update 16 Apr 2012
Diffstat (limited to 'xorg-server/hw/xfree86/ramdac')
-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
7 files changed, 236 insertions, 235 deletions
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);