summaryrefslogtreecommitdiff
path: root/src/sis_accel.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/sis_accel.h')
-rw-r--r--src/sis_accel.h82
1 files changed, 18 insertions, 64 deletions
diff --git a/src/sis_accel.h b/src/sis_accel.h
index 5fe9a33..2a3f2fa 100644
--- a/src/sis_accel.h
+++ b/src/sis_accel.h
@@ -1,35 +1,38 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/sis_accel.h,v 1.6 2003/06/26 22:35:17 twini Exp $ */
+/* $XFree86$ */
+/* $XdotOrg$ */
/*
* 2D acceleration for 5597/5598 and 6326
* Definitions for the SIS engine communication
*
- * Copyright 1998,1999 by Alan Hourihane, Wigan, England.
- * Parts Copyright 2002,2003 Thomas Winischhofer, Vienna, Austria.
+ * Copyright (C) 1998, 1999 by Alan Hourihane, Wigan, England.
+ * Parts Copyright (C) 2001-2004 Thomas Winischhofer, Vienna, Austria.
+ *
+ * Licensed under the following terms:
*
* 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 the copyright holder not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. The copyright holder makes no representations
+ * the above copyright notice appears in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * and that the name of the copyright holder not be used in advertising
+ * or publicity pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holder makes no representations
* about the suitability of this software for any purpose. It is provided
- * "as is" without express or implied warranty.
+ * "as is" without expressed or implied warranty.
*
* THE COPYRIGHT HOLDER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
* EVENT SHALL THE COPYRIGHT HOLDER 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
+ * Authors: Alan Hourihane <alanh@fairlite.demon.co.uk>,
* Mike Chapman <mike@paranoia.com>,
* Juanjo Santamarta <santamarta@ctv.es>,
- * Mitani Hiroshi <hmitani@drl.mei.co.jp>
- * David Thomas <davtom@dream.org.uk>
- * Thomas Winischhofer <thomas@winischhofer.net>
+ * Mitani Hiroshi <hmitani@drl.mei.co.jp>,
+ * David Thomas <davtom@dream.org.uk>,
+ * Thomas Winischhofer <thomas@winischhofer.net>.
*/
@@ -116,6 +119,7 @@ const int sisReg32MMIO[] = {
unsigned long temp; \
MMIO_OUT16(pSiS->IOBase, BR(10) + 2, op); \
temp = MMIO_IN32(pSiS->IOBase, BR(10)); \
+ (void)temp; \
}
/* set foreground color and fg ROP */
@@ -129,29 +133,17 @@ const int sisReg32MMIO[] = {
/* background color */
#define sisSETBGCOLOR(bgColor) \
MMIO_OUT32(pSiS->IOBase, BR(5), (bgColor));
-#if 0
- *(volatile unsigned int *)(pSiS->IOBase + BR(5)) = (bgColor)
-#endif
/* foreground color */
#define sisSETFGCOLOR(fgColor) \
MMIO_OUT32(pSiS->IOBase, BR(4), (fgcolor));
-#if 0
- *(volatile unsigned int *)(pSiS->IOBase + BR(4)) = (fgColor)
-#endif
/* ROP */
#define sisSETROPFG(op) \
MMIO_OUT8(pSiS->IOBase, BR(4) + 3, op);
-#if 0
- *(volatile unsigned int *)(pSiS->IOBase + BR(4)) = ((*(volatile unsigned int *)(pSiS->IOBase + BR(4)))&0xffffff) | (op<<24)
-#endif
#define sisSETROPBG(op) \
MMIO_OUT8(pSiS->IOBase, BR(5) + 3, op);
-#if 0
- *(volatile unsigned int *)(pSiS->IOBase + BR(5)) = ((*(volatile unsigned int *)(pSiS->IOBase + BR(5)))&0xffffff) | (op<<24)
-#endif
#define sisSETROP(op) \
sisSETROPFG(op); sisSETROPBG(op);
@@ -159,23 +151,13 @@ const int sisReg32MMIO[] = {
/* source and dest address */
#define sisSETSRCADDR(srcAddr) \
MMIO_OUT32(pSiS->IOBase, BR(0), (srcAddr & 0x3FFFFFL));
-#if 0
- *(volatile unsigned int *)(pSiS->IOBase + BR(0)) = srcAddr & 0x3FFFFFL
-#endif
#define sisSETDSTADDR(dstAddr) \
MMIO_OUT32(pSiS->IOBase, BR(1), (dstAddr & 0x3FFFFFL));
-#if 0
- *(volatile unsigned int *)(pSiS->IOBase + BR(1)) = dstAddr & 0x3FFFFFL
-#endif
/* pitch */
#define sisSETPITCH(srcPitch,dstPitch) \
MMIO_OUT32(pSiS->IOBase, BR(2), ((((dstPitch) & 0xFFFF) << 16) | ((srcPitch) & 0xFFFF)));
-#if 0
- *(volatile unsigned int *)(pSiS->IOBase + BR(2)) = ((dstPitch&0xFFFF)<<16)| \
- (srcPitch&0xFFFF)
-#endif
#define sisSETSRCPITCH(srcPitch) \
MMIO_OUT16(pSiS->IOBase, BR(2), ((srcPitch) & 0xFFFF));
@@ -189,54 +171,26 @@ const int sisReg32MMIO[] = {
*/
#define sisSETHEIGHTWIDTH(Height, Width) \
MMIO_OUT32(pSiS->IOBase, BR(3), ((((Height) & 0xFFFF) << 16) | ((Width) & 0xFFFF)));
-#if 0
- *(volatile unsigned int *)(pSiS->IOBase + BR(3)) = (((Height)&0xFFFF)<<16)| \
- ((Width)&0xFFFF)
-#endif
/* Clipping */
#define sisSETCLIPTOP(x, y) \
MMIO_OUT32(pSiS->IOBase, BR(8), ((((y) & 0xFFFF) << 16) | ((x) & 0xFFFF)));
-#if 0
- *(volatile unsigned int *)(pSiS->IOBase + BR(8)) = (((y)&0xFFFF)<<16)| \
- ((x)&0xFFFF)
-#endif
#define sisSETCLIPBOTTOM(x, y) \
MMIO_OUT32(pSiS->IOBase, BR(9), ((((y) & 0xFFFF) << 16) | ((x) & 0xFFFF)));
-#if 0
- *(volatile unsigned int *)(pSiS->IOBase + BR(9)) = (((y)&0xFFFF)<<16)| \
- ((x)&0xFFFF)
-#endif
/* Line drawing */
#define sisSETXStart(XStart) \
MMIO_OUT32(pSiS->IOBase, BR(0), ((XStart) & 0xFFFF));
-#if 0
- *(volatile unsigned int *)(pSiS->IOBase + BR(0)) = XStart&0xFFFF
-#endif
#define sisSETYStart(YStart) \
MMIO_OUT32(pSiS->IOBase, BR(1), ((YStart) & 0xFFFF));
-#if 0
- *(volatile unsigned int *)(pSiS->IOBase + BR(1)) = YStart&0xFFFF
-#endif
#define sisSETLineMajorCount(MajorAxisCount) \
MMIO_OUT32(pSiS->IOBase, BR(3), ((MajorAxisCount) & 0xFFFF));
-#if 0
- *(volatile unsigned int *)(pSiS->IOBase + BR(3)) = MajorAxisCount&0xFFFF
-#endif
#define sisSETLineSteps(K1,K2) \
MMIO_OUT32(pSiS->IOBase, BR(6), ((((K1) & 0xFFFF) << 16) | ((K2) & 0xFFFF)));
-#if 0
- *(volatile unsigned int *)(pSiS->IOBase + BR(6)) = (((K1)&0xFFFF)<<16)| \
- ((K2)&0xFFFF)
-#endif
#define sisSETLineErrorTerm(ErrorTerm) \
MMIO_OUT16(pSiS->IOBase, BR(7), (ErrorTerm));
-#if 0
- *(volatile unsigned short *)(pSiS->IOBase + BR(7)) = ErrorTerm
-#endif