Commit 515b943c authored by Thomas Winischhofer's avatar Thomas Winischhofer

SiS driver update 2004/06/17

parent dccd124b
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.
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/sis300_accel.h,v 1.13 2003/08/23 10:25:19 twini Exp $ */ /* $XFree86$ */
/* $XdotOrg$ */
/* /*
* 2D Acceleration for SiS300, SiS540, SiS630, SiS730, SiS530, SiS620 * 2D Acceleration for SiS 530, 620, 300, 540, 630, 730.
* Definitions for the SIS engine communication * Definitions for the SIS engine communication
* *
* Copyright Xavier Ducoin <x.ducoin@lectra.com> * Copyright (C) 2001-2004 by Thomas Winischhofer, Vienna, Austria
* Copyright 2002, 2003 by Thomas Winischhofer, Vienna, Austria
* *
* Permission to use, copy, modify, distribute, and sell this software and its * Redistribution and use in source and binary forms, with or without
* documentation for any purpose is hereby granted without fee, provided that * modification, are permitted provided that the following conditions
* the above copyright notice appear in all copies and that both that * are met:
* copyright notice and this permission notice appear in supporting * 1) Redistributions of source code must retain the above copyright
* documentation, and that the name of the copyright holder not be used in * notice, this list of conditions and the following disclaimer.
* advertising or publicity pertaining to distribution of the software without * 2) Redistributions in binary form must reproduce the above copyright
* specific, written prior permission. The copyright holder makes no representations * notice, this list of conditions and the following disclaimer in the
* about the suitability of this software for any purpose. It is provided * documentation and/or other materials provided with the distribution.
* "as is" without express or implied warranty. * 3) The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
* *
* THE COPYRIGHT HOLDER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, INDIRECT OR * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* PERFORMANCE OF THIS SOFTWARE. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Authors: * Authors: Thomas Winischhofer <thomas@winischhofer.net>
* * Can-Ru Yeou, SiS Inc. (code base)
* Xavier Ducoin <x.ducoin@lectra.com>
* Thomas Winischhofer <thomas@winischhofer.net>
* *
*/ */
...@@ -116,7 +118,7 @@ ...@@ -116,7 +118,7 @@
while( (MMIO_IN16(pSiS->IOBase, BR(16)+2) & 0xE000) != 0xE000){}; \ while( (MMIO_IN16(pSiS->IOBase, BR(16)+2) & 0xE000) != 0xE000){}; \
CmdQueLen = (MMIO_IN16(pSiS->IOBase, 0x8240) & pSiS->CmdQueLenMask) - pSiS->CmdQueLenFix; \ CmdQueLen = (MMIO_IN16(pSiS->IOBase, 0x8240) & pSiS->CmdQueLenMask) - pSiS->CmdQueLenFix; \
} }
/* TW: (do three times, because 2D engine seems quite unsure about whether or not it's idle) */ /* (do three times, because 2D engine seems quite unsure about whether or not it's idle) */
#define SiSSetupSRCBase(base) \ #define SiSSetupSRCBase(base) \
if (CmdQueLen <= 0) SiSIdle;\ if (CmdQueLen <= 0) SiSIdle;\
...@@ -229,6 +231,7 @@ ...@@ -229,6 +231,7 @@
} else { \ } else { \
unsigned long temp; \ unsigned long temp; \
temp = MMIO_IN32(pSiS->IOBase, BR(16)); \ temp = MMIO_IN32(pSiS->IOBase, BR(16)); \
(void) temp; \
} \ } \
/* Line */ /* Line */
...@@ -262,7 +265,7 @@ ...@@ -262,7 +265,7 @@
MMIO_OUT32(pSiS->IOBase, BR(12), ls);\ MMIO_OUT32(pSiS->IOBase, BR(12), ls);\
CmdQueLen--; CmdQueLen--;
/* TW: Trapezoid */ /* Trapezoid */
#define SiSSetupYH(y,h) \ #define SiSSetupYH(y,h) \
if (CmdQueLen <= 0) SiSIdle;\ if (CmdQueLen <= 0) SiSIdle;\
MMIO_OUT32(pSiS->IOBase, 0x8208, (y)<<16 | (h) );\ MMIO_OUT32(pSiS->IOBase, 0x8208, (y)<<16 | (h) );\
......
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_common.h,v 1.1 2003/08/29 08:52:12 twini Exp $ */ /* $XFree86$ */
/* $XdotOrg$ */
/* /*
* Common header definitions for SiS 2D/3D/DRM suite * Common header definitions for SiS 2D/3D/DRM suite
* *
...@@ -6,16 +7,16 @@ ...@@ -6,16 +7,16 @@
* *
* Permission to use, copy, modify, distribute, and sell this software and its * Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that * documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that * the above copyright notice appears in all copies and that both that copyright
* copyright notice and this permission notice appear in supporting * notice and this permission notice appear in supporting documentation, and
* documentation, and that the name of the copyright holder not be used in * and that the name of the copyright holder not be used in advertising
* advertising or publicity pertaining to distribution of the software without * or publicity pertaining to distribution of the software without specific,
* specific, written prior permission. The copyright holder makes no representations * written prior permission. The copyright holder makes no representations
* about the suitability of this software for any purpose. It is provided * 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, * 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 * EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
......
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$ */ /* $XFree86$ */
/* $XdotOrg$ */
/* /*
* SiS DRI wrapper * SiS DRI wrapper
* *
...@@ -36,6 +37,19 @@ ...@@ -36,6 +37,19 @@
#include "xf86drm.h" #include "xf86drm.h"
#if 0
#ifndef DRI_VERSION_CURRENT
#define drm_handle_t drmHandle
#define drm_context_t drmContext
#endif
#ifdef DRI_VERSION_CURRENT
#if DRI_VERSION_CURRENT < DRI_VERSION_NUMERIC(?,?,?,?)
#define drm_handle_t drmHandle
#define drm_context_t drmContext
#endif
#endif
#endif
#define SIS_MAX_DRAWABLES 256 #define SIS_MAX_DRAWABLES 256
#define SISIOMAPSIZE (64*1024) #define SISIOMAPSIZE (64*1024)
......
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