XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks

parent 4a0967d9
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/osdef.h,v 1.2 2003/02/10 01:14:16 tsi Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/osdef.h,v 1.5 2003/10/30 18:53:42 twini Exp $ */
/* OS depending defines */
/* The choices are: */
/* #define WINCE_HEADER */ /* Incomplete! */
/* #define WIN2000 */ /* Incomplete! */
/* #define TC */ /* Incomplete! */
/* #define LINUX_KERNEL */ /* Kernel framebuffer */
#define LINUX_XF86 /* XFree86 */
/**********************************************************************/
#ifdef LINUX_KERNEL /* ----------------------------*/
#include <linux/config.h>
#ifdef CONFIG_FB_SIS_300
#define SIS300
#endif
......@@ -21,62 +18,25 @@
#define SIS315H
#endif
#else /* if not LINUX_KERNEL --------------------- */
/* #define SIS300*/
#define SIS315H
#endif /* if LINUX_KERNEL ------------------------ */
#if 1
#define SISFBACCEL /* Include 2D acceleration */
#endif
#ifdef LINUX_XF86 /* Linux Xfree86 ---------------- */
#endif
#ifdef LINUX_XF86 /* ----------------------------- */
#define SIS300
/* #define SIS315H */ /* TW: done above */
#define SIS315H
#endif
/**********************************************************************/
#ifdef TC
#endif
#ifdef WIN2000
#endif
#ifdef WINCE_HEADER
#endif
#ifdef LINUX_XF86
#endif
#ifdef LINUX_KERNEL
#endif
/**********************************************************************/
#ifdef TC
#define SiS_SetMemory(MemoryAddress,MemorySize,value) memset(MemoryAddress, value, MemorySize);
#endif
#ifdef WIN2000
#define SiS_SetMemory(MemoryAddress,MemorySize,value) MemFill((PVOID) MemoryAddress,(ULONG) MemorySize,(UCHAR) value);
#endif
#ifdef WINCE_HEADER
#define SiS_SetMemory(MemoryAddress,MemorySize,value) memset(MemoryAddress, value, MemorySize);
#endif
#ifdef LINUX_XF86
#define SiS_SetMemory(MemoryAddress,MemorySize,value) memset(MemoryAddress, value, MemorySize)
#endif
#ifdef LINUX_KERNEL
#define SiS_SetMemory(MemoryAddress,MemorySize,value) memset(MemoryAddress, value, MemorySize)
#define SiS_MemoryCopy(Destination,Soruce,Length) memcpy(Destination,Soruce,Length)
#endif
/**********************************************************************/
/**********************************************************************/
#ifdef TC
#define SiS_MemoryCopy(Destination,Soruce,Length) memmove(Destination, Soruce, Length);
#endif
#ifdef WIN2000
#define SiS_MemoryCopy(Destination,Soruce,Length) /*VideoPortMoveMemory((PUCHAR)Destination , Soruce,length);*/
#endif
#ifdef WINCE_HEADER
#define SiS_MemoryCopy(Destination,Soruce,Length) memmove(Destination, Soruce, Length);
#endif
#ifdef LINUX_XF86
#define SiS_MemoryCopy(Destination,Soruce,Length) memcpy(Destination,Soruce,Length)
#endif
#ifdef LINUX_KERNEL
#define SiS_SetMemory(MemoryAddress,MemorySize,value) memset(MemoryAddress, value, MemorySize)
#define SiS_MemoryCopy(Destination,Soruce,Length) memcpy(Destination,Soruce,Length)
#endif
......@@ -107,31 +67,9 @@
#endif /* InPortLong */
/**********************************************************************/
/* TC */
/**********************************************************************/
#ifdef TC
#define OutPortByte(p,v) outp((unsigned short)(p),(unsigned char)(v))
#define OutPortWord(p,v) outp((unsigned short)(p),(unsigned short)(v))
#define OutPortLong(p,v) outp((unsigned short)(p),(unsigned long)(v))
#define InPortByte(p) inp((unsigned short)(p))
#define InPortWord(p) inp((unsigned short)(p))
#define InPortLong(p) ((inp((unsigned short)(p+2))<<16) | inp((unsigned short)(p)))
#endif
/**********************************************************************/
/* LINUX XF86 */
/* LINUX KERNEL */
/**********************************************************************/
#ifdef LINUX_XF86
#define OutPortByte(p,v) outb((CARD16)(p),(CARD8)(v))
#define OutPortWord(p,v) outw((CARD16)(p),(CARD16)(v))
#define OutPortLong(p,v) outl((CARD16)(p),(CARD32)(v))
#define InPortByte(p) inb((CARD16)(p))
#define InPortWord(p) inw((CARD16)(p))
#define InPortLong(p) inl((CARD16)(p))
#endif
#ifdef LINUX_KERNEL
#define OutPortByte(p,v) outb((u8)(v),(u16)(p))
#define OutPortWord(p,v) outw((u16)(v),(u16)(p))
......@@ -142,28 +80,15 @@
#endif
/**********************************************************************/
/* WIN 2000 */
/* LINUX XF86 */
/**********************************************************************/
#ifdef WIN2000
#define OutPortByte(p,v) VideoPortWritePortUchar ((PUCHAR) (p), (UCHAR) (v))
#define OutPortWord(p,v) VideoPortWritePortUshort((PUSHORT) (p), (USHORT) (v))
#define OutPortLong(p,v) VideoPortWritePortUlong ((PULONG) (p), (ULONG) (v))
#define InPortByte(p) VideoPortReadPortUchar ((PUCHAR) (p))
#define InPortWord(p) VideoPortReadPortUshort ((PUSHORT) (p))
#define InPortLong(p) VideoPortReadPortUlong ((PULONG) (p))
#ifdef LINUX_XF86
#define OutPortByte(p,v) outb((IOADDRESS)(p),(CARD8)(v))
#define OutPortWord(p,v) outw((IOADDRESS)(p),(CARD16)(v))
#define OutPortLong(p,v) outl((IOADDRESS)(p),(CARD32)(v))
#define InPortByte(p) inb((IOADDRESS)(p))
#define InPortWord(p) inw((IOADDRESS)(p))
#define InPortLong(p) inl((IOADDRESS)(p))
#endif
/**********************************************************************/
/* WIN CE */
/**********************************************************************/
#ifdef WINCE_HEADER
#define OutPortByte(p,v) WRITE_PORT_UCHAR ((PUCHAR) (p), (UCHAR) (v))
#define OutPortWord(p,v) WRITE_PORT_USHORT((PUSHORT) (p), (USHORT) (v))
#define OutPortLong(p,v) WRITE_PORT_ULONG ((PULONG) (p), (ULONG) (v))
#define InPortByte(p) READ_PORT_UCHAR ((PUCHAR) (p))
#define InPortWord(p) READ_PORT_USHORT ((PUSHORT) (p))
#define InPortLong(p) READ_PORT_ULONG ((PULONG) (p))
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/sis_accel.c,v 1.25 2003/01/29 15:42:16 eich Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/sis_accel.c,v 1.34 2003/11/03 17:02:52 twini Exp $ */
/*
* 2D acceleration for SiS5597/5598 and 6326
*
* Copyright 1998,1999 by Alan Hourihane, Wigan, England.
* Parts Copyright 2002 Thomas Winischhofer, Vienna, Austria.
* Parts Copyright 2002-2003 Thomas Winischhofer, Vienna, Austria.
*
* 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
* 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. Alan Hourihane makes no representations
* 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.
*
* ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* THE COPYRIGHT HOLDER 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
* 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
......@@ -212,7 +214,7 @@ SiSAccelInit(ScreenPtr pScreen)
if(AvailFBArea.y2 < pScrn->currentMode->VDisplay) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"Not enough video RAM for accelerator. At least "
"%dKB needed, %dKB available\n",
"%dKB needed, %ldKB available\n",
((((pScrn->displayWidth * pScrn->bitsPerPixel/8) /* TW: +8 for make it sure */
* pScrn->currentMode->VDisplay) + reservedFbSize) / 1024) + 8,
pSiS->maxxfbmem/1024);
......@@ -257,6 +259,7 @@ static void SiSDisableClipping (ScrnInfoPtr pScrn)
pSiS->ClipEnabled = FALSE;
}
#ifdef CTSCE
static const int sisALUConv[] =
{
0x00, /* dest = 0; 0, GXclear, 0 */
......@@ -296,7 +299,7 @@ static const int sisPatALUConv[] =
0x5F, /* dest = ~src|~dest; DPan, GXnand, 0xE */
0xFF, /* dest = 0xFF; 1, GXset, 0xF */
};
#endif
/* Screen to screen copy */
static void
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment