diff options
author | dawes <dawes> | 2000-11-08 00:06:24 +0000 |
---|---|---|
committer | dawes <dawes> | 2000-11-08 00:06:24 +0000 |
commit | bc9d002299a38f40073b455ab00a382510a82485 (patch) | |
tree | 992568d20d107747e284c8a4763e2193153daecc | |
parent | 38b17cc33454f7fb15124f3d6662db17742608b1 (diff) |
merge with 4.0.1dX_4_0_1d-20001107-merge
326 files changed, 12565 insertions, 11152 deletions
diff --git a/xc/config/cf/X11.tmpl b/xc/config/cf/X11.tmpl index 9bd5711f0..3ade6a7f7 100644 --- a/xc/config/cf/X11.tmpl +++ b/xc/config/cf/X11.tmpl @@ -5,7 +5,7 @@ XCOMM XCOMM XCOMM XCOMM -XCOMM $XFree86: xc/config/cf/X11.tmpl,v 1.75 2000/08/26 16:37:55 keithp Exp $ +XCOMM $XFree86: xc/config/cf/X11.tmpl,v 1.78 2000/10/24 18:07:33 dawes Exp $ /*************************************************************************** * * @@ -52,6 +52,9 @@ XCOMM $XFree86: xc/config/cf/X11.tmpl,v 1.75 2000/08/26 16:37:55 keithp Exp $ #ifndef BuildFontServer #define BuildFontServer YES #endif +#ifndef XserverStaticFontLib +#define XserverStaticFontLib YES +#endif #ifndef BuildSpeedo #define BuildSpeedo YES #endif @@ -304,6 +307,9 @@ XCOMM $XFree86: xc/config/cf/X11.tmpl,v 1.75 2000/08/26 16:37:55 keithp Exp $ #ifndef BuildRenderLibrary #define BuildRenderLibrary BuildRender #endif +#ifndef BuildXftLibrary +#define BuildXftLibrary BuildRenderLibrary && defined(Freetype2Dir) +#endif #ifndef BuildMiscDocs #define BuildMiscDocs NO @@ -1464,7 +1470,25 @@ ProjectUnsharedLibReferences(XTHRSTUB,XThrStub,$(XTHRSTUBSRC),XBuildLibDir) #undef LinkGLToUsrInclude #define LinkGLToUsrInclude NO #endif +/* + * Don't make a shared GLw library because is would depend on Motif. + */ +#ifndef SharedLibGLw +#define SharedLibGLw NO /* HasSharedLibraries */ +#endif +#ifndef NormalLibGLw +#define NormalLibGLw YES /* (!SharedLibGLw | ForceNormalLib) */ +#endif +#ifndef DebugLibGLw +#define DebugLibGLw NO /* debugged widget library */ +#endif +#ifndef ProfileLibGLw +#define ProfileLibGLw NO /* profiled widget library */ #endif +#ifndef GLwUseXmStubs +#define GLwUseXmStubs NO /* create stub (weak) Motif symbols */ +#endif +#endif /* BuildGLXLibrary */ #ifndef SharedLibXext #define SharedLibXext HasSharedLibraries @@ -1636,7 +1660,16 @@ SharedLibReferences(GLX,GL,$(GLXLIBSRC),SOGLREV,SharedGlxRev) #else ProjectUnsharedLibReferences(GLX,GL,$(GLXLIBSRC),XBuildLibDir) #endif + GLWIDGETSRC = $(LIBSRC)/GLw +#if SharedLibGLw +#ifndef SharedGLwRev +#define SharedGLwRev 1.0 /* used to name the shared library */ +#endif +SharedDSLibReferences(GLW,GLw,$(GLWIDGETSRC),SOGLWREV,SharedGLwRev) +#else +ProjectUnsharedLibReferences(GLW,GLw,$(GLWIDGETSRC),XBuildLibDir) #endif +#endif /* BuildGLXLibrary */ #if BuildRenderLibrary XRENDERLIBSRC = $(LIBSRC)/Xrender @@ -2080,7 +2113,7 @@ ProjectUnsharedLibReferences(FS,FS,$(FSLIBSRC),XBuildLibDir) #define SharedLibFont HasSharedLibraries #endif #ifndef NormalLibFont -#define NormalLibFont (!SharedLibFont | ForceNormalLib) +#define NormalLibFont (!SharedLibFont | ForceNormalLib | XserverStaticFontLib) #endif #ifndef DebugLibFont #define DebugLibFont NO /* debugged Font library */ @@ -2127,6 +2160,53 @@ SharedLibReferences(XPM,Xpm,$(XPMLIBSRC),SOXPMREV,SharedXpmRev) ProjectUnsharedLibReferences(XPM,Xpm,$(XPMLIBSRC),XBuildLibDir) #endif +#ifndef SharedLibXft +#define SharedLibXft HasSharedLibraries +#endif +#ifndef NormalLibXft +#define NormalLibXft (!SharedLibXft | ForceNormalLib) +#endif +#ifndef DebugLibXft +#define DebugLibXft NO +#endif +#ifndef ProfileLibXft +#define ProfileLibXft NO +#endif + XFTLIBSRC = $(LIBSRC)/Xft +#if SharedLibXft +#ifndef SharedXftRev +#define SharedXftRev 1.0 +#endif +SharedLibReferences(XFT,Xft,$(XFTLIBSRC),SOXFTREV,SharedXftRev) +#else +ProjectUnsharedLibReferences(XFT,Xft,$(XFTLIBSRC),XBuildLibDir) +#endif + +#ifdef Freetype2Dir +#ifndef Freetype2LibDir +#define Freetype2LibDir Freetype2Dir/lib +#endif + +#ifndef Freetype2IncDir +#define Freetype2IncDir Freetype2Dir/include +#endif + +FREETYPE2DIR = Freetype2Dir +FREETYPE2LIBDIR = Freetype2LibDir +FREETYPE2INCDIR = Freetype2IncDir +FREETYPE2INCLUDES = -I$(FREETYPE2INCDIR) +FREETYPE2LIB = -L$(FREETYPE2DIR)/lib -lfreetype +FREETYPE2DEFINES = -DFREETYPE2 + +#endif + +#ifndef XftClientDepLibs +#define XftClientDepLibs $(DEPXFTLIB) +#endif +#ifndef XftClientLibs +#define XftClientLibs $(XFTLIB) $(FREETYPE2LIB) +#endif + #ifndef LdLibraryPath #define LdLibraryPath LD_LIBRARY_PATH #endif diff --git a/xc/config/cf/kdrive.cf b/xc/config/cf/kdrive.cf index f4d42e9a6..45486254d 100644 --- a/xc/config/cf/kdrive.cf +++ b/xc/config/cf/kdrive.cf @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/config/cf/kdrive.cf,v 1.6 2000/08/31 04:34:50 keithp Exp $ +XCOMM $XFree86: xc/config/cf/kdrive.cf,v 1.7 2000/09/26 04:26:30 keithp Exp $ /* * This configuration file contains all of the configuration * information for the XFree86 based X Servers. @@ -28,6 +28,9 @@ XCOMM $XConsortium: $ #ifndef XItsyServer #define XItsyServer NO #endif +#ifndef XiPAQH3600Server +#define XiPAQH3600Server NO +#endif #ifndef XvesaServer #define XvesaServer NO #endif @@ -36,6 +39,10 @@ XCOMM $XConsortium: $ #include <itsy.cf> #endif +#if XiPAQH3600Server +#include <iPAQH3600.cf> +#endif + #define XprtServer NO #define BuildXIE NO #define BuildXInputExt NO @@ -49,6 +56,9 @@ XCOMM $XConsortium: $ #ifndef BuildRender #define BuildRender YES #endif +#ifndef TouchScreen +#define TouchScreen NO +#endif /* * By default, build all of the fonts. @@ -158,6 +168,12 @@ XCOMM $XConsortium: $ FONTSERVERACCESS=-DNOFONTSERVERACCESS #endif +#if TouchScreen +#define TouchScreenDefines -DTOUCHSCREEN +#else +#define TouchScreenDefines /**/ +#endif + #if BuildPseudo8 #define Pseudo8Defines -DPSEUDO8 #else @@ -171,7 +187,7 @@ FONTSERVERACCESS=-DNOFONTSERVERACCESS XF86COMSRC=. #undef ServerExtraDefines -#define ServerExtraDefines -DKDRIVESERVER -DGCCUSESGAS -DDDXOSINIT -DSMART_SCHEDULE $(FONTSERVERACCESS) Pseudo8Defines KdriveServerExtraDefines +#define ServerExtraDefines -DKDRIVESERVER -DGCCUSESGAS -DDDXOSINIT -DSMART_SCHEDULE $(FONTSERVERACCESS) Pseudo8Defines TouchScreenDefines KdriveServerExtraDefines #undef ServerOSDefines #define ServerOSDefines -DDDXOSINIT diff --git a/xc/config/cf/linux.cf b/xc/config/cf/linux.cf index 4c5a68a25..5f23b6c24 100644 --- a/xc/config/cf/linux.cf +++ b/xc/config/cf/linux.cf @@ -4,7 +4,7 @@ XCOMM platform: $TOG: linux.cf /main/47 1998/04/17 11:32:51 mgreess -XCOMM platform: $XFree86: xc/config/cf/linux.cf,v 3.137 2000/09/19 12:46:03 eich Exp $ +XCOMM platform: $XFree86: xc/config/cf/linux.cf,v 3.141 2000/10/20 12:57:21 alanh Exp $ #ifndef LinuxElfDefault # define LinuxElfDefault YES @@ -172,7 +172,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion) /* The DRM module requires kernel services that appeared in late 2.1.x kernels and are known to be present in 2.2.x kernels. */ #ifndef BuildXF86DRI -# if defined(i386Architecture) +# if defined(i386Architecture) || defined(ia64Architecture) # if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 2) # define BuildXF86DRI YES # else @@ -193,7 +193,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion) kernel revisions. So, we'll only build the module for kernels that are known to be supported by the module. */ #ifndef BuildXF86DRM -# ifdef i386Architecture +# if defined(i386Architecture) || defined(ia64Architecture) # if OSMajorVersion == 2 /* Only tested for Linux 2.2.0 through 2.2.12 */ # if OSMinorVersion == 2 && OSTeenyVersion <= 12 @@ -217,7 +217,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion) #endif #ifndef HasAgpGart -# ifdef i386Architecture +# if defined(i386Architecture) || defined(ia64Architecture) /* The AGPGART header file is included in os-support/linux, which allows all drivers that depend on AGP to build properly. */ # define HasAgpGart YES @@ -477,6 +477,10 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion) # define LinuxMachineDefines -D__ia64__ # define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 +#if UseElfFormat +#define HasPlugin YES +#define VendorHasX11R6_3libXext YES /* XC or XFree86 >= 3.3.1 */ +#endif #endif /* ia64Architecture */ #ifdef Mc68020Architecture diff --git a/xc/config/cf/xfree86.cf b/xc/config/cf/xfree86.cf index 6e88852b0..396efa14b 100644 --- a/xc/config/cf/xfree86.cf +++ b/xc/config/cf/xfree86.cf @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/config/cf/xfree86.cf,v 3.314 2000/09/20 02:03:46 keithp Exp $ +XCOMM $XFree86: xc/config/cf/xfree86.cf,v 3.318 2000/10/20 14:58:56 alanh Exp $ /* * This configuration file contains all of the configuration * information for the XFree86 based X Servers. @@ -173,9 +173,9 @@ XCOMM $TOG: xfree86.cf /main/38 1997/10/22 13:01:59 kaleb $ # define XF86CardDrivers mga glint nv tga s3virge sis rendition \ neomagic i740 tdfx \ cirrus tseng trident chips apm \ - GlideDriver fbdev \ + GlideDriver fbdev i128 \ r128 ati AgpGartDrivers DevelDrivers cyrix \ - vga XF86OSCardDrivers XF86ExtraCardDrivers + vesa vga XF86OSCardDrivers XF86ExtraCardDrivers # endif #endif @@ -444,7 +444,7 @@ XCOMM $TOG: xfree86.cf /main/38 1997/10/22 13:01:59 kaleb $ /* Pure PCI drivers should go first */ # ifndef XF86CardDrivers -# define XF86CardDrivers r128 mga glint s3virge sis cirrus tseng \ +# define XF86CardDrivers r128 mga glint s3virge sis \ trident chips fbdev \ DevelDrivers vga \ XF86OSCardDrivers XF86ExtraCardDrivers diff --git a/xc/extras/Mesa/include/GL/gl.h b/xc/extras/Mesa/include/GL/gl.h index 78c5efbd5..5a31ddebd 100644 --- a/xc/extras/Mesa/include/GL/gl.h +++ b/xc/extras/Mesa/include/GL/gl.h @@ -22,7 +22,7 @@ * 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. */ -/* $XFree86: xc/extras/Mesa/include/GL/gl.h,v 1.6 2000/08/11 16:36:41 dawes Exp $ */ +/* $XFree86: xc/extras/Mesa/include/GL/gl.h,v 1.7 2000/09/24 13:50:05 alanh Exp $ */ #ifndef __gl_h_ diff --git a/xc/extras/Mesa/include/GL/glext.h b/xc/extras/Mesa/include/GL/glext.h index f721a9fd7..3df22a373 100644 --- a/xc/extras/Mesa/include/GL/glext.h +++ b/xc/extras/Mesa/include/GL/glext.h @@ -1,3 +1,5 @@ +/* $XFree86: xc/extras/Mesa/include/GL/glext.h,v 1.4 2000/09/26 15:56:28 tsi Exp $ */ + #ifndef __glext_h_ #define __glext_h_ diff --git a/xc/extras/Mesa/src/OSmesa/osmesa.c b/xc/extras/Mesa/src/OSmesa/osmesa.c index 13ff0a16c..e489f2553 100644 --- a/xc/extras/Mesa/src/OSmesa/osmesa.c +++ b/xc/extras/Mesa/src/OSmesa/osmesa.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/OSmesa/osmesa.c,v 1.3 2000/09/26 15:56:38 tsi Exp $ */ /* * Off-Screen Mesa rendering / Rendering into client memory space diff --git a/xc/extras/Mesa/src/X/fakeglx.c b/xc/extras/Mesa/src/X/fakeglx.c index 2c5866489..f7dde2533 100644 --- a/xc/extras/Mesa/src/X/fakeglx.c +++ b/xc/extras/Mesa/src/X/fakeglx.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/X/fakeglx.c,v 1.7 2000/09/26 15:56:38 tsi Exp $ */ /* * This is an emulation of the GLX API which allows Mesa/GLX-based programs diff --git a/xc/extras/Mesa/src/X/xmesa1.c b/xc/extras/Mesa/src/X/xmesa1.c index 662cae85e..8a84ca9a4 100644 --- a/xc/extras/Mesa/src/X/xmesa1.c +++ b/xc/extras/Mesa/src/X/xmesa1.c @@ -22,7 +22,7 @@ * 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. */ -/* $XFree86: xc/extras/Mesa/src/X/xmesa1.c,v 1.6 2000/08/09 23:40:10 dawes Exp $ */ +/* $XFree86: xc/extras/Mesa/src/X/xmesa1.c,v 1.7 2000/09/24 13:50:53 alanh Exp $ */ /* diff --git a/xc/extras/Mesa/src/X/xmesa2.c b/xc/extras/Mesa/src/X/xmesa2.c index e1b5b69f4..48cea9497 100644 --- a/xc/extras/Mesa/src/X/xmesa2.c +++ b/xc/extras/Mesa/src/X/xmesa2.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/X/xmesa2.c,v 1.7 2000/09/26 15:56:38 tsi Exp $ */ /* * Mesa/X11 interface, part 2. diff --git a/xc/extras/Mesa/src/X/xmesa3.c b/xc/extras/Mesa/src/X/xmesa3.c index 7e81e4ba4..3f6f507c6 100644 --- a/xc/extras/Mesa/src/X/xmesa3.c +++ b/xc/extras/Mesa/src/X/xmesa3.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/X/xmesa3.c,v 1.6 2000/09/26 15:56:39 tsi Exp $ */ /* * Mesa/X11 interface, part 3. diff --git a/xc/extras/Mesa/src/X/xmesa4.c b/xc/extras/Mesa/src/X/xmesa4.c index 350922008..2211eaffc 100644 --- a/xc/extras/Mesa/src/X/xmesa4.c +++ b/xc/extras/Mesa/src/X/xmesa4.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/X/xmesa4.c,v 1.6 2000/09/26 15:56:39 tsi Exp $ */ /* * Mesa/X11 interface, part 4. diff --git a/xc/extras/Mesa/src/X/xmesaP.h b/xc/extras/Mesa/src/X/xmesaP.h index 0886fa3dc..8d8000874 100644 --- a/xc/extras/Mesa/src/X/xmesaP.h +++ b/xc/extras/Mesa/src/X/xmesaP.h @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/X/xmesaP.h,v 1.7 2000/09/26 15:56:39 tsi Exp $ */ #ifndef XMESAP_H #define XMESAP_H @@ -226,7 +226,7 @@ struct xmesa_buffer { /* Used to do XAllocColor/XFreeColors accounting: */ int num_alloced; - unsigned long alloced_colors[256]; + Pixel alloced_colors[256]; #if defined(GLX_DIRECT_RENDERING) && !defined(XFree86Server) __DRIdrawablePrivate *driDrawPriv; /* back pointer to DRI drawable diff --git a/xc/extras/Mesa/src/X86/3dnow.c b/xc/extras/Mesa/src/X86/3dnow.c index c252f70ea..ef92d27c0 100644 --- a/xc/extras/Mesa/src/X86/3dnow.c +++ b/xc/extras/Mesa/src/X86/3dnow.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/X86/3dnow.c,v 1.6 2000/09/26 15:56:39 tsi Exp $ */ /* * 3DNow! optimizations contributed by diff --git a/xc/extras/Mesa/src/X86/3dnow_norm_raw.S b/xc/extras/Mesa/src/X86/3dnow_norm_raw.S index 427ba295c..e074c3337 100644 --- a/xc/extras/Mesa/src/X86/3dnow_norm_raw.S +++ b/xc/extras/Mesa/src/X86/3dnow_norm_raw.S @@ -21,6 +21,7 @@ * 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. */ +/* $XFree86: xc/extras/Mesa/src/X86/3dnow_norm_raw.S,v 1.4 2000/09/26 15:56:39 tsi Exp $ */ /* * 3Dnow assembly code by Holger Waechtler diff --git a/xc/extras/Mesa/src/X86/katmai.c b/xc/extras/Mesa/src/X86/katmai.c index d27f89b2d..507a7208c 100644 --- a/xc/extras/Mesa/src/X86/katmai.c +++ b/xc/extras/Mesa/src/X86/katmai.c @@ -21,7 +21,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/X86/katmai.c,v 1.4 2000/09/26 15:56:39 tsi Exp $ */ /* * PentiumIII-SIMD (SSE) optimizations contributed by diff --git a/xc/extras/Mesa/src/X86/katmai_xform_masked1.S b/xc/extras/Mesa/src/X86/katmai_xform_masked1.S index 235ac4e57..0408fcf81 100644 --- a/xc/extras/Mesa/src/X86/katmai_xform_masked1.S +++ b/xc/extras/Mesa/src/X86/katmai_xform_masked1.S @@ -1,4 +1,7 @@ +/* $XFree86: xc/extras/Mesa/src/X86/katmai_xform_masked1.S,v 1.4 2000/09/26 15:56:40 tsi Exp $ */ + #include "assyntax.h" + /** TODO: * - insert PREFETCH instructions to avoid cache-misses ! * - some more optimizations are possible... diff --git a/xc/extras/Mesa/src/X86/katmai_xform_masked2.S b/xc/extras/Mesa/src/X86/katmai_xform_masked2.S index 45193f19c..bfaaa5400 100644 --- a/xc/extras/Mesa/src/X86/katmai_xform_masked2.S +++ b/xc/extras/Mesa/src/X86/katmai_xform_masked2.S @@ -1,4 +1,7 @@ +/* $XFree86: xc/extras/Mesa/src/X86/katmai_xform_masked2.S,v 1.4 2000/09/26 15:56:40 tsi Exp $ */ + #include "assyntax.h" + /** TODO: * - insert PREFETCH instructions to avoid cache-misses ! * - some more optimizations are possible... diff --git a/xc/extras/Mesa/src/X86/katmai_xform_masked3.S b/xc/extras/Mesa/src/X86/katmai_xform_masked3.S index 3258f521e..cace27fc1 100644 --- a/xc/extras/Mesa/src/X86/katmai_xform_masked3.S +++ b/xc/extras/Mesa/src/X86/katmai_xform_masked3.S @@ -1,4 +1,7 @@ +/* $XFree86: xc/extras/Mesa/src/X86/katmai_xform_masked3.S,v 1.4 2000/09/26 15:56:40 tsi Exp $ */ + #include "assyntax.h" + /** TODO: * - insert PREFETCH instructions to avoid cache-misses ! * - some more optimizations are possible... diff --git a/xc/extras/Mesa/src/X86/katmai_xform_masked4.S b/xc/extras/Mesa/src/X86/katmai_xform_masked4.S index 82d960c02..d5d591bbb 100644 --- a/xc/extras/Mesa/src/X86/katmai_xform_masked4.S +++ b/xc/extras/Mesa/src/X86/katmai_xform_masked4.S @@ -1,4 +1,7 @@ +/* $XFree86: xc/extras/Mesa/src/X86/katmai_xform_masked4.S,v 1.4 2000/09/26 15:56:40 tsi Exp $ */ + #include "assyntax.h" + /** TODO: * - insert PREFETCH instructions to avoid cache-misses ! * - some more optimizations are possible... diff --git a/xc/extras/Mesa/src/X86/katmai_xform_raw1.S b/xc/extras/Mesa/src/X86/katmai_xform_raw1.S index e6ff089e2..b8e9dcda8 100644 --- a/xc/extras/Mesa/src/X86/katmai_xform_raw1.S +++ b/xc/extras/Mesa/src/X86/katmai_xform_raw1.S @@ -1,4 +1,7 @@ +/* $XFree86: xc/extras/Mesa/src/X86/katmai_xform_raw1.S,v 1.4 2000/09/26 15:56:40 tsi Exp $ */ + #include "assyntax.h" + /** TODO: * - insert PREFETCH instructions to avoid cache-misses ! * - some more optimizations are possible... diff --git a/xc/extras/Mesa/src/X86/katmai_xform_raw2.S b/xc/extras/Mesa/src/X86/katmai_xform_raw2.S index 993880885..c330b0783 100644 --- a/xc/extras/Mesa/src/X86/katmai_xform_raw2.S +++ b/xc/extras/Mesa/src/X86/katmai_xform_raw2.S @@ -1,4 +1,7 @@ +/* $XFree86: xc/extras/Mesa/src/X86/katmai_xform_raw2.S,v 1.4 2000/09/26 15:56:40 tsi Exp $ */ + #include "assyntax.h" + /** TODO: * - insert PREFETCH instructions to avoid cache-misses ! * - some more optimizations are possible... diff --git a/xc/extras/Mesa/src/X86/katmai_xform_raw3.S b/xc/extras/Mesa/src/X86/katmai_xform_raw3.S index 35f95f511..d9ed22be3 100644 --- a/xc/extras/Mesa/src/X86/katmai_xform_raw3.S +++ b/xc/extras/Mesa/src/X86/katmai_xform_raw3.S @@ -1,4 +1,7 @@ +/* $XFree86: xc/extras/Mesa/src/X86/katmai_xform_raw3.S,v 1.4 2000/09/26 15:56:40 tsi Exp $ */ + #include "assyntax.h" + /** TODO: * - insert PREFETCH instructions to avoid cache-misses ! * - some more optimizations are possible... diff --git a/xc/extras/Mesa/src/X86/katmai_xform_raw4.S b/xc/extras/Mesa/src/X86/katmai_xform_raw4.S index 5a38a2f4e..eabec45bc 100644 --- a/xc/extras/Mesa/src/X86/katmai_xform_raw4.S +++ b/xc/extras/Mesa/src/X86/katmai_xform_raw4.S @@ -1,4 +1,7 @@ +/* $XFree86: xc/extras/Mesa/src/X86/katmai_xform_raw4.S,v 1.4 2000/09/26 15:56:40 tsi Exp $ */ + #include "assyntax.h" + /** TODO: * - insert PREFETCH instructions to avoid cache-misses ! * - some more optimizations are possible... diff --git a/xc/extras/Mesa/src/X86/x86.c b/xc/extras/Mesa/src/X86/x86.c index 606ec7051..0e531b8df 100644 --- a/xc/extras/Mesa/src/X86/x86.c +++ b/xc/extras/Mesa/src/X86/x86.c @@ -22,6 +22,7 @@ * 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. */ +/* $XFree86: xc/extras/Mesa/src/X86/x86.c,v 1.6 2000/09/26 15:56:40 tsi Exp $ */ /* * Intel x86 assembly code by Josh Vanderhoof diff --git a/xc/extras/Mesa/src/X86/x86a.S b/xc/extras/Mesa/src/X86/x86a.S index bae1e8f65..ac12457ee 100644 --- a/xc/extras/Mesa/src/X86/x86a.S +++ b/xc/extras/Mesa/src/X86/x86a.S @@ -1,3 +1,5 @@ +/* $XFree86: xc/extras/Mesa/src/X86/x86a.S,v 1.4 2000/09/26 15:56:40 tsi Exp $ */ + #include "assyntax.h" SEG_TEXT diff --git a/xc/extras/Mesa/src/accum.c b/xc/extras/Mesa/src/accum.c index 5161c9f31..da658df0c 100644 --- a/xc/extras/Mesa/src/accum.c +++ b/xc/extras/Mesa/src/accum.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/accum.c,v 1.7 2000/09/26 15:56:29 tsi Exp $ */ #ifdef PC_HEADER #include "all.h" diff --git a/xc/extras/Mesa/src/attrib.c b/xc/extras/Mesa/src/attrib.c index cc736bdc5..a464f0905 100644 --- a/xc/extras/Mesa/src/attrib.c +++ b/xc/extras/Mesa/src/attrib.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/attrib.c,v 1.6 2000/09/26 15:56:29 tsi Exp $ */ #ifdef PC_HEADER #include "all.h" diff --git a/xc/extras/Mesa/src/blend.c b/xc/extras/Mesa/src/blend.c index 46f846939..70c114ef9 100644 --- a/xc/extras/Mesa/src/blend.c +++ b/xc/extras/Mesa/src/blend.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/blend.c,v 1.7 2000/09/26 15:56:29 tsi Exp $ */ #ifdef PC_HEADER diff --git a/xc/extras/Mesa/src/buffers.c b/xc/extras/Mesa/src/buffers.c index 566afed92..e334265a6 100644 --- a/xc/extras/Mesa/src/buffers.c +++ b/xc/extras/Mesa/src/buffers.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/buffers.c,v 1.4 2000/09/26 15:56:29 tsi Exp $ */ #ifdef PC_HEADER #include "all.h" diff --git a/xc/extras/Mesa/src/clip_funcs.h b/xc/extras/Mesa/src/clip_funcs.h index e0003bf3d..d2bb45280 100644 --- a/xc/extras/Mesa/src/clip_funcs.h +++ b/xc/extras/Mesa/src/clip_funcs.h @@ -22,6 +22,7 @@ * 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. */ +/* $XFree86: xc/extras/Mesa/src/clip_funcs.h,v 1.6 2000/09/26 15:56:29 tsi Exp $ */ /* * New (3.1) transformation code written by Keith Whitwell. diff --git a/xc/extras/Mesa/src/colortab.c b/xc/extras/Mesa/src/colortab.c index 3b6cb37ec..dff9feae9 100644 --- a/xc/extras/Mesa/src/colortab.c +++ b/xc/extras/Mesa/src/colortab.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/colortab.c,v 1.7 2000/09/26 15:56:29 tsi Exp $ */ #ifdef PC_HEADER #include "all.h" diff --git a/xc/extras/Mesa/src/config.c b/xc/extras/Mesa/src/config.c index 7dc4d9613..9e50ff4b0 100644 --- a/xc/extras/Mesa/src/config.c +++ b/xc/extras/Mesa/src/config.c @@ -22,7 +22,7 @@ * 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. */ -/* $XFree86: xc/extras/Mesa/src/config.c,v 1.5 2000/08/09 23:40:10 dawes Exp $ */ +/* $XFree86: xc/extras/Mesa/src/config.c,v 1.6 2000/09/24 13:50:08 alanh Exp $ */ /* Mesa config file parse and execute code. diff --git a/xc/extras/Mesa/src/config.h b/xc/extras/Mesa/src/config.h index 07ff841f6..1d93ae611 100644 --- a/xc/extras/Mesa/src/config.h +++ b/xc/extras/Mesa/src/config.h @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/config.h,v 1.7 2000/09/26 15:56:30 tsi Exp $ */ /* * Tunable configuration parameters. diff --git a/xc/extras/Mesa/src/context.c b/xc/extras/Mesa/src/context.c index 5548e8c26..f8a4ef90b 100644 --- a/xc/extras/Mesa/src/context.c +++ b/xc/extras/Mesa/src/context.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/context.c,v 1.6 2000/09/26 15:56:30 tsi Exp $ */ #ifdef PC_HEADER #include "all.h" diff --git a/xc/extras/Mesa/src/copypix.c b/xc/extras/Mesa/src/copypix.c index 6fbfbfee4..8b40a8711 100644 --- a/xc/extras/Mesa/src/copypix.c +++ b/xc/extras/Mesa/src/copypix.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/copypix.c,v 1.6 2000/09/26 15:56:30 tsi Exp $ */ #ifdef PC_HEADER #include "all.h" diff --git a/xc/extras/Mesa/src/dd.h b/xc/extras/Mesa/src/dd.h index d2dfc9464..90ff664ed 100644 --- a/xc/extras/Mesa/src/dd.h +++ b/xc/extras/Mesa/src/dd.h @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/dd.h,v 1.7 2000/09/26 15:56:30 tsi Exp $ */ #ifndef DD_INCLUDED diff --git a/xc/extras/Mesa/src/debug_xform.c b/xc/extras/Mesa/src/debug_xform.c index cd3442a58..5926ba191 100644 --- a/xc/extras/Mesa/src/debug_xform.c +++ b/xc/extras/Mesa/src/debug_xform.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/debug_xform.c,v 1.5 2000/09/26 15:56:30 tsi Exp $ */ #ifdef PC_HEADER #include "all.h" diff --git a/xc/extras/Mesa/src/dlist.c b/xc/extras/Mesa/src/dlist.c index ff23ee951..5c26ba403 100644 --- a/xc/extras/Mesa/src/dlist.c +++ b/xc/extras/Mesa/src/dlist.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/dlist.c,v 1.7 2000/09/26 15:56:30 tsi Exp $ */ #ifdef PC_HEADER #include "all.h" diff --git a/xc/extras/Mesa/src/drawpix.c b/xc/extras/Mesa/src/drawpix.c index dad8ada33..ecb1b22af 100644 --- a/xc/extras/Mesa/src/drawpix.c +++ b/xc/extras/Mesa/src/drawpix.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/drawpix.c,v 1.6 2000/09/26 15:56:31 tsi Exp $ */ #ifdef PC_HEADER #include "all.h" diff --git a/xc/extras/Mesa/src/enums.c b/xc/extras/Mesa/src/enums.c index f28c61a03..2de4ef06e 100644 --- a/xc/extras/Mesa/src/enums.c +++ b/xc/extras/Mesa/src/enums.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/enums.c,v 1.6 2000/09/26 15:56:31 tsi Exp $ */ #ifdef PC_HEADER #include "all.h" diff --git a/xc/extras/Mesa/src/eval.c b/xc/extras/Mesa/src/eval.c index a88c6dc85..2c29dcc27 100644 --- a/xc/extras/Mesa/src/eval.c +++ b/xc/extras/Mesa/src/eval.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/eval.c,v 1.5 2000/09/26 15:56:31 tsi Exp $ */ /* * eval.c was written by diff --git a/xc/extras/Mesa/src/extensions.c b/xc/extras/Mesa/src/extensions.c index f3e771c98..a9522bbd8 100644 --- a/xc/extras/Mesa/src/extensions.c +++ b/xc/extras/Mesa/src/extensions.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/extensions.c,v 1.7 2000/09/26 15:56:31 tsi Exp $ */ #ifdef PC_HEADER #include "all.h" diff --git a/xc/extras/Mesa/src/fog.c b/xc/extras/Mesa/src/fog.c index 15dad1d36..e98e67644 100644 --- a/xc/extras/Mesa/src/fog.c +++ b/xc/extras/Mesa/src/fog.c @@ -22,7 +22,7 @@ * 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. */ -/* $XFree86: xc/extras/Mesa/src/fog.c,v 1.7 2000/08/23 22:10:00 tsi Exp $ */ +/* $XFree86: xc/extras/Mesa/src/fog.c,v 1.8 2000/09/24 13:50:10 alanh Exp $ */ #ifdef PC_HEADER #include "all.h" diff --git a/xc/extras/Mesa/src/get.c b/xc/extras/Mesa/src/get.c index 59e86056a..a12e6be24 100644 --- a/xc/extras/Mesa/src/get.c +++ b/xc/extras/Mesa/src/get.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/get.c,v 1.7 2000/09/26 15:56:31 tsi Exp $ */ #ifdef PC_HEADER #include "all.h" diff --git a/xc/extras/Mesa/src/glapinoop.c b/xc/extras/Mesa/src/glapinoop.c index a48509d6b..43a68c773 100644 --- a/xc/extras/Mesa/src/glapinoop.c +++ b/xc/extras/Mesa/src/glapinoop.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/glapinoop.c,v 1.9 2000/09/26 15:56:31 tsi Exp $ */ /* * This is part of the reusable GL dispather, see glapi.c for details. diff --git a/xc/extras/Mesa/src/glheader.h b/xc/extras/Mesa/src/glheader.h index 7b4909852..705c25c74 100644 --- a/xc/extras/Mesa/src/glheader.h +++ b/xc/extras/Mesa/src/glheader.h @@ -22,7 +22,7 @@ * 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. */ -/* $XFree86: xc/extras/Mesa/src/glheader.h,v 1.8 2000/08/11 17:01:49 dawes Exp $ */ +/* $XFree86: xc/extras/Mesa/src/glheader.h,v 1.11 2000/10/26 17:57:48 dawes Exp $ */ #ifndef GLHEADER_H @@ -164,8 +164,10 @@ typedef unsigned long COLORREF; typedef struct tagLAYERPLANEDESCRIPTOR LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, *LPLAYERPLANEDESCRIPTOR; typedef struct _GLYPHMETRICSFLOAT GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, *LPGLYPHMETRICSFLOAT; typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESCRIPTOR, *LPPIXELFORMATDESCRIPTOR; +#if 0 #include <gl/mesa_wgl.h> #endif +#endif diff --git a/xc/extras/Mesa/src/image.c b/xc/extras/Mesa/src/image.c index 11703a5d0..f1781326d 100644 --- a/xc/extras/Mesa/src/image.c +++ b/xc/extras/Mesa/src/image.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/image.c,v 1.7 2000/09/26 15:56:32 tsi Exp $ */ #ifdef PC_HEADER #include "all.h" diff --git a/xc/extras/Mesa/src/imaging.c b/xc/extras/Mesa/src/imaging.c index ebc1b7487..5d2250cbc 100644 --- a/xc/extras/Mesa/src/imaging.c +++ b/xc/extras/Mesa/src/imaging.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/imaging.c,v 1.6 2000/09/26 15:56:32 tsi Exp $ */ /* * Histogram, Min/max and convolution for GL_ARB_imaging subset diff --git a/xc/extras/Mesa/src/light.c b/xc/extras/Mesa/src/light.c index 138aefb08..9d73e6814 100644 --- a/xc/extras/Mesa/src/light.c +++ b/xc/extras/Mesa/src/light.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/light.c,v 1.5 2000/09/26 15:56:32 tsi Exp $ */ #ifdef PC_HEADER #include "all.h" diff --git a/xc/extras/Mesa/src/light.h b/xc/extras/Mesa/src/light.h index 8edcac801..1a4fa4174 100644 --- a/xc/extras/Mesa/src/light.h +++ b/xc/extras/Mesa/src/light.h @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/light.h,v 1.5 2000/09/26 15:56:32 tsi Exp $ */ #ifndef LIGHT_H #define LIGHT_H diff --git a/xc/extras/Mesa/src/lines.c b/xc/extras/Mesa/src/lines.c index 7b3b51112..24b9d5feb 100644 --- a/xc/extras/Mesa/src/lines.c +++ b/xc/extras/Mesa/src/lines.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/lines.c,v 1.6 2000/09/26 15:56:32 tsi Exp $ */ #ifdef PC_HEADER #include "all.h" diff --git a/xc/extras/Mesa/src/linetemp.h b/xc/extras/Mesa/src/linetemp.h index 9d427ad32..ab0f6657e 100644 --- a/xc/extras/Mesa/src/linetemp.h +++ b/xc/extras/Mesa/src/linetemp.h @@ -22,7 +22,7 @@ * 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. */ -/* $XFree86: xc/extras/Mesa/src/linetemp.h,v 1.8 2000/06/17 00:02:13 martin Exp $ */ +/* $XFree86: xc/extras/Mesa/src/linetemp.h,v 1.9 2000/09/24 13:50:12 alanh Exp $ */ /* * Line Rasterizer Template diff --git a/xc/extras/Mesa/src/lnaatemp.h b/xc/extras/Mesa/src/lnaatemp.h index 1a96a811f..872fe09b9 100644 --- a/xc/extras/Mesa/src/lnaatemp.h +++ b/xc/extras/Mesa/src/lnaatemp.h @@ -22,7 +22,7 @@ * 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. */ -/* $XFree86: xc/extras/Mesa/src/lnaatemp.h,v 1.10 2000/06/21 20:18:13 tsi Exp $ */ +/* $XFree86: xc/extras/Mesa/src/lnaatemp.h,v 1.11 2000/09/24 13:50:12 alanh Exp $ */ /* * Antialiased Line Rasterizer Template diff --git a/xc/extras/Mesa/src/logic.c b/xc/extras/Mesa/src/logic.c index 872cb48d6..2a4bd3aed 100644 --- a/xc/extras/Mesa/src/logic.c +++ b/xc/extras/Mesa/src/logic.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/logic.c,v 1.6 2000/09/26 15:56:32 tsi Exp $ */ #ifdef PC_HEADER #include "all.h" diff --git a/xc/extras/Mesa/src/matrix.c b/xc/extras/Mesa/src/matrix.c index ed3175536..3dcc61ad9 100644 --- a/xc/extras/Mesa/src/matrix.c +++ b/xc/extras/Mesa/src/matrix.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/matrix.c,v 1.7 2000/09/26 15:56:32 tsi Exp $ */ /* * Matrix operations diff --git a/xc/extras/Mesa/src/matrix.h b/xc/extras/Mesa/src/matrix.h index 6d989abd1..2da7687c9 100644 --- a/xc/extras/Mesa/src/matrix.h +++ b/xc/extras/Mesa/src/matrix.h @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/matrix.h,v 1.5 2000/09/26 15:56:32 tsi Exp $ */ #ifndef MATRIX_H #define MATRIX_H diff --git a/xc/extras/Mesa/src/mem.c b/xc/extras/Mesa/src/mem.c index 9334b63c4..9e6a5c2b1 100644 --- a/xc/extras/Mesa/src/mem.c +++ b/xc/extras/Mesa/src/mem.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/mem.c,v 1.4 2000/09/26 15:56:32 tsi Exp $ */ /* * Memory allocation functions. Called via the MALLOC, CALLOC and diff --git a/xc/extras/Mesa/src/mem.h b/xc/extras/Mesa/src/mem.h index 8935cb1aa..e9b1f3136 100644 --- a/xc/extras/Mesa/src/mem.h +++ b/xc/extras/Mesa/src/mem.h @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/mem.h,v 1.5 2000/09/26 15:56:32 tsi Exp $ */ #ifndef MEM_H #define MEM_H diff --git a/xc/extras/Mesa/src/mmath.h b/xc/extras/Mesa/src/mmath.h index c0144c924..dae66eac6 100644 --- a/xc/extras/Mesa/src/mmath.h +++ b/xc/extras/Mesa/src/mmath.h @@ -22,7 +22,7 @@ * 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. */ -/* $XFree86: xc/extras/Mesa/src/mmath.h,v 1.6 2000/08/09 23:40:10 dawes Exp $ */ +/* $XFree86: xc/extras/Mesa/src/mmath.h,v 1.7 2000/09/24 13:50:14 alanh Exp $ */ /* * Faster arithmetic functions. If the FAST_MATH preprocessor symbol is diff --git a/xc/extras/Mesa/src/pb.c b/xc/extras/Mesa/src/pb.c index 4cfbfa674..454882d5b 100644 --- a/xc/extras/Mesa/src/pb.c +++ b/xc/extras/Mesa/src/pb.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/pb.c,v 1.6 2000/09/26 15:56:32 tsi Exp $ */ /* diff --git a/xc/extras/Mesa/src/points.c b/xc/extras/Mesa/src/points.c index 41cd06022..cd73dd1c3 100644 --- a/xc/extras/Mesa/src/points.c +++ b/xc/extras/Mesa/src/points.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/points.c,v 1.6 2000/09/26 15:56:32 tsi Exp $ */ #ifdef PC_HEADER #include "all.h" diff --git a/xc/extras/Mesa/src/readpix.c b/xc/extras/Mesa/src/readpix.c index f2520b6af..4e5e11985 100644 --- a/xc/extras/Mesa/src/readpix.c +++ b/xc/extras/Mesa/src/readpix.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/readpix.c,v 1.6 2000/09/26 15:56:33 tsi Exp $ */ #ifdef PC_HEADER #include "all.h" diff --git a/xc/extras/Mesa/src/rect.c b/xc/extras/Mesa/src/rect.c index 502498c01..5a54a072b 100644 --- a/xc/extras/Mesa/src/rect.c +++ b/xc/extras/Mesa/src/rect.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/rect.c,v 1.5 2000/09/26 15:56:33 tsi Exp $ */ #ifdef PC_HEADER #include "all.h" diff --git a/xc/extras/Mesa/src/render_tmp.h b/xc/extras/Mesa/src/render_tmp.h index bcc60d42b..b7a23b056 100644 --- a/xc/extras/Mesa/src/render_tmp.h +++ b/xc/extras/Mesa/src/render_tmp.h @@ -22,6 +22,7 @@ * 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. */ +/* $XFree86: xc/extras/Mesa/src/render_tmp.h,v 1.6 2000/09/26 15:56:33 tsi Exp $ */ /* * New (3.1) transformation code written by Keith Whitwell. diff --git a/xc/extras/Mesa/src/shade.c b/xc/extras/Mesa/src/shade.c index 5fa94258a..0d794dcdf 100644 --- a/xc/extras/Mesa/src/shade.c +++ b/xc/extras/Mesa/src/shade.c @@ -22,8 +22,7 @@ * 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. */ - - +/* $XFree86: xc/extras/Mesa/src/shade.c,v 1.5 2000/09/26 15:56:33 tsi Exp $ */ #ifdef PC_HEADER #include "all.h" diff --git a/xc/extras/Mesa/src/shade_tmp.h b/xc/extras/Mesa/src/shade_tmp.h index f6ec08cb7..72a7f2d82 100644 --- a/xc/extras/Mesa/src/shade_tmp.h +++ b/xc/extras/Mesa/src/shade_tmp.h @@ -22,6 +22,7 @@ * 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. */ +/* $XFree86: xc/extras/Mesa/src/shade_tmp.h,v 1.6 2000/09/26 15:56:33 tsi Exp $ */ /* * New (3.1) transformation code written by Keith Whitwell. diff --git a/xc/extras/Mesa/src/span.c b/xc/extras/Mesa/src/span.c index 77d2d80b5..3a3ba0633 100644 --- a/xc/extras/Mesa/src/span.c +++ b/xc/extras/Mesa/src/span.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/span.c,v 1.7 2000/09/26 15:56:33 tsi Exp $ */ /* * pixel span rasterization: diff --git a/xc/extras/Mesa/src/stages.c b/xc/extras/Mesa/src/stages.c index 8741b69cf..859aadac5 100644 --- a/xc/extras/Mesa/src/stages.c +++ b/xc/extras/Mesa/src/stages.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/stages.c,v 1.6 2000/09/26 15:56:33 tsi Exp $ */ #ifdef PC_HEADER #include "all.h" diff --git a/xc/extras/Mesa/src/state.c b/xc/extras/Mesa/src/state.c index 3ae304d8d..e111b18db 100644 --- a/xc/extras/Mesa/src/state.c +++ b/xc/extras/Mesa/src/state.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/state.c,v 1.5 2000/09/26 15:56:33 tsi Exp $ */ /* * This file initializes the immediate-mode dispatch table (which may diff --git a/xc/extras/Mesa/src/texgen_tmp.h b/xc/extras/Mesa/src/texgen_tmp.h index c1fa50816..8fe16187f 100644 --- a/xc/extras/Mesa/src/texgen_tmp.h +++ b/xc/extras/Mesa/src/texgen_tmp.h @@ -22,6 +22,7 @@ * 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. */ +/* $XFree86: xc/extras/Mesa/src/texgen_tmp.h,v 1.5 2000/09/26 15:56:33 tsi Exp $ */ /* * New (3.1) transformation code written by Keith Whitwell. diff --git a/xc/extras/Mesa/src/teximage.c b/xc/extras/Mesa/src/teximage.c index 8f55409e6..c92ff7937 100644 --- a/xc/extras/Mesa/src/teximage.c +++ b/xc/extras/Mesa/src/teximage.c @@ -22,7 +22,7 @@ * 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. */ -/* $XFree86: xc/extras/Mesa/src/teximage.c,v 1.9 2000/08/28 02:43:09 tsi Exp $ */ +/* $XFree86: xc/extras/Mesa/src/teximage.c,v 1.10 2000/09/24 13:50:18 alanh Exp $ */ #ifdef PC_HEADER #include "all.h" diff --git a/xc/extras/Mesa/src/teximage.h b/xc/extras/Mesa/src/teximage.h index 98fae39a8..1ff5e9038 100644 --- a/xc/extras/Mesa/src/teximage.h +++ b/xc/extras/Mesa/src/teximage.h @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/teximage.h,v 1.6 2000/09/26 15:56:33 tsi Exp $ */ #ifndef TEXIMAGE_H #define TEXIMAGE_H diff --git a/xc/extras/Mesa/src/texobj.c b/xc/extras/Mesa/src/texobj.c index d7572d86b..75d63fff1 100644 --- a/xc/extras/Mesa/src/texobj.c +++ b/xc/extras/Mesa/src/texobj.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/texobj.c,v 1.6 2000/09/26 15:56:33 tsi Exp $ */ #ifdef PC_HEADER #include "all.h" diff --git a/xc/extras/Mesa/src/texstate.c b/xc/extras/Mesa/src/texstate.c index 8d8a8a20e..7324ca657 100644 --- a/xc/extras/Mesa/src/texstate.c +++ b/xc/extras/Mesa/src/texstate.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/texstate.c,v 1.6 2000/09/26 15:56:33 tsi Exp $ */ #ifdef PC_HEADER #include "all.h" diff --git a/xc/extras/Mesa/src/texture.c b/xc/extras/Mesa/src/texture.c index 9d83efd79..fe4863ff4 100644 --- a/xc/extras/Mesa/src/texture.c +++ b/xc/extras/Mesa/src/texture.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/texture.c,v 1.7 2000/09/26 15:56:34 tsi Exp $ */ #ifdef PC_HEADER #include "all.h" diff --git a/xc/extras/Mesa/src/texture.h b/xc/extras/Mesa/src/texture.h index 113602bf7..379e7a1d4 100644 --- a/xc/extras/Mesa/src/texture.h +++ b/xc/extras/Mesa/src/texture.h @@ -22,10 +22,7 @@ * 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. */ - - - - +/* $XFree86: xc/extras/Mesa/src/texture.h,v 1.6 2000/09/26 15:56:34 tsi Exp $ */ #ifndef TEXTURE_H #define TEXTURE_H diff --git a/xc/extras/Mesa/src/texutil.c b/xc/extras/Mesa/src/texutil.c index eb310ee55..a12ddd745 100644 --- a/xc/extras/Mesa/src/texutil.c +++ b/xc/extras/Mesa/src/texutil.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/texutil.c,v 1.3 2000/09/26 15:56:34 tsi Exp $ */ #ifdef PC_HEADER #include "all.h" diff --git a/xc/extras/Mesa/src/texutil.h b/xc/extras/Mesa/src/texutil.h index 22e916d50..f1fbcfab2 100644 --- a/xc/extras/Mesa/src/texutil.h +++ b/xc/extras/Mesa/src/texutil.h @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/texutil.h,v 1.3 2000/09/26 15:56:34 tsi Exp $ */ #ifndef TEXUTIL_H #define TEXUTIL_H diff --git a/xc/extras/Mesa/src/triangle.c b/xc/extras/Mesa/src/triangle.c index 04c91bdc0..d8f402d67 100644 --- a/xc/extras/Mesa/src/triangle.c +++ b/xc/extras/Mesa/src/triangle.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/triangle.c,v 1.7 2000/09/26 15:56:34 tsi Exp $ */ /* * Triangle rasterizers diff --git a/xc/extras/Mesa/src/tritemp.h b/xc/extras/Mesa/src/tritemp.h index 25f0f2b57..54f8cea2e 100644 --- a/xc/extras/Mesa/src/tritemp.h +++ b/xc/extras/Mesa/src/tritemp.h @@ -22,7 +22,7 @@ * 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. */ -/* $XFree86: xc/extras/Mesa/src/tritemp.h,v 1.8 2000/06/17 00:02:18 martin Exp $ */ +/* $XFree86: xc/extras/Mesa/src/tritemp.h,v 1.9 2000/09/24 13:50:20 alanh Exp $ */ /* * Triangle Rasterizer Template diff --git a/xc/extras/Mesa/src/types.h b/xc/extras/Mesa/src/types.h index ada9fd745..550f4f1e6 100644 --- a/xc/extras/Mesa/src/types.h +++ b/xc/extras/Mesa/src/types.h @@ -23,7 +23,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/types.h,v 1.7 2000/09/26 15:56:34 tsi Exp $ */ #ifndef TYPES_H #define TYPES_H diff --git a/xc/extras/Mesa/src/varray.c b/xc/extras/Mesa/src/varray.c index 5915cdb97..ce8a4a186 100644 --- a/xc/extras/Mesa/src/varray.c +++ b/xc/extras/Mesa/src/varray.c @@ -22,6 +22,7 @@ * 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. */ +/* $XFree86: xc/extras/Mesa/src/varray.c,v 1.6 2000/09/26 15:56:34 tsi Exp $ */ #ifdef PC_HEADER #include "all.h" diff --git a/xc/extras/Mesa/src/vb.c b/xc/extras/Mesa/src/vb.c index 18ca16b14..33139e8f3 100644 --- a/xc/extras/Mesa/src/vb.c +++ b/xc/extras/Mesa/src/vb.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/vb.c,v 1.6 2000/09/26 15:56:35 tsi Exp $ */ #ifdef PC_HEADER #include "all.h" diff --git a/xc/extras/Mesa/src/vbcull.c b/xc/extras/Mesa/src/vbcull.c index 61c8ea9eb..4af76165b 100644 --- a/xc/extras/Mesa/src/vbcull.c +++ b/xc/extras/Mesa/src/vbcull.c @@ -22,6 +22,7 @@ * 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. */ +/* $XFree86: xc/extras/Mesa/src/vbcull.c,v 1.6 2000/09/26 15:56:35 tsi Exp $ */ /* * New (3.1) transformation code written by Keith Whitwell. diff --git a/xc/extras/Mesa/src/vbfill.c b/xc/extras/Mesa/src/vbfill.c index 50d5806d5..1bcea531a 100644 --- a/xc/extras/Mesa/src/vbfill.c +++ b/xc/extras/Mesa/src/vbfill.c @@ -22,7 +22,7 @@ * 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. */ - +/* $XFree86: xc/extras/Mesa/src/vbfill.c,v 1.6 2000/09/26 15:56:35 tsi Exp $ */ #ifdef PC_HEADER #include "all.h" diff --git a/xc/extras/Mesa/src/vbrender.c b/xc/extras/Mesa/src/vbrender.c index 3d053fd4d..c71902330 100644 --- a/xc/extras/Mesa/src/vbrender.c +++ b/xc/extras/Mesa/src/vbrender.c @@ -22,7 +22,7 @@ * 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. */ -/* $XFree86: xc/extras/Mesa/src/vbrender.c,v 1.6 2000/08/28 02:43:10 tsi Exp $ */ +/* $XFree86: xc/extras/Mesa/src/vbrender.c,v 1.7 2000/09/24 13:50:22 alanh Exp $ */ /* * Render points, lines, and polygons. The only entry point to this diff --git a/xc/extras/Mesa/src/vector.c b/xc/extras/Mesa/src/vector.c index 954a4235a..a7daed715 100644 --- a/xc/extras/Mesa/src/vector.c +++ b/xc/extras/Mesa/src/vector.c @@ -22,6 +22,7 @@ * 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. */ +/* $XFree86: xc/extras/Mesa/src/vector.c,v 1.5 2000/09/26 15:56:35 tsi Exp $ */ /* * New (3.1) transformation code written by Keith Whitwell. diff --git a/xc/extras/Mesa/src/xform.h b/xc/extras/Mesa/src/xform.h index 2f8843815..ce2166901 100644 --- a/xc/extras/Mesa/src/xform.h +++ b/xc/extras/Mesa/src/xform.h @@ -22,10 +22,7 @@ * 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. */ - - - - +/* $XFree86: xc/extras/Mesa/src/xform.h,v 1.5 2000/09/26 15:56:35 tsi Exp $ */ #ifndef XFORM_H #define XFORM_H diff --git a/xc/extras/Mesa/src/xform_tmp.h b/xc/extras/Mesa/src/xform_tmp.h index aacbee841..8f521fa11 100644 --- a/xc/extras/Mesa/src/xform_tmp.h +++ b/xc/extras/Mesa/src/xform_tmp.h @@ -22,6 +22,7 @@ * 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. */ +/* $XFree86: xc/extras/Mesa/src/xform_tmp.h,v 1.5 2000/09/26 15:56:35 tsi Exp $ */ /* * New (3.1) transformation code written by Keith Whitwell. diff --git a/xc/include/extensions/renderproto.h b/xc/include/extensions/renderproto.h index 0279b70ee..dcd83e906 100644 --- a/xc/include/extensions/renderproto.h +++ b/xc/include/extensions/renderproto.h @@ -1,5 +1,5 @@ /* - * $XFree86: xc/include/extensions/renderproto.h,v 1.2 2000/08/28 02:43:11 tsi Exp $ + * $XFree86: xc/include/extensions/renderproto.h,v 1.4 2000/10/07 05:59:32 keithp Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -43,7 +43,7 @@ #define Picture CARD32 #define PictFormat CARD32 -#define Fixed CARD32 +#define Fixed INT32 #define Glyphset CARD32 #define Glyph CARD32 @@ -109,6 +109,19 @@ typedef struct { #define sz_xIndexValue 12 typedef struct { + Fixed x B32; + Fixed y B32; +} xPointFixed; + +#define sz_xPointFixed 8 + +typedef struct { + xPointFixed p1, p2, p3; +} xTriangle; + +#define sz_xTriangle 24 + +typedef struct { CARD16 width B16; CARD16 height B16; INT16 x B16; @@ -290,6 +303,18 @@ typedef struct { CARD8 reqType; CARD8 renderReqType; CARD16 length B16; + Picture src B32; + Picture dst B32; + INT16 xSrc B16; + INT16 ySrc B16; +} xRenderTrianglesReq; + +#define sz_xRenderTrianglesReq 16 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; Glyphset gsid B32; PictFormat format B32; } xRenderCreateGlyphSetReq; diff --git a/xc/lib/GL/Imakefile b/xc/lib/GL/Imakefile index cb4170d0e..59af03fed 100644 --- a/xc/lib/GL/Imakefile +++ b/xc/lib/GL/Imakefile @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/Imakefile,v 1.31 2000/08/28 16:04:47 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/Imakefile,v 1.32 2000/09/24 13:50:59 alanh Exp $ #include <Threads.tmpl> diff --git a/xc/lib/GL/dri/XF86dri.c b/xc/lib/GL/dri/XF86dri.c index 44eac8b84..3800110b4 100644 --- a/xc/lib/GL/dri/XF86dri.c +++ b/xc/lib/GL/dri/XF86dri.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/dri/XF86dri.c,v 1.9 2000/08/28 16:04:48 dawes Exp $ */ +/* $XFree86: xc/lib/GL/dri/XF86dri.c,v 1.10 2000/09/24 13:50:59 alanh Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. diff --git a/xc/lib/GL/dri/dri_glx.c b/xc/lib/GL/dri/dri_glx.c index 917a745de..20884c16b 100644 --- a/xc/lib/GL/dri/dri_glx.c +++ b/xc/lib/GL/dri/dri_glx.c @@ -24,6 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +/* $XFree86: xc/lib/GL/dri/dri_glx.c,v 1.7 2000/09/26 15:56:45 tsi Exp $ */ /* * Authors: diff --git a/xc/lib/GL/dri/drm/Imakefile b/xc/lib/GL/dri/drm/Imakefile index 9ee61da95..ba7b73fea 100644 --- a/xc/lib/GL/dri/drm/Imakefile +++ b/xc/lib/GL/dri/drm/Imakefile @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/dri/drm/Imakefile,v 1.9 2000/08/24 15:35:46 tsi Exp $ +XCOMM $XFree86: xc/lib/GL/dri/drm/Imakefile,v 1.10 2000/09/24 13:51:00 alanh Exp $ #define DoNormalLib NormalLibGlx #define DoSharedLib SharedLibGlx diff --git a/xc/lib/GL/glx/glxclient.h b/xc/lib/GL/glx/glxclient.h index fffa57b17..c71955c69 100644 --- a/xc/lib/GL/glx/glxclient.h +++ b/xc/lib/GL/glx/glxclient.h @@ -1,5 +1,3 @@ -#ifndef _GLX_client_h_ -#define _GLX_client_h_ /* ** The contents of this file are subject to the GLX Public License Version 1.0 @@ -20,6 +18,7 @@ ** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. ** */ +/* $XFree86: xc/lib/GL/glx/glxclient.h,v 1.9 2000/09/26 15:56:46 tsi Exp $ */ /* * Direct rendering support added by Precision Insight, Inc. @@ -29,6 +28,8 @@ * */ +#ifndef _GLX_client_h_ +#define _GLX_client_h_ #define NEED_REPLIES #define NEED_EVENTS #include <string.h> diff --git a/xc/lib/GL/glx/glxcmds.c b/xc/lib/GL/glx/glxcmds.c index fb4e65429..849d074f3 100644 --- a/xc/lib/GL/glx/glxcmds.c +++ b/xc/lib/GL/glx/glxcmds.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/glx/glxcmds.c,v 1.11 2000/07/01 15:23:10 martin Exp $ */ +/* $XFree86: xc/lib/GL/glx/glxcmds.c,v 1.12 2000/09/24 13:51:00 alanh Exp $ */ /* ** The contents of this file are subject to the GLX Public License Version 1.0 ** (the "License"). You may not use this file except in compliance with the diff --git a/xc/lib/GL/glx/glxext.c b/xc/lib/GL/glx/glxext.c index 262e91059..9bed4bb09 100644 --- a/xc/lib/GL/glx/glxext.c +++ b/xc/lib/GL/glx/glxext.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/glx/glxext.c,v 1.6 2000/02/15 19:19:18 dawes Exp $ */ +/* $XFree86: xc/lib/GL/glx/glxext.c,v 1.8 2000/09/26 15:56:46 tsi Exp $ */ /* ** The contents of this file are subject to the GLX Public License Version 1.0 @@ -184,8 +184,7 @@ static /* const */ XExtensionHooks __glXExtensionHooks = { __glXErrorString, /* error_string */ }; -XExtDisplayInfo *__glXFindDisplay(Display *); - +static XEXT_GENERATE_FIND_DISPLAY(__glXFindDisplay, __glXExtensionInfo, __glXExtensionName, &__glXExtensionHooks, __GLX_NUMBER_EVENTS, NULL) @@ -558,7 +557,9 @@ __GLXdisplayPrivate *__glXInitialize(Display* dpy) XAddToExtensionList(privList, private); if (dpyPriv->majorVersion == 1 && dpyPriv->minorVersion >= 1) { +#if 0 __glXClientInfo(dpy, dpyPriv->majorOpcode); +#endif } __glXUnlock(); diff --git a/xc/lib/GL/highpc.c b/xc/lib/GL/highpc.c index eca2a9382..fb9682ebb 100644 --- a/xc/lib/GL/highpc.c +++ b/xc/lib/GL/highpc.c @@ -1,3 +1,5 @@ +/* $XFree86: xc/lib/GL/highpc.c,v 1.3 2000/09/26 15:56:45 tsi Exp $ */ + #include <stdio.h> #include <stdlib.h> diff --git a/xc/lib/GL/mesa/dri/dri_mesa.c b/xc/lib/GL/mesa/dri/dri_mesa.c index 91daf4218..3b17366d3 100644 --- a/xc/lib/GL/mesa/dri/dri_mesa.c +++ b/xc/lib/GL/mesa/dri/dri_mesa.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/dri/dri_mesa.c,v 1.8 2000/06/26 05:41:29 martin Exp $ */ +/* $XFree86: xc/lib/GL/mesa/dri/dri_mesa.c,v 1.11 2000/10/11 17:27:32 martin Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. diff --git a/xc/lib/GL/mesa/src/Imakefile b/xc/lib/GL/mesa/src/Imakefile index d9f973e6e..f8232128f 100644 --- a/xc/lib/GL/mesa/src/Imakefile +++ b/xc/lib/GL/mesa/src/Imakefile @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/Imakefile,v 1.16 2000/08/01 20:28:38 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/Imakefile,v 1.19 2000/10/20 12:57:22 alanh Exp $ #include <Threads.tmpl> @@ -374,10 +374,6 @@ LinkSourceFile(zoom.h, $(MESASRCDIR)/src) #endif #if GlxBuiltInMesa || GlxDriverUsesMesa || !GlxUseBuiltInDRIDriver - MESASUBDIRS = -#ifdef i386Architecture - ASMSUBDIRS = X86 -#endif #include <Library.tmpl> @@ -386,17 +382,22 @@ LibraryObjectRule() SubdirLibraryRule($(OBJS)) NormalLintTarget($(SRCS)) -#else - -AllTarget($(OBJS)) - -#endif +#ifdef i386Architecture #define IHaveSubdirs #define PassCDebugFlags -SUBDIRS = $(MESASUBDIRS) $(ASMSUBDIRS) +SUBDIRS = X86 MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) + +#endif + +#else + +AllTarget($(OBJS)) + +#endif + DependTarget() diff --git a/xc/lib/GL/mesa/src/X86/Imakefile b/xc/lib/GL/mesa/src/X86/Imakefile index 77259ede4..e3239ecd8 100644 --- a/xc/lib/GL/mesa/src/X86/Imakefile +++ b/xc/lib/GL/mesa/src/X86/Imakefile @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/X86/Imakefile,v 1.10 2000/08/01 20:28:39 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/X86/Imakefile,v 1.11 2000/09/24 13:51:02 alanh Exp $ #define DoNormalLib NormalLibGlx #define DoSharedLib SharedLibGlx diff --git a/xc/lib/GL/mesa/src/drv/ffb/Imakefile b/xc/lib/GL/mesa/src/drv/ffb/Imakefile index 13a7c1005..d66bc2bfb 100644 --- a/xc/lib/GL/mesa/src/drv/ffb/Imakefile +++ b/xc/lib/GL/mesa/src/drv/ffb/Imakefile @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/ffb/Imakefile,v 1.5 2000/08/24 22:20:06 tsi Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/ffb/Imakefile,v 1.6 2000/10/20 12:57:22 alanh Exp $ #include <Threads.tmpl> diff --git a/xc/lib/GL/mesa/src/drv/ffb/ffb_vb.c b/xc/lib/GL/mesa/src/drv/ffb/ffb_vb.c index 03c1b32a5..6fa6a4ae2 100644 --- a/xc/lib/GL/mesa/src/drv/ffb/ffb_vb.c +++ b/xc/lib/GL/mesa/src/drv/ffb/ffb_vb.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_vb.c,v 1.1 2000/06/20 05:08:40 dawes Exp $ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_vb.c,v 1.2 2000/09/24 13:51:03 alanh Exp $ * * GLX Hardware Device Driver for Sun Creator/Creator3D * Copyright (C) 2000 David S. Miller diff --git a/xc/lib/GL/mesa/src/drv/gamma/Imakefile b/xc/lib/GL/mesa/src/drv/gamma/Imakefile index c20e2c0a3..ff31fdf2b 100644 --- a/xc/lib/GL/mesa/src/drv/gamma/Imakefile +++ b/xc/lib/GL/mesa/src/drv/gamma/Imakefile @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/gamma/Imakefile,v 1.13 2000/08/24 22:20:06 tsi Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/gamma/Imakefile,v 1.14 2000/10/20 12:57:22 alanh Exp $ #include <Threads.tmpl> diff --git a/xc/lib/GL/mesa/src/drv/i810/Imakefile b/xc/lib/GL/mesa/src/drv/i810/Imakefile index fcf97a5ce..b66d715c1 100644 --- a/xc/lib/GL/mesa/src/drv/i810/Imakefile +++ b/xc/lib/GL/mesa/src/drv/i810/Imakefile @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/i810/Imakefile,v 1.9 2000/08/25 13:42:19 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/i810/Imakefile,v 1.11 2000/10/20 12:57:22 alanh Exp $ #include <Threads.tmpl> diff --git a/xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c b/xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c index ba9688f54..73c6bf3e9 100644 --- a/xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c +++ b/xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c @@ -24,7 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c,v 1.6 2000/08/25 13:42:20 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c,v 1.7 2000/09/24 13:51:04 alanh Exp $ */ /* * Authors: diff --git a/xc/lib/GL/mesa/src/drv/i810/i810dd.c b/xc/lib/GL/mesa/src/drv/i810/i810dd.c index 0e9f1d5f0..eb78a91c6 100644 --- a/xc/lib/GL/mesa/src/drv/i810/i810dd.c +++ b/xc/lib/GL/mesa/src/drv/i810/i810dd.c @@ -21,7 +21,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ -/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810dd.c,v 1.3 2000/06/22 16:59:24 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810dd.c,v 1.4 2000/09/24 13:51:04 alanh Exp $ */ #include "types.h" #include "vbrender.h" diff --git a/xc/lib/GL/mesa/src/drv/i810/i810ioctl.h b/xc/lib/GL/mesa/src/drv/i810/i810ioctl.h index 57f72be67..6f74526ae 100644 --- a/xc/lib/GL/mesa/src/drv/i810/i810ioctl.h +++ b/xc/lib/GL/mesa/src/drv/i810/i810ioctl.h @@ -1,7 +1,7 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810ioctl.h,v 1.4 2000/08/28 02:43:11 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810ioctl.h,v 1.5 2000/10/24 22:45:01 dawes Exp $ */ -#ifndef MGA_IOCTL_H -#define MGA_IOCTL_H +#ifndef I810_IOCTL_H +#define I810_IOCTL_H #include "i810context.h" diff --git a/xc/lib/GL/mesa/src/drv/i810/i810tris.c b/xc/lib/GL/mesa/src/drv/i810/i810tris.c index b05affec2..e97e7e644 100644 --- a/xc/lib/GL/mesa/src/drv/i810/i810tris.c +++ b/xc/lib/GL/mesa/src/drv/i810/i810tris.c @@ -22,7 +22,7 @@ * * */ -/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810tris.c,v 1.4 2000/08/28 02:43:11 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810tris.c,v 1.5 2000/09/24 13:51:04 alanh Exp $ */ #include <stdio.h> #include <math.h> diff --git a/xc/lib/GL/mesa/src/drv/i810/i810tris.h b/xc/lib/GL/mesa/src/drv/i810/i810tris.h index c1e8cf7bc..20e7cbd80 100644 --- a/xc/lib/GL/mesa/src/drv/i810/i810tris.h +++ b/xc/lib/GL/mesa/src/drv/i810/i810tris.h @@ -22,7 +22,7 @@ * * */ -/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810tris.h,v 1.4 2000/08/28 02:43:11 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810tris.h,v 1.6 2000/09/29 08:59:42 eich Exp $ */ #ifndef I810TRIS_INC #define I810TRIS_INC @@ -53,7 +53,7 @@ static void __inline__ i810_draw_triangle( i810ContextPtr imesa, GLuint *vb = i810AllocDwordsInline( imesa, 3 * vertsize ); int j; -#if 1 +#if defined(USE_X86_ASM) __asm__ __volatile__( "rep ; movsl" : "=%c" (j) : "0" (vertsize), "D" ((long)vb), "S" ((long)v0) diff --git a/xc/lib/GL/mesa/src/drv/i810/i810vb.c b/xc/lib/GL/mesa/src/drv/i810/i810vb.c index 37514dd8d..4b0f9430a 100644 --- a/xc/lib/GL/mesa/src/drv/i810/i810vb.c +++ b/xc/lib/GL/mesa/src/drv/i810/i810vb.c @@ -22,7 +22,7 @@ * * */ -/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810vb.c,v 1.5 2000/08/28 02:43:12 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810vb.c,v 1.6 2000/09/24 13:51:04 alanh Exp $ */ #include <stdio.h> #include <stdlib.h> diff --git a/xc/lib/GL/mesa/src/drv/mga/Imakefile b/xc/lib/GL/mesa/src/drv/mga/Imakefile index 2bee66de9..ba384a1ee 100644 --- a/xc/lib/GL/mesa/src/drv/mga/Imakefile +++ b/xc/lib/GL/mesa/src/drv/mga/Imakefile @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/mga/Imakefile,v 1.9 2000/08/25 13:42:22 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/mga/Imakefile,v 1.11 2000/10/20 12:57:22 alanh Exp $ #include <Threads.tmpl> @@ -276,7 +276,7 @@ MESA_INCLUDES = -I. -I.. -I../../include \ OBJS = $(LOOBJS) $(DRIOBJS) $(DRMOBJS) $(MESAOBJS) $(ASMOBJS) \ $(COMMONOBJS) $(MGAOBJS) $(HIOBJS) -REQUIREDLIBS += MathLibrary +REQUIREDLIBS += MathLibrary #if !GlxBuiltInMga REQUIREDLIBS += -L../../../.. -lGL -L../../../../../X11 -lX11 #endif diff --git a/xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c b/xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c index f07c12089..a691f9ecd 100644 --- a/xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c +++ b/xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c,v 1.5 2000/08/25 13:42:22 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c,v 1.6 2000/09/24 13:51:05 alanh Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. diff --git a/xc/lib/GL/mesa/src/drv/mga/mga_xmesa.h b/xc/lib/GL/mesa/src/drv/mga/mga_xmesa.h index 2e9877eb2..f562ad094 100644 --- a/xc/lib/GL/mesa/src/drv/mga/mga_xmesa.h +++ b/xc/lib/GL/mesa/src/drv/mga/mga_xmesa.h @@ -24,7 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mga_xmesa.h,v 1.5 2000/08/28 02:43:12 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mga_xmesa.h,v 1.6 2000/09/24 13:51:05 alanh Exp $ */ /* * Authors: diff --git a/xc/lib/GL/mesa/src/drv/mga/mgabuffers.c b/xc/lib/GL/mesa/src/drv/mga/mgabuffers.c index d37027473..75d322c47 100644 --- a/xc/lib/GL/mesa/src/drv/mga/mgabuffers.c +++ b/xc/lib/GL/mesa/src/drv/mga/mgabuffers.c @@ -24,7 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgabuffers.c,v 1.3 2000/08/25 13:42:22 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgabuffers.c,v 1.4 2000/09/24 13:51:05 alanh Exp $ */ /* * Authors: diff --git a/xc/lib/GL/mesa/src/drv/mga/mgadd.c b/xc/lib/GL/mesa/src/drv/mga/mgadd.c index 78f6d1ed4..c390b9aba 100644 --- a/xc/lib/GL/mesa/src/drv/mga/mgadd.c +++ b/xc/lib/GL/mesa/src/drv/mga/mgadd.c @@ -23,7 +23,7 @@ * * Wittawat Yamwong <Wittawat.Yamwong@stud.uni-hannover.de> */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgadd.c,v 1.4 2000/08/25 13:42:23 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgadd.c,v 1.5 2000/09/24 13:51:06 alanh Exp $ */ diff --git a/xc/lib/GL/mesa/src/drv/mga/mgaeltpath.c b/xc/lib/GL/mesa/src/drv/mga/mgaeltpath.c index 3dcfa5eed..8d09236d6 100644 --- a/xc/lib/GL/mesa/src/drv/mga/mgaeltpath.c +++ b/xc/lib/GL/mesa/src/drv/mga/mgaeltpath.c @@ -21,7 +21,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgaeltpath.c,v 1.3 2000/08/28 02:43:12 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgaeltpath.c,v 1.5 2000/09/26 15:56:47 tsi Exp $ */ #include <stdio.h> @@ -58,10 +58,10 @@ static void fire_elts( mgaContextPtr mmesa ) if (mmesa->first_elt != mmesa->next_elt) { mgaFireEltsLocked( mmesa, - ((GLuint)mmesa->first_elt - - (GLuint)mmesa->elt_buf->address), - ((GLuint)mmesa->next_elt - - (GLuint)mmesa->elt_buf->address), + ((char *)mmesa->first_elt - + (char *)mmesa->elt_buf->address), + ((char *)mmesa->next_elt - + (char *)mmesa->elt_buf->address), !retain ); } else if (!retain) mgaReleaseBufLocked( mmesa, mmesa->elt_buf ); @@ -77,7 +77,7 @@ static void fire_elts( mgaContextPtr mmesa ) UNLOCK_HARDWARE( mmesa ); - mmesa->next_vert = (GLfloat *)((GLuint)mmesa->elt_buf->address + + mmesa->next_vert = (GLfloat *)((char *)mmesa->elt_buf->address + mmesa->elt_buf->total - BUFFER_STRIDE * sizeof(GLfloat)); @@ -99,10 +99,10 @@ static void release_bufs( mgaContextPtr mmesa ) LOCK_HARDWARE( mmesa ); if (mmesa->first_elt != mmesa->next_elt) { mgaFireEltsLocked( mmesa, - ((GLuint)mmesa->first_elt - - (GLuint)mmesa->elt_buf->address), - ((GLuint)mmesa->next_elt - - (GLuint)mmesa->elt_buf->address), + ((char *)mmesa->first_elt - + (char *)mmesa->elt_buf->address), + ((char *)mmesa->next_elt - + (char *)mmesa->elt_buf->address), 0 ); mmesa->first_elt = mmesa->next_elt; @@ -205,7 +205,7 @@ static void mga_tri_clip( mgaContextPtr mmesa, { GLuint *out = inlist[in]; - GLuint space = (GLuint)mmesa->next_vert - (GLuint)mmesa->next_elt; + GLuint space = (char *)mmesa->next_vert - (char *)mmesa->next_elt; if (space < n * (BUFFER_STRIDE + 3) * sizeof(GLuint)) fire_elts(mmesa); @@ -242,15 +242,15 @@ static void mga_tri_clip( mgaContextPtr mmesa, #define UNCLIPPED_VERT(x) (mmesa->first_vert_phys - x * BUFFER_STRIDE * 4) -#define TRIANGLE( e2, e1, e0 ) \ -do { \ - if ((GLuint)mmesa->next_vert - \ - (GLuint)mmesa->next_elt < TRI_THRESHOLD) \ - fire_elts(mmesa); \ - mmesa->next_elt[0] = UNCLIPPED_VERT(e2); \ - mmesa->next_elt[1] = UNCLIPPED_VERT(e1); \ - mmesa->next_elt[2] = UNCLIPPED_VERT(e0); \ - mmesa->next_elt+=3; \ +#define TRIANGLE( e2, e1, e0 ) \ +do { \ + if (((char *)mmesa->next_vert - \ + (char *)mmesa->next_elt) < TRI_THRESHOLD) \ + fire_elts(mmesa); \ + mmesa->next_elt[0] = UNCLIPPED_VERT(e2); \ + mmesa->next_elt[1] = UNCLIPPED_VERT(e1); \ + mmesa->next_elt[2] = UNCLIPPED_VERT(e0); \ + mmesa->next_elt+=3; \ } while (0) #define CLIP_TRIANGLE( e2, e1, e0 ) \ @@ -428,7 +428,7 @@ void mgaDDEltPath( struct vertex_buffer *VB ) /* Allocate a single buffer to hold unclipped vertices. All * unclipped vertices must be contiguous. */ - if ((GLuint)mmesa->next_vert - (GLuint)mmesa->next_elt < + if ((char *)mmesa->next_vert - (char *)mmesa->next_elt < VB->Count * BUFFER_STRIDE * sizeof(GLuint)) fire_elts( mmesa ); diff --git a/xc/lib/GL/mesa/src/drv/mga/mgafastpath.c b/xc/lib/GL/mesa/src/drv/mga/mgafastpath.c index ad69cf8f6..c2e672a46 100644 --- a/xc/lib/GL/mesa/src/drv/mga/mgafastpath.c +++ b/xc/lib/GL/mesa/src/drv/mga/mgafastpath.c @@ -21,7 +21,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgafastpath.c,v 1.4 2000/08/28 02:43:12 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgafastpath.c,v 1.5 2000/09/24 13:51:06 alanh Exp $ */ #include <stdio.h> diff --git a/xc/lib/GL/mesa/src/drv/mga/mgaioctl.c b/xc/lib/GL/mesa/src/drv/mga/mgaioctl.c index 8dcb8f988..d1949cf27 100644 --- a/xc/lib/GL/mesa/src/drv/mga/mgaioctl.c +++ b/xc/lib/GL/mesa/src/drv/mga/mgaioctl.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgaioctl.c,v 1.5 2000/08/28 02:43:12 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgaioctl.c,v 1.7 2000/09/26 15:56:47 tsi Exp $ */ #include <stdio.h> @@ -169,7 +169,6 @@ GLbitfield mgaClear( GLcontext *ctx, GLbitfield mask, GLboolean all, clear.clear_depth = 0; clear.clear_depth_mask = 0; - FLUSH_BATCH( mmesa ); if (mask & DD_FRONT_LEFT_BIT) { @@ -524,10 +523,10 @@ void mgaFlushEltsLocked( mgaContextPtr mmesa ) { if (mmesa->first_elt != mmesa->next_elt) { mgaFireEltsLocked( mmesa, - ((GLuint)mmesa->first_elt - - (GLuint)mmesa->elt_buf->address), - ((GLuint)mmesa->next_elt - - (GLuint)mmesa->elt_buf->address), + ((char *)mmesa->first_elt - + (char *)mmesa->elt_buf->address), + ((char *)mmesa->next_elt - + (char *)mmesa->elt_buf->address), 0 ); mmesa->first_elt = mmesa->next_elt; } diff --git a/xc/lib/GL/mesa/src/drv/mga/mgaioctl.h b/xc/lib/GL/mesa/src/drv/mga/mgaioctl.h index f84ec731a..869d50160 100644 --- a/xc/lib/GL/mesa/src/drv/mga/mgaioctl.h +++ b/xc/lib/GL/mesa/src/drv/mga/mgaioctl.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgaioctl.h,v 1.4 2000/08/28 02:43:12 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgaioctl.h,v 1.5 2000/09/24 13:51:07 alanh Exp $ */ #ifndef MGA_IOCTL_H #define MGA_IOCTL_H diff --git a/xc/lib/GL/mesa/src/drv/mga/mgapipeline.c b/xc/lib/GL/mesa/src/drv/mga/mgapipeline.c index bb28e55df..1f5288de5 100644 --- a/xc/lib/GL/mesa/src/drv/mga/mgapipeline.c +++ b/xc/lib/GL/mesa/src/drv/mga/mgapipeline.c @@ -1,4 +1,4 @@ -/* #include "mgapipeline.h" */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgapipeline.c,v 1.3 2000/09/26 15:56:47 tsi Exp $ */ #include <stdio.h> #include "mgavb.h" diff --git a/xc/lib/GL/mesa/src/drv/mga/mgaspan.c b/xc/lib/GL/mesa/src/drv/mga/mgaspan.c index b3442d3fa..3df15ddce 100644 --- a/xc/lib/GL/mesa/src/drv/mga/mgaspan.c +++ b/xc/lib/GL/mesa/src/drv/mga/mgaspan.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgaspan.c,v 1.4 2000/08/28 02:43:12 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgaspan.c,v 1.5 2000/09/24 13:51:07 alanh Exp $ */ #include "types.h" #include "mgadd.h" diff --git a/xc/lib/GL/mesa/src/drv/mga/mgastate.c b/xc/lib/GL/mesa/src/drv/mga/mgastate.c index 84a4b8135..c5a9f7060 100644 --- a/xc/lib/GL/mesa/src/drv/mga/mgastate.c +++ b/xc/lib/GL/mesa/src/drv/mga/mgastate.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgastate.c,v 1.4 2000/08/25 13:42:25 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgastate.c,v 1.5 2000/09/24 13:51:07 alanh Exp $ */ #include <stdio.h> diff --git a/xc/lib/GL/mesa/src/drv/mga/mgatex.c b/xc/lib/GL/mesa/src/drv/mga/mgatex.c index 964157d19..b0ae6aba5 100644 --- a/xc/lib/GL/mesa/src/drv/mga/mgatex.c +++ b/xc/lib/GL/mesa/src/drv/mga/mgatex.c @@ -25,7 +25,7 @@ * 9/20/99 rewrite by John Carmack <johnc@idsoftware.com> * 13/1/00 port to DRI by Keith Whitwell <keithw@precisioninsight.com> */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatex.c,v 1.5 2000/08/25 13:42:25 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatex.c,v 1.6 2000/09/24 13:51:07 alanh Exp $ */ #include <stdlib.h> #include <stdio.h> diff --git a/xc/lib/GL/mesa/src/drv/mga/mgatex.h b/xc/lib/GL/mesa/src/drv/mga/mgatex.h index 6b897c3d2..02e95f59f 100644 --- a/xc/lib/GL/mesa/src/drv/mga/mgatex.h +++ b/xc/lib/GL/mesa/src/drv/mga/mgatex.h @@ -24,7 +24,7 @@ * John Carmack <johnc@idsoftware.com> * Keith Whitwell <keithw@precisioninsight.com> */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatex.h,v 1.3 2000/06/22 16:59:24 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatex.h,v 1.4 2000/09/24 13:51:07 alanh Exp $ */ #ifndef MGATEX_INC #define MGATEX_INC diff --git a/xc/lib/GL/mesa/src/drv/mga/mgatris.c b/xc/lib/GL/mesa/src/drv/mga/mgatris.c index d63796946..d842e5252 100644 --- a/xc/lib/GL/mesa/src/drv/mga/mgatris.c +++ b/xc/lib/GL/mesa/src/drv/mga/mgatris.c @@ -23,7 +23,7 @@ * * Wittawat Yamwong <Wittawat.Yamwong@stud.uni-hannover.de> */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatris.c,v 1.4 2000/08/28 02:43:12 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatris.c,v 1.5 2000/09/24 13:51:08 alanh Exp $ */ #include <stdio.h> #include <math.h> diff --git a/xc/lib/GL/mesa/src/drv/mga/mgatris.h b/xc/lib/GL/mesa/src/drv/mga/mgatris.h index 6fcf73d58..0c27ab43d 100644 --- a/xc/lib/GL/mesa/src/drv/mga/mgatris.h +++ b/xc/lib/GL/mesa/src/drv/mga/mgatris.h @@ -23,7 +23,7 @@ * * Wittawat Yamwong <Wittawat.Yamwong@stud.uni-hannover.de> */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatris.h,v 1.4 2000/08/28 02:43:12 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatris.h,v 1.5 2000/09/24 13:51:08 alanh Exp $ */ #ifndef MGATIS_INC #define MGATIS_INC diff --git a/xc/lib/GL/mesa/src/drv/mga/mgavb.c b/xc/lib/GL/mesa/src/drv/mga/mgavb.c index dec13514a..fc3b07cac 100644 --- a/xc/lib/GL/mesa/src/drv/mga/mgavb.c +++ b/xc/lib/GL/mesa/src/drv/mga/mgavb.c @@ -23,7 +23,7 @@ * * Wittawat Yamwong <Wittawat.Yamwong@stud.uni-hannover.de> */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgavb.c,v 1.5 2000/08/28 02:43:13 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgavb.c,v 1.6 2000/09/24 13:51:09 alanh Exp $ */ #include "mgacontext.h" #include "mgavb.h" diff --git a/xc/lib/GL/mesa/src/drv/mga/mgavb.h b/xc/lib/GL/mesa/src/drv/mga/mgavb.h index c79fd5b6e..c51fd0744 100644 --- a/xc/lib/GL/mesa/src/drv/mga/mgavb.h +++ b/xc/lib/GL/mesa/src/drv/mga/mgavb.h @@ -23,7 +23,7 @@ * * Wittawat Yamwong <Wittawat.Yamwong@stud.uni-hannover.de> */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgavb.h,v 1.4 2000/08/28 02:43:13 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgavb.h,v 1.5 2000/09/24 13:51:09 alanh Exp $ */ #ifndef MGAVB_INC #define MGAVB_INC diff --git a/xc/lib/GL/mesa/src/drv/r128/Imakefile b/xc/lib/GL/mesa/src/drv/r128/Imakefile index fb384362f..cf9c82b86 100644 --- a/xc/lib/GL/mesa/src/drv/r128/Imakefile +++ b/xc/lib/GL/mesa/src/drv/r128/Imakefile @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/r128/Imakefile,v 1.5 2000/08/24 22:20:07 tsi Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/r128/Imakefile,v 1.7 2000/10/20 12:57:23 alanh Exp $ #include <Threads.tmpl> diff --git a/xc/lib/GL/mesa/src/drv/r128/r128_tex.c b/xc/lib/GL/mesa/src/drv/r128/r128_tex.c index 2dd5e41dc..cc6791d57 100644 --- a/xc/lib/GL/mesa/src/drv/r128/r128_tex.c +++ b/xc/lib/GL/mesa/src/drv/r128/r128_tex.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_tex.c,v 1.3 2000/08/25 13:42:30 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_tex.c,v 1.4 2000/09/27 03:39:03 tsi Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -149,7 +149,7 @@ static r128TexObjPtr r128CreateTexObj(r128ContextPtr r128ctx, t->tObj = tObj; t->memBlock = NULL; - t->bufAddr = NULL; + t->bufAddr = 0; t->regs.tex_cntl = t->textureFormat; t->regs.size_pitch = ((log2Pitch << R128_TEX_PITCH_SHIFT) | @@ -702,7 +702,7 @@ static void r128UploadSubImage(r128ContextPtr r128ctx, } dwords = width * height / texelsPerDword; - offset = (CARD32)(t->bufAddr + t->image[level].offset); + offset = t->bufAddr + t->image[level].offset; #if ENABLE_PERF_BOXES /* Bump the performace counter */ @@ -868,8 +868,7 @@ int r128UploadTexImages(r128ContextPtr r128ctx, r128TexObjPtr t) } /* Set the base offset of the texture image */ - t->bufAddr = (unsigned char *)r128ctx->r128Screen->texOffset[heap]; - t->bufAddr += t->memBlock->ofs; + t->bufAddr = r128ctx->r128Screen->texOffset[heap] + t->memBlock->ofs; maxLevel = ((t->regs.size_pitch & R128_TEX_SIZE_MASK) >> R128_TEX_SIZE_SHIFT); @@ -882,11 +881,11 @@ int r128UploadTexImages(r128ContextPtr r128ctx, r128TexObjPtr t) /* Set texture offsets */ if (t->regs.tex_cntl & R128_MIP_MAP_DISABLE) { for (i = 0; i < R128_TEX_MAXLEVELS; i++) - r128ctx->regs.prim_tex_offset[i] = (CARD32)t->bufAddr; + r128ctx->regs.prim_tex_offset[i] = t->bufAddr; } else { for (i = maxLevel; i >= minLevel; i--) r128ctx->regs.prim_tex_offset[i] = - t->image[maxLevel-i].offset + (CARD32)t->bufAddr; + t->image[maxLevel-i].offset + t->bufAddr; } /* Fix AGP texture offsets */ if (heap == R128_AGP_TEX_HEAP) @@ -903,11 +902,11 @@ int r128UploadTexImages(r128ContextPtr r128ctx, r128TexObjPtr t) /* Set texture offsets */ if (t->regs.tex_cntl & R128_MIP_MAP_DISABLE) { for (i = 0; i < R128_TEX_MAXLEVELS; i++) - r128ctx->regs.sec_tex_offset[i] = (CARD32)t->bufAddr; + r128ctx->regs.sec_tex_offset[i] = t->bufAddr; } else { for (i = maxLevel; i >= minLevel; i--) r128ctx->regs.sec_tex_offset[i] = - t->image[maxLevel-i].offset + (CARD32)t->bufAddr; + t->image[maxLevel-i].offset + t->bufAddr; } /* Fix AGP texture offsets */ if (heap == R128_AGP_TEX_HEAP) @@ -1258,7 +1257,7 @@ static void r128UpdateTex0State(r128ContextPtr r128ctx) /* Set texture offsets */ if (t->regs.tex_cntl & R128_MIP_MAP_DISABLE) { for (i = 0; i < R128_TEX_MAXLEVELS; i++) - r128ctx->regs.prim_tex_offset[i] = (CARD32)t->bufAddr; + r128ctx->regs.prim_tex_offset[i] = t->bufAddr; } else { int maxLevel = ((t->regs.size_pitch & R128_TEX_SIZE_MASK) >> R128_TEX_SIZE_SHIFT); @@ -1266,7 +1265,7 @@ static void r128UpdateTex0State(r128ContextPtr r128ctx) R128_TEX_MIN_SIZE_SHIFT); for (i = maxLevel; i >= minLevel; i--) r128ctx->regs.prim_tex_offset[i] = - t->image[maxLevel-i].offset + (CARD32)t->bufAddr; + t->image[maxLevel-i].offset + t->bufAddr; } /* Fix AGP texture offsets */ if (t->heap == R128_AGP_TEX_HEAP) @@ -1575,7 +1574,7 @@ static void r128UpdateTex1State(r128ContextPtr r128ctx) /* Set texture offsets */ if (t->regs.tex_cntl & R128_MIP_MAP_DISABLE) { for (i = 0; i < R128_TEX_MAXLEVELS; i++) - r128ctx->regs.sec_tex_offset[i] = (CARD32)t->bufAddr; + r128ctx->regs.sec_tex_offset[i] = t->bufAddr; } else { int maxLevel = ((t->regs.size_pitch & R128_TEX_SIZE_MASK) >> R128_TEX_SIZE_SHIFT); @@ -1583,7 +1582,7 @@ static void r128UpdateTex1State(r128ContextPtr r128ctx) R128_TEX_MIN_SIZE_SHIFT); for (i = maxLevel; i >= minLevel; i--) r128ctx->regs.sec_tex_offset[i] = - t->image[maxLevel-i].offset + (CARD32)t->bufAddr; + t->image[maxLevel-i].offset + t->bufAddr; } /* Fix AGP texture offsets */ if (t->heap == R128_AGP_TEX_HEAP) diff --git a/xc/lib/GL/mesa/src/drv/r128/r128_texobj.h b/xc/lib/GL/mesa/src/drv/r128/r128_texobj.h index 8ccaaf9fe..504d35087 100644 --- a/xc/lib/GL/mesa/src/drv/r128/r128_texobj.h +++ b/xc/lib/GL/mesa/src/drv/r128/r128_texobj.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_texobj.h,v 1.1 2000/06/17 00:03:08 martin Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_texobj.h,v 1.2 2000/09/27 03:39:03 tsi Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -64,7 +64,7 @@ struct r128_tex_obj { struct gl_texture_object *tObj; /* Mesa texture object */ PMemBlock memBlock; /* Memory block containing texture */ - unsigned char *bufAddr; /* Offset to start of locally + CARD32 bufAddr; /* Offset to start of locally shared texture block */ CARD32 dirty_images; /* Flags for whether or not diff --git a/xc/lib/GL/mesa/src/drv/r128/r128_vb.c b/xc/lib/GL/mesa/src/drv/r128/r128_vb.c index 4ae310783..ea4f5f248 100644 --- a/xc/lib/GL/mesa/src/drv/r128/r128_vb.c +++ b/xc/lib/GL/mesa/src/drv/r128/r128_vb.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_vb.c,v 1.4 2000/08/25 13:42:31 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_vb.c,v 1.6 2000/09/26 15:56:47 tsi Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -413,7 +413,8 @@ void r128DDResizeVB(struct vertex_buffer *VB, GLuint size) exit(1); } - r128vb->verts = (r128VertexPtr)(((CARD32)r128vb->vert_store + 31) & ~31); + r128vb->verts = + (r128VertexPtr)(((unsigned long)r128vb->vert_store + 31) & ~31); gl_vector1ui_free(&r128vb->clipped_elements); gl_vector1ui_alloc(&r128vb->clipped_elements, @@ -445,7 +446,8 @@ void r128DDRegisterVB(struct vertex_buffer *VB) exit(1); } - r128vb->verts = (r128VertexPtr)(((CARD32)r128vb->vert_store + 31) & ~31); + r128vb->verts = + (r128VertexPtr)(((unsigned long)r128vb->vert_store + 31) & ~31); gl_vector1ui_alloc(&r128vb->clipped_elements, VEC_WRITABLE, r128vb->size, 32); diff --git a/xc/lib/GL/mesa/src/drv/sis/Imakefile b/xc/lib/GL/mesa/src/drv/sis/Imakefile index 93e16987d..59f2429ac 100644 --- a/xc/lib/GL/mesa/src/drv/sis/Imakefile +++ b/xc/lib/GL/mesa/src/drv/sis/Imakefile @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/sis/Imakefile,v 1.7 2000/08/24 22:20:08 tsi Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/sis/Imakefile,v 1.10 2000/10/20 12:57:23 alanh Exp $ #include <Threads.tmpl> @@ -164,8 +164,7 @@ LinkSourceFile(xdriP.h, ../../X) ../../vertices.c \ ../../winpos.c \ ../../xform.c \ - ../../zoom.c \ - ../../X86/common_x86.c + ../../zoom.c MESAOBJS = ../../aatriangle.o \ ../../accum.o \ diff --git a/xc/lib/GL/mesa/src/drv/sis/sis_alloc.c b/xc/lib/GL/mesa/src/drv/sis/sis_alloc.c index e9ce26d30..1caa57200 100644 --- a/xc/lib/GL/mesa/src/drv/sis/sis_alloc.c +++ b/xc/lib/GL/mesa/src/drv/sis/sis_alloc.c @@ -24,6 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_alloc.c,v 1.6 2000/09/26 15:56:48 tsi Exp $ */ /* * Authors: @@ -147,7 +148,7 @@ sis_free_fb (int hHWContext, void *free) } fb.context = hHWContext; - fb.free = (unsigned int)free; + fb.free = (unsigned long)free; ioctl(gDRMSubFD, SIS_IOCTL_FB_FREE, &fb); } @@ -217,7 +218,7 @@ sis_free_agp (int hHWContext, void *free) } agp.context = hHWContext; - agp.free = (unsigned int)free; + agp.free = (unsigned long)free; ioctl(gDRMSubFD, SIS_IOCTL_AGP_FREE, &agp); } @@ -263,7 +264,7 @@ sis_alloc_z_stencil_buffer (GLcontext * ctx) fprintf(stderr, "sis_alloc_z_stencil_buffer: addr=%lu\n", (DWORD)addr); } - addr = (GLubyte *) ALIGNMENT ((GLuint) addr, Z_BUFFER_HW_ALIGNMENT); + addr = (GLubyte *) ALIGNMENT ((unsigned long) addr, Z_BUFFER_HW_ALIGNMENT); xm_buffer->depthbuffer = (void *) addr; @@ -342,9 +343,9 @@ sis_alloc_back_image (GLcontext * ctx, XMesaImage *image, void **free, sis_fatal_error (); } - addr = (GLbyte *) ALIGNMENT ((GLuint) addr, DRAW_BUFFER_HW_ALIGNMENT); + addr = (GLbyte *) ALIGNMENT ((unsigned long) addr, DRAW_BUFFER_HW_ALIGNMENT); - image->data = addr; + image->data = (char *)addr; image->bytes_per_line = width2 * depth; image->bits_per_pixel = depth * 8; @@ -499,7 +500,8 @@ sis_alloc_texture_image (GLcontext * ctx, GLtextureImage * image) return; } - area->Data = (GLbyte *) ALIGNMENT ((GLuint) addr, TEXTURE_HW_ALIGNMENT); + area->Data = + (GLbyte *) ALIGNMENT ((unsigned long) addr, TEXTURE_HW_ALIGNMENT); area->Pitch = image->Width * texel_size; area->Format = driver_format; area->Size = image->Width * image->Height * texel_size; diff --git a/xc/lib/GL/mesa/src/drv/sis/sis_clear.c b/xc/lib/GL/mesa/src/drv/sis/sis_clear.c index 03da12499..b29f7904c 100644 --- a/xc/lib/GL/mesa/src/drv/sis/sis_clear.c +++ b/xc/lib/GL/mesa/src/drv/sis/sis_clear.c @@ -24,6 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_clear.c,v 1.5 2000/09/26 15:56:48 tsi Exp $ */ /* * Authors: diff --git a/xc/lib/GL/mesa/src/drv/sis/sis_common.h b/xc/lib/GL/mesa/src/drv/sis/sis_common.h index 8b62fadcf..b2ace4d45 100644 --- a/xc/lib/GL/mesa/src/drv/sis/sis_common.h +++ b/xc/lib/GL/mesa/src/drv/sis/sis_common.h @@ -24,6 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_common.h,v 1.5 2000/09/26 15:56:48 tsi Exp $ */ /* * Authors: diff --git a/xc/lib/GL/mesa/src/drv/sis/sis_ctx.c b/xc/lib/GL/mesa/src/drv/sis/sis_ctx.c index a45934fac..e7b865942 100644 --- a/xc/lib/GL/mesa/src/drv/sis/sis_ctx.c +++ b/xc/lib/GL/mesa/src/drv/sis/sis_ctx.c @@ -24,6 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_ctx.c,v 1.3 2000/09/26 15:56:48 tsi Exp $ */ /* * Authors: diff --git a/xc/lib/GL/mesa/src/drv/sis/sis_ctx.h b/xc/lib/GL/mesa/src/drv/sis/sis_ctx.h index 5bbaa29b4..61a9fcb70 100644 --- a/xc/lib/GL/mesa/src/drv/sis/sis_ctx.h +++ b/xc/lib/GL/mesa/src/drv/sis/sis_ctx.h @@ -24,6 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_ctx.h,v 1.5 2000/09/26 15:56:48 tsi Exp $ */ /* * Authors: diff --git a/xc/lib/GL/mesa/src/drv/sis/sis_debug.c b/xc/lib/GL/mesa/src/drv/sis/sis_debug.c index d95579ac0..33041c4b9 100644 --- a/xc/lib/GL/mesa/src/drv/sis/sis_debug.c +++ b/xc/lib/GL/mesa/src/drv/sis/sis_debug.c @@ -24,6 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_debug.c,v 1.5 2000/09/26 15:56:48 tsi Exp $ */ /* * Authors: diff --git a/xc/lib/GL/mesa/src/drv/sis/sis_debug.h b/xc/lib/GL/mesa/src/drv/sis/sis_debug.h index 546aa361a..6b7c79698 100644 --- a/xc/lib/GL/mesa/src/drv/sis/sis_debug.h +++ b/xc/lib/GL/mesa/src/drv/sis/sis_debug.h @@ -24,6 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_debug.h,v 1.3 2000/09/26 15:56:48 tsi Exp $ */ /* * Authors: diff --git a/xc/lib/GL/mesa/src/drv/sis/sis_fastpath.c b/xc/lib/GL/mesa/src/drv/sis/sis_fastpath.c index ba1092d30..1e94e1e9a 100644 --- a/xc/lib/GL/mesa/src/drv/sis/sis_fastpath.c +++ b/xc/lib/GL/mesa/src/drv/sis/sis_fastpath.c @@ -24,6 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_fastpath.c,v 1.3 2000/09/26 15:56:48 tsi Exp $ */ /* * Authors: diff --git a/xc/lib/GL/mesa/src/drv/sis/sis_fog.c b/xc/lib/GL/mesa/src/drv/sis/sis_fog.c index 7a2f5302c..dcffcca5b 100644 --- a/xc/lib/GL/mesa/src/drv/sis/sis_fog.c +++ b/xc/lib/GL/mesa/src/drv/sis/sis_fog.c @@ -24,6 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_fog.c,v 1.3 2000/09/26 15:56:48 tsi Exp $ */ /* * Authors: diff --git a/xc/lib/GL/mesa/src/drv/sis/sis_init.h b/xc/lib/GL/mesa/src/drv/sis/sis_init.h index 8b8f3b4ab..6e9a6c241 100644 --- a/xc/lib/GL/mesa/src/drv/sis/sis_init.h +++ b/xc/lib/GL/mesa/src/drv/sis/sis_init.h @@ -24,6 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_init.h,v 1.3 2000/09/26 15:56:48 tsi Exp $ */ /* * Authors: diff --git a/xc/lib/GL/mesa/src/drv/sis/sis_linefunc.h b/xc/lib/GL/mesa/src/drv/sis/sis_linefunc.h index 33f4542bf..09781a629 100644 --- a/xc/lib/GL/mesa/src/drv/sis/sis_linefunc.h +++ b/xc/lib/GL/mesa/src/drv/sis/sis_linefunc.h @@ -24,6 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_linefunc.h,v 1.5 2000/09/26 15:56:48 tsi Exp $ */ /* * Authors: diff --git a/xc/lib/GL/mesa/src/drv/sis/sis_lock.h b/xc/lib/GL/mesa/src/drv/sis/sis_lock.h index 99bee12ca..647a05357 100644 --- a/xc/lib/GL/mesa/src/drv/sis/sis_lock.h +++ b/xc/lib/GL/mesa/src/drv/sis/sis_lock.h @@ -24,6 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_lock.h,v 1.3 2000/09/26 15:56:48 tsi Exp $ */ /* * Authors: diff --git a/xc/lib/GL/mesa/src/drv/sis/sis_mesa.c b/xc/lib/GL/mesa/src/drv/sis/sis_mesa.c index d733a4cf8..e83a6a0e9 100644 --- a/xc/lib/GL/mesa/src/drv/sis/sis_mesa.c +++ b/xc/lib/GL/mesa/src/drv/sis/sis_mesa.c @@ -24,6 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_mesa.c,v 1.5 2000/09/26 15:56:48 tsi Exp $ */ /* * Authors: @@ -1044,8 +1045,8 @@ void sis_set_render_pos(GLcontext * ctx, GLubyte *base, GLuint pitch) assert (base != NULL); if (SIS_VERBOSE&VERBOSE_SIS_BUFFER){ - fprintf(stderr, "set drawing position: base=%x, pitch=%u\n", - (unsigned int)base, pitch); + fprintf(stderr, "set drawing position: base=%x, pitch=%lu\n", + (unsigned long)base, pitch); } /* software render */ diff --git a/xc/lib/GL/mesa/src/drv/sis/sis_mesa.h b/xc/lib/GL/mesa/src/drv/sis/sis_mesa.h index 033ee56ad..309a1ba8f 100644 --- a/xc/lib/GL/mesa/src/drv/sis/sis_mesa.h +++ b/xc/lib/GL/mesa/src/drv/sis/sis_mesa.h @@ -24,6 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_mesa.h,v 1.3 2000/09/26 15:56:48 tsi Exp $ */ /* * Authors: diff --git a/xc/lib/GL/mesa/src/drv/sis/sis_reg.h b/xc/lib/GL/mesa/src/drv/sis/sis_reg.h index 1d023e634..53708ca9b 100644 --- a/xc/lib/GL/mesa/src/drv/sis/sis_reg.h +++ b/xc/lib/GL/mesa/src/drv/sis/sis_reg.h @@ -24,6 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_reg.h,v 1.3 2000/09/26 15:56:48 tsi Exp $ */ /* * Authors: diff --git a/xc/lib/GL/mesa/src/drv/sis/sis_render.c b/xc/lib/GL/mesa/src/drv/sis/sis_render.c index f990d43b5..b019ec724 100644 --- a/xc/lib/GL/mesa/src/drv/sis/sis_render.c +++ b/xc/lib/GL/mesa/src/drv/sis/sis_render.c @@ -24,6 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_render.c,v 1.5 2000/09/26 15:56:49 tsi Exp $ */ /* * Authors: diff --git a/xc/lib/GL/mesa/src/drv/sis/sis_span.c b/xc/lib/GL/mesa/src/drv/sis/sis_span.c index 1128e39b3..70fbd7f64 100644 --- a/xc/lib/GL/mesa/src/drv/sis/sis_span.c +++ b/xc/lib/GL/mesa/src/drv/sis/sis_span.c @@ -24,6 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_span.c,v 1.4 2000/09/26 15:56:49 tsi Exp $ */ /* * Authors: @@ -45,7 +46,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; \ __GLSiScontext *hwcx = (__GLSiScontext *) xmesa->private; \ GLuint pitch = hwcx->swRenderPitch; \ - char *buf = hwcx->swRenderBase + char *buf = (char *)hwcx->swRenderBase #define CLIPPIXEL(_x,_y) (_x >= minx && _x < maxx && \ _y >= miny && _y < maxy) diff --git a/xc/lib/GL/mesa/src/drv/sis/sis_stencil.c b/xc/lib/GL/mesa/src/drv/sis/sis_stencil.c index 3f2abb5bb..19d68288f 100644 --- a/xc/lib/GL/mesa/src/drv/sis/sis_stencil.c +++ b/xc/lib/GL/mesa/src/drv/sis/sis_stencil.c @@ -24,6 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_stencil.c,v 1.3 2000/09/26 15:56:49 tsi Exp $ */ /* * Authors: diff --git a/xc/lib/GL/mesa/src/drv/sis/sis_swzfunc.h b/xc/lib/GL/mesa/src/drv/sis/sis_swzfunc.h index f2969bec2..b4b8ea61f 100644 --- a/xc/lib/GL/mesa/src/drv/sis/sis_swzfunc.h +++ b/xc/lib/GL/mesa/src/drv/sis/sis_swzfunc.h @@ -24,6 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_swzfunc.h,v 1.3 2000/09/26 15:56:49 tsi Exp $ */ /* * Authors: diff --git a/xc/lib/GL/mesa/src/drv/sis/sis_texture.c b/xc/lib/GL/mesa/src/drv/sis/sis_texture.c index bbbe73dd7..3c817a8c9 100644 --- a/xc/lib/GL/mesa/src/drv/sis/sis_texture.c +++ b/xc/lib/GL/mesa/src/drv/sis/sis_texture.c @@ -24,6 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_texture.c,v 1.5 2000/09/26 15:56:49 tsi Exp $ */ /* * Authors: @@ -181,7 +182,7 @@ sis_TexImage (GLcontext * ctx, GLenum target, if (area->Format == GL_RGB8) { int i; - GLbyte *src = image->Data; + GLbyte *src = (GLbyte *)image->Data; GLbyte *dst = area->Data; for (i = 0; i < area->Size / 4; i++) @@ -231,7 +232,7 @@ sis_TexSubImage (GLcontext * ctx, GLenum target, if (area->Format == GL_RGB8) { - src = image->Data + (xoffset + yoffset * image->Width) * 3; + src = (GLbyte *)image->Data + (xoffset + yoffset * image->Width) * 3; dst = area->Data + (xoffset + yoffset * image->Width) * 4; soffset = (image->Width - width) * 3; doffset = (image->Width - width) * 4; @@ -252,7 +253,8 @@ sis_TexSubImage (GLcontext * ctx, GLenum target, GLuint texelSize = area->texelSize; GLuint copySize = texelSize * width; - src = image->Data + (xoffset + yoffset * image->Width) * texelSize; + src = (GLbyte *)image->Data + + (xoffset + yoffset * image->Width) * texelSize; dst = area->Data + (xoffset + yoffset * image->Width) * texelSize; soffset = image->Width * texelSize; @@ -773,11 +775,11 @@ sis_set_texobj_parm (GLcontext * ctx, GLtextureObject * object, int hw_unit) switch(area->memType){ case VIDEO_TYPE: - texOffset = ((GLuint) area->Data - (GLuint) GET_FbBase (hwcx)); + texOffset = ((char *) area->Data - (char *) GET_FbBase (hwcx)); break; case AGP_TYPE: - texOffset = ((GLuint) area->Data - (GLuint) GET_AGPBase (hwcx) + - (GLuint) hwcx->AGPAddr); + texOffset = ((char *) area->Data - (char *) GET_AGPBase (hwcx)) + + (unsigned long) hwcx->AGPAddr; current->texture[hw_unit].hwTextureMip |= (0x40000 << i); break; default: diff --git a/xc/lib/GL/mesa/src/drv/sis/sis_trifunc.h b/xc/lib/GL/mesa/src/drv/sis/sis_trifunc.h index 7c57a615f..ca9fdc656 100644 --- a/xc/lib/GL/mesa/src/drv/sis/sis_trifunc.h +++ b/xc/lib/GL/mesa/src/drv/sis/sis_trifunc.h @@ -24,6 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_trifunc.h,v 1.3 2000/09/26 15:56:49 tsi Exp $ */ /* * Authors: diff --git a/xc/lib/GL/mesa/src/drv/sis/sis_xmesa.c b/xc/lib/GL/mesa/src/drv/sis/sis_xmesa.c index 0f9bb0619..318684ae8 100644 --- a/xc/lib/GL/mesa/src/drv/sis/sis_xmesa.c +++ b/xc/lib/GL/mesa/src/drv/sis/sis_xmesa.c @@ -24,6 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_xmesa.c,v 1.5 2000/09/26 15:56:49 tsi Exp $ */ /* * Authors: diff --git a/xc/lib/GL/mesa/src/drv/sis/sis_xmesaP.h b/xc/lib/GL/mesa/src/drv/sis/sis_xmesaP.h index dc19c1be4..7cf4b0b00 100644 --- a/xc/lib/GL/mesa/src/drv/sis/sis_xmesaP.h +++ b/xc/lib/GL/mesa/src/drv/sis/sis_xmesaP.h @@ -21,7 +21,7 @@ * 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. */ - +/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_xmesaP.h,v 1.5 2000/09/26 15:56:49 tsi Exp $ */ #ifndef XMESAP_H #define XMESAP_H diff --git a/xc/lib/GL/mesa/src/drv/sis/sis_xwin.c b/xc/lib/GL/mesa/src/drv/sis/sis_xwin.c index c651b444b..f04b677b2 100644 --- a/xc/lib/GL/mesa/src/drv/sis/sis_xwin.c +++ b/xc/lib/GL/mesa/src/drv/sis/sis_xwin.c @@ -24,6 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_xwin.c,v 1.3 2000/09/26 15:56:49 tsi Exp $ */ /* * Authors: diff --git a/xc/lib/GL/mesa/src/drv/tdfx/Imakefile b/xc/lib/GL/mesa/src/drv/tdfx/Imakefile index 6bf8d3d5a..ae70f81d9 100644 --- a/xc/lib/GL/mesa/src/drv/tdfx/Imakefile +++ b/xc/lib/GL/mesa/src/drv/tdfx/Imakefile @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/tdfx/Imakefile,v 1.12 2000/08/25 13:42:32 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/tdfx/Imakefile,v 1.15 2000/10/28 01:05:22 dawes Exp $ #include <Threads.tmpl> @@ -288,7 +288,7 @@ MESA_INCLUDES = -I. -I.. -I../../include \ SRCS = $(LOSRCS) $(DRISRCS) $(DRMSRCS) $(TDFXSRCS) $(MESASRCS) $(ASMSRCS) $(HISRCS) OBJS = $(LOOBJS) $(DRIOBJS) $(DRMOBJS) $(TDFXOBJS) $(MESAOBJS) $(ASMOBJS) $(HIOBJS) -REQUIREDLIBS = -lglide3x MathLibrary +REQUIREDLIBS = -l$(GLIDE3LIBNAME) MathLibrary #if !GlxBuiltInTdfx REQUIREDLIBS += -L../../../.. -lGL #endif diff --git a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_init.c b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_init.c index cfa099433..0c0ae8b0c 100644 --- a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_init.c +++ b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_init.c @@ -24,6 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_init.c,v 1.5 2000/09/26 15:56:50 tsi Exp $ */ /* * Authors: diff --git a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_inithw.c b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_inithw.c index 13806c6e7..1dcc6a0e8 100644 --- a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_inithw.c +++ b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_inithw.c @@ -24,6 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_inithw.c,v 1.6 2000/09/26 15:56:50 tsi Exp $ */ /* * Authors: diff --git a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c index 4977c3e44..228a59758 100644 --- a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c +++ b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c @@ -24,6 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c,v 1.8 2000/09/26 15:56:50 tsi Exp $ */ /* * Authors: diff --git a/xc/lib/X11/XlcUTF.h b/xc/lib/X11/XlcUTF.h deleted file mode 100644 index f58ecddbe..000000000 --- a/xc/lib/X11/XlcUTF.h +++ /dev/null @@ -1,187 +0,0 @@ -/* $TOG: XlcUTF.h /main/10 1998/05/20 14:47:44 kaleb $ */ -/****************************************************************** - - Copyright 1993 by SunSoft, 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 SunSoft, Inc. -not be used in advertising or publicity pertaining to distribution -of the software without specific, written prior permission. -SunSoft, Inc. makes no representations about the suitability of -this software for any purpose. It is provided "as is" without -express or implied warranty. - -SunSoft Inc. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, -IN NO EVENT SHALL SunSoft, 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. - - Author: Hiromu Inukai (inukai@Japan.Sun.COM) SunSoft, inc. - -******************************************************************/ -/* $XFree86: xc/lib/X11/XlcUTF.h,v 1.6 1999/06/06 14:05:52 dawes Exp $ */ - -#include "Xlibint.h" -#include "XlcGeneric.h" -#include <X11/Xos.h> -#include <stdio.h> - -typedef unsigned short Rune; /* 16 bits */ -#define Runeerror 0x80 /* decoding error in UTF */ -#define Runeself 0x80 /* rune and UTF sequences are the same (<) */ -#define UTFmax 3 /* maximum bytes per rune */ - -#define BADMAP (0xFFFD) -#define ESC 033 -#define NRUNE 65536 -#define NLATIN 0x6ff -#define LATINMAX 256 -#define KUTENMAX 8407 -#define KSCMAX 8743 -#define GBMAX 8795 -#define tab8859_1 "tab8859_1" -#define tab8859_2 "tab8859_2" -#define tab8859_3 "tab8859_3" -#define tab8859_4 "tab8859_4" -#define tab8859_5 "tab8859_5" -#define tab8859_6 "tab8859_6" -#define tab8859_7 "tab8859_7" -#define tab8859_8 "tab8859_8" -#define tab8859_9 "tab8859_9" -#define tab8859_10 "tab8859_10" -#define tab8859_14 "tab8859_14" -#define tab8859_15 "tab8859_15" -#define jis0208 "jis0208" -#define ksc5601 "ksc5601" -#define gb2312 "gb2312" -#define tabtis620 "tabtis620" -#define tabkoi8_r "tabkoi8_r" -#define tabkoi8_u "tabkoi8_u" -#define tabarmscii_8 "tabarmscii_8" -#define tabibm_cp1133 "tabibm_cp1133" -#define tabmulelao_1 "tabmulelao_1" -#define tabviscii "tabviscii" -#define tabtcvn "tabtcvn" -#define tabgeorgian_academy "tabgeorgian_academy" -#define tabgeorgian_ps "tabgeorgian_ps" - -#define emit(x) *r = (Rune)x; - -typedef enum { - N11n_none, /* No need to normalize (1byte) */ - N11n_ja, /* Normalize for ja */ - N11n_ko, /* Normalize for ko */ - N11n_zh /* Normalize for zh */ -} NormalizeType; - -typedef struct _UtfDataRec { - XlcCharSet charset; - void (*initialize)( /* Table Initializer */ -#if NeedNestedPrototypes - int*, - wchar_t -#endif - ); - int* fromtbl; /* UTF -> CharSet */ - NormalizeType type; /* Normalize type */ - void (*cstorune)( /* CharSet -> UTF */ -#if NeedNestedPrototypes - unsigned char, - Rune* -#endif - ); - Bool already_init; - struct _UtfDataRec *next; /* next entry */ -} UtfDataRec, *UtfData; - -typedef struct _XlcUTFDataRec { - char *name; - XlcSide side; - void (*initialize)( -#if NeedNestedPrototypes - int*, - wchar_t -#endif - ); - void (*cstorune)( -#if NeedNestedPrototypes - unsigned char, - Rune* -#endif - ); - NormalizeType type; - wchar_t fallback_value; -} XlcUTFDataRec, *XlcUTFData; - -#define MAX_UTF_CHARSET (sizeof(default_utf_data)/sizeof(XlcUTFDataRec)) - -#define Char1 Runeself -#define Rune1 Runeself -#define Char21 0xA1 -#define Rune21 0x0100 -#define Char22 0xF6 -#define Rune22 0x4016 -#define Char3 0xFC -#define Rune3 0x10000 /* really 0x38E2E */ -#define Esc 0xBE -#define Bad Runeerror - -#define T1 0x00 -#define Tx 0x80 -#define T2 0xC0 -#define T3 0xE0 -#define T4 0xF0 -#define T5 0xF8 -#define T6 0xFC - -#define Bit1 7 -#define Bitx 6 -#define Bit2 5 -#define Bit3 4 -#define Bit4 3 -#define Bit5 2 -#define Bit6 2 - -#define Mask1 (1<<Bit1)-1 -#define Maskx (1<<Bitx)-1 -#define Mask2 (1<<Bit2)-1 -#define Mask3 (1<<Bit3)-1 -#define Mask4 (1<<Bit4)-1 -#define Mask5 (1<<Bit5)-1 -#define Mask6 (1<<Bit6)-1 - -#define Wchar1 (1<<Bit1)-1 -#define Wchar2 (1<<(Bit2+Bitx))-1 -#define Wchar3 (1<<(Bit3+2*Bitx))-1 -#define Wchar4 (1<<(Bit4+3*Bitx))-1 -#define Wchar5 (1<<(Bit5+4*Bitx))-1 - -#ifndef EILSEQ -#define EILSEQ 123 -#endif - -#define J2S(_h, _l) { \ - /* lower: 21-7e >> 40-9d,9e-fb >> 40-7e,(skip 7f),80-fc */ \ - if (((_l) += (((_h)-- % 2) ? 0x1f : 0x7d)) > 0x7e) (_l)++; \ - /* upper: 21-7e >> 81-af >> 81-9f,(skip a0-df),e0-ef */ \ - if (((_h) = ((_h) / 2 + 0x71)) > 0x9f) (_h) += 0x40; \ -} -#define S2J(_h, _l) { \ - /* lower: 40-7e,80-fc >> 21-5f,61-dd >> 21-7e,7f-dc */ \ - if (((_l) -= 0x1f) > 0x60) (_l)--; \ - /* upper: 81-9f,e0-ef >> 00-1e,5f-6e >> 00-2e >> 21-7d */ \ - if (((_h) -= 0x81) > 0x5e) (_h) -= 0x40; (_h) *= 2, (_h) += 0x21; \ - /* upper: ,21-7d >> ,22-7e ; lower: ,7f-dc >> ,21-7e */ \ - if ((_l) > 0x7e) (_h)++, (_l) -= 0x5e; \ -} -#define ISJKANA(_b) (0xa0 <= (_b) && (_b) < 0xe0) -#define CANS2JH(_h) ((0x81 <= (_h) && (_h) < 0xf0) && !ISJKANA(_h)) -#define CANS2JL(_l) (0x40 <= (_l) && (_l) < 0xfd && (_l) != 0x7f) -#define CANS2J(_h, _l) (CANS2JH(_h) && CANS2JL(_l)) - diff --git a/xc/lib/X11/lcUTF.c b/xc/lib/X11/lcUTF.c deleted file mode 100644 index 397571e05..000000000 --- a/xc/lib/X11/lcUTF.c +++ /dev/null @@ -1,1733 +0,0 @@ -/* $TOG: lcUTF.c /main/25 1998/05/20 14:47:50 kaleb $ */ -/****************************************************************** - - Copyright 1993 by SunSoft, 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 SunSoft, Inc. -not be used in advertising or publicity pertaining to distribution -of the software without specific, written prior permission. -SunSoft, Inc. makes no representations about the suitability of -this software for any purpose. It is provided "as is" without -express or implied warranty. - -SunSoft Inc. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, -IN NO EVENT SHALL SunSoft, 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. - - Author: Hiromu Inukai (inukai@Japan.Sun.COM) SunSoft, inc. - -******************************************************************/ -/* $XFree86: xc/lib/X11/lcUTF.c,v 3.12 1999/06/07 07:33:21 dawes Exp $ */ - - -#ifdef X_LOCALE - -#include "XlcUTF.h" - -static int getutfrune( -#if NeedFunctionPrototypes - char**, - int* -#endif -); -static void our_wctomb( -#if NeedFunctionPrototypes - wchar_t, - char **, - int * -#endif -); -static int our_mbtowc( -#if NeedFunctionPrototypes - wchar_t*, - char*, - size_t -#endif -); -static void latin2rune( -#if NeedFunctionPrototypes - unsigned char, - Rune* -#endif -); -static void jis02012rune( -#if NeedFunctionPrototypes - unsigned char, - Rune* -#endif -); -static void jis02082rune( -#if NeedFunctionPrototypes - unsigned char, - Rune* -#endif -); -static void ksc2rune( -#if NeedFunctionPrototypes - unsigned char, - Rune* -#endif -); -static void gb2rune( -#if NeedFunctionPrototypes - unsigned char, - Rune* -#endif -); -static void init_latin1tab( -#if NeedFunctionPrototypes - int*, - wchar_t -#endif -); -static void init_latin2tab( -#if NeedFunctionPrototypes - int*, - wchar_t -#endif -); -static void init_latin3tab( -#if NeedFunctionPrototypes - int*, - wchar_t -#endif -); -static void init_latin4tab( -#if NeedFunctionPrototypes - int*, - wchar_t -#endif -); -static void init_cyrillictab( -#if NeedFunctionPrototypes - int*, - wchar_t -#endif -); -static void init_koi8rtab( -#if NeedFunctionPrototypes - int*, - wchar_t -#endif -); -static void init_koi8utab( -#if NeedFunctionPrototypes - int*, - wchar_t -#endif -); -static void init_arabictab( -#if NeedFunctionPrototypes - int*, - wchar_t -#endif -); -static void init_greektab( -#if NeedFunctionPrototypes - int*, - wchar_t -#endif -); -static void init_hebrewtab( -#if NeedFunctionPrototypes - int*, - wchar_t -#endif -); -static void init_latin5tab( -#if NeedFunctionPrototypes - int*, - wchar_t -#endif -); -static void init_latin6tab( -#if NeedFunctionPrototypes - int*, - wchar_t -#endif -); -static void init_latin8tab( -#if NeedFunctionPrototypes - int*, - wchar_t -#endif -); -static void init_latin9tab( -#if NeedFunctionPrototypes - int*, - wchar_t -#endif -); -static void init_tis620tab( -#if NeedFunctionPrototypes - int*, - wchar_t -#endif -); -static void init_armscii8tab( -#if NeedFunctionPrototypes - int*, - wchar_t -#endif -); -static void init_ibmcp1133tab( -#if NeedFunctionPrototypes - int*, - wchar_t -#endif -); -static void init_mulelao1tab( -#if NeedFunctionPrototypes - int*, - wchar_t -#endif -); -static void init_visciitab( -#if NeedFunctionPrototypes - int*, - wchar_t -#endif -); -static void init_tcvn5712tab( -#if NeedFunctionPrototypes - int*, - wchar_t -#endif -); -static void init_georgianacademytab( -#if NeedFunctionPrototypes - int*, - wchar_t -#endif -); -static void init_georgianpstab( -#if NeedFunctionPrototypes - int*, - wchar_t -#endif -); - - -static void init_jis0201tab( -#if NeedFunctionPrototypes - int*, - wchar_t -#endif -); -static void init_jis0208tab( -#if NeedFunctionPrototypes - int*, - wchar_t -#endif -); -static void init_ksc5601tab( -#if NeedFunctionPrototypes - int*, - wchar_t -#endif -); -static void init_gb2312tab( -#if NeedFunctionPrototypes - int*, - wchar_t -#endif -); - -static int* tabkuten = NULL; -static int* tabksc = NULL; -static int* tabgb = NULL; - -static UtfData utfdata_list = (UtfData)NULL; - -static XlcUTFDataRec default_utf_data[] = -{ - {"ISO8859-1", XlcGL, init_latin1tab, latin2rune, N11n_none, 0x20}, - {"ISO8859-1", XlcGR, init_latin1tab, latin2rune, N11n_none, 0x20}, - {"ISO8859-2", XlcGL, init_latin2tab, latin2rune, N11n_none, 0x20}, - {"ISO8859-2", XlcGR, init_latin2tab, latin2rune, N11n_none, 0x20}, - {"ISO8859-3", XlcGL, init_latin3tab, latin2rune, N11n_none, 0x20}, - {"ISO8859-3", XlcGR, init_latin3tab, latin2rune, N11n_none, 0x20}, - {"ISO8859-4", XlcGL, init_latin4tab, latin2rune, N11n_none, 0x20}, - {"ISO8859-4", XlcGR, init_latin4tab, latin2rune, N11n_none, 0x20}, - {"ISO8859-5", XlcGL, init_cyrillictab, latin2rune, N11n_none, 0x20}, - {"ISO8859-5", XlcGR, init_cyrillictab, latin2rune, N11n_none, 0x20}, - {"ISO8859-6", XlcGL, init_arabictab, latin2rune, N11n_none, 0x20}, - {"ISO8859-6", XlcGR, init_arabictab, latin2rune, N11n_none, 0x20}, - {"ISO8859-7", XlcGL, init_greektab, latin2rune, N11n_none, 0x20}, - {"ISO8859-7", XlcGR, init_greektab, latin2rune, N11n_none, 0x20}, - {"ISO8859-8", XlcGL, init_hebrewtab, latin2rune, N11n_none, 0x20}, - {"ISO8859-8", XlcGR, init_hebrewtab, latin2rune, N11n_none, 0x20}, - {"ISO8859-9", XlcGL, init_latin5tab, latin2rune, N11n_none, 0x20}, - {"ISO8859-9", XlcGR, init_latin5tab, latin2rune, N11n_none, 0x20}, - {"ISO8859-10", XlcGL, init_latin6tab, latin2rune, N11n_none, 0x20}, - {"ISO8859-10", XlcGR, init_latin6tab, latin2rune, N11n_none, 0x20}, - {"ISO8859-14", XlcGL, init_latin8tab, latin2rune, N11n_none, 0x20}, - {"ISO8859-14", XlcGR, init_latin8tab, latin2rune, N11n_none, 0x20}, - {"ISO8859-15", XlcGL, init_latin9tab, latin2rune, N11n_none, 0x20}, - {"ISO8859-15", XlcGR, init_latin9tab, latin2rune, N11n_none, 0x20}, - {"JISX0201.1976-0", XlcGL, init_jis0201tab, jis02012rune, N11n_none, 0x20}, - {"JISX0201.1976-0", XlcGR, init_jis0201tab, jis02012rune, N11n_none, 0x20}, - {"JISX0208.1983-0", XlcGL, init_jis0208tab, jis02082rune, N11n_ja, 0x2222}, - {"JISX0208.1983-0", XlcGR, init_jis0208tab, jis02082rune, N11n_ja, 0x2222}, - {"KSC5601.1987-0", XlcGL, init_ksc5601tab, ksc2rune, N11n_ko, 0x2160}, - {"KSC5601.1987-0", XlcGR, init_ksc5601tab, ksc2rune, N11n_ko, 0x2160}, - {"GB2312.1980-0", XlcGL, init_gb2312tab, gb2rune, N11n_zh, 0x2175}, - {"GB2312.1980-0", XlcGR, init_gb2312tab, gb2rune, N11n_zh, 0x2175}, - {"TIS620.2533-1", XlcGL, init_tis620tab, latin2rune, N11n_none, 0x20}, - {"TIS620.2533-1", XlcGR, init_tis620tab, latin2rune, N11n_none, 0x20}, - {"KOI8-R", XlcGL, init_koi8rtab, latin2rune, N11n_none, 0x20}, - {"KOI8-R", XlcGR, init_koi8rtab, latin2rune, N11n_none, 0x20}, - {"KOI8-U", XlcGL, init_koi8utab, latin2rune, N11n_none, 0x20}, - {"KOI8-U", XlcGR, init_koi8utab, latin2rune, N11n_none, 0x20}, - {"ARMSCII-8", XlcGL, init_armscii8tab, latin2rune, N11n_none, 0x20}, - {"ARMSCII-8", XlcGR, init_armscii8tab, latin2rune, N11n_none, 0x20}, - {"IBM-CP1133", XlcGL, init_ibmcp1133tab, latin2rune, N11n_none, 0x20}, - {"IBM-CP1133", XlcGR, init_ibmcp1133tab, latin2rune, N11n_none, 0x20}, - {"MULELAO-1", XlcGL, init_mulelao1tab, latin2rune, N11n_none, 0x20}, - {"MULELAO-1", XlcGR, init_mulelao1tab, latin2rune, N11n_none, 0x20}, - {"VISCII1.1-1", XlcGL, init_visciitab, latin2rune, N11n_none, 0x20}, - {"VISCII1.1-1", XlcGR, init_visciitab, latin2rune, N11n_none, 0x20}, - {"TCVN-5712", XlcGL, init_tcvn5712tab, latin2rune, N11n_none, 0x20}, - {"TCVN-5712", XlcGR, init_tcvn5712tab, latin2rune, N11n_none, 0x20}, - {"GEORGIAN-ACADEMY", XlcGL, init_georgianacademytab, latin2rune, N11n_none, 0x20}, - {"GEORGIAN-ACADEMY", XlcGR, init_georgianacademytab, latin2rune, N11n_none, 0x20}, - {"GEORGIAN-PS", XlcGL, init_georgianpstab, latin2rune, N11n_none, 0x20}, - {"GEORGIAN-PS", XlcGR, init_georgianpstab, latin2rune, N11n_none, 0x20}, - -}; - - -static void -set_latin_nop(table, default_val) - int* table; - wchar_t default_val; -{ - register int i; - for(i = 0; i < LATINMAX; i++) - table[i] = (int) default_val; - return; -} - -static void -set_cjk_nop(to_tbl, to_max, default_val) - int* to_tbl; - wchar_t default_val; - int to_max; -{ - register int i; - for(i = 0; i < to_max; i++) - to_tbl[i] = default_val; - return; -} - -static void -set_latin_tab(fptr, table, fb_default) - FILE* fptr; - int* table; - wchar_t fb_default; -{ - int j = 0; - int rv; - long value; - - while((rv = fscanf(fptr, "%lx", &value)) != EOF) { - if(rv != 0) - table[j++] = (wchar_t) value; - } -} - -static void -set_cjk_tab(fptr, to_tbl, from_tbl, to_max, fb_default) - FILE* fptr; - int* to_tbl; - int* from_tbl; - int to_max; - wchar_t fb_default; -{ - int j = 0; - int rv; - long value; - - while((rv = fscanf(fptr, "%lx", &value)) != EOF) { - if(rv != 0) - to_tbl[j++] = value; - } - for(j = 0; j < to_max; j++) { - if((value = to_tbl[j]) != -1) - from_tbl[abs(value)] = j; - } -} - -extern int _XlcResolveI18NPath(); -static char TBL_DATA_DIR[] = "tbl_data"; - -static void -#if NeedFunctionPrototypes -init_8859_tab( - int* tbl, - wchar_t fb_default, - char* which) -#else -init_8859_tab(tbl, fb_default, which) - int* tbl; - wchar_t fb_default; - char* which; -#endif -{ - FILE* fp = NULL; - char dirname[BUFSIZE]; - char filename[BUFSIZE]; - char* p; - char* q; - - _XlcResolveI18NPath(dirname, BUFSIZE); - p = dirname; - while(p) { - q = strchr(p, ':'); - if(q) { - *q = '\0'; - } - - if ((3 + (p ? strlen(p) : 0) + - strlen (TBL_DATA_DIR) + strlen (which)) < BUFSIZE) { - sprintf(filename, "%s/%s/%s", p, TBL_DATA_DIR, which); - fp = _XFopenFile (filename, "r"); - } - if(fp) { - set_latin_tab(fp, tbl, fb_default); - fclose(fp); - return; - } - if(q) { - p = q + 1; - } else { - p = q; - } - } - if(!fp) { - set_latin_nop(tbl, fb_default); - } -} - -static void -#if NeedFunctionPrototypes -init_cjk_tab( - int* tbl, - wchar_t fb_default, - char* which, - int** tab, - long max) -#else -init_cjk_tab(tbl, fb_default, which, tab, max) - int* tbl; - wchar_t fb_default; - char* which; - int** tab; - long max; -#endif -{ - FILE* fp = NULL; - char dirname[BUFSIZE]; - char filename[BUFSIZE]; - char* p; - char* q; - - if((*tab = (int*)Xmalloc(max * sizeof(int))) == NULL) { - return; - } - _XlcResolveI18NPath(dirname, BUFSIZE); - p = dirname; - while(p) { - q = strchr(p, ':'); - if(q) { - *q = '\0'; - } - if ((3 + (p ? strlen(p) : 0) + - strlen (TBL_DATA_DIR) + strlen (which)) < BUFSIZE) { - sprintf(filename, "%s/%s/%s", p, TBL_DATA_DIR, which); - fp = _XFopenFile (filename, "r"); - } - if(fp) { - set_cjk_tab(fp, *tab, tbl, max, fb_default); - fclose(fp); - return; - } - if(q) { - p = q + 1; - } else { - p = q; - } - } - if(!fp) { - set_cjk_nop(*tab, max, fb_default); - } -} - -static void -#if NeedFunctionPrototypes -init_latin1tab( - int* tbl, - wchar_t fb_default) -#else -init_latin1tab(tbl, fb_default) - int* tbl; - wchar_t fb_default; -#endif -{ - init_8859_tab (tbl, fb_default, tab8859_1); -} - -static void -#if NeedFunctionPrototypes -init_latin2tab( - int* tbl, - wchar_t fb_default) -#else -init_latin2tab(tbl, fb_default) - int* tbl; - wchar_t fb_default; -#endif -{ - init_8859_tab (tbl, fb_default, tab8859_2); -} - -static void -#if NeedFunctionPrototypes -init_latin3tab( - int* tbl, - wchar_t fb_default) -#else -init_latin3tab(tbl, fb_default) - int* tbl; - wchar_t fb_default; -#endif -{ - init_8859_tab (tbl, fb_default, tab8859_3); -} - -static void -#if NeedFunctionPrototypes -init_latin4tab( - int* tbl, - wchar_t fb_default) -#else -init_latin4tab(tbl, fb_default) - int* tbl; - wchar_t fb_default; -#endif -{ - init_8859_tab (tbl, fb_default, tab8859_4); -} - -static void -#if NeedFunctionPrototypes -init_cyrillictab( - int* tbl, - wchar_t fb_default) -#else -init_cyrillictab(tbl, fb_default) - int* tbl; - wchar_t fb_default; -#endif -{ - init_8859_tab (tbl, fb_default, tab8859_5); -} - -static void -#if NeedFunctionPrototypes -init_koi8rtab( - int* tbl, - wchar_t fb_default) -#else -init_koi8rtab(tbl, fb_default) - int* tbl; - wchar_t fb_default; -#endif -{ - init_8859_tab (tbl, fb_default, tabkoi8_r); -} - -static void -#if NeedFunctionPrototypes -init_koi8utab( - int* tbl, - wchar_t fb_default) -#else -init_koi8utab(tbl, fb_default) - int* tbl; - wchar_t fb_default; -#endif -{ - init_8859_tab (tbl, fb_default, tabkoi8_u); -} - -static void -#if NeedFunctionPrototypes -init_arabictab( - int* tbl, - wchar_t fb_default) -#else -init_arabictab(tbl, fb_default) - int* tbl; - wchar_t fb_default; -#endif -{ - init_8859_tab (tbl, fb_default, tab8859_6); -} - -static void -#if NeedFunctionPrototypes -init_greektab( - int* tbl, - wchar_t fb_default) -#else -init_greektab(tbl, fb_default) - int* tbl; - wchar_t fb_default; -#endif -{ - init_8859_tab (tbl, fb_default, tab8859_7); -} - -static void -#if NeedFunctionPrototypes -init_hebrewtab( - int* tbl, - wchar_t fb_default) -#else -init_hebrewtab(tbl, fb_default) - int* tbl; - wchar_t fb_default; -#endif -{ - init_8859_tab (tbl, fb_default, tab8859_8); -} - -static void -#if NeedFunctionPrototypes -init_latin5tab( - int* tbl, - wchar_t fb_default) -#else -init_latin5tab(tbl, fb_default) - int* tbl; - wchar_t fb_default; -#endif -{ - init_8859_tab (tbl, fb_default, tab8859_9); -} - -static void -#if NeedFunctionPrototypes -init_latin6tab( - int* tbl, - wchar_t fb_default) -#else -init_latin6tab(tbl, fb_default) - int* tbl; - wchar_t fb_default; -#endif -{ - init_8859_tab (tbl, fb_default, tab8859_10); -} - -static void -#if NeedFunctionPrototypes -init_latin8tab( - int* tbl, - wchar_t fb_default) -#else -init_latin8tab(tbl, fb_default) - int* tbl; - wchar_t fb_default; -#endif -{ - init_8859_tab (tbl, fb_default, tab8859_14); -} - -static void -#if NeedFunctionPrototypes -init_latin9tab( - int* tbl, - wchar_t fb_default) -#else -init_latin9tab(tbl, fb_default) - int* tbl; - wchar_t fb_default; -#endif -{ - init_8859_tab (tbl, fb_default, tab8859_15); -} - -static void -#if NeedFunctionPrototypes -init_tis620tab( - int* tbl, - wchar_t fb_default) -#else -init_tis620tab(tbl, fb_default) - int* tbl; - wchar_t fb_default; -#endif -{ - init_8859_tab (tbl, fb_default, tabtis620); -} - -static void -#if NeedFunctionPrototypes -init_armscii8tab( - int* tbl, - wchar_t fb_default) -#else -init_armscii8tab(tbl, fb_default) - int* tbl; - wchar_t fb_default; -#endif -{ - init_8859_tab (tbl, fb_default, tabarmscii_8); -} - -static void -#if NeedFunctionPrototypes -init_ibmcp1133tab( - int* tbl, - wchar_t fb_default) -#else -init_ibmcp1133tab(tbl, fb_default) - int* tbl; - wchar_t fb_default; -#endif -{ - init_8859_tab (tbl, fb_default, tabibm_cp1133); -} - -static void -#if NeedFunctionPrototypes -init_mulelao1tab( - int* tbl, - wchar_t fb_default) -#else -init_mulelao1tab(tbl, fb_default) - int* tbl; - wchar_t fb_default; -#endif -{ - init_8859_tab (tbl, fb_default, tabmulelao_1); -} - -static void -#if NeedFunctionPrototypes -init_visciitab( - int* tbl, - wchar_t fb_default) -#else -init_visciitab(tbl, fb_default) - int* tbl; - wchar_t fb_default; -#endif -{ - init_8859_tab (tbl, fb_default, tabviscii); -} - -static void -#if NeedFunctionPrototypes -init_tcvn5712tab( - int* tbl, - wchar_t fb_default) -#else -init_tcvn5712tab(tbl, fb_default) - int* tbl; - wchar_t fb_default; -#endif -{ - init_8859_tab (tbl, fb_default, tabtcvn); -} - -static void -#if NeedFunctionPrototypes -init_georgianacademytab( - int* tbl, - wchar_t fb_default) -#else -init_georgianacademytab(tbl, fb_default) - int* tbl; - wchar_t fb_default; -#endif -{ - init_8859_tab (tbl, fb_default, tabgeorgian_academy); -} - -static void -#if NeedFunctionPrototypes -init_georgianpstab( - int* tbl, - wchar_t fb_default) -#else -init_georgianpstab(tbl, fb_default) - int* tbl; - wchar_t fb_default; -#endif -{ - init_8859_tab (tbl, fb_default, tabgeorgian_ps); -} - -static void -#if NeedFunctionPrototypes -init_jis0201tab( - int* tbl, - wchar_t fb_default) -#else -init_jis0201tab(tbl, fb_default) - int* tbl; - wchar_t fb_default; -#endif -{ - int i; - for(i = 0; i < NRUNE; i++) - tbl[i] = -1; -} - -static void -#if NeedFunctionPrototypes -init_jis0208tab( - int* tbl, - wchar_t fb_default) -#else -init_jis0208tab(tbl, fb_default) - int* tbl; - wchar_t fb_default; -#endif -{ - init_cjk_tab (tbl, fb_default, jis0208, &tabkuten, KUTENMAX); -} - -static void -#if NeedFunctionPrototypes -init_ksc5601tab( - int* tbl, - wchar_t fb_default) -#else -init_ksc5601tab(tbl, fb_default) - int* tbl; - wchar_t fb_default; -#endif -{ - init_cjk_tab (tbl, fb_default, ksc5601, &tabksc, KSCMAX); -} - -static void -#if NeedFunctionPrototypes -init_gb2312tab( - int* tbl, - wchar_t fb_default) -#else -init_gb2312tab(tbl, fb_default) - int* tbl; - wchar_t fb_default; -#endif -{ - init_cjk_tab (tbl, fb_default, gb2312, &tabgb, GBMAX); -} - -static UtfData -make_entry() -{ - UtfData tmp = (UtfData)Xmalloc(sizeof(UtfDataRec)); - bzero(tmp, sizeof(UtfDataRec)); - return tmp; -} - -static int once = 0; - -static int -InitUTFInfo(lcd) -XLCd lcd; -{ - if(!once) { - int i; - CodeSet *codeset_list = XLC_GENERIC(lcd, codeset_list); - int codeset_num = XLC_GENERIC(lcd, codeset_num); - UtfData pdata; - - if(!utfdata_list) { - utfdata_list = make_entry(); - } - pdata = utfdata_list; - for(i=0; i < codeset_num; i++) { - XlcCharSet charset = *codeset_list[i]->charset_list; - while(pdata->next) { - if(charset == pdata->charset) { - break; - } - pdata = pdata->next; - } - if(pdata->next) { - continue; - } else { - int j; - for(j = 0; j < MAX_UTF_CHARSET; j++) { - if(_XlcCompareISOLatin1(charset->encoding_name, default_utf_data[j].name) || - charset->side != default_utf_data[j].side) { - continue; - } else { - pdata->initialize = default_utf_data[j].initialize; - pdata->fromtbl = (int *)Xmalloc(LATINMAX * sizeof(int)); - (*pdata->initialize)(pdata->fromtbl, default_utf_data[j].fallback_value); - pdata->already_init = True; - pdata->charset = charset; - pdata->cstorune = default_utf_data[j].cstorune; - pdata->type = default_utf_data[j].type; - pdata->next = make_entry(); - break; - } - } - } - } - once = 1; - } - return 1; -} - -static int -utftocs(conv, from, from_left, to, to_left, args, num_args) - XlcConv conv; - char **from; - int *from_left; - char **to; - int *to_left; - XPointer *args; - int num_args; -{ - char *utfptr; - char *bufptr; - int utf_len, buf_len; - wchar_t wc; - XlcCharSet tmpcharset = (XlcCharSet)NULL; - UtfData pdata = utfdata_list; - - if (from == NULL || *from == NULL) - return 0; - - utfptr = *from; - bufptr = *to; - utf_len = *from_left; - buf_len = *to_left; - - while(utf_len > 0 && buf_len > 0) { - char *p = utfptr; - int rune = getutfrune(&p, &utf_len); - if(rune == -1) { - return -1; - } else { - wc = (wchar_t) rune; - while(pdata->next) { - wchar_t r; - int* tbl; - - tbl = pdata->fromtbl; - tbl += wc; - if (*tbl == -1) { - if(tmpcharset) { - goto end; - } else { - pdata = pdata->next; - continue; - } - } else { - r = *tbl; - utfptr = p; - if(!tmpcharset) tmpcharset = pdata->charset; - } - if(r < 128) { - *bufptr++ = r; - buf_len--; - } else { - switch(pdata->type) { - case N11n_ja: - *bufptr++ = (r/100 + ' '); - *bufptr++ = (r%100 + ' '); - break; - case N11n_ko: - *bufptr++ = (r/94 + 0x21); - *bufptr++ = (r%94 + 0x21); - break; - case N11n_zh: - *bufptr++ = 0x20 + (r/100); - *bufptr++ = 0x20 + (r%100); - break; - default: - break; - } - buf_len -= 2; - } - break; - } - if(!tmpcharset) return -1; /* Unknown Codepoint */ - } - } -end: - if((num_args > 0) && tmpcharset) - *((XlcCharSet *) args[0]) = tmpcharset; - - *from_left -= utfptr - *from; - *from = utfptr; - - *to_left -= bufptr - *to; - *to = bufptr; - - return 0; -} - -static int -utf1tocs(conv, from, from_left, to, to_left, args, num_args) - XlcConv conv; - char **from; - int *from_left; - char **to; - int *to_left; - XPointer *args; - int num_args; -{ - char **ptr = NULL; - char char_ptr[UTFmax]; - int i = 0; - wchar_t dummy = (wchar_t)0; - - if (from == NULL || *from == NULL) - return utftocs(conv, from, from_left, to, to_left, args, num_args); - - ptr = from; - for(i = 0; i < UTFmax; char_ptr[i++] = *(*ptr)++); - i=0; - while(our_mbtowc(&dummy, (char*)&char_ptr[0], i) <= 0) - i++; - return utftocs(conv, from, &i, to, to_left, args, num_args); -} - -static int -ucstocs(conv, from, from_left, to, to_left, args, num_args) - XlcConv conv; - XPointer *from; - int *from_left; - char **to; - int *to_left; - XPointer *args; - int num_args; -{ - wchar_t *ucsptr; - char *bufptr; - int ucs_len, buf_len; - XlcCharSet tmpcharset = (XlcCharSet)NULL; - UtfData pdata = utfdata_list; - - if (from == NULL || *from == NULL) - return 0; - - ucsptr = (wchar_t *)*from; - bufptr = *to; - ucs_len = *from_left; - buf_len = *to_left; - - while(ucs_len > 0 && buf_len > 0) { - while(pdata->next) { - wchar_t r; - int* tbl; - - tbl = pdata->fromtbl; - tbl += *ucsptr; - if(*tbl == -1) { - if(tmpcharset) { - goto end; - } else { - pdata = pdata->next; - continue; - } - } else { - r = *tbl; - if(!tmpcharset) tmpcharset = pdata->charset; - } - ucsptr++; - if(r < 128) { - *bufptr++ = r; - ucs_len--; - buf_len--; - } else { - switch(pdata->type) { - case N11n_ja: - *bufptr++ = (r/100 + ' '); - *bufptr++ = (r%100 + ' '); - break; - case N11n_ko: - *bufptr++ = (r/94 + 0x21); - *bufptr++ = (r%94 + 0x21); - break; - case N11n_zh: - *bufptr++ = 0x20 + (r/100); - *bufptr++ = 0x20 + (r%100); - break; - default: - break; - } - ucs_len--; - buf_len -= 2; - } - break; - } - if(!tmpcharset) return -1; /* Unknown Codepoint */ - } -end: - if((num_args > 0) && tmpcharset) - *((XlcCharSet *) args[0]) = tmpcharset; - - *from_left -= ucsptr - (wchar_t *)*from; - *from = (XPointer)ucsptr; - - *to_left -= bufptr - *to; - *to = bufptr; - - return 0; -} - -static int -#if NeedFunctionPrototypes -getutfrune(char **read_from, int *from_len) -#else -getutfrune(read_from, from_len) -char **read_from; -int *from_len; -#endif -{ - int c, i; - char str[UTFmax]; /* MB_LEN_MAX really */ - wchar_t wc; - int n; - - str[0] = '\0'; - for(i = 0; i <= UTFmax;) { - c = **read_from; - (*read_from)++; - str[i++] = c; - n = our_mbtowc(&wc, str, i); - if(n == -1) - return -1; - if(n > 0) { - *from_len -= n; - return wc; - } - } - return -1; -} - -static int -cstoutf(conv, from, from_left, to, to_left, args, num_args) - XlcConv conv; - char **from; - int *from_left; - char **to; - int *to_left; - XPointer *args; - int num_args; -{ - XlcCharSet charset; - char *csptr, *utfptr; - int csstr_len, utf_len; - int cmp_len = 0; - void (*putrune)( -#if NeedFunctionPrototypes - unsigned char c, - Rune *r -#endif - ) = NULL; - Rune r = (Rune)0; - UtfData pdata = utfdata_list; - - if (from == NULL || *from == NULL) - return 0; - - if (num_args < 1) - return -1; - - csptr = *from; - utfptr = *to; - csstr_len = *from_left; - utf_len = *to_left; - - charset = (XlcCharSet)args[0]; - cmp_len = strchr(charset->name, ':') - charset->name; - while(pdata->next) { - if(!_XlcNCompareISOLatin1(charset->name, pdata->charset->name, cmp_len)) { - putrune = pdata->cstorune; - break; - } else { - pdata = pdata->next; - } - } - if(!putrune) - return -1; - - while(csstr_len-- > 0 && utf_len > 0) { - (*putrune)(*csptr++, &r); - if(!r) { - continue; - } - our_wctomb(r, &utfptr, &utf_len); - r = 0; - } - - *from_left -= csptr - *from; - *from = csptr; - - *to_left -= utfptr - *to; - *to = utfptr; - - return 0; -} - -static int -cstoucs(conv, from, from_left, to, to_left, args, num_args) - XlcConv conv; - char **from; - int *from_left; - XPointer *to; - int *to_left; - XPointer *args; - int num_args; -{ - XlcCharSet charset; - char *csptr; - wchar_t *ucsptr; - int csstr_len, ucs_len; - int cmp_len = 0; - void (*putrune)( -#if NeedFunctionPrototypes - unsigned char c, - Rune *r -#endif - ) = NULL; - Rune r = (Rune)0; - UtfData pdata = utfdata_list; - - if (from == NULL || *from == NULL) - return 0; - - if (num_args < 1) - return -1; - - csptr = *from; - ucsptr = (wchar_t *)*to; - csstr_len = *from_left; - ucs_len = *to_left; - charset = (XlcCharSet)args[0]; - cmp_len = strchr(charset->name, ':') - charset->name; - - while(pdata->next) { - if(!_XlcNCompareISOLatin1(charset->name, pdata->charset->name, cmp_len)) { - putrune = pdata->cstorune; - break; - } else { - pdata = pdata->next; - } - } - if(!putrune) - return -1; - - while(csstr_len-- > 0 && ucs_len > 0) { - (*putrune)(*csptr++, &r); - if(!r) { - continue; - } - *ucsptr = (wchar_t)r; - ucsptr++; - ucs_len--; - r = 0; - } - - *from_left -= csptr - *from; - *from = csptr; - - *to_left -= ucsptr - (wchar_t *)*to; - *to = (XPointer)ucsptr; - - return 0; -} - -static void -#if NeedFunctionPrototypes -our_wctomb(wchar_t r, char **utfptr, int *utf_len) -#else -our_wctomb(r, utfptr, utf_len) -wchar_t r; -char **utfptr; -int *utf_len; -#endif -{ - if(!utfptr || !*utfptr) - return; /* no shift states */ - if(r & ~Wchar2) { - if(r & ~Wchar4) { - if(r & ~Wchar5) { - /* 6 bytes */ - *(*utfptr)++ = T6 | ((r >> 5*Bitx) & Mask6); - *(*utfptr)++ = Tx | ((r >> 4*Bitx) & Maskx); - *(*utfptr)++ = Tx | ((r >> 3*Bitx) & Maskx); - *(*utfptr)++ = Tx | ((r >> 2*Bitx) & Maskx); - *(*utfptr)++ = Tx | ((r >> 1*Bitx) & Maskx); - *(*utfptr)++ = Tx | (r & Maskx); - *utf_len -= 6; - return; - } - /* 5 bytes */ - *(*utfptr)++ = T5 | (r >> 4*Bitx); - *(*utfptr)++ = Tx | ((r >> 3*Bitx) & Maskx); - *(*utfptr)++ = Tx | ((r >> 2*Bitx) & Maskx); - *(*utfptr)++ = Tx | ((r >> 1*Bitx) & Maskx); - *(*utfptr)++ = Tx | (r & Maskx); - *utf_len -= 5; - return; - } - if(r & ~Wchar3) { - /* 4 bytes */ - *(*utfptr)++ = T4 | (r >> 3*Bitx); - *(*utfptr)++ = Tx | ((r >> 2*Bitx) & Maskx); - *(*utfptr)++ = Tx | ((r >> 1*Bitx) & Maskx); - *(*utfptr)++ = Tx | (r & Maskx); - *utf_len -= 4; - return; - } - /* 3 bytes */ - *(*utfptr)++ = T3 | (r >> 2*Bitx); - *(*utfptr)++ = Tx | ((r >> 1*Bitx) & Maskx); - *(*utfptr)++ = Tx | (r & Maskx); - *utf_len -= 3; - return; - } - if(r & ~Wchar1) { - /* 2 bytes */ - *(*utfptr)++ = T2 | (r >> 1*Bitx); - *(*utfptr)++ = Tx | (r & Maskx); - *utf_len -= 2; - return; - } - /* 1 byte */ - *(*utfptr)++ = T1 | r; - *utf_len -= 1; - return; -} - -static void -#if NeedFunctionPrototypes -latin2rune(unsigned char c, Rune *r) -#else -latin2rune(c, r) -unsigned char c; -Rune *r; -#endif -{ - *r = (Rune)c; - return; -} - -static void -#if NeedFunctionPrototypes -ksc2rune(unsigned char c, Rune *r) -#else -ksc2rune(c, r) -unsigned char c; -Rune *r; -#endif -{ - static enum { init, cs1last} state = init; - static int korean646 = 1; /* fixed to 1 for now. */ - static int lastc; - unsigned char ch = (c|0x80); /* XXX */ - int n; - wchar_t l; - - switch(state) { - case init: - if (ch < 128){ - if(korean646 && (ch=='\\')){ - emit(0x20A9); - } else { - emit(ch); - } - }else{ - lastc = ch; - state = cs1last; - } - return; - - case cs1last: /* 2nd byte of codeset 1 (KSC 5601) */ - n = ((lastc&0x7f)-33)*94 + (ch&0x7f)-33; - if((l = tabksc[n]) == 0){ - emit(BADMAP); - } else { - emit(l); - } - state = init; - return; - } -} - -static void -#if NeedFunctionPrototypes -jis02012rune(unsigned char c, Rune *r) -#else -jis02012rune(c, r) - unsigned char c; - Rune *r; -#endif -{ -/* To Be Implemented */ -} - -static void -#if NeedFunctionPrototypes -gb2rune(unsigned char c, Rune *r) -#else -gb2rune(c, r) - unsigned char c; - Rune *r; -#endif -{ - static enum { state0, state1 } state = state0; - static int lastc; - long n; - unsigned char ch1 = (c|0x80); /* XXX */ - - switch(state) { - case state0: /* idle state */ - if(ch1 >= 0xA1){ - lastc = ch1; - state = state1; - return; - } - emit(ch1); - return; - - case state1: /* seen a font spec */ - if(ch1 >= 0xA1) - n = (lastc-0xA0)*100 + (ch1-0xA0); - else { - emit(BADMAP); - state = state0; - return; - } - if(tabgb[n] < 0){ - emit(BADMAP); - } else - emit(tabgb[n]); - state = state0; - } -} - -static void -#if NeedFunctionPrototypes -jis02082rune(unsigned char c, Rune *r) -#else -jis02082rune(c, r) - unsigned char c; - Rune *r; -#endif -{ - static enum { state0, state1} state = state0; - static int lastc; - unsigned char ch = (c|0x80); /* XXX */ - int n; - wchar_t l; - -again: - switch(state) { - case state0: /* idle state */ - lastc = ch; - state = state1; - return; - - case state1: /* two part char */ - if((lastc&0x80) != (ch&0x80)){ - emit(lastc); - state = state0; - goto again; - } - if(CANS2J(lastc, ch)){ - int h = lastc, l = ch; - S2J(h, l); - n = h*100 + l - 3232; - } else - n = (lastc&0x7F)*100 + (ch&0x7f) - 3232; /* kuten */ - if(tabkuten[n] == -1){ - emit(BADMAP); - } else { - emit(tabkuten[n]); - } - state = state0; - } -} - -static int -#if NeedFunctionPrototypes -our_mbtowc(wchar_t *p, char *s, size_t n) -#else -our_mbtowc(p, s, n) - wchar_t *p; - char *s; - size_t n; -#endif -{ - unsigned char *us; - int c0, c1, c2, c3, c4, c5; - wchar_t wc; - - if(s == 0) - return 0; /* no shift states */ - - if(n < 1) - goto badlen; - us = (unsigned char*)s; - c0 = us[0]; - if(c0 >= T3) { - if(n < 3) - goto badlen; - c1 = us[1] ^ Tx; - c2 = us[2] ^ Tx; - if((c1|c2) & T2) { - goto bad; - } - if(c0 >= T5) { - if(n < 5) - goto badlen; - c3 = us[3] ^ Tx; - c4 = us[4] ^ Tx; - if((c3|c4) & T2) { - goto bad; - } - if(c0 >= T6) { - /* 6 bytes */ - if(n < 6) - goto badlen; - c5 = us[5] ^ Tx; - if(c5 & T2) { - goto bad; - } - wc = ((((((((((c0 & Mask6) << Bitx) | c1) - << Bitx) | c2) - << Bitx) | c3) - << Bitx) | c4) - << Bitx) | c5; - if(wc <= Wchar5) { - goto bad; - } - *p = wc; - return 6; - } - /* 5 bytes */ - wc = ((((((((c0 & Mask5) << Bitx) | c1) - << Bitx) | c2) - << Bitx) | c3) - << Bitx) | c4; - if(wc <= Wchar4) { - goto bad; - } - *p = wc; - return 5; - } - if(c0 >= T4) { - /* 4 bytes */ - if(n < 4) - goto badlen; - c3 = us[3] ^ Tx; - if(c3 & T2) { - goto bad; - } - wc = ((((((c0 & Mask4) << Bitx) | c1) - << Bitx) | c2) - << Bitx) | c3; - if(wc <= Wchar3) { - goto bad; - } - *p = wc; - return 4; - } - /* 3 bytes */ - wc = ((((c0 & Mask3) << Bitx) | c1) - << Bitx) | c2; - if(wc <= Wchar2) { - goto bad; - } - *p = wc; - return 3; - } - if(c0 >= T2) { - /* 2 bytes */ - if(n < 2) - goto badlen; - c1 = us[1] ^ Tx; - if(c1 & T2) { - goto bad; - } - wc = ((c0 & Mask2) << Bitx) | c1; - if(wc <= Wchar1) { - goto bad; - } - *p = wc; - return 2; - } - /* 1 byte */ - if(c0 >= Tx) { - goto bad; - } - *p = c0; - return 1; - -bad: - errno = EILSEQ; - return -1; -badlen: - return -2; -} - -static void -close_converter(conv) - XlcConv conv; -{ - Xfree((char *) conv); -} - -static XlcConv -create_conv(lcd, methods) - XLCd lcd; - XlcConvMethods methods; -{ - XlcConv conv; - - conv = (XlcConv) Xmalloc(sizeof(XlcConvRec)); - if (conv == (XlcConv) NULL) - return (XlcConv) NULL; - - conv->methods = methods; - - conv->state = NULL; - InitUTFInfo(lcd); - - return conv; -} - -static XlcConvMethodsRec mbtocs_methods = { - close_converter, - utf1tocs, - NULL -}; - -static XlcConv -open_mbtocs(from_lcd, from, to_lcd, to) - XLCd from_lcd; - char *from; - XLCd to_lcd; - char *to; -{ - return create_conv(from_lcd, &mbtocs_methods); -} - -static XlcConvMethodsRec mbstocs_methods = { - close_converter, - utftocs, - NULL -}; - -static XlcConv -open_mbstocs(from_lcd, from, to_lcd, to) - XLCd from_lcd; - char *from; - XLCd to_lcd; - char *to; -{ - return create_conv(from_lcd, &mbstocs_methods); -} - -static XlcConvMethodsRec wcstocs_methods = { - close_converter, - ucstocs, - NULL -}; - -static XlcConv -open_wcstocs(from_lcd, from, to_lcd, to) - XLCd from_lcd; - char *from; - XLCd to_lcd; - char *to; -{ - return create_conv(from_lcd, &wcstocs_methods); -} - -static XlcConvMethodsRec cstombs_methods = { - close_converter, - cstoutf, - NULL -}; - -static XlcConv -open_cstombs(from_lcd, from, to_lcd, to) - XLCd from_lcd; - char *from; - XLCd to_lcd; - char *to; -{ - return create_conv(from_lcd, &cstombs_methods); -} - -static XlcConvMethodsRec cstowcs_methods = { - close_converter, - cstoucs, - NULL -}; - -static XlcConv -open_cstowcs(from_lcd, from, to_lcd, to) - XLCd from_lcd; - char *from; - XLCd to_lcd; - char *to; -{ - return create_conv(from_lcd, &cstowcs_methods); -} - - -XLCd -_XlcUtfLoader(name) - _Xconst char *name; -{ - XLCd lcd; - - lcd = _XlcCreateLC(name, _XlcGenericMethods); - if (lcd == (XLCd) NULL) - return lcd; - - if (!XLC_PUBLIC_PART(lcd)->codeset || - (_XlcCompareISOLatin1(XLC_PUBLIC_PART(lcd)->codeset, "utf"))) { - _XlcDestroyLC(lcd); - return (XLCd) NULL; - } - - _XlcSetConverter(lcd, XlcNMultiByte, lcd, XlcNCharSet, open_mbstocs); - _XlcSetConverter(lcd, XlcNWideChar, lcd, XlcNCharSet, open_wcstocs); - - _XlcSetConverter(lcd, XlcNMultiByte, lcd, XlcNChar, open_mbtocs); - - _XlcSetConverter(lcd, XlcNCharSet, lcd, XlcNMultiByte, open_cstombs); - _XlcSetConverter(lcd, XlcNCharSet, lcd, XlcNWideChar, open_cstowcs); - - return lcd; -} - -#else -typedef int dummy; -#endif /* X_LOCALE */ diff --git a/xc/lib/Xxf86rush/XF86Rush.c b/xc/lib/Xxf86rush/XF86Rush.c index 5caba014d..1b4ec1b19 100644 --- a/xc/lib/Xxf86rush/XF86Rush.c +++ b/xc/lib/Xxf86rush/XF86Rush.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/Xxf86rush/XF86Rush.c,v 1.4 2000/02/29 03:09:06 dawes Exp $ */ +/* $XFree86: xc/lib/Xxf86rush/XF86Rush.c,v 1.5 2000/09/26 15:56:59 tsi Exp $ */ /* Copyright (c) 1998 Daryll Strauss @@ -112,7 +112,7 @@ Bool XF86RushLockPixmap(Display *dpy, int screen, Pixmap pixmap, void **addr) return False; } if (addr) - *addr = (void *)rep.addr; + *addr = (void *)(long)rep.addr; UnlockDisplay(dpy); SyncHandle(); return True; diff --git a/xc/nls/Compose/en_US.utf b/xc/nls/Compose/en_US.utf deleted file mode 100644 index 3d5e4a130..000000000 --- a/xc/nls/Compose/en_US.utf +++ /dev/null @@ -1,15 +0,0 @@ -# -# en_US.utf Compose Sequence -# -# Sequence Definition -# -# $XFree86: xc/nls/Compose/en_US.utf,v 1.1 1999/08/28 09:00:34 dawes Exp $ -# -# This file currently has no entries. It appears that a compose file (even -# just an empty one) is required for the appropriate keysyms to work for -# this encoding. -# -# <Multi_key> Means <Compose> -# Special Character - -# End of Sequence Definition diff --git a/xc/nls/XLC_LOCALE/en_US.utf b/xc/nls/XLC_LOCALE/en_US.utf deleted file mode 100644 index 16d9862f7..000000000 --- a/xc/nls/XLC_LOCALE/en_US.utf +++ /dev/null @@ -1,121 +0,0 @@ -XCOMM $XConsortium: en_US.utf /main/4 1996/09/28 16:50:55 rws $ -XCOMM XLocale Database Sample for en_US.utf -XCOMM - -XCOMM -XCOMM XLC_FONTSET category -XCOMM -XLC_FONTSET -XCOMM fs0 class (7 bit ASCII) -fs0 { - charset { - name ISO8859-1:GL - } - font { - primary ISO8859-1:GL - vertical_rotate all - } -} -XCOMM fs1 class (ISO8859 families) -fs1 { - charset { - name ISO8859-1:GR - } - font { - primary ISO8859-1:GR - } -} -XCOMM fs2 class (Kanji) -fs2 { - charset { - name JISX0208.1983-0:GL - } - font { - primary JISX0208.1983-0:GL - } -} -XCOMM fs3 class (Korean Character) -fs3 { - charset { - name KSC5601.1987-0:GL - } - font { - primary KSC5601.1987-0:GL - } -} -XCOMM fs4 class (Chinese Han Character) -fs4 { - charset { - name GB2312.1980-0:GL - } - font { - primary GB2312.1980-0:GL - } -} -XCOMM fs5 class (Half Kana) -fs5 { - charset { - name JISX0201.1976-0:GR - } - font { - primary JISX0201.1976-0:GR - vertical_rotate all - } -} -END XLC_FONTSET - -XCOMM -XCOMM XLC_XLOCALE category -XCOMM -XLC_XLOCALE - -encoding_name "UTF" -mb_cur_max 3 -state_depend_encoding False - -XCOMM cs0 class -cs0 { - side GL:Default - length 1 - ct_encoding ISO8859-1:GL -} - -XCOMM cs1 class -cs1 { - side GR:Default - length 1 - ct_encoding ISO8859-1:GR -} - -XCOMM cs2 class -cs2 { - side GR - length 2 - ct_encoding JISX0208.1983-0:GL; JISX0208.1983-0:GR;\ - JISX0208.1983-1:GL; JISX0208.1983-1:GR -} - -XCOMM cs3 class -cs3 { - side GL - length 2 - ct_encoding KSC5601.1987-0:GL; KSC5601.1987-0:GR;\ - KSC5601.1987-1:GL; KSC5601.1987-1:GR -} - -XCOMM cs4 class -cs4 { - side GR - length 2 - ct_encoding GB2312.1980-0:GL; GB2312.1980-0:GR -} - -XCOMM cs5 class -cs5 { - side GR - length 1 - ct_encoding JISX0201.1976-0:GR -} - - -END XLC_XLOCALE diff --git a/xc/nls/XLC_LOCALE/gb2312 b/xc/nls/XLC_LOCALE/gb2312 deleted file mode 100644 index 402885327..000000000 --- a/xc/nls/XLC_LOCALE/gb2312 +++ /dev/null @@ -1,1100 +0,0 @@ - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 3000 3001 3002 -30fb 203e 02c7 00a8 3003 3005 2015 30fc -2225 2026 2018 2019 201c 201d 3014 3015 -3008 3009 300a 300b 300c 300d 300e 300f -3016 3017 3010 3011 00b1 00d7 00f7 2236 -2227 2228 2211 220f 222a 2229 2208 2237 -221a 22a5 -1 2220 2312 2299 222b 222e -2261 224c 2248 223d 221d 2260 226e 226f -2264 2265 221e 2235 2234 2642 2640 00b0 -2032 2033 2103 -1 00a4 00a2 00a3 2030 -00a7 2116 2606 2605 25cb 25cf 25ce 25c7 -25c6 25a1 25a0 25b3 25b2 203b 2192 2190 -2191 2193 3013 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 2488 2489 248a 248b 248c 248d 248e -248f 2490 2491 2492 2493 2494 2495 2496 -2497 2498 2499 249a 249b 2474 2475 2476 -2477 2478 2479 247a 247b 247c 247d 247e -247f 2480 2481 2482 2483 2484 2485 2486 -2487 2460 2461 2462 2463 2464 2465 2466 -2467 2468 2469 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 2160 2161 2162 2163 2164 2165 2166 -2167 2168 2169 216a 216b -1 -1 -1 - -1 -1 -1 -1 -1 ff01 ff02 ff03 -ff04 ff05 ff06 ff07 ff08 ff09 ff0a ff0b -ff0c ff0d ff0e ff0f ff10 ff11 ff12 ff13 -ff14 ff15 ff16 ff17 ff18 ff19 ff1a ff1b -ff1c ff1d ff1e ff1f ff20 ff21 ff22 ff23 -ff24 ff25 ff26 ff27 ff28 ff29 ff2a ff2b -ff2c ff2d ff2e ff2f ff30 ff31 ff32 ff33 -ff34 ff35 ff36 ff37 ff38 ff39 ff3a ff3b -ff3c ff3d ff3e ff3f ff40 ff41 ff42 ff43 -ff44 ff45 ff46 ff47 ff48 ff49 ff4a ff4b -ff4c ff4d ff4e ff4f ff50 ff51 ff52 ff53 -ff54 ff55 ff56 ff57 ff58 ff59 ff5a ff5b -ff5c ff5d ff5e -1 -1 -1 -1 -1 - -1 3041 3042 3043 3044 3045 3046 3047 -3048 3049 304a 304b 304c 304d 304e 304f -3050 3051 3052 3053 3054 3055 3056 3057 -3058 3059 305a 305b 305c 305d 305e 305f -3060 3061 3062 3063 3064 3065 3066 3067 -3068 3069 306a 306b 306c 306d 306e 306f -3070 3071 3072 3073 3074 3075 3076 3077 -3078 3079 307a 307b 307c 307d 307e 307f -3080 3081 3082 3083 3084 3085 3086 3087 -3088 3089 308a 308b 308c 308d 308e 308f -3090 3091 3092 3093 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 30a1 30a2 30a3 -30a4 30a5 30a6 30a7 30a8 30a9 30aa 30ab -30ac 30ad 30ae 30af 30b0 30b1 30b2 30b3 -30b4 30b5 30b6 30b7 30b8 30b9 30ba 30bb -30bc 30bd 30be 30bf 30c0 30c1 30c2 30c3 -30c4 30c5 30c6 30c7 30c8 30c9 30ca 30cb -30cc 30cd 30ce 30cf 30d0 30d1 30d2 30d3 -30d4 30d5 30d6 30d7 30d8 30d9 30da 30db -30dc 30dd 30de 30df 30e0 30e1 30e2 30e3 -30e4 30e5 30e6 30e7 30e8 30e9 30ea 30eb -30ec 30ed 30ee 30ef 30f0 30f1 30f2 30f3 -30f4 30f5 30f6 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 0391 0392 0393 0394 0395 0396 0397 -0398 0399 039a 039b 039c 039d 039e 039f -03a0 03a1 03a3 03a4 03a5 03a6 03a7 03a8 -03a9 -1 -1 -1 -1 -1 -1 -1 - -1 03b1 03b2 03b3 03b4 03b5 03b6 03b7 -03b8 03b9 03ba 03bb 03bc 03bd 03be 03bf -03c0 03c1 03c3 03c4 03c5 03c6 03c7 03c8 -03c9 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 0410 0411 0412 -0413 0414 0415 0401 0416 0417 0418 0419 -041a 041b 041c 041d 041e 041f 0420 0421 -0422 0423 0424 0425 0426 0427 0428 0429 -042a 042b 042c 042d 042e 042f -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 0430 0431 0432 -0433 0434 0435 0451 0436 0437 0438 0439 -043a 043b 043c 043d 043e 043f 0440 0441 -0442 0443 0444 0445 0446 0447 0448 0449 -044a 044b 044c 044d 044e 044f -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 3105 3106 3107 -3108 3109 310a 310b 310c 310d 310e 310f -3110 3111 3112 3113 3114 3115 3116 3117 -3118 3119 311a 311b 311c 311d 311e 311f -3120 3121 3122 3123 3124 3125 3126 3127 -3128 3129 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 -2500 2501 2502 2503 2504 2505 2506 2507 -2508 2509 250a 250b 250c 250d 250e 250f -2510 2511 2512 2513 2514 2515 2516 2517 -2518 2519 251a 251b 251c 251d 251e 251f -2520 2521 2522 2523 2524 2525 2526 2527 -2528 2529 252a 252b 252c 252d 252e 252f -2530 2531 2532 2533 2534 2535 2536 2537 -2538 2539 253a 253b 253c 253d 253e 253f -2540 2541 2542 2543 2544 2545 2546 2547 -2548 2549 254a 254b -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 554a 963f 57c3 6328 54ce 5509 54c0 -7691 764c 853c 77ee 827e 788d 7231 9698 -978d 6c28 5b89 4ffa 6309 6697 5cb8 80fa -6848 80ae 6602 76ce 51f9 6556 71ac 7ff1 -8884 50b2 5965 61ca 6fb3 82ad 634c 6252 -53ed 5427 7b06 516b 75a4 5df4 62d4 8dcb -9776 628a 8019 575d 9738 7f62 7238 767d -67cf 767e 6446 4f70 8d25 62dc 7a17 6591 -73ed 642c 6273 822c 9881 677f 7248 626e -62cc 4f34 74e3 534a 529e 7eca 90a6 5e2e -6886 699c 8180 7ed1 68d2 78c5 868c 9551 -508d 8c24 82de 80de 5305 8912 5265 -1 - -1 -1 -1 -1 -1 8584 96f9 4fdd -5821 9971 5b9d 62b1 62a5 66b4 8c79 9c8d -7206 676f 7891 60b2 5351 5317 8f88 80cc -8d1d 94a1 500d 72c8 5907 60eb 7119 88ab -5954 82ef 672c 7b28 5d29 7ef7 752d 6cf5 -8e66 8ff8 903c 9f3b 6bd4 9119 7b14 5f7c -78a7 84d6 853d 6bd5 6bd9 6bd6 5e01 5e87 -75f9 95ed 655d 5f0a 5fc5 8f9f 58c1 81c2 -907f 965b 97ad 8fb9 7f16 8d2c 6241 4fbf -53d8 535e 8fa8 8fa9 8fab 904d 6807 5f6a -8198 8868 9cd6 618b 522b 762a 5f6c 658c -6fd2 6ee8 5bbe 6448 5175 51b0 67c4 4e19 -79c9 997c 70b3 -1 -1 -1 -1 -1 - -1 75c5 5e76 73bb 83e0 64ad 62e8 94b5 -6ce2 535a 52c3 640f 94c2 7b94 4f2f 5e1b -8236 8116 818a 6e24 6cca 9a73 6355 535c -54fa 8865 57e0 4e0d 5e03 6b65 7c3f 90e8 -6016 64e6 731c 88c1 6750 624d 8d22 776c -8e29 91c7 5f69 83dc 8521 9910 53c2 8695 -6b8b 60ed 60e8 707f 82cd 8231 4ed3 6ca7 -85cf 64cd 7cd9 69fd 66f9 8349 5395 7b56 -4fa7 518c 6d4b 5c42 8e6d 63d2 53c9 832c -8336 67e5 78b4 643d 5bdf 5c94 5dee 8be7 -62c6 67f4 8c7a 6400 63ba 8749 998b 8c17 -7f20 94f2 4ea7 9610 98a4 660c 7316 -1 - -1 -1 -1 -1 -1 573a 5c1d 5e38 -957f 507f 80a0 5382 655e 7545 5531 5021 -8d85 6284 949e 671d 5632 6f6e 5de2 5435 -7092 8f66 626f 64a4 63a3 5f7b 6f88 90f4 -81e3 8fb0 5c18 6668 5ff1 6c89 9648 8d81 -886c 6491 79f0 57ce 6a59 6210 5448 4e58 -7a0b 60e9 6f84 8bda 627f 901e 9a8b 79e4 -5403 75f4 6301 5319 6c60 8fdf 5f1b 9a70 -803b 9f7f 4f88 5c3a 8d64 7fc5 65a5 70bd -5145 51b2 866b 5d07 5ba0 62bd 916c 7574 -8e0c 7a20 6101 7b79 4ec7 7ef8 7785 4e11 -81ed 521d 51fa 6a71 53a8 8e87 9504 96cf -6ec1 9664 695a -1 -1 -1 -1 -1 - -1 7840 50a8 77d7 6410 89e6 5904 63e3 -5ddd 7a7f 693d 4f20 8239 5598 4e32 75ae -7a97 5e62 5e8a 95ef 521b 5439 708a 6376 -9524 5782 6625 693f 9187 5507 6df3 7eaf -8822 6233 7ef0 75b5 8328 78c1 96cc 8f9e -6148 74f7 8bcd 6b64 523a 8d50 6b21 806a -8471 56f1 5306 4ece 4e1b 51d1 7c97 918b -7c07 4fc3 8e7f 7be1 7a9c 6467 5d14 50ac -8106 7601 7cb9 6dec 7fe0 6751 5b58 5bf8 -78cb 64ae 6413 63aa 632b 9519 642d 8fbe -7b54 7629 6253 5927 5446 6b79 50a3 6234 -5e26 6b86 4ee3 8d37 888b 5f85 902e -1 - -1 -1 -1 -1 -1 6020 803d 62c5 -4e39 5355 90f8 63b8 80c6 65e6 6c2e 4f46 -60ee 6de1 8bde 5f39 86cb 5f53 6321 515a -8361 6863 5200 6363 8e48 5012 5c9b 7977 -5bfc 5230 7a3b 60bc 9053 76d7 5fb7 5f97 -7684 8e6c 706f 767b 7b49 77aa 51f3 9093 -5824 4f4e 6ef4 8fea 654c 7b1b 72c4 6da4 -7fdf 5ae1 62b5 5e95 5730 8482 7b2c 5e1d -5f1f 9012 7f14 98a0 6382 6ec7 7898 70b9 -5178 975b 57ab 7535 4f43 7538 5e97 60e6 -5960 6dc0 6bbf 7889 53fc 96d5 51cb 5201 -6389 540a 9493 8c03 8dcc 7239 789f 8776 -8fed 8c0d 53e0 -1 -1 -1 -1 -1 - -1 4e01 76ef 53ee 9489 9876 9f0e 952d -5b9a 8ba2 4e22 4e1c 51ac 8463 61c2 52a8 -680b 4f97 606b 51bb 6d1e 515c 6296 6597 -9661 8c46 9017 75d8 90fd 7763 6bd2 728a -72ec 8bfb 5835 7779 8d4c 675c 9540 809a -5ea6 6e21 5992 7aef 77ed 953b 6bb5 65ad -7f0e 5806 5151 961f 5bf9 58a9 5428 8e72 -6566 987f 56e4 949d 76fe 9041 6387 54c6 -591a 593a 579b 8eb2 6735 8dfa 8235 5241 -60f0 5815 86fe 5ce8 9e45 4fc4 989d 8bb9 -5a25 6076 5384 627c 904f 9102 997f 6069 -800c 513f 8033 5c14 9975 6d31 4e8c -1 - -1 -1 -1 -1 -1 8d30 53d1 7f5a -7b4f 4f10 4e4f 9600 6cd5 73d0 85e9 5e06 -756a 7ffb 6a0a 77fe 9492 7e41 51e1 70e6 -53cd 8fd4 8303 8d29 72af 996d 6cdb 574a -82b3 65b9 80aa 623f 9632 59a8 4eff 8bbf -7eba 653e 83f2 975e 5561 98de 80a5 532a -8bfd 5420 80ba 5e9f 6cb8 8d39 82ac 915a -5429 6c1b 5206 7eb7 575f 711a 6c7e 7c89 -594b 4efd 5fff 6124 7caa 4e30 5c01 67ab -8702 5cf0 950b 98ce 75af 70fd 9022 51af -7f1d 8bbd 5949 51e4 4f5b 5426 592b 6577 -80a4 5b75 6276 62c2 8f90 5e45 6c1f 7b26 -4f0f 4fd8 670d -1 -1 -1 -1 -1 - -1 6d6e 6daa 798f 88b1 5f17 752b 629a -8f85 4fef 91dc 65a7 812f 8151 5e9c 8150 -8d74 526f 8986 8d4b 590d 5085 4ed8 961c -7236 8179 8d1f 5bcc 8ba3 9644 5987 7f1a -5490 5676 560e 8be5 6539 6982 9499 76d6 -6e89 5e72 7518 6746 67d1 7aff 809d 8d76 -611f 79c6 6562 8d63 5188 521a 94a2 7f38 -809b 7eb2 5c97 6e2f 6760 7bd9 768b 9ad8 -818f 7f94 7cd5 641e 9550 7a3f 544a 54e5 -6b4c 6401 6208 9e3d 80f3 7599 5272 9769 -845b 683c 86e4 9601 9694 94ec 4e2a 5404 -7ed9 6839 8ddf 8015 66f4 5e9a 7fb9 -1 - -1 -1 -1 -1 -1 57c2 803f 6897 -5de5 653b 529f 606d 9f9a 4f9b 8eac 516c -5bab 5f13 5de9 6c5e 62f1 8d21 5171 94a9 -52fe 6c9f 82df 72d7 57a2 6784 8d2d 591f -8f9c 83c7 5495 7b8d 4f30 6cbd 5b64 59d1 -9f13 53e4 86ca 9aa8 8c37 80a1 6545 987e -56fa 96c7 522e 74dc 5250 5be1 6302 8902 -4e56 62d0 602a 68fa 5173 5b98 51a0 89c2 -7ba1 9986 7f50 60ef 704c 8d2f 5149 5e7f -901b 7470 89c4 572d 7845 5f52 9f9f 95fa -8f68 9b3c 8be1 7678 6842 67dc 8dea 8d35 -523d 8f8a 6eda 68cd 9505 90ed 56fd 679c -88f9 8fc7 54c8 -1 -1 -1 -1 -1 - -1 9ab8 5b69 6d77 6c26 4ea5 5bb3 9a87 -9163 61a8 90af 97e9 542b 6db5 5bd2 51fd -558a 7f55 7ff0 64bc 634d 65f1 61be 608d -710a 6c57 6c49 592f 676d 822a 58d5 568e -8c6a 6beb 90dd 597d 8017 53f7 6d69 5475 -559d 8377 83cf 6838 79be 548c 4f55 5408 -76d2 8c89 9602 6cb3 6db8 8d6b 8910 9e64 -8d3a 563f 9ed1 75d5 5f88 72e0 6068 54fc -4ea8 6a2a 8861 6052 8f70 54c4 70d8 8679 -9e3f 6d2a 5b8f 5f18 7ea2 5589 4faf 7334 -543c 539a 5019 540e 547c 4e4e 5ffd 745a -58f6 846b 80e1 8774 72d0 7cca 6e56 -1 - -1 -1 -1 -1 -1 5f27 864e 552c -62a4 4e92 6caa 6237 82b1 54d7 534e 733e -6ed1 753b 5212 5316 8bdd 69d0 5f8a 6000 -6dee 574f 6b22 73af 6853 8fd8 7f13 6362 -60a3 5524 75ea 8c62 7115 6da3 5ba6 5e7b -8352 614c 9ec4 78fa 8757 7c27 7687 51f0 -60f6 714c 6643 5e4c 604d 8c0e 7070 6325 -8f89 5fbd 6062 86d4 56de 6bc1 6094 6167 -5349 60e0 6666 8d3f 79fd 4f1a 70e9 6c47 -8bb3 8bf2 7ed8 8364 660f 5a5a 9b42 6d51 -6df7 8c41 6d3b 4f19 706b 83b7 6216 60d1 -970d 8d27 7978 51fb 573e 57fa 673a 7578 -7a3d 79ef 7b95 -1 -1 -1 -1 -1 - -1 808c 9965 8ff9 6fc0 8ba5 9e21 59ec -7ee9 7f09 5409 6781 68d8 8f91 7c4d 96c6 -53ca 6025 75be 6c72 5373 5ac9 7ea7 6324 -51e0 810a 5df1 84df 6280 5180 5b63 4f0e -796d 5242 60b8 6d4e 5bc4 5bc2 8ba1 8bb0 -65e2 5fcc 9645 5993 7ee7 7eaa 5609 67b7 -5939 4f73 5bb6 52a0 835a 988a 8d3e 7532 -94be 5047 7a3c 4ef7 67b6 9a7e 5ac1 6b7c -76d1 575a 5c16 7b3a 95f4 714e 517c 80a9 -8270 5978 7f04 8327 68c0 67ec 78b1 7877 -62e3 6361 7b80 4fed 526a 51cf 8350 69db -9274 8df5 8d31 89c1 952e 7bad 4ef6 -1 - -1 -1 -1 -1 -1 5065 8230 5251 -996f 6e10 6e85 6da7 5efa 50f5 59dc 5c06 -6d46 6c5f 7586 848b 6868 5956 8bb2 5320 -9171 964d 8549 6912 7901 7126 80f6 4ea4 -90ca 6d47 9a84 5a07 56bc 6405 94f0 77eb -4fa5 811a 72e1 89d2 997a 7f34 7ede 527f -6559 9175 8f7f 8f83 53eb 7a96 63ed 63a5 -7686 79f8 8857 9636 622a 52ab 8282 6854 -6770 6377 776b 7aed 6d01 7ed3 89e3 59d0 -6212 85c9 82a5 754c 501f 4ecb 75a5 8beb -5c4a 5dfe 7b4b 65a4 91d1 4eca 6d25 895f -7d27 9526 4ec5 8c28 8fdb 9773 664b 7981 -8fd1 70ec 6d78 -1 -1 -1 -1 -1 - -1 5c3d 52b2 8346 5162 830e 775b 6676 -9cb8 4eac 60ca 7cbe 7cb3 7ecf 4e95 8b66 -666f 9888 9759 5883 656c 955c 5f84 75c9 -9756 7adf 7ade 51c0 70af 7a98 63ea 7a76 -7ea0 7396 97ed 4e45 7078 4e5d 9152 53a9 -6551 65e7 81fc 8205 548e 5c31 759a 97a0 -62d8 72d9 75bd 5c45 9a79 83ca 5c40 5480 -77e9 4e3e 6cae 805a 62d2 636e 5de8 5177 -8ddd 8e1e 952f 4ff1 53e5 60e7 70ac 5267 -6350 9e43 5a1f 5026 7737 5377 7ee2 6485 -652b 6289 6398 5014 7235 89c9 51b3 8bc0 -7edd 5747 83cc 94a7 519b 541b 5cfb -1 - -1 -1 -1 -1 -1 4fca 7ae3 6d5a -90e1 9a8f 5580 5496 5361 54af 5f00 63e9 -6977 51ef 6168 520a 582a 52d8 574e 780d -770b 5eb7 6177 7ce0 625b 6297 4ea2 7095 -8003 62f7 70e4 9760 5777 82db 67ef 68f5 -78d5 9897 79d1 58f3 54b3 53ef 6e34 514b -523b 5ba2 8bfe 80af 5543 57a6 6073 5751 -542d 7a7a 6050 5b54 63a7 62a0 53e3 6263 -5bc7 67af 54ed 7a9f 82e6 9177 5e93 88e4 -5938 57ae 630e 8de8 80ef 5757 7b77 4fa9 -5feb 5bbd 6b3e 5321 7b50 72c2 6846 77ff -7736 65f7 51b5 4e8f 76d4 5cbf 7aa5 8475 -594e 9b41 5080 -1 -1 -1 -1 -1 - -1 9988 6127 6e83 5764 6606 6346 56f0 -62ec 6269 5ed3 9614 5783 62c9 5587 8721 -814a 8fa3 5566 83b1 6765 8d56 84dd 5a6a -680f 62e6 7bee 9611 5170 6f9c 8c30 63fd -89c8 61d2 7f06 70c2 6ee5 7405 6994 72fc -5eca 90ce 6717 6d6a 635e 52b3 7262 8001 -4f6c 59e5 916a 70d9 6d9d 52d2 4e50 96f7 -956d 857e 78ca 7d2f 5121 5792 64c2 808b -7c7b 6cea 68f1 695e 51b7 5398 68a8 7281 -9ece 7bf1 72f8 79bb 6f13 7406 674e 91cc -9ca4 793c 8389 8354 540f 6817 4e3d 5389 -52b1 783e 5386 5229 5088 4f8b 4fd0 -1 - -1 -1 -1 -1 -1 75e2 7acb 7c92 -6ca5 96b6 529b 7483 54e9 4fe9 8054 83b2 -8fde 9570 5ec9 601c 6d9f 5e18 655b 8138 -94fe 604b 70bc 7ec3 7cae 51c9 6881 7cb1 -826f 4e24 8f86 91cf 667e 4eae 8c05 64a9 -804a 50da 7597 71ce 5be5 8fbd 6f66 4e86 -6482 9563 5ed6 6599 5217 88c2 70c8 52a3 -730e 7433 6797 78f7 9716 4e34 90bb 9cde -6dcb 51db 8d41 541d 62ce 73b2 83f1 96f6 -9f84 94c3 4f36 7f9a 51cc 7075 9675 5cad -9886 53e6 4ee4 6e9c 7409 69b4 786b 998f -7559 5218 7624 6d41 67f3 516d 9f99 804b -5499 7b3c 7abf -1 -1 -1 -1 -1 - -1 9686 5784 62e2 9647 697c 5a04 6402 -7bd3 6f0f 964b 82a6 5362 9885 5e90 7089 -63b3 5364 864f 9c81 9e93 788c 9732 8def -8d42 9e7f 6f5e 7984 5f55 9646 622e 9a74 -5415 94dd 4fa3 65c5 5c65 5c61 7f15 8651 -6c2f 5f8b 7387 6ee4 7eff 5ce6 631b 5b6a -6ee6 5375 4e71 63a0 7565 62a1 8f6e 4f26 -4ed1 6ca6 7eb6 8bba 841d 87ba 7f57 903b -9523 7ba9 9aa1 88f8 843d 6d1b 9a86 7edc -5988 9ebb 739b 7801 8682 9a6c 9a82 561b -5417 57cb 4e70 9ea6 5356 8fc8 8109 7792 -9992 86ee 6ee1 8513 66fc 6162 6f2b -1 - -1 -1 -1 -1 -1 8c29 8292 832b -76f2 6c13 5fd9 83bd 732b 8305 951a 6bdb -77db 94c6 536f 8302 5192 5e3d 8c8c 8d38 -4e48 73ab 679a 6885 9176 9709 7164 6ca1 -7709 5a92 9541 6bcf 7f8e 6627 5bd0 59b9 -5a9a 95e8 95f7 4eec 840c 8499 6aac 76df -9530 731b 68a6 5b5f 772f 919a 9761 7cdc -8ff7 8c1c 5f25 7c73 79d8 89c5 6ccc 871c -5bc6 5e42 68c9 7720 7ef5 5195 514d 52c9 -5a29 7f05 9762 82d7 63cf 7784 85d0 79d2 -6e3a 5e99 5999 8511 706d 6c11 62bf 76bf -654f 60af 95fd 660e 879f 9e23 94ed 540d -547d 8c2c 6478 -1 -1 -1 -1 -1 - -1 6479 8611 6a21 819c 78e8 6469 9b54 -62b9 672b 83ab 58a8 9ed8 6cab 6f20 5bde -964c 8c0b 725f 67d0 62c7 7261 4ea9 59c6 -6bcd 5893 66ae 5e55 52df 6155 6728 76ee -7766 7267 7a46 62ff 54ea 5450 94a0 90a3 -5a1c 7eb3 6c16 4e43 5976 8010 5948 5357 -7537 96be 56ca 6320 8111 607c 95f9 6dd6 -5462 9981 5185 5ae9 80fd 59ae 9713 502a -6ce5 5c3c 62df 4f60 533f 817b 9006 6eba -852b 62c8 5e74 78be 64b5 637b 5ff5 5a18 -917f 9e1f 5c3f 634f 8042 5b7d 556e 954a -954d 6d85 60a8 67e0 72de 51dd 5b81 -1 - -1 -1 -1 -1 -1 62e7 6cde 725b -626d 94ae 7ebd 8113 6d53 519c 5f04 5974 -52aa 6012 5973 6696 8650 759f 632a 61e6 -7cef 8bfa 54e6 6b27 9e25 6bb4 85d5 5455 -5076 6ca4 556a 8db4 722c 5e15 6015 7436 -62cd 6392 724c 5f98 6e43 6d3e 6500 6f58 -76d8 78d0 76fc 7554 5224 53db 4e53 5e9e -65c1 802a 80d6 629b 5486 5228 70ae 888d -8dd1 6ce1 5478 80da 57f9 88f4 8d54 966a -914d 4f69 6c9b 55b7 76c6 7830 62a8 70f9 -6f8e 5f6d 84ec 68da 787c 7bf7 81a8 670b -9e4f 6367 78b0 576f 7812 9739 6279 62ab -5288 7435 6bd7 -1 -1 -1 -1 -1 - -1 5564 813e 75b2 76ae 5339 75de 50fb -5c41 8b6c 7bc7 504f 7247 9a97 98d8 6f02 -74e2 7968 6487 77a5 62fc 9891 8d2b 54c1 -8058 4e52 576a 82f9 840d 5e73 51ed 74f6 -8bc4 5c4f 5761 6cfc 9887 5a46 7834 9b44 -8feb 7c95 5256 6251 94fa 4ec6 8386 8461 -83e9 84b2 57d4 6734 5703 666e 6d66 8c31 -66dd 7011 671f 6b3a 6816 621a 59bb 4e03 -51c4 6f06 67d2 6c8f 5176 68cb 5947 6b67 -7566 5d0e 8110 9f50 65d7 7948 7941 9a91 -8d77 5c82 4e5e 4f01 542f 5951 780c 5668 -6c14 8fc4 5f03 6c7d 6ce3 8bab 6390 -1 - -1 -1 -1 -1 -1 6070 6d3d 7275 -6266 948e 94c5 5343 8fc1 7b7e 4edf 8c26 -4e7e 9ed4 94b1 94b3 524d 6f5c 9063 6d45 -8c34 5811 5d4c 6b20 6b49 67aa 545b 8154 -7f8c 5899 8537 5f3a 62a2 6a47 9539 6572 -6084 6865 77a7 4e54 4fa8 5de7 9798 64ac -7fd8 5ced 4fcf 7a8d 5207 8304 4e14 602f -7a83 94a6 4fb5 4eb2 79e6 7434 52e4 82b9 -64d2 79bd 5bdd 6c81 9752 8f7b 6c22 503e -537f 6e05 64ce 6674 6c30 60c5 9877 8bf7 -5e86 743c 7a77 79cb 4e18 90b1 7403 6c42 -56da 914b 6cc5 8d8b 533a 86c6 66f2 8eaf -5c48 9a71 6e20 -1 -1 -1 -1 -1 - -1 53d6 5a36 9f8b 8da3 53bb 5708 98a7 -6743 919b 6cc9 5168 75ca 62f3 72ac 5238 -529d 7f3a 7094 7638 5374 9e4a 69b7 786e -96c0 88d9 7fa4 7136 71c3 5189 67d3 74e4 -58e4 6518 56b7 8ba9 9976 6270 7ed5 60f9 -70ed 58ec 4ec1 4eba 5fcd 97e7 4efb 8ba4 -5203 598a 7eab 6254 4ecd 65e5 620e 8338 -84c9 8363 878d 7194 6eb6 5bb9 7ed2 5197 -63c9 67d4 8089 8339 8815 5112 5b7a 5982 -8fb1 4e73 6c5d 5165 8925 8f6f 962e 854a -745e 9510 95f0 6da6 82e5 5f31 6492 6d12 -8428 816e 9cc3 585e 8d5b 4e09 53c1 -1 - -1 -1 -1 -1 -1 4f1e 6563 6851 -55d3 4e27 6414 9a9a 626b 5ac2 745f 8272 -6da9 68ee 50e7 838e 7802 6740 5239 6c99 -7eb1 50bb 5565 715e 7b5b 6652 73ca 82eb -6749 5c71 5220 717d 886b 95ea 9655 64c5 -8d61 81b3 5584 6c55 6247 7f2e 5892 4f24 -5546 8d4f 664c 4e0a 5c1a 88f3 68a2 634e -7a0d 70e7 828d 52fa 97f6 5c11 54e8 90b5 -7ecd 5962 8d4a 86c7 820c 820d 8d66 6444 -5c04 6151 6d89 793e 8bbe 7837 7533 547b -4f38 8eab 6df1 5a20 7ec5 795e 6c88 5ba1 -5a76 751a 80be 614e 6e17 58f0 751f 7525 -7272 5347 7ef3 -1 -1 -1 -1 -1 - -1 7701 76db 5269 80dc 5723 5e08 5931 -72ee 65bd 6e7f 8bd7 5c38 8671 5341 77f3 -62fe 65f6 4ec0 98df 8680 5b9e 8bc6 53f2 -77e2 4f7f 5c4e 9a76 59cb 5f0f 793a 58eb -4e16 67ff 4e8b 62ed 8a93 901d 52bf 662f -55dc 566c 9002 4ed5 4f8d 91ca 9970 6c0f -5e02 6043 5ba4 89c6 8bd5 6536 624b 9996 -5b88 5bff 6388 552e 53d7 7626 517d 852c -67a2 68b3 6b8a 6292 8f93 53d4 8212 6dd1 -758f 4e66 8d4e 5b70 719f 85af 6691 66d9 -7f72 8700 9ecd 9f20 5c5e 672f 8ff0 6811 -675f 620d 7ad6 5885 5eb6 6570 6f31 -1 - -1 -1 -1 -1 -1 6055 5237 800d -6454 8870 7529 5e05 6813 62f4 971c 53cc -723d 8c01 6c34 7761 7a0e 542e 77ac 987a -821c 8bf4 7855 6714 70c1 65af 6495 5636 -601d 79c1 53f8 4e1d 6b7b 8086 5bfa 55e3 -56db 4f3a 4f3c 9972 5df3 677e 8038 6002 -9882 9001 5b8b 8bbc 8bf5 641c 8258 64de -55fd 82cf 9165 4fd7 7d20 901f 7c9f 50f3 -5851 6eaf 5bbf 8bc9 8083 9178 849c 7b97 -867d 968b 968f 7ee5 9ad3 788e 5c81 7a57 -9042 96a7 795f 5b59 635f 7b0b 84d1 68ad -5506 7f29 7410 7d22 9501 6240 584c 4ed6 -5b83 5979 5854 -1 -1 -1 -1 -1 - -1 736d 631e 8e4b 8e0f 80ce 82d4 62ac -53f0 6cf0 915e 592a 6001 6c70 574d 644a -8d2a 762b 6ee9 575b 6a80 75f0 6f6d 8c2d -8c08 5766 6bef 8892 78b3 63a2 53f9 70ad -6c64 5858 642a 5802 68e0 819b 5510 7cd6 -5018 8eba 6dcc 8d9f 70eb 638f 6d9b 6ed4 -7ee6 8404 6843 9003 6dd8 9676 8ba8 5957 -7279 85e4 817e 75bc 8a8a 68af 5254 8e22 -9511 63d0 9898 8e44 557c 4f53 66ff 568f -60d5 6d95 5243 5c49 5929 6dfb 586b 7530 -751c 606c 8214 8146 6311 6761 8fe2 773a -8df3 8d34 94c1 5e16 5385 542c 70c3 -1 - -1 -1 -1 -1 -1 6c40 5ef7 505c -4ead 5ead 633a 8247 901a 6850 916e 77b3 -540c 94dc 5f64 7ae5 6876 6345 7b52 7edf -75db 5077 6295 5934 900f 51f8 79c3 7a81 -56fe 5f92 9014 6d82 5c60 571f 5410 5154 -6e4d 56e2 63a8 9893 817f 8715 892a 9000 -541e 5c6f 81c0 62d6 6258 8131 9e35 9640 -9a6e 9a7c 692d 59a5 62d3 553e 6316 54c7 -86d9 6d3c 5a03 74e6 889c 6b6a 5916 8c4c -5f2f 6e7e 73a9 987d 4e38 70f7 5b8c 7897 -633d 665a 7696 60cb 5b9b 5a49 4e07 8155 -6c6a 738b 4ea1 6789 7f51 5f80 65fa 671b -5fd8 5984 5a01 -1 -1 -1 -1 -1 - -1 5dcd 5fae 5371 97e6 8fdd 6845 56f4 -552f 60df 4e3a 6f4d 7ef4 82c7 840e 59d4 -4f1f 4f2a 5c3e 7eac 672a 851a 5473 754f -80c3 5582 9b4f 4f4d 6e2d 8c13 5c09 6170 -536b 761f 6e29 868a 6587 95fb 7eb9 543b -7a33 7d0a 95ee 55e1 7fc1 74ee 631d 8717 -6da1 7a9d 6211 65a1 5367 63e1 6c83 5deb -545c 94a8 4e4c 6c61 8bec 5c4b 65e0 829c -68a7 543e 5434 6bcb 6b66 4e94 6342 5348 -821e 4f0d 4fae 575e 620a 96fe 6664 7269 -52ff 52a1 609f 8bef 6614 7199 6790 897f -7852 77fd 6670 563b 5438 9521 727a -1 - -1 -1 -1 -1 -1 7a00 606f 5e0c -6089 819d 5915 60dc 7184 70ef 6eaa 6c50 -7280 6a84 88ad 5e2d 4e60 5ab3 559c 94e3 -6d17 7cfb 9699 620f 7ec6 778e 867e 5323 -971e 8f96 6687 5ce1 4fa0 72ed 4e0b 53a6 -590f 5413 6380 9528 5148 4ed9 9c9c 7ea4 -54b8 8d24 8854 8237 95f2 6d8e 5f26 5acc -663e 9669 73b0 732e 53bf 817a 9985 7fa1 -5baa 9677 9650 7ebf 76f8 53a2 9576 9999 -7bb1 8944 6e58 4e61 7fd4 7965 8be6 60f3 -54cd 4eab 9879 5df7 6a61 50cf 5411 8c61 -8427 785d 9704 524a 54ee 56a3 9500 6d88 -5bb5 6dc6 6653 -1 -1 -1 -1 -1 - -1 5c0f 5b5d 6821 8096 5578 7b11 6548 -6954 4e9b 6b47 874e 978b 534f 631f 643a -90aa 659c 80c1 8c10 5199 68b0 5378 87f9 -61c8 6cc4 6cfb 8c22 5c51 85aa 82af 950c -6b23 8f9b 65b0 5ffb 5fc3 4fe1 8845 661f -8165 7329 60fa 5174 5211 578b 5f62 90a2 -884c 9192 5e78 674f 6027 59d3 5144 51f6 -80f8 5308 6c79 96c4 718a 4f11 4fee 7f9e -673d 55c5 9508 79c0 8896 7ee3 589f 620c -9700 865a 5618 987b 5f90 8bb8 84c4 9157 -53d9 65ed 5e8f 755c 6064 7d6e 5a7f 7eea -7eed 8f69 55a7 5ba3 60ac 65cb 7384 -1 - -1 -1 -1 -1 -1 9009 7663 7729 -7eda 9774 859b 5b66 7a74 96ea 8840 52cb -718f 5faa 65ec 8be2 5bfb 9a6f 5de1 6b89 -6c5b 8bad 8baf 900a 8fc5 538b 62bc 9e26 -9e2d 5440 4e2b 82bd 7259 869c 5d16 8859 -6daf 96c5 54d1 4e9a 8bb6 7109 54bd 9609 -70df 6df9 76d0 4e25 7814 8712 5ca9 5ef6 -8a00 989c 960e 708e 6cbf 5944 63a9 773c -884d 6f14 8273 5830 71d5 538c 781a 96c1 -5501 5f66 7130 5bb4 8c1a 9a8c 6b83 592e -9e2f 79e7 6768 626c 4f6f 75a1 7f8a 6d0b -9633 6c27 4ef0 75d2 517b 6837 6f3e 9080 -8170 5996 7476 -1 -1 -1 -1 -1 - -1 6447 5c27 9065 7a91 8c23 59da 54ac -8200 836f 8981 8000 6930 564e 8036 7237 -91ce 51b6 4e5f 9875 6396 4e1a 53f6 66f3 -814b 591c 6db2 4e00 58f9 533b 63d6 94f1 -4f9d 4f0a 8863 9890 5937 9057 79fb 4eea -80f0 7591 6c82 5b9c 59e8 5f5d 6905 8681 -501a 5df2 4e59 77e3 4ee5 827a 6291 6613 -9091 5c79 4ebf 5f79 81c6 9038 8084 75ab -4ea6 88d4 610f 6bc5 5fc6 4e49 76ca 6ea2 -8be3 8bae 8c0a 8bd1 5f02 7ffc 7fcc 7ece -8335 836b 56e0 6bb7 97f3 9634 59fb 541f -94f6 6deb 5bc5 996e 5c39 5f15 9690 -1 - -1 -1 -1 -1 -1 5370 82f1 6a31 -5a74 9e70 5e94 7f28 83b9 8424 8425 8367 -8747 8fce 8d62 76c8 5f71 9896 786c 6620 -54df 62e5 4f63 81c3 75c8 5eb8 96cd 8e0a -86f9 548f 6cf3 6d8c 6c38 607f 52c7 7528 -5e7d 4f18 60a0 5fe7 5c24 7531 90ae 94c0 -72b9 6cb9 6e38 9149 6709 53cb 53f3 4f51 -91c9 8bf1 53c8 5e7c 8fc2 6de4 4e8e 76c2 -6986 865e 611a 8206 4f59 4fde 903e 9c7c -6109 6e1d 6e14 9685 4e88 5a31 96e8 4e0e -5c7f 79b9 5b87 8bed 7fbd 7389 57df 828b -90c1 5401 9047 55bb 5cea 5fa1 6108 6b32 -72f1 80b2 8a89 -1 -1 -1 -1 -1 - -1 6d74 5bd3 88d5 9884 8c6b 9a6d 9e33 -6e0a 51a4 5143 57a3 8881 539f 63f4 8f95 -56ed 5458 5706 733f 6e90 7f18 8fdc 82d1 -613f 6028 9662 66f0 7ea6 8d8a 8dc3 94a5 -5cb3 7ca4 6708 60a6 9605 8018 4e91 90e7 -5300 9668 5141 8fd0 8574 915d 6655 97f5 -5b55 531d 7838 6742 683d 54c9 707e 5bb0 -8f7d 518d 5728 54b1 6512 6682 8d5e 8d43 -810f 846c 906d 7cdf 51ff 85fb 67a3 65e9 -6fa1 86a4 8e81 566a 9020 7682 7076 71e5 -8d23 62e9 5219 6cfd 8d3c 600e 589e 618e -66fe 8d60 624e 55b3 6e23 672d 8f67 -1 - -1 -1 -1 -1 -1 94e1 95f8 7728 -6805 69a8 548b 4e4d 70b8 8bc8 6458 658b -5b85 7a84 503a 5be8 77bb 6be1 8a79 7c98 -6cbe 76cf 65a9 8f97 5d2d 5c55 8638 6808 -5360 6218 7ad9 6e5b 7efd 6a1f 7ae0 5f70 -6f33 5f20 638c 6da8 6756 4e08 5e10 8d26 -4ed7 80c0 7634 969c 62db 662d 627e 6cbc -8d75 7167 7f69 5146 8087 53ec 906e 6298 -54f2 86f0 8f99 8005 9517 8517 8fd9 6d59 -73cd 659f 771f 7504 7827 81fb 8d1e 9488 -4fa6 6795 75b9 8bca 9707 632f 9547 9635 -84b8 6323 7741 5f81 72f0 4e89 6014 6574 -62ef 6b63 653f -1 -1 -1 -1 -1 - -1 5e27 75c7 90d1 8bc1 829d 679d 652f -5431 8718 77e5 80a2 8102 6c41 4e4b 7ec7 -804c 76f4 690d 6b96 6267 503c 4f84 5740 -6307 6b62 8dbe 53ea 65e8 7eb8 5fd7 631a -63b7 81f3 81f4 7f6e 5e1c 5cd9 5236 667a -79e9 7a1a 8d28 7099 75d4 6ede 6cbb 7a92 -4e2d 76c5 5fe0 949f 8877 7ec8 79cd 80bf -91cd 4ef2 4f17 821f 5468 5dde 6d32 8bcc -7ca5 8f74 8098 5e1a 5492 76b1 5b99 663c -9aa4 73e0 682a 86db 6731 732a 8bf8 8bdb -9010 7af9 70db 716e 62c4 77a9 5631 4e3b -8457 67f1 52a9 86c0 8d2e 94f8 7b51 -1 - -1 -1 -1 -1 -1 4f4f 6ce8 795d -9a7b 6293 722a 62fd 4e13 7816 8f6c 64b0 -8d5a 7bc6 6869 5e84 88c5 5986 649e 58ee -72b6 690e 9525 8ffd 8d58 5760 7f00 8c06 -51c6 6349 62d9 5353 684c 7422 8301 914c -5544 7740 707c 6d4a 5179 54a8 8d44 59ff -6ecb 6dc4 5b5c 7d2b 4ed4 7c7d 6ed3 5b50 -81ea 6e0d 5b57 9b03 68d5 8e2a 5b97 7efc -603b 7eb5 90b9 8d70 594f 63cd 79df 8db3 -5352 65cf 7956 8bc5 963b 7ec4 94bb 7e82 -5634 9189 6700 7f6a 5c0a 9075 6628 5de6 -4f50 67de 505a 4f5c 5750 5ea7 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 4e8d 4e0c 5140 4e10 5eff 5345 4e15 -4e98 4e1e 9b32 5b6c 5669 4e28 79ba 4e3f -5315 4e47 592d 723b 536e 6c10 56df 80e4 -9997 6bd3 777e 9f17 4e36 4e9f 9f10 4e5c -4e69 4e93 8288 5b5b 556c 560f 4ec4 538d -539d 53a3 53a5 53ae 9765 8d5d 531a 53f5 -5326 532e 533e 8d5c 5366 5363 5202 5208 -520e 522d 5233 523f 5240 524c 525e 5261 -525c 84af 527d 5282 5281 5290 5293 5182 -7f54 4ebb 4ec3 4ec9 4ec2 4ee8 4ee1 4eeb -4ede 4f1b 4ef3 4f22 4f64 4ef5 4f25 4f27 -4f09 4f2b 4f5e 4f67 6538 4f5a 4f5d -1 - -1 -1 -1 -1 -1 4f5f 4f57 4f32 -4f3d 4f76 4f74 4f91 4f89 4f83 4f8f 4f7e -4f7b 4faa 4f7c 4fac 4f94 4fe6 4fe8 4fea -4fc5 4fda 4fe3 4fdc 4fd1 4fdf 4ff8 5029 -504c 4ff3 502c 500f 502e 502d 4ffe 501c -500c 5025 5028 507e 5043 5055 5048 504e -506c 507b 50a5 50a7 50a9 50ba 50d6 5106 -50ed 50ec 50e6 50ee 5107 510b 4edd 6c3d -4f58 4f65 4fce 9fa0 6c46 7c74 516e 5dfd -9ec9 9998 5181 5914 52f9 530d 8a07 5310 -51eb 5919 5155 4ea0 5156 4eb3 886e 88a4 -4eb5 8114 88d2 7980 5b34 8803 7fb8 51ab -51b1 51bd 51bc -1 -1 -1 -1 -1 - -1 51c7 5196 51a2 51a5 8ba0 8ba6 8ba7 -8baa 8bb4 8bb5 8bb7 8bc2 8bc3 8bcb 8bcf -8bce 8bd2 8bd3 8bd4 8bd6 8bd8 8bd9 8bdc -8bdf 8be0 8be4 8be8 8be9 8bee 8bf0 8bf3 -8bf6 8bf9 8bfc 8bff 8c00 8c02 8c04 8c07 -8c0c 8c0f 8c11 8c12 8c14 8c15 8c16 8c19 -8c1b 8c18 8c1d 8c1f 8c20 8c21 8c25 8c27 -8c2a 8c2b 8c2e 8c2f 8c32 8c33 8c35 8c36 -5369 537a 961d 9622 9621 9631 962a 963d -963c 9642 9649 9654 965f 9667 966c 9672 -9674 9688 968d 9697 96b0 9097 909b 909d -9099 90ac 90a1 90b4 90b3 90b6 90ba -1 - -1 -1 -1 -1 -1 90b8 90b0 90cf -90c5 90be 90d0 90c4 90c7 90d3 90e6 90e2 -90dc 90d7 90db 90eb 90ef 90fe 9104 9122 -911e 9123 9131 912f 9139 9143 9146 520d -5942 52a2 52ac 52ad 52be 54ff 52d0 52d6 -52f0 53df 71ee 77cd 5ef4 51f5 51fc 9b2f -53b6 5f01 755a 5def 574c 57a9 57a1 587e -58bc 58c5 58d1 5729 572c 572a 5733 5739 -572e 572f 575c 573b 5742 5769 5785 576b -5786 577c 577b 5768 576d 5776 5773 57ad -57a4 578c 57b2 57cf 57a7 57b4 5793 57a0 -57d5 57d8 57da 57d9 57d2 57b8 57f4 57ef -57f8 57e4 57dd -1 -1 -1 -1 -1 - -1 580b 580d 57fd 57ed 5800 581e 5819 -5844 5820 5865 586c 5881 5889 589a 5880 -99a8 9f19 61ff 8279 827d 827f 828f 828a -82a8 8284 828e 8291 8297 8299 82ab 82b8 -82be 82b0 82c8 82ca 82e3 8298 82b7 82ae -82cb 82cc 82c1 82a9 82b4 82a1 82aa 829f -82c4 82ce 82a4 82e1 8309 82f7 82e4 830f -8307 82dc 82f4 82d2 82d8 830c 82fb 82d3 -8311 831a 8306 8314 8315 82e0 82d5 831c -8351 835b 835c 8308 8392 833c 8334 8331 -839b 835e 832f 834f 8347 8343 835f 8340 -8317 8360 832d 833a 8333 8366 8365 -1 - -1 -1 -1 -1 -1 8368 831b 8369 -836c 836a 836d 836e 83b0 8378 83b3 83b4 -83a0 83aa 8393 839c 8385 837c 83b6 83a9 -837d 83b8 837b 8398 839e 83a8 83ba 83bc -83c1 8401 83e5 83d8 5807 8418 840b 83dd -83fd 83d6 841c 8438 8411 8406 83d4 83df -840f 8403 83f8 83f9 83ea 83c5 83c0 8426 -83f0 83e1 845c 8451 845a 8459 8473 8487 -8488 847a 8489 8478 843c 8446 8469 8476 -848c 848e 8431 846d 84c1 84cd 84d0 84e6 -84bd 84d3 84ca 84bf 84ba 84e0 84a1 84b9 -84b4 8497 84e5 84e3 850c 750d 8538 84f0 -8539 851f 853a -1 -1 -1 -1 -1 - -1 8556 853b 84ff 84fc 8559 8548 8568 -8564 855e 857a 77a2 8543 8572 857b 85a4 -85a8 8587 858f 8579 85ae 859c 8585 85b9 -85b7 85b0 85d3 85c1 85dc 85ff 8627 8605 -8629 8616 863c 5efe 5f08 593c 5941 8037 -5955 595a 5958 530f 5c22 5c25 5c2c 5c34 -624c 626a 629f 62bb 62ca 62da 62d7 62ee -6322 62f6 6339 634b 6343 63ad 63f6 6371 -637a 638e 63b4 636d 63ac 638a 6369 63ae -63bc 63f2 63f8 63e0 63ff 63c4 63de 63ce -6452 63c6 63be 6445 6441 640b 641b 6420 -640c 6426 6421 645e 6484 646d 6496 -1 - -1 -1 -1 -1 -1 647a 64b7 64b8 -6499 64ba 64c0 64d0 64d7 64e4 64e2 6509 -6525 652e 5f0b 5fd2 7519 5f11 535f 53f1 -53fd 53e9 53e8 53fb 5412 5416 5406 544b -5452 5453 5454 5456 5443 5421 5457 5459 -5423 5432 5482 5494 5477 5471 5464 549a -549b 5484 5476 5466 549d 54d0 54ad 54c2 -54b4 54d2 54a7 54a6 54d3 54d4 5472 54a3 -54d5 54bb 54bf 54cc 54d9 54da 54dc 54a9 -54aa 54a4 54dd 54cf 54de 551b 54e7 5520 -54fd 5514 54f3 5522 5523 550f 5511 5527 -552a 5567 558f 55b5 5549 556d 5541 5555 -553f 5550 553c -1 -1 -1 -1 -1 - -1 5537 5556 5575 5576 5577 5533 5530 -555c 558b 55d2 5583 55b1 55b9 5588 5581 -559f 557e 55d6 5591 557b 55df 55bd 55be -5594 5599 55ea 55f7 55c9 561f 55d1 55eb -55ec 55d4 55e6 55dd 55c4 55ef 55e5 55f2 -55f3 55cc 55cd 55e8 55f5 55e4 8f94 561e -5608 560c 5601 5624 5623 55fe 5600 5627 -562d 5658 5639 5657 562c 564d 5662 5659 -565c 564c 5654 5686 5664 5671 566b 567b -567c 5685 5693 56af 56d4 56d7 56dd 56e1 -56f5 56eb 56f9 56ff 5704 570a 5709 571c -5e0f 5e19 5e14 5e11 5e31 5e3b 5e3c -1 - -1 -1 -1 -1 -1 5e37 5e44 5e54 -5e5b 5e5e 5e61 5c8c 5c7a 5c8d 5c90 5c96 -5c88 5c98 5c99 5c91 5c9a 5c9c 5cb5 5ca2 -5cbd 5cac 5cab 5cb1 5ca3 5cc1 5cb7 5cc4 -5cd2 5ce4 5ccb 5ce5 5d02 5d03 5d27 5d26 -5d2e 5d24 5d1e 5d06 5d1b 5d58 5d3e 5d34 -5d3d 5d6c 5d5b 5d6f 5d5d 5d6b 5d4b 5d4a -5d69 5d74 5d82 5d99 5d9d 8c73 5db7 5dc5 -5f73 5f77 5f82 5f87 5f89 5f8c 5f95 5f99 -5f9c 5fa8 5fad 5fb5 5fbc 8862 5f61 72ad -72b0 72b4 72b7 72b8 72c3 72c1 72ce 72cd -72d2 72e8 72ef 72e9 72f2 72f4 72f7 7301 -72f3 7303 72fa -1 -1 -1 -1 -1 - -1 72fb 7317 7313 7321 730a 731e 731d -7315 7322 7339 7325 732c 7338 7331 7350 -734d 7357 7360 736c 736f 737e 821b 5925 -98e7 5924 5902 9963 9967 9968 9969 996a -996b 996c 9974 9977 997d 9980 9984 9987 -998a 998d 9990 9991 9993 9994 9995 5e80 -5e91 5e8b 5e96 5ea5 5ea0 5eb9 5eb5 5ebe -5eb3 8d53 5ed2 5ed1 5edb 5ee8 5eea 81ba -5fc4 5fc9 5fd6 5fcf 6003 5fee 6004 5fe1 -5fe4 5ffe 6005 6006 5fea 5fed 5ff8 6019 -6035 6026 601b 600f 600d 6029 602b 600a -603f 6021 6078 6079 607b 607a 6042 -1 - -1 -1 -1 -1 -1 606a 607d 6096 -609a 60ad 609d 6083 6092 608c 609b 60ec -60bb 60b1 60dd 60d8 60c6 60da 60b4 6120 -6126 6115 6123 60f4 6100 610e 612b 614a -6175 61ac 6194 61a7 61b7 61d4 61f5 5fdd -96b3 95e9 95eb 95f1 95f3 95f5 95f6 95fc -95fe 9603 9604 9606 9608 960a 960b 960c -960d 960f 9612 9615 9616 9617 9619 961a -4e2c 723f 6215 6c35 6c54 6c5c 6c4a 6ca3 -6c85 6c90 6c94 6c8c 6c68 6c69 6c74 6c76 -6c86 6ca9 6cd0 6cd4 6cad 6cf7 6cf8 6cf1 -6cd7 6cb2 6ce0 6cd6 6cfa 6ceb 6cee 6cb1 -6cd3 6cef 6cfe -1 -1 -1 -1 -1 - -1 6d39 6d27 6d0c 6d43 6d48 6d07 6d04 -6d19 6d0e 6d2b 6d4d 6d2e 6d35 6d1a 6d4f -6d52 6d54 6d33 6d91 6d6f 6d9e 6da0 6d5e -6d93 6d94 6d5c 6d60 6d7c 6d63 6e1a 6dc7 -6dc5 6dde 6e0e 6dbf 6de0 6e11 6de6 6ddd -6dd9 6e16 6dab 6e0c 6dae 6e2b 6e6e 6e4e -6e6b 6eb2 6e5f 6e86 6e53 6e54 6e32 6e25 -6e44 6edf 6eb1 6e98 6ee0 6f2d 6ee2 6ea5 -6ea7 6ebd 6ebb 6eb7 6ed7 6eb4 6ecf 6e8f -6ec2 6e9f 6f62 6f46 6f47 6f24 6f15 6ef9 -6f2f 6f36 6f4b 6f74 6f2a 6f09 6f29 6f89 -6f8d 6f8c 6f78 6f72 6f7c 6f7a 6fd1 -1 - -1 -1 -1 -1 -1 6fc9 6fa7 6fb9 -6fb6 6fc2 6fe1 6fee 6fde 6fe0 6fef 701a -7023 701b 7039 7035 704f 705e 5b80 5b84 -5b95 5b93 5ba5 5bb8 752f 9a9e 6434 5be4 -5bee 8930 5bf0 8e47 8b07 8fb6 8fd3 8fd5 -8fe5 8fee 8fe4 8fe9 8fe6 8ff3 8fe8 9005 -9004 900b 9026 9011 900d 9016 9021 9035 -9036 902d 902f 9044 9051 9052 9050 9068 -9058 9062 905b 66b9 9074 907d 9082 9088 -9083 908b 5f50 5f57 5f56 5f58 5c3b 54ab -5c50 5c59 5b71 5c63 5c66 7fbc 5f2a 5f29 -5f2d 8274 5f3c 9b3b 5c6e 5981 5983 598d -59a9 59aa 59a3 -1 -1 -1 -1 -1 - -1 5997 59ca 59ab 599e 59a4 59d2 59b2 -59af 59d7 59be 5a05 5a06 59dd 5a08 59e3 -59d8 59f9 5a0c 5a09 5a32 5a34 5a11 5a23 -5a13 5a40 5a67 5a4a 5a55 5a3c 5a62 5a75 -80ec 5aaa 5a9b 5a77 5a7a 5abe 5aeb 5ab2 -5ad2 5ad4 5ab8 5ae0 5ae3 5af1 5ad6 5ae6 -5ad8 5adc 5b09 5b17 5b16 5b32 5b37 5b40 -5c15 5c1c 5b5a 5b65 5b73 5b51 5b53 5b62 -9a75 9a77 9a78 9a7a 9a7f 9a7d 9a80 9a81 -9a85 9a88 9a8a 9a90 9a92 9a93 9a96 9a98 -9a9b 9a9c 9a9d 9a9f 9aa0 9aa2 9aa3 9aa5 -9aa7 7e9f 7ea1 7ea3 7ea5 7ea8 7ea9 -1 - -1 -1 -1 -1 -1 7ead 7eb0 7ebe -7ec0 7ec1 7ec2 7ec9 7ecb 7ecc 7ed0 7ed4 -7ed7 7edb 7ee0 7ee1 7ee8 7eeb 7eee 7eef -7ef1 7ef2 7f0d 7ef6 7efa 7efb 7efe 7f01 -7f02 7f03 7f07 7f08 7f0b 7f0c 7f0f 7f11 -7f12 7f17 7f19 7f1c 7f1b 7f1f 7f21 7f22 -7f23 7f24 7f25 7f26 7f27 7f2a 7f2b 7f2c -7f2d 7f2f 7f30 7f31 7f32 7f33 7f35 5e7a -757f 5ddb 753e 9095 738e 7391 73ae 73a2 -739f 73cf 73c2 73d1 73b7 73b3 73c0 73c9 -73c8 73e5 73d9 987c 740a 73e9 73e7 73de -73ba 73f2 740f 742a 745b 7426 7425 7428 -7430 742e 742c -1 -1 -1 -1 -1 - -1 741b 741a 7441 745c 7457 7455 7459 -7477 746d 747e 749c 748e 7480 7481 7487 -748b 749e 74a8 74a9 7490 74a7 74d2 74ba -97ea 97eb 97ec 674c 6753 675e 6748 6769 -67a5 6787 676a 6773 6798 67a7 6775 67a8 -679e 67ad 678b 6777 677c 67f0 6809 67d8 -680a 67e9 67b0 680c 67d9 67b5 67da 67b3 -67dd 6800 67c3 67b8 67e2 680e 67c1 67fd -6832 6833 6860 6861 684e 6862 6844 6864 -6883 681d 6855 6866 6841 6867 6840 683e -684a 6849 6829 68b5 688f 6874 6877 6893 -686b 68c2 696e 68fc 691f 6920 68f9 -1 - -1 -1 -1 -1 -1 6924 68f0 690b -6901 6957 68e3 6910 6971 6939 6960 6942 -695d 6984 696b 6980 6998 6978 6934 69cc -6987 6988 69ce 6989 6966 6963 6979 699b -69a7 69bb 69ab 69ad 69d4 69b1 69c1 69ca -69df 6995 69e0 698d 69ff 6a2f 69ed 6a17 -6a18 6a65 69f2 6a44 6a3e 6aa0 6a50 6a5b -6a35 6a8e 6a79 6a3d 6a28 6a58 6a7c 6a91 -6a90 6aa9 6a97 6aab 7337 7352 6b81 6b82 -6b87 6b84 6b92 6b93 6b8d 6b9a 6b9b 6ba1 -6baa 8f6b 8f6d 8f71 8f72 8f73 8f75 8f76 -8f78 8f77 8f79 8f7a 8f7c 8f7e 8f81 8f82 -8f84 8f87 8f8b -1 -1 -1 -1 -1 - -1 8f8d 8f8e 8f8f 8f98 8f9a 8ece 620b -6217 621b 621f 6222 6221 6225 6224 622c -81e7 74ef 74f4 74ff 750f 7511 7513 6534 -65ee 65ef 65f0 660a 6619 6772 6603 6615 -6600 7085 66f7 661d 6634 6631 6636 6635 -8006 665f 6654 6641 664f 6656 6661 6657 -6677 6684 668c 66a7 669d 66be 66db 66dc -66e6 66e9 8d32 8d33 8d36 8d3b 8d3d 8d40 -8d45 8d46 8d48 8d49 8d47 8d4d 8d55 8d59 -89c7 89ca 89cb 89cc 89ce 89cf 89d0 89d1 -726e 729f 725d 7266 726f 727e 727f 7284 -728b 728d 728f 7292 6308 6332 63b0 -1 - -1 -1 -1 -1 -1 643f 64d8 8004 -6bea 6bf3 6bfd 6bf5 6bf9 6c05 6c07 6c06 -6c0d 6c15 6c18 6c19 6c1a 6c21 6c29 6c24 -6c2a 6c32 6535 6555 656b 724d 7252 7256 -7230 8662 5216 809f 809c 8093 80bc 670a -80bd 80b1 80ab 80ad 80b4 80b7 80e7 80e8 -80e9 80ea 80db 80c2 80c4 80d9 80cd 80d7 -6710 80dd 80eb 80f1 80f4 80ed 810d 810e -80f2 80fc 6715 8112 8c5a 8136 811e 812c -8118 8132 8148 814c 8153 8174 8159 815a -8171 8160 8169 817c 817d 816d 8167 584d -5ab5 8188 8182 8191 6ed5 81a3 81aa 81cc -6726 81ca 81bb -1 -1 -1 -1 -1 - -1 81c1 81a6 6b24 6b37 6b39 6b43 6b46 -6b59 98d1 98d2 98d3 98d5 98d9 98da 6bb3 -5f40 6bc2 89f3 6590 9f51 6593 65bc 65c6 -65c4 65c3 65cc 65ce 65d2 65d6 7080 709c -7096 709d 70bb 70c0 70b7 70ab 70b1 70e8 -70ca 7110 7113 7116 712f 7131 7173 715c -7168 7145 7172 714a 7178 717a 7198 71b3 -71b5 71a8 71a0 71e0 71d4 71e7 71f9 721d -7228 706c 7118 7166 71b9 623e 623d 6243 -6248 6249 793b 7940 7946 7949 795b 795c -7953 795a 7962 7957 7960 796f 7967 797a -7985 798a 799a 79a7 79b3 5fd1 5fd0 -1 - -1 -1 -1 -1 -1 603c 605d 605a -6067 6041 6059 6063 60ab 6106 610d 615d -61a9 619d 61cb 61d1 6206 8080 807f 6c93 -6cf6 6dfc 77f6 77f8 7800 7809 7817 7818 -7811 65ab 782d 781c 781d 7839 783a 783b -781f 783c 7825 782c 7823 7829 784e 786d -7856 7857 7826 7850 7847 784c 786a 789b -7893 789a 7887 789c 78a1 78a3 78b2 78b9 -78a5 78d4 78d9 78c9 78ec 78f2 7905 78f4 -7913 7924 791e 7934 9f9b 9ef9 9efb 9efc -76f1 7704 770d 76f9 7707 7708 771a 7722 -7719 772d 7726 7735 7738 7750 7751 7747 -7743 775a 7768 -1 -1 -1 -1 -1 - -1 7762 7765 777f 778d 777d 7780 778c -7791 779f 77a0 77b0 77b5 77bd 753a 7540 -754e 754b 7548 755b 7572 7579 7583 7f58 -7f61 7f5f 8a48 7f68 7f74 7f71 7f79 7f81 -7f7e 76cd 76e5 8832 9485 9486 9487 948b -948a 948c 948d 948f 9490 9494 9497 9495 -949a 949b 949c 94a3 94a4 94ab 94aa 94ad -94ac 94af 94b0 94b2 94b4 94b6 94b7 94b8 -94b9 94ba 94bc 94bd 94bf 94c4 94c8 94c9 -94ca 94cb 94cc 94cd 94ce 94d0 94d1 94d2 -94d5 94d6 94d7 94d9 94d8 94db 94de 94df -94e0 94e2 94e4 94e5 94e7 94e8 94ea -1 - -1 -1 -1 -1 -1 94e9 94eb 94ee -94ef 94f3 94f4 94f5 94f7 94f9 94fc 94fd -94ff 9503 9502 9506 9507 9509 950a 950d -950e 950f 9512 9513 9514 9515 9516 9518 -951b 951d 951e 951f 9522 952a 952b 9529 -952c 9531 9532 9534 9536 9537 9538 953c -953e 953f 9542 9535 9544 9545 9546 9549 -954c 954e 954f 9552 9553 9554 9556 9557 -9558 9559 955b 955e 955f 955d 9561 9562 -9564 9565 9566 9567 9568 9569 956a 956b -956c 956f 9571 9572 9573 953a 77e7 77ec -96c9 79d5 79ed 79e3 79eb 7a06 5d47 7a03 -7a02 7a1e 7a14 -1 -1 -1 -1 -1 - -1 7a39 7a37 7a51 9ecf 99a5 7a70 7688 -768e 7693 7699 76a4 74de 74e0 752c 9e20 -9e22 9e28 9e29 9e2a 9e2b 9e2c 9e32 9e31 -9e36 9e38 9e37 9e39 9e3a 9e3e 9e41 9e42 -9e44 9e46 9e47 9e48 9e49 9e4b 9e4c 9e4e -9e51 9e55 9e57 9e5a 9e5b 9e5c 9e5e 9e63 -9e66 9e67 9e68 9e69 9e6a 9e6b 9e6c 9e71 -9e6d 9e73 7592 7594 7596 75a0 759d 75ac -75a3 75b3 75b4 75b8 75c4 75b1 75b0 75c3 -75c2 75d6 75cd 75e3 75e8 75e6 75e4 75eb -75e7 7603 75f1 75fc 75ff 7610 7600 7605 -760c 7617 760a 7625 7618 7615 7619 -1 - -1 -1 -1 -1 -1 761b 763c 7622 -7620 7640 762d 7630 763f 7635 7643 763e -7633 764d 765e 7654 765c 7656 766b 766f -7fca 7ae6 7a78 7a79 7a80 7a86 7a88 7a95 -7aa6 7aa0 7aac 7aa8 7aad 7ab3 8864 8869 -8872 887d 887f 8882 88a2 88c6 88b7 88bc -88c9 88e2 88ce 88e3 88e5 88f1 891a 88fc -88e8 88fe 88f0 8921 8919 8913 891b 890a -8934 892b 8936 8941 8966 897b 758b 80e5 -76b2 76b4 77dc 8012 8014 8016 801c 8020 -8022 8025 8026 8027 8029 8028 8031 800b -8035 8043 8046 804d 8052 8069 8071 8983 -9878 9880 9883 -1 -1 -1 -1 -1 - -1 9889 988c 988d 988f 9894 989a 989b -989e 989f 98a1 98a2 98a5 98a6 864d 8654 -866c 866e 867f 867a 867c 867b 86a8 868d -868b 86ac 869d 86a7 86a3 86aa 8693 86a9 -86b6 86c4 86b5 86ce 86b0 86ba 86b1 86af -86c9 86cf 86b4 86e9 86f1 86f2 86ed 86f3 -86d0 8713 86de 86f4 86df 86d8 86d1 8703 -8707 86f8 8708 870a 870d 8709 8723 873b -871e 8725 872e 871a 873e 8748 8734 8731 -8729 8737 873f 8782 8722 877d 877e 877b -8760 8770 874c 876e 878b 8753 8763 877c -8764 8759 8765 8793 87af 87a8 87d2 -1 - -1 -1 -1 -1 -1 87c6 8788 8785 -87ad 8797 8783 87ab 87e5 87ac 87b5 87b3 -87cb 87d3 87bd 87d1 87c0 87ca 87db 87ea -87e0 87ee 8816 8813 87fe 880a 881b 8821 -8839 883c 7f36 7f42 7f44 7f45 8210 7afa -7afd 7b08 7b03 7b04 7b15 7b0a 7b2b 7b0f -7b47 7b38 7b2a 7b19 7b2e 7b31 7b20 7b25 -7b24 7b33 7b3e 7b1e 7b58 7b5a 7b45 7b75 -7b4c 7b5d 7b60 7b6e 7b7b 7b62 7b72 7b71 -7b90 7ba6 7ba7 7bb8 7bac 7b9d 7ba8 7b85 -7baa 7b9c 7ba2 7bab 7bb4 7bd1 7bc1 7bcc -7bdd 7bda 7be5 7be6 7bea 7c0c 7bfe 7bfc -7c0f 7c16 7c0b -1 -1 -1 -1 -1 - -1 7c1f 7c2a 7c26 7c38 7c41 7c40 81fe -8201 8202 8204 81ec 8844 8221 8222 8223 -822d 822f 8228 822b 8238 823b 8233 8234 -823e 8244 8249 824b 824f 825a 825f 8268 -887e 8885 8888 88d8 88df 895e 7f9d 7f9f -7fa7 7faf 7fb0 7fb2 7c7c 6549 7c91 7c9d -7c9c 7c9e 7ca2 7cb2 7cbc 7cbd 7cc1 7cc7 -7ccc 7ccd 7cc8 7cc5 7cd7 7ce8 826e 66a8 -7fbf 7fce 7fd5 7fe5 7fe1 7fe6 7fe9 7fee -7ff3 7cf8 7d77 7da6 7dae 7e47 7e9b 9eb8 -9eb4 8d73 8d84 8d94 8d91 8db1 8d67 8d6d -8c47 8c49 914a 9150 914e 914f 9164 -1 - -1 -1 -1 -1 -1 9162 9161 9170 -9169 916f 917d 917e 9172 9174 9179 918c -9185 9190 918d 9191 91a2 91a3 91aa 91ad -91ae 91af 91b5 91b4 91ba 8c55 9e7e 8db8 -8deb 8e05 8e59 8e69 8db5 8dbf 8dbc 8dba -8dc4 8dd6 8dd7 8dda 8dde 8dce 8dcf 8ddb -8dc6 8dec 8df7 8df8 8de3 8df9 8dfb 8de4 -8e09 8dfd 8e14 8e1d 8e1f 8e2c 8e2e 8e23 -8e2f 8e3a 8e40 8e39 8e35 8e3d 8e31 8e49 -8e41 8e42 8e51 8e52 8e4a 8e70 8e76 8e7c -8e6f 8e74 8e85 8e8f 8e94 8e90 8e9c 8e9e -8c78 8c82 8c8a 8c85 8c98 8c94 659b 89d6 -89de 89da 89dc -1 -1 -1 -1 -1 - -1 89e5 89eb 89ef 8a3e 8b26 9753 96e9 -96f3 96ef 9706 9701 9708 970f 970e 972a -972d 9730 973e 9f80 9f83 9f85 9f86 9f87 -9f88 9f89 9f8a 9f8c 9efe 9f0b 9f0d 96b9 -96bc 96bd 96ce 96d2 77bf 96e0 928e 92ae -92c8 933e 936a 93ca 938f 943e 946b 9c7f -9c82 9c85 9c86 9c87 9c88 7a23 9c8b 9c8e -9c90 9c91 9c92 9c94 9c95 9c9a 9c9b 9c9e -9c9f 9ca0 9ca1 9ca2 9ca3 9ca5 9ca6 9ca7 -9ca8 9ca9 9cab 9cad 9cae 9cb0 9cb1 9cb2 -9cb3 9cb4 9cb5 9cb6 9cb7 9cba 9cbb 9cbc -9cbd 9cc4 9cc5 9cc6 9cc7 9cca 9ccb -1 - -1 -1 -1 -1 -1 9ccc 9ccd 9cce -9ccf 9cd0 9cd3 9cd4 9cd5 9cd7 9cd8 9cd9 -9cdc 9cdd 9cdf 9ce2 977c 9785 9791 9792 -9794 97af 97ab 97a3 97b2 97b4 9ab1 9ab0 -9ab7 9e58 9ab6 9aba 9abc 9ac1 9ac0 9ac5 -9ac2 9acb 9acc 9ad1 9b45 9b43 9b47 9b49 -9b48 9b4d 9b51 98e8 990d 992e 9955 9954 -9adf 9ae1 9ae6 9aef 9aeb 9afb 9aed 9af9 -9b08 9b0f 9b13 9b1f 9b23 9ebd 9ebe 7e3b -9e82 9e87 9e88 9e8b 9e92 93d6 9e9d 9e9f -9edb 9edc 9edd 9ee0 9edf 9ee2 9ee9 9ee7 -9ee5 9eea 9eef 9f22 9f2c 9f2f 9f39 9f37 -9f3d 9f3e 9f44 diff --git a/xc/nls/XLC_LOCALE/jis0201 b/xc/nls/XLC_LOCALE/jis0201 deleted file mode 100644 index decf43b39..000000000 --- a/xc/nls/XLC_LOCALE/jis0201 +++ /dev/null @@ -1,32 +0,0 @@ -00 01 02 03 04 05 06 07 -08 09 0A 0B 0C 0D 0E 0F -10 11 12 13 14 15 16 17 -18 19 1A 1B 1C 1D 1E 1F -20 21 22 23 24 25 26 27 -28 29 2A 2B 2C 2D 2E 2F -30 31 32 33 34 35 36 37 -38 39 3A 3B 3C 3D 3E 3F -40 41 42 43 44 45 46 47 -48 49 4A 4B 4C 4D 4E 4F -50 51 52 53 54 55 56 57 -58 59 5A 5B A5 5D 5E 5F -60 61 62 63 64 65 66 67 -68 69 6A 6B 6C 6D 6E 6F -70 71 72 73 74 75 76 77 -78 79 7A 7B 7C 7D 203E 7F -80 81 82 83 84 85 86 87 -88 89 8A 8B 8C 8D 8E 8F -90 91 92 93 94 95 96 97 -98 99 9A 9B 9C 9D 9E 9F -A0 FF61 FF62 FF63 FF64 FF65 FF66 FF67 -FF68 FF69 FF6A FF6B FF6C FF6D FF6E FF6F -FF70 FF71 FF72 FF73 FF74 FF75 FF76 FF77 -FF78 FF79 FF7A FF7B FF7C FF7D FF7E FF7F -FF80 FF81 FF82 FF83 FF84 FF85 FF86 FF87 -FF88 FF89 FF8A FF8B FF8C FF8D FF8E FF8F -FF90 FF91 FF92 FF93 FF94 FF95 FF96 FF97 -FF98 FF99 FF9A FF9B FF9C FF9D FF9E FF9F --1 -1 -1 -1 -1 -1 -1 -1 --1 -1 -1 -1 -1 -1 -1 -1 --1 -1 -1 -1 -1 -1 -1 -1 --1 -1 -1 -1 -1 -1 -1 -1 diff --git a/xc/nls/XLC_LOCALE/jis0208 b/xc/nls/XLC_LOCALE/jis0208 deleted file mode 100644 index 87bc418aa..000000000 --- a/xc/nls/XLC_LOCALE/jis0208 +++ /dev/null @@ -1,1051 +0,0 @@ - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 3000 3001 3002 -ff0c ff0e 30fb ff1a ff1b ff1f ff01 309b -309c 00b4 ff40 00a8 ff3e 203e ff3f 30fd -30fe 309d 309e 3003 4edd 3005 3006 3007 -30fc 2015 00ad ff0f ff3c ff5e 2225 ff5c -2026 2025 2018 2019 201c 201d ff08 ff09 -3014 3015 ff3b ff3d ff5b ff5d 3008 3009 -300a 300b 300c 300d 300e 300f 3010 3011 -ff0b ff0d 00b1 00d7 00f7 ff1d 2260 ff1c -ff1e 2264 2265 221e 2234 2642 2640 00b0 -2032 2033 2103 00a5 ff04 00a2 00a3 ff05 -ff03 ff06 ff0a ff20 00a7 2606 2605 25cb -25cf 25ce 25c7 -1 -1 -1 -1 -1 - -1 25c6 25a1 25a0 25b3 25b2 25bd 25bc -203b 3012 2192 2190 2191 2193 3013 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 2208 220b 2286 2287 2282 2283 -222a 2229 -1 -1 -1 -1 -1 -1 - -1 -1 2227 2228 00ac 21d2 21d4 2200 -2203 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 2220 22a5 2040 2202 -2207 2261 2252 226a 226b 221a 224c 221d -2235 222b 222c -1 -1 -1 -1 -1 - -1 -1 212b 2030 266f 266d 266a 2020 -2021 00b6 -1 -1 -1 -1 20dd -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 ff10 ff11 ff12 ff13 -ff14 ff15 ff16 ff17 ff18 ff19 -1 -1 - -1 -1 -1 -1 -1 ff21 ff22 ff23 -ff24 ff25 ff26 ff27 ff28 ff29 ff2a ff2b -ff2c ff2d ff2e ff2f ff30 ff31 ff32 ff33 -ff34 ff35 ff36 ff37 ff38 ff39 ff3a -1 - -1 -1 -1 -1 -1 ff41 ff42 ff43 -ff44 ff45 ff46 ff47 ff48 ff49 ff4a ff4b -ff4c ff4d ff4e ff4f ff50 ff51 ff52 ff53 -ff54 ff55 ff56 ff57 ff58 ff59 ff5a -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 3041 3042 3043 3044 3045 3046 3047 -3048 3049 304a 304b 304c 304d 304e 304f -3050 3051 3052 3053 3054 3055 3056 3057 -3058 3059 305a 305b 305c 305d 305e 305f -3060 3061 3062 3063 3064 3065 3066 3067 -3068 3069 306a 306b 306c 306d 306e 306f -3070 3071 3072 3073 3074 3075 3076 3077 -3078 3079 307a 307b 307c 307d 307e 307f -3080 3081 3082 3083 3084 3085 3086 3087 -3088 3089 308a 308b 308c 308d 308e 308f -3090 3091 3092 3093 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 30a1 30a2 30a3 -30a4 30a5 30a6 30a7 30a8 30a9 30aa 30ab -30ac 30ad 30ae 30af 30b0 30b1 30b2 30b3 -30b4 30b5 30b6 30b7 30b8 30b9 30ba 30bb -30bc 30bd 30be 30bf 30c0 30c1 30c2 30c3 -30c4 30c5 30c6 30c7 30c8 30c9 30ca 30cb -30cc 30cd 30ce 30cf 30d0 30d1 30d2 30d3 -30d4 30d5 30d6 30d7 30d8 30d9 30da 30db -30dc 30dd 30de 30df 30e0 30e1 30e2 30e3 -30e4 30e5 30e6 30e7 30e8 30e9 30ea 30eb -30ec 30ed 30ee 30ef 30f0 30f1 30f2 30f3 -30f4 30f5 30f6 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 0391 0392 0393 0394 0395 0396 0397 -0398 0399 039a 039b 039c 039d 039e 039f -03a0 03a1 03a3 03a4 03a5 03a6 03a7 03a8 -03a9 -1 -1 -1 -1 -1 -1 -1 - -1 03b1 03b2 03b3 03b4 03b5 03b6 03b7 -03b8 03b9 03ba 03bb 03bc 03bd 03be 03bf -03c0 03c1 03c3 03c4 03c5 03c6 03c7 03c8 -03c9 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 0410 0411 0412 -0413 0414 0415 0401 0416 0417 0418 0419 -041a 041b 041c 041d 041e 041f 0420 0421 -0422 0423 0424 0425 0426 0427 0428 0429 -042a 042b 042c 042d 042e 042f -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 0430 0431 0432 -0433 0434 0435 0451 0436 0437 0438 0439 -043a 043b 043c 043d 043e 043f 0440 0441 -0442 0443 0444 0445 0446 0447 0448 0449 -044a 044b 044c 044d 044e 044f -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 2500 2502 250c 2510 2518 2514 251c -252c 2524 2534 253c 2501 2503 250f 2513 -251b 2517 2523 2533 252b 253b 254b 2520 -252f 2528 2537 253f 251d 2530 2525 2538 -2542 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 4e9c 5516 5a03 963f 54c0 611b 6328 -59f6 9022 8475 831c 7a50 60aa 63e1 6e25 -65ed 8466 82a6 9bf5 6893 5727 65a1 6271 -5b9b 59d0 867b 98f4 7d62 7dbe 9b8e 6216 -7c9f 88b7 5b89 5eb5 6309 6697 6848 95c7 -978d 674f 4ee5 4f0a 4f4d 4f9d 5049 56f2 -5937 59d4 5a01 5c09 60df 610f 6170 6613 -6905 70ba 754f 7570 79fb 7dad 7def 80c3 -840e 8863 8b02 9055 907a 533b 4e95 4ea5 -57df 80b2 90c1 78ef 4e00 58f1 6ea2 9038 -7a32 8328 828b 9c2f 5141 5370 54bd 54e1 -56e0 59fb 5f15 98f2 6deb 80e4 852d -1 - -1 -1 -1 -1 -1 9662 9670 96a0 -97fb 540b 53f3 5b87 70cf 7fbd 8fc2 96e8 -536f 9d5c 7aba 4e11 7893 81fc 6e26 5618 -5504 6b1d 851a 9c3b 59e5 53a9 6d66 74dc -958f 5642 4e91 904b 96f2 834f 990c 53e1 -55b6 5b30 5f71 6620 66f3 6804 6c38 6cf3 -6d29 745b 76c8 7a4e 9834 82f1 885b 8a60 -92ed 6db2 75ab 76ca 99c5 60a6 8b01 8d8a -95b2 698e 53ad 5186 5712 5830 5944 5bb4 -5ef6 6028 63a9 63f4 6cbf 6f14 708e 7114 -7159 71d5 733f 7e01 8276 82d1 8597 9060 -925b 9d1b 5869 65bc 6c5a 7525 51f9 592e -5965 5f80 5fdc -1 -1 -1 -1 -1 - -1 62bc 65fa 6a2a 6b27 6bb4 738b 7fc1 -8956 9d2c 9d0e 9ec4 5ca1 6c96 837b 5104 -5c4b 61b6 81c6 6876 7261 4e59 4ffa 5378 -6069 6e29 7a4f 97f3 4e0b 5316 4eee 4f55 -4f3d 4fa1 4f73 52a0 53ef 5609 590f 5ac1 -5bb6 5be1 79d1 6687 679c 67b6 6b4c 6cb3 -706b 73c2 798d 79be 7a3c 7b87 82b1 82db -8304 8377 83ef 83d3 8766 8ab2 5629 8ca8 -8fe6 904e 971e 868a 4fc4 5ce8 6211 7259 -753b 81e5 82bd 86fe 8cc0 96c5 9913 99d5 -4ecb 4f1a 89e3 56de 584a 58ca 5efb 5feb -602a 6094 6062 61d0 6212 62d0 6539 -1 - -1 -1 -1 -1 -1 9b41 6666 68b0 -6d77 7070 754c 7686 7d75 82a5 87f9 958b -968e 8c9d 51f1 52be 5916 54b3 5bb3 5d16 -6168 6982 6daf 788d 84cb 8857 8a72 93a7 -9ab8 6d6c 99a8 86d9 57a3 67ff 86ce 920e -5283 5687 5404 5ed3 62e1 64b9 683c 6838 -6bbb 7372 78ba 7a6b 899a 89d2 8d6b 8f03 -90ed 95a3 9694 9769 5b66 5cb3 697d 984d -984e 639b 7b20 6a2b 6a7f 68b6 9c0d 6f5f -5272 559d 6070 62ec 6d3b 6e07 6ed1 845b -8910 8f44 4e14 9c39 53f6 691b 6a3a 9784 -682a 515c 7ac3 84b2 91dc 938c 565b 9d28 -6822 8305 8431 -1 -1 -1 -1 -1 - -1 7ca5 5208 82c5 74e6 4e7e 4f83 51a0 -5bd2 520a 52d8 52e7 5dfb 559a 582a 59e6 -5b8c 5b98 5bdb 5e72 5e79 60a3 611f 6163 -61be 63db 6562 67d1 6853 68fa 6b3e 6b53 -6c57 6f22 6f97 6f45 74b0 7518 76e3 770b -7aff 7ba1 7c21 7de9 7f36 7ff0 809d 8266 -839e 89b3 8acc 8cab 9084 9451 9593 9591 -95a2 9665 97d3 9928 8218 4e38 542b 5cb8 -5dcc 73a9 764c 773c 5ca9 7feb 8d0b 96c1 -9811 9854 9858 4f01 4f0e 5371 559c 5668 -57fa 5947 5b09 5bc4 5c90 5e0c 5e7e 5fcc -63ee 673a 65d7 65e2 671f 68cb 68c4 -1 - -1 -1 -1 -1 -1 6a5f 5e30 6bc5 -6c17 6c7d 757f 7948 5b63 7a00 7d00 5fbd -898f 8a18 8cb4 8d77 8ecc 8f1d 98e2 9a0e -9b3c 4e80 507d 5100 5993 5b9c 622f 6280 -64ec 6b3a 72a0 7591 7947 7fa9 87fb 8abc -8b70 63ac 83ca 97a0 5409 5403 55ab 6854 -6a58 8a70 7827 6775 9ecd 5374 5ba2 811a -8650 9006 4e18 4e45 4ec7 4f11 53ca 5438 -5bae 5f13 6025 6551 673d 6c42 6c72 6ce3 -7078 7403 7a76 7aae 7b08 7d1a 7cfe 7d66 -65e7 725b 53bb 5c45 5de8 62d2 62e0 6319 -6e20 865a 8a31 8ddd 92f8 6f01 79a6 9b5a -4ea8 4eab 4eac -1 -1 -1 -1 -1 - -1 4f9b 4fa0 50d1 5147 7af6 5171 51f6 -5354 5321 537f 53eb 55ac 5883 5ce1 5f37 -5f4a 602f 6050 606d 631f 6559 6a4b 6cc1 -72c2 72ed 77ef 80f8 8105 8208 854e 90f7 -93e1 97ff 9957 9a5a 4ef0 51dd 5c2d 6681 -696d 5c40 66f2 6975 7389 6850 7c81 50c5 -52e4 5747 5dfe 9326 65a4 6b23 6b3d 7434 -7981 79bd 7b4b 7dca 82b9 83cc 887f 895f -8b39 8fd1 91d1 541f 9280 4e5d 5036 53e5 -533a 72d7 7396 77e9 82e6 8eaf 99c6 99c8 -99d2 5177 611a 865e 55b0 7a7a 5076 5bd3 -9047 9685 4e32 6adb 91e7 5c51 5c48 -1 - -1 -1 -1 -1 -1 6398 7a9f 6c93 -9774 8f61 7aaa 718a 9688 7c82 6817 7e70 -6851 936c 52f2 541b 85ab 8a13 7fa4 8ecd -90e1 5366 8888 7941 4fc2 50be 5211 5144 -5553 572d 73ea 578b 5951 5f62 5f84 6075 -6176 6167 61a9 63b2 643a 656c 666f 6842 -6e13 7566 7a3d 7cfb 7d4c 7d99 7e4b 7f6b -830e 834a 86cd 8a08 8a63 8b66 8efd 981a -9d8f 82b8 8fce 9be8 5287 621f 6483 6fc0 -9699 6841 5091 6b20 6c7a 6f54 7a74 7d50 -8840 8a23 6708 4ef6 5039 5026 5065 517c -5238 5263 55a7 570f 5805 5acc 5efa 61b2 -61f8 62f3 6372 -1 -1 -1 -1 -1 - -1 691c 6a29 727d 72ac 732e 7814 786f -7d79 770c 80a9 898b 8b19 8ce2 8ed2 9063 -9375 967a 9855 9a13 9e78 5143 539f 53b3 -5e7b 5f26 6e1b 6e90 7384 73fe 7d43 8237 -8a00 8afa 9650 4e4e 500b 53e4 547c 56fa -59d1 5b64 5df1 5eab 5f27 6238 6545 67af -6e56 72d0 7cca 88b4 80a1 80e1 83f0 864e -8a87 8de8 9237 96c7 9867 9f13 4e94 4e92 -4f0d 5348 5449 543e 5a2f 5f8c 5fa1 609f -68a7 6a8e 745a 7881 8a9e 8aa4 8b77 9190 -4e5e 9bc9 4ea4 4f7c 4faf 5019 5016 5149 -516c 529f 52b9 52fe 539a 53e3 5411 -1 - -1 -1 -1 -1 -1 540e 5589 5751 -57a2 597d 5b54 5b5d 5b8f 5de5 5de7 5df7 -5e78 5e83 5e9a 5eb7 5f18 6052 614c 6297 -62d8 63a7 653b 6602 6643 66f4 676d 6821 -6897 69cb 6c5f 6d2a 6d69 6e2f 6e9d 7532 -7687 786c 7a3f 7ce0 7d05 7d18 7d5e 7db1 -8015 8003 80af 80b1 8154 818f 822a 8352 -884c 8861 8b1b 8ca2 8cfc 90ca 9175 9271 -783f 92fc 95a4 964d 9805 9999 9ad8 9d3b -525b 52ab 53f7 5408 58d5 62f7 6fe0 8c6a -8f5f 9eb9 514b 523b 544a 56fd 7a40 9177 -9d60 9ed2 7344 6f09 8170 7511 5ffd 60da -9aa8 72db 8fbc -1 -1 -1 -1 -1 - -1 6b64 9803 4eca 56f0 5764 58be 5a5a -6068 61c7 660f 6606 6839 68b1 6df7 75d5 -7d3a 826e 9b42 4e9b 4f50 53c9 5506 5d6f -5de6 5dee 67fb 6c99 7473 7802 8a50 9396 -88df 5750 5ea7 632b 50b5 50ac 518d 6700 -54c9 585e 59bb 5bb0 5f69 624d 63a1 683d -6b73 6e08 707d 91c7 7280 7815 7826 796d -658e 7d30 83dc 88c1 8f09 969b 5264 5728 -6750 7f6a 8ca1 51b4 5742 962a 583a 698a -80b4 54b2 5d0e 57fc 7895 9dfa 4f5c 524a -548b 643e 6628 6714 67f5 7a84 7b56 7d22 -932f 685c 9bad 7b39 5319 518a 5237 -1 - -1 -1 -1 -1 -1 5bdf 62f6 64ae -64e6 672d 6bba 85a9 96d1 7690 9bd6 634c -9306 9bab 76bf 6652 4e09 5098 53c2 5c71 -60e8 6492 6563 685f 71e6 73ca 7523 7b97 -7e82 8695 8b83 8cdb 9178 9910 65ac 66ab -6b8b 4ed5 4ed4 4f3a 4f7f 523a 53f8 53f2 -55e3 56db 58eb 59cb 59c9 59ff 5b50 5c4d -5e02 5e2b 5fd7 601d 6307 652f 5b5c 65af -65bd 65e8 679d 6b62 6b7b 6c0f 7345 7949 -79c1 7cf8 7d19 7d2b 80a2 8102 81f3 8996 -8a5e 8a69 8a66 8a8c 8aee 8cc7 8cdc 96cc -98fc 6b6f 4e8b 4f3c 4f8d 5150 5b57 5bfa -6148 6301 6642 -1 -1 -1 -1 -1 - -1 6b21 6ecb 6cbb 723e 74bd 75d4 78c1 -793a 800c 8033 81ea 8494 8f9e 6c50 9e7f -5f0f 8b58 9d2b 7afa 8ef8 5b8d 96eb 4e03 -53f1 57f7 5931 5ac9 5ba4 6089 6e7f 6f06 -75be 8cea 5b9f 8500 7be0 5072 67f4 829d -5c61 854a 7e1e 820e 5199 5c04 6368 8d66 -659c 716e 793e 7d17 8005 8b1d 8eca 906e -86c7 90aa 501f 52fa 5c3a 6753 707c 7235 -914c 91c8 932b 82e5 5bc2 5f31 60f9 4e3b -53d6 5b88 624b 6731 6b8a 72e9 73e0 7a2e -816b 8da3 9152 9996 5112 53d7 546a 5bff -6388 6a39 7dac 9700 56da 53ce 5468 -1 - -1 -1 -1 -1 -1 5b97 5c31 5dde -4fee 6101 62fe 6d32 79c0 79cb 7d42 7e4d -7fd2 81ed 821f 8490 8846 8972 8b90 8e74 -8f2f 9031 914b 916c 96c6 919c 4ec0 4f4f -5145 5341 5f93 620e 67d4 6c41 6e0b 7363 -7e26 91cd 9283 53d4 5919 5bbf 6dd1 795d -7e2e 7c9b 587e 719f 51fa 8853 8ff0 4fca -5cfb 6625 77ac 7ae3 821c 99ff 51c6 5faa -65ec 696f 6b89 6df3 6e96 6f64 76fe 7d14 -5de1 9075 9187 9806 51e6 521d 6240 6691 -66d9 6e1a 5eb6 7dd2 7f72 66f8 85af 85f7 -8af8 52a9 53d9 5973 5e8f 5f90 6055 92e4 -9664 50b7 511f -1 -1 -1 -1 -1 - -1 52dd 5320 5347 53ec 54e8 5546 5531 -5617 5968 59be 5a3c 5bb5 5c06 5c0f 5c11 -5c1a 5e84 5e8a 5ee0 5f70 627f 6284 62db -638c 6377 6607 660c 662d 6676 677e 68a2 -6a1f 6a35 6cbc 6d88 6e09 6e58 713c 7126 -7167 75c7 7701 785d 7901 7965 79f0 7ae0 -7b11 7ca7 7d39 8096 83d6 848b 8549 885d -88f3 8a1f 8a3c 8a54 8a73 8c61 8cde 91a4 -9266 937e 9418 969c 9798 4e0a 4e08 4e1e -4e57 5197 5270 57ce 5834 58cc 5b22 5e38 -60c5 64fe 6761 6756 6d44 72b6 7573 7a63 -84b8 8b72 91b8 9320 5631 57f4 98fe -1 - -1 -1 -1 -1 -1 62ed 690d 6b96 -71ed 7e54 8077 8272 89e6 98df 8755 8fb1 -5c3b 4f38 4fe1 4fb5 5507 5a20 5bdd 5be9 -5fc3 614e 632f 65b0 664b 68ee 699b 6d78 -6df1 7533 75b9 771f 795e 79e6 7d33 81e3 -82af 85aa 89aa 8a3a 8eab 8f9b 9032 91dd -9707 4eba 4ec1 5203 5875 58ec 5c0b 751a -5c3d 814e 8a0a 8fc5 9663 976d 7b25 8acf -9808 9162 56f3 53a8 9017 5439 5782 5e25 -63a8 6c34 708a 7761 7c8b 7fe0 8870 9042 -9154 9310 9318 968f 745e 9ac4 5d07 5d69 -6570 67a2 8da8 96db 636e 6749 6919 83c5 -9817 96c0 88fe -1 -1 -1 -1 -1 - -1 6f84 647a 5bf8 4e16 702c 755d 662f -51c4 5236 52e2 59d3 5f81 6027 6210 653f -6574 661f 6674 68f2 6816 6b63 6e05 7272 -751f 76db 7cbe 8056 58f0 88fd 897f 8aa0 -8a93 8acb 901d 9192 9752 9759 6589 7a0e -8106 96bb 5e2d 60dc 621a 65a5 6614 6790 -77f3 7a4d 7c4d 7e3e 810a 8cac 8d64 8de1 -8e5f 78a9 5207 62d9 63a5 6442 6298 8a2d -7a83 7bc0 8aac 96ea 7d76 820c 8749 4ed9 -5148 5343 5360 5ba3 5c02 5c16 5ddd 6226 -6247 64b0 6813 6834 6cc9 6d45 6d17 67d3 -6f5c 714e 717d 65cb 7a7f 7bad 7dda -1 - -1 -1 -1 -1 -1 7e4a 7fa8 817a -821b 8239 85a6 8a6e 8cce 8df5 9078 9077 -92ad 9291 9583 9bae 524d 5584 6f38 7136 -5168 7985 7e55 81b3 7cce 564c 5851 5ca8 -63aa 66fe 66fd 695a 72d9 758f 758e 790e -7956 79df 7c97 7d20 7d44 8607 8a34 963b -9061 9f20 50e7 5275 53cc 53e2 5009 55aa -58ee 594f 723d 5b8b 5c64 531d 60e3 60f3 -635c 6383 633f 63bb 64cd 65e9 66f9 5de3 -69cd 69fd 6f15 71e5 4e89 75e9 76f8 7a93 -7cdf 7dcf 7d9c 8061 8349 8358 846c 84bc -85fb 88c5 8d70 9001 906d 9397 971c 9a12 -50cf 5897 618e -1 -1 -1 -1 -1 - -1 81d3 8535 8d08 9020 4fc3 5074 5247 -5373 606f 6349 675f 6e2c 8db3 901f 4fd7 -5c5e 8cca 65cf 7d9a 5352 8896 5176 63c3 -5b58 5b6b 5c0a 640d 6751 905c 4ed6 591a -592a 6c70 8a51 553e 5815 59a5 60f0 6253 -67c1 8235 6955 9640 99c4 9a28 4f53 5806 -5bfe 8010 5cb1 5e2f 5f85 6020 614b 6234 -66ff 6cf0 6ede 80ce 817f 82d4 888b 8cb8 -9000 902e 968a 9edb 9bdb 4ee3 53f0 5927 -7b2c 918d 984c 9df9 6edd 7027 5353 5544 -5b85 6258 629e 62d3 6ca2 6fef 7422 8a17 -9438 6fc1 8afe 8338 51e7 86f8 53ea -1 - -1 -1 -1 -1 -1 53e9 4f46 9054 -8fb0 596a 8131 5dfd 7aea 8fbf 68da 8c37 -72f8 9c48 6a3d 8ab0 4e39 5358 5606 5766 -62c5 63a2 65e6 6b4e 6de1 6e5b 70ad 77ed -7aef 7baa 7dbb 803d 80c6 86cb 8a95 935b -56e3 58c7 5f3e 65ad 6696 6a80 6bb5 7537 -8ac7 5024 77e5 5730 5f1b 6065 667a 6c60 -75f4 7a1a 7f6e 81f4 8718 9045 99b3 7bc9 -755c 7af9 7b51 84c4 9010 79e9 7a92 8336 -5ae1 7740 4e2d 4ef2 5b99 5fe0 62bd 663c -67f1 6ce8 866b 8877 8a3b 914e 92f3 99d0 -6a17 7026 732a 82e7 8457 8caf 4e01 5146 -51cb 558b 5bf5 -1 -1 -1 -1 -1 - -1 5e16 5e33 5e81 5f14 5f35 5f6b 5fb4 -61f2 6311 66a2 671d 6f6e 7252 753a 773a -8074 8139 8178 8776 8abf 8adc 8d85 8df3 -929a 9577 9802 9ce5 52c5 6357 76f4 6715 -6c88 73cd 8cc3 93ae 9673 6d25 589c 690e -69cc 8ffd 939a 75db 901a 585a 6802 63b4 -69fb 4f43 6f2c 67d8 8fbb 8526 7db4 9354 -693f 6f70 576a 58f7 5b2c 7d2c 722a 540a -91e3 9db4 4ead 4f4e 505c 5075 5243 8c9e -5448 5824 5b9a 5e1d 5e95 5ead 5ef7 5f1f -608c 62b5 633a 63d0 68af 6c40 7887 798e -7a0b 7de0 8247 8a02 8ae6 8e44 9013 -1 - -1 -1 -1 -1 -1 90b8 912d 91d8 -9f0e 6ce5 6458 64e2 6575 6ef4 7684 7b1b -9069 93d1 6eba 54f2 5fb9 64a4 8f4d 8fed -9244 5178 586b 5929 5c55 5e97 6dfb 7e8f -751c 8cbc 8ee2 985b 70b9 4f1d 6bbf 6fb1 -7530 96fb 514e 5410 5835 5857 59ac 5c60 -5f92 6597 675c 6e21 767b 83df 8ced 9014 -90fd 934d 7825 783a 52aa 5ea6 571f 5974 -6012 5012 515a 51ac 51cd 5200 5510 5854 -5858 5957 5b95 5cf6 5d8b 60bc 6295 642d -6771 6843 68bc 68df 76d7 6dd8 6e6f 6d9b -706f 71c8 5f53 75d8 7977 7b49 7b54 7b52 -7cd6 7d71 5230 -1 -1 -1 -1 -1 - -1 8463 8569 85e4 8a0e 8b04 8c46 8e0f -9003 900f 9419 9676 982d 9a30 95d8 50cd -52d5 540c 5802 5c0e 61a7 649e 6d1e 77b3 -7ae5 80f4 8404 9053 9285 5ce0 9d07 533f -5f97 5fb3 6d9c 7279 7763 79bf 7be4 6bd2 -72ec 8aad 6803 6a61 51f8 7a81 6934 5c4a -9cf6 82eb 5bc5 9149 701e 5678 5c6f 60c7 -6566 6c8c 8c5a 9041 9813 5451 66c7 920d -5948 90a3 5185 4e4d 51ea 8599 8b0e 7058 -637a 934b 6962 99b4 7e04 7577 5357 6960 -8edf 96e3 6c5d 4e8c 5c3c 5f10 8fe9 5302 -8cd1 8089 8679 5eff 65e5 4e73 5165 -1 - -1 -1 -1 -1 -1 5982 5c3f 97ee -4efb 598a 5fcd 8a8d 6fe1 79b0 7962 5be7 -8471 732b 71b1 5e74 5ff5 637b 649a 71c3 -7c98 4e43 5efc 4e4b 57dc 56a2 60a9 6fc3 -7d0d 80fd 8133 81bf 8fb2 8997 86a4 5df4 -628a 64ad 8987 6777 6ce2 6d3e 7436 7834 -5a46 7f75 82ad 99ac 4ff3 5ec3 62dd 6392 -6557 676f 76c3 724c 80cc 80ba 8f29 914d -500d 57f9 5a92 6885 6973 7164 72fd 8cb7 -58f2 8ce0 966a 9019 877f 79e4 77e7 8429 -4f2f 5265 535a 62cd 67cf 6cca 767d 7b94 -7c95 8236 8584 8feb 66dd 6f20 7206 7e1b -83ab 99c1 9ea6 -1 -1 -1 -1 -1 - -1 51fd 7bb1 7872 7bb8 8087 7b48 6ae8 -5e61 808c 7551 7560 516b 9262 6e8c 767a -9197 9aea 4f10 7f70 629c 7b4f 95a5 9ce9 -567a 5859 86e4 96bc 4f34 5224 534a 53cd -53db 5e06 642c 6591 677f 6c3e 6c4e 7248 -72af 73ed 7554 7e41 822c 85e9 8ca9 7bc4 -91c6 7169 9812 98ef 633d 6669 756a 76e4 -78d0 8543 86ee 532a 5351 5426 5983 5e87 -5f7c 60b2 6249 6279 62ab 6590 6bd4 6ccc -75b2 76ae 7891 79d8 7dcb 7f77 80a5 88ab -8ab9 8cbb 907f 975e 98db 6a0b 7c38 5099 -5c3e 5fae 6787 6bd8 7435 7709 7f8e -1 - -1 -1 -1 -1 -1 9f3b 67ca 7a17 -5339 758b 9aed 5f66 819d 83f1 8098 5f3c -5fc5 7562 7b46 903c 6867 59eb 5a9b 7d10 -767e 8b2c 4ff5 5f6a 6a19 6c37 6f02 74e2 -7968 8868 8a55 8c79 5edf 63cf 75c5 79d2 -82d7 9328 92f2 849c 86ed 9c2d 54c1 5f6c -658c 6d5c 7015 8ca7 8cd3 983b 654f 74f6 -4e0d 4ed8 57e0 592b 5a66 5bcc 51a8 5e03 -5e9c 6016 6276 6577 65a7 666e 6d6e 7236 -7b26 8150 819a 8299 8b5c 8ca0 8ce6 8d74 -961c 9644 4fae 64ab 6b66 821e 8461 856a -90e8 5c01 6953 98a8 847a 8557 4f0f 526f -5fa9 5e45 670d -1 -1 -1 -1 -1 - -1 798f 8179 8907 8986 6df5 5f17 6255 -6cb8 4ecf 7269 9b92 5206 543b 5674 58b3 -61a4 626e 711a 596e 7c89 7cde 7d1b 96f0 -6587 805e 4e19 4f75 5175 5840 5e63 5e73 -5f0a 67c4 4e26 853d 9589 965b 7c73 9801 -50fb 58c1 7656 78a7 5225 77a5 8511 7b86 -504f 5909 7247 7bc7 7de8 8fba 8fd4 904d -4fbf 52c9 5a29 5f01 97ad 4fdd 8217 92ea -5703 6355 6b69 752b 88dc 8f14 7a42 52df -5893 6155 620a 66ae 6bcd 7c3f 83e9 5023 -4ff8 5305 5446 5831 5949 5b9d 5cf0 5cef -5d29 5e96 62b1 6367 653e 65b9 670b -1 - -1 -1 -1 -1 -1 6cd5 6ce1 70f9 -7832 7e2b 80de 82b3 840c 84ec 8702 8912 -8a2a 8c4a 90a6 92d2 98fd 9cf3 9d6c 4e4f -4ea1 508d 5256 574a 59a8 5e3d 5fd8 5fd9 -623f 66b4 671b 67d0 68d2 5192 7d21 80aa -81a8 8b00 8c8c 8cbf 927e 9632 5420 982c -5317 50d5 535c 58a8 64b2 6734 7267 7766 -7a46 91e6 52c3 6ca1 6b86 5800 5e4c 5954 -672c 7ffb 51e1 76c6 6469 78e8 9b54 9ebb -57cb 59b9 6627 679a 6bce 54e9 69d9 5e55 -819c 6795 9baa 67fe 9c52 685d 4ea6 4fe3 -53c8 62b9 672b 6cab 8fc4 4fad 7e6d 9ebf -4e07 6162 6e80 -1 -1 -1 -1 -1 - -1 6f2b 8513 5473 672a 9b45 5df3 7b95 -5cac 5bc6 871c 6e4a 84d1 7a14 8108 5999 -7c8d 6c11 7720 52d9 5922 7121 725f 77db -9727 9d61 690b 5a7f 5a18 51a5 540d 547d -660e 76df 8ff7 9298 9cf4 59ea 725d 6ec5 -514d 68c9 7dbf 7dec 9762 9eba 6478 6a21 -8302 5984 5b5f 6bdb 731b 76f2 7db2 8017 -8499 5132 6728 9ed9 76ee 6762 52ff 9905 -5c24 623b 7c7e 8cb0 554f 60b6 7d0b 9580 -5301 4e5f 51b6 591c 723a 8036 91ce 5f25 -77e2 5384 5f79 7d04 85ac 8a33 8e8d 9756 -67f3 85ae 9453 6109 6108 6cb9 7652 -1 - -1 -1 -1 -1 -1 8aed 8f38 552f -4f51 512a 52c7 53cb 5ba5 5e7d 60a0 6182 -63d6 6709 67da 6e67 6d8c 7336 7337 7531 -7950 88d5 8a98 904a 9091 90f5 96c4 878d -5915 4e88 4f59 4e0e 8a89 8f3f 9810 50ad -5e7c 5996 5bb9 5eb8 63da 63fa 64c1 66dc -694a 69d8 6d0b 6eb6 7194 7528 7aaf 7f8a -8000 8449 84c9 8981 8b21 8e0a 9065 967d -990a 617e 6291 6b32 6c83 6d74 7fcc 7ffc -6dc0 7f85 87ba 88f8 6765 83b1 983c 96f7 -6d1b 7d61 843d 916a 4e71 5375 5d50 6b04 -6feb 85cd 862d 89a7 5229 540f 5c65 674e -68a8 7406 7483 -1 -1 -1 -1 -1 - -1 75e2 88cf 88e1 91cc 96e2 9678 5f8b -7387 7acb 844e 63a0 7565 5289 6d41 6e9c -7409 7559 786b 7c92 9686 7adc 9f8d 4fb6 -616e 65c5 865c 4e86 4eae 50da 4e21 51cc -5bee 6599 6881 6dbc 731f 7642 77ad 7a1c -7ce7 826f 8ad2 907c 91cf 9675 9818 529b -7dd1 502b 5398 6797 6dcb 71d0 7433 81e8 -8f2a 96a3 9c57 9e9f 7460 5841 6d99 7d2f -985e 4ee4 4f36 4f8b 51b7 52b1 5dba 601c -73b2 793c 82d3 9234 96b7 96f6 970a 9e97 -9f62 66a6 6b74 5217 52a3 70c8 88c2 5ec9 -604b 6190 6f23 7149 7c3e 7df4 806f -1 - -1 -1 -1 -1 -1 84ee 9023 932c -5442 9b6f 6ad3 7089 8cc2 8def 9732 52b4 -5a41 5eca 5f04 6717 697c 6994 6d6a 6f0f -7262 72fc 7bed 8001 807e 874b 90ce 516d -9e93 7984 808b 9332 8ad6 502d 548c 8a71 -6b6a 8cc4 8107 60d1 67a0 9df2 4e99 4e98 -9c10 8a6b 85c1 8568 6900 6e7e 7897 8155 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 5f0c 4e10 4e15 4e2a 4e31 4e36 4e3c -4e3f 4e42 4e56 4e58 4e82 4e85 8c6b 4e8a -8212 5f0d 4e8e 4e9e 4e9f 4ea0 4ea2 4eb0 -4eb3 4eb6 4ece 4ecd 4ec4 4ec6 4ec2 4ed7 -4ede 4eed 4edf 4ef7 4f09 4f5a 4f30 4f5b -4f5d 4f57 4f47 4f76 4f88 4f8f 4f98 4f7b -4f69 4f70 4f91 4f6f 4f86 4f96 5118 4fd4 -4fdf 4fce 4fd8 4fdb 4fd1 4fda 4fd0 4fe4 -4fe5 501a 5028 5014 502a 5025 5005 4f1c -4ff6 5021 5029 502c 4ffe 4fef 5011 5006 -5043 5047 6703 5055 5050 5048 505a 5056 -506c 5078 5080 509a 5085 50b4 50b2 -1 - -1 -1 -1 -1 -1 50c9 50ca 50b3 -50c2 50d6 50de 50e5 50ed 50e3 50ee 50f9 -50f5 5109 5101 5102 5116 5115 5114 511a -5121 513a 5137 513c 513b 513f 5140 5152 -514c 5154 5162 7af8 5169 516a 516e 5180 -5182 56d8 518c 5189 518f 5191 5193 5195 -5196 51a4 51a6 51a2 51a9 51aa 51ab 51b3 -51b1 51b2 51b0 51b5 51bd 51c5 51c9 51db -51e0 8655 51e9 51ed 51f0 51f5 51fe 5204 -520b 5214 520e 5227 522a 522e 5233 5239 -524f 5244 524b 524c 525e 5254 526a 5274 -5269 5273 527f 527d 528d 5294 5292 5271 -5288 5291 8fa8 -1 -1 -1 -1 -1 - -1 8fa7 52ac 52ad 52bc 52b5 52c1 52cd -52d7 52de 52e3 52e6 98ed 52e0 52f3 52f5 -52f8 52f9 5306 5308 7538 530d 5310 530f -5315 531a 5323 532f 5331 5333 5338 5340 -5346 5345 4e17 5349 534d 51d6 535e 5369 -536e 5918 537b 5377 5382 5396 53a0 53a6 -53a5 53ae 53b0 53b6 53c3 7c12 96d9 53df -66fc 71ee 53ee 53e8 53ed 53fa 5401 543d -5440 542c 542d 543c 542e 5436 5429 541d -544e 548f 5475 548e 545f 5471 5477 5470 -5492 547b 5480 5476 5484 5490 5486 54c7 -54a2 54b8 54a5 54ac 54c4 54c8 54a8 -1 - -1 -1 -1 -1 -1 54ab 54c2 54a4 -54be 54bc 54d8 54e5 54e6 550f 5514 54fd -54ee 54ed 54fa 54e2 5539 5540 5563 554c -552e 555c 5545 5556 5557 5538 5533 555d -5599 5580 54af 558a 559f 557b 557e 5598 -559e 55ae 557c 5583 55a9 5587 55a8 55da -55c5 55df 55c4 55dc 55e4 55d4 5614 55f7 -5616 55fe 55fd 561b 55f9 564e 5650 71df -5634 5636 5632 5638 566b 5664 562f 566c -566a 5686 5680 568a 56a0 5694 568f 56a5 -56ae 56b6 56b4 56c2 56bc 56c1 56c3 56c0 -56c8 56ce 56d1 56d3 56d7 56ee 56f9 5700 -56ff 5704 5709 -1 -1 -1 -1 -1 - -1 5708 570b 570d 5713 5718 5716 55c7 -571c 5726 5737 5738 574e 573b 5740 574f -5769 57c0 5788 5761 577f 5789 5793 57a0 -57b3 57a4 57aa 57b0 57c3 57c6 57d4 57d2 -57d3 580a 57d6 57e3 580b 5819 581d 5872 -5821 5862 584b 5870 6bc0 5852 583d 5879 -5885 58b9 589f 58ab 58ba 58de 58bb 58b8 -58ae 58c5 58d3 58d1 58d7 58d9 58d8 58e5 -58dc 58e4 58df 58ef 58fa 58f9 58fb 58fc -58fd 5902 590a 5910 591b 68a6 5925 592c -592d 5932 5938 593e 7ad2 5955 5950 594e -595a 5958 5962 5960 5967 596c 5969 -1 - -1 -1 -1 -1 -1 5978 5981 599d -4f5e 4fab 59a3 59b2 59c6 59e8 59dc 598d -59d9 59da 5a25 5a1f 5a11 5a1c 5a09 5a1a -5a40 5a6c 5a49 5a35 5a36 5a62 5a6a 5a9a -5abc 5abe 5acb 5ac2 5abd 5ae3 5ad7 5ae6 -5ae9 5ad6 5afa 5afb 5b0c 5b0b 5b16 5b32 -5ad0 5b2a 5b36 5b3e 5b43 5b45 5b40 5b51 -5b55 5b5a 5b5b 5b65 5b69 5b70 5b73 5b75 -5b78 6588 5b7a 5b80 5b83 5ba6 5bb8 5bc3 -5bc7 5bc9 5bd4 5bd0 5be4 5be6 5be2 5bde -5be5 5beb 5bf0 5bf6 5bf3 5c05 5c07 5c08 -5c0d 5c13 5c20 5c22 5c28 5c38 5c39 5c41 -5c46 5c4e 5c53 -1 -1 -1 -1 -1 - -1 5c50 5c4f 5b71 5c6c 5c6e 4e62 5c76 -5c79 5c8c 5c91 5c94 599b 5cab 5cbb 5cb6 -5cbc 5cb7 5cc5 5cbe 5cc7 5cd9 5ce9 5cfd -5cfa 5ced 5d8c 5cea 5d0b 5d15 5d17 5d5c -5d1f 5d1b 5d11 5d14 5d22 5d1a 5d19 5d18 -5d4c 5d52 5d4e 5d4b 5d6c 5d73 5d76 5d87 -5d84 5d82 5da2 5d9d 5dac 5dae 5dbd 5d90 -5db7 5dbc 5dc9 5dcd 5dd3 5dd2 5dd6 5ddb -5deb 5df2 5df5 5e0b 5e1a 5e19 5e11 5e1b -5e36 5e37 5e44 5e43 5e40 5e4e 5e57 5e54 -5e5f 5e62 5e64 5e47 5e75 5e76 5e7a 9ebc -5e7f 5ea0 5ec1 5ec2 5ec8 5ed0 5ecf -1 - -1 -1 -1 -1 -1 5ed6 5ee3 5edd -5eda 5edb 5ee2 5ee1 5ee8 5ee9 5eec 5ef1 -5ef3 5ef0 5ef4 5ef8 5efe 5f03 5f09 5f5d -5f5c 5f0b 5f11 5f16 5f29 5f2d 5f38 5f41 -5f48 5f4c 5f4e 5f2f 5f51 5f56 5f57 5f59 -5f61 5f6d 5f73 5f77 5f83 5f82 5f7f 5f8a -5f88 5f91 5f87 5f9e 5f99 5f98 5fa0 5fa8 -5fad 5fbc 5fd6 5ffb 5fe4 5ff8 5ff1 5fdd -60b3 5fff 6021 6060 6019 6010 6029 600e -6031 601b 6015 602b 6026 600f 603a 605a -6041 606a 6077 605f 604a 6046 604d 6063 -6043 6064 6042 606c 606b 6059 6081 608d -60e7 6083 609a -1 -1 -1 -1 -1 - -1 6084 609b 6096 6097 6092 60a7 608b -60e1 60b8 60e0 60d3 60b4 5ff0 60bd 60c6 -60b5 60d8 614d 6115 6106 60f6 60f7 6100 -60f4 60fa 6103 6121 60fb 60f1 610d 610e -6147 613e 6128 6127 614a 613f 613c 612c -6134 613d 6142 6144 6173 6177 6158 6159 -615a 616b 6174 616f 6165 6171 615f 615d -6153 6175 6199 6196 6187 61ac 6194 619a -618a 6191 61ab 61ae 61cc 61ca 61c9 61f7 -61c8 61c3 61c6 61ba 61cb 7f79 61cd 61e6 -61e3 61f6 61fa 61f4 61ff 61fd 61fc 61fe -6200 6208 6209 620d 620c 6214 621b -1 - -1 -1 -1 -1 -1 621e 6221 622a -622e 6230 6232 6233 6241 624e 625e 6263 -625b 6260 6268 627c 6282 6289 627e 6292 -6293 6296 62d4 6283 6294 62d7 62d1 62bb -62cf 62ff 62c6 64d4 62c8 62dc 62cc 62ca -62c2 62c7 629b 62c9 630c 62ee 62f1 6327 -6302 6308 62ef 62f5 6350 633e 634d 641c -634f 6396 638e 6380 63ab 6376 63a3 638f -6389 639f 63b5 636b 6369 63be 63e9 63c0 -63c6 63e3 63c9 63d2 63f6 63c4 6416 6434 -6406 6413 6426 6436 651d 6417 6428 640f -6467 646f 6476 644e 652a 6495 6493 64a5 -64a9 6488 64bc -1 -1 -1 -1 -1 - -1 64da 64d2 64c5 64c7 64bb 64d8 64c2 -64f1 64e7 8209 64e0 64e1 62ac 64e3 64ef -652c 64f6 64f4 64f2 64fa 6500 64fd 6518 -651c 6505 6524 6523 652b 6534 6535 6537 -6536 6538 754b 6548 6556 6555 654d 6558 -655e 655d 6572 6578 6582 6583 8b8a 659b -659f 65ab 65b7 65c3 65c6 65c1 65c4 65cc -65d2 65db 65d9 65e0 65e1 65f1 6772 660a -6603 65fb 6773 6635 6636 6634 661c 664f -6644 6649 6641 665e 665d 6664 6667 6668 -665f 6662 6670 6683 6688 668e 6689 6684 -6698 669d 66c1 66b9 66c9 66be 66bc -1 - -1 -1 -1 -1 -1 66c4 66b8 66d6 -66da 66e0 663f 66e6 66e9 66f0 66f5 66f7 -670f 6716 671e 6726 6727 9738 672e 673f -6736 6741 6738 6737 6746 675e 6760 6759 -6763 6764 6789 6770 67a9 677c 676a 678c -678b 67a6 67a1 6785 67b7 67ef 67b4 67ec -67b3 67e9 67b8 67e4 67de 67dd 67e2 67ee -67b9 67ce 67c6 67e7 6a9c 681e 6846 6829 -6840 684d 6832 684e 68b3 682b 6859 6863 -6877 687f 689f 688f 68ad 6894 689d 689b -6883 6aae 68b9 6874 68b5 68a0 68ba 690f -688d 687e 6901 68ca 6908 68d8 6922 6926 -68e1 690c 68cd -1 -1 -1 -1 -1 - -1 68d4 68e7 68d5 6936 6912 6904 68d7 -68e3 6925 68f9 68e0 68ef 6928 692a 691a -6923 6921 68c6 6979 6977 695c 6978 696b -6954 697e 696e 6939 6974 693d 6959 6930 -6961 695e 695d 6981 696a 69b2 69ae 69d0 -69bf 69c1 69d3 69be 69ce 5be8 69ca 69dd -69bb 69c3 69a7 6a2e 6991 69a0 699c 6995 -69b4 69de 69e8 6a02 6a1b 69ff 6b0a 69f9 -69f2 69e7 6a05 69b1 6a1e 69ed 6a14 69eb -6a0a 6a12 6ac1 6a23 6a13 6a44 6a0c 6a72 -6a36 6a78 6a47 6a62 6a59 6a66 6a48 6a38 -6a22 6a90 6a8d 6aa0 6a84 6aa2 6aa3 -1 - -1 -1 -1 -1 -1 6a97 8617 6abb -6ac3 6ac2 6ab8 6ab3 6aac 6ade 6ad1 6adf -6aaa 6ada 6aea 6afb 6b05 8616 6afa 6b12 -6b16 9b31 6b1f 6b38 6b37 76dc 6b39 98ee -6b47 6b43 6b49 6b50 6b59 6b54 6b5b 6b5f -6b61 6b78 6b79 6b7f 6b80 6b84 6b83 6b8d -6b98 6b95 6b9e 6ba4 6baa 6bab 6baf 6bb2 -6bb1 6bb3 6bb7 6bbc 6bc6 6bcb 6bd3 6bdf -6bec 6beb 6bf3 6bef 9ebe 6c08 6c13 6c14 -6c1b 6c24 6c23 6c5e 6c55 6c62 6c6a 6c82 -6c8d 6c9a 6c81 6c9b 6c7e 6c68 6c73 6c92 -6c90 6cc4 6cf1 6cd3 6cbd 6cd7 6cc5 6cdd -6cae 6cb1 6cbe -1 -1 -1 -1 -1 - -1 6cba 6cdb 6cef 6cd9 6cea 6d1f 884d -6d36 6d2b 6d3d 6d38 6d19 6d35 6d33 6d12 -6d0c 6d63 6d93 6d64 6d5a 6d79 6d59 6d8e -6d95 6fe4 6d85 6df9 6e15 6e0a 6db5 6dc7 -6de6 6db8 6dc6 6dec 6dde 6dcc 6de8 6dd2 -6dc5 6dfa 6dd9 6de4 6dd5 6dea 6dee 6e2d -6e6e 6e2e 6e19 6e72 6e5f 6e3e 6e23 6e6b -6e2b 6e76 6e4d 6e1f 6e43 6e3a 6e4e 6e24 -6eff 6e1d 6e38 6e82 6eaa 6e98 6ec9 6eb7 -6ed3 6ebd 6eaf 6ec4 6eb2 6ed4 6ed5 6e8f -6ea5 6ec2 6e9f 6f41 6f11 704c 6eec 6ef8 -6efe 6f3f 6ef2 6f31 6eef 6f32 6ecc -1 - -1 -1 -1 -1 -1 6f3e 6f13 6ef7 -6f86 6f7a 6f78 6f81 6f80 6f6f 6f5b 6ff3 -6f6d 6f82 6f7c 6f58 6f8e 6f91 6fc2 6f66 -6fb3 6fa3 6fa1 6fa4 6fb9 6fc6 6faa 6fdf -6fd5 6fec 6fd4 6fd8 6ff1 6fee 6fdb 7009 -700b 6ffa 7011 7001 700f 6ffe 701b 701a -6f74 701d 7018 701f 7030 703e 7032 7051 -7063 7099 7092 70af 70f1 70ac 70b8 70b3 -70ae 70df 70cb 70dd 70d9 7109 70fd 711c -7119 7165 7155 7188 7166 7162 714c 7156 -716c 718f 71fb 7184 7195 71a8 71ac 71d7 -71b9 71be 71d2 71c9 71d4 71ce 71e0 71ec -71e7 71f5 71fc -1 -1 -1 -1 -1 - -1 71f9 71ff 720d 7210 721b 7228 722d -722c 7230 7232 723b 723c 723f 7240 7246 -724b 7258 7274 727e 7282 7281 7287 7292 -7296 72a2 72a7 72b9 72b2 72c3 72c6 72c4 -72ce 72d2 72e2 72e0 72e1 72f9 72f7 500f -7317 730a 731c 7316 731d 7334 732f 7329 -7325 733e 734e 734f 9ed8 7357 736a 7368 -7370 7378 7375 737b 737a 73c8 73b3 73ce -73bb 73c0 73e5 73ee 73de 74a2 7405 746f -7425 73f8 7432 743a 7455 743f 745f 7459 -7441 745c 7469 7470 7463 746a 7476 747e -748b 749e 74a7 74ca 74cf 74d4 73f1 -1 - -1 -1 -1 -1 -1 74e0 74e3 74e7 -74e9 74ee 74f2 74f0 74f1 74f8 74f7 7504 -7503 7505 750c 750e 750d 7515 7513 751e -7526 752c 753c 7544 754d 754a 7549 755b -7546 755a 7569 7564 7567 756b 756d 7578 -7576 7586 7587 7574 758a 7589 7582 7594 -759a 759d 75a5 75a3 75c2 75b3 75c3 75b5 -75bd 75b8 75bc 75b1 75cd 75ca 75d2 75d9 -75e3 75de 75fe 75ff 75fc 7601 75f0 75fa -75f2 75f3 760b 760d 7609 761f 7627 7620 -7621 7622 7624 7634 7630 763b 7647 7648 -7646 765c 7658 7661 7662 7668 7669 766a -7667 766c 7670 -1 -1 -1 -1 -1 - -1 7672 7676 7678 767c 7680 7683 7688 -768b 768e 7696 7693 7699 769a 76b0 76b4 -76b8 76b9 76ba 76c2 76cd 76d6 76d2 76de -76e1 76e5 76e7 76ea 862f 76fb 7708 7707 -7704 7729 7724 771e 7725 7726 771b 7737 -7738 7747 775a 7768 776b 775b 7765 777f -777e 7779 778e 778b 7791 77a0 779e 77b0 -77b6 77b9 77bf 77bc 77bd 77bb 77c7 77cd -77d7 77da 77dc 77e3 77ee 77fc 780c 7812 -7926 7820 792a 7845 788e 7874 7886 787c -789a 788c 78a3 78b5 78aa 78af 78d1 78c6 -78cb 78d4 78be 78bc 78c5 78ca 78ec -1 - -1 -1 -1 -1 -1 78e7 78da 78fd -78f4 7907 7912 7911 7919 792c 792b 7940 -7960 7957 795f 795a 7955 7953 797a 797f -798a 799d 79a7 9f4b 79aa 79ae 79b3 79b9 -79ba 79c9 79d5 79e7 79ec 79e1 79e3 7a08 -7a0d 7a18 7a19 7a20 7a1f 7980 7a31 7a3b -7a3e 7a37 7a43 7a57 7a49 7a61 7a62 7a69 -9f9d 7a70 7a79 7a7d 7a88 7a97 7a95 7a98 -7a96 7aa9 7ac8 7ab0 7ab6 7ac5 7ac4 7abf -9083 7ac7 7aca 7acd 7acf 7ad5 7ad3 7ad9 -7ada 7add 7ae1 7ae2 7ae6 7aed 7af0 7b02 -7b0f 7b0a 7b06 7b33 7b18 7b19 7b1e 7b35 -7b28 7b36 7b50 -1 -1 -1 -1 -1 - -1 7b7a 7b04 7b4d 7b0b 7b4c 7b45 7b75 -7b65 7b74 7b67 7b70 7b71 7b6c 7b6e 7b9d -7b98 7b9f 7b8d 7b9c 7b9a 7b8b 7b92 7b8f -7b5d 7b99 7bcb 7bc1 7bcc 7bcf 7bb4 7bc6 -7bdd 7be9 7c11 7c14 7be6 7be5 7c60 7c00 -7c07 7c13 7bf3 7bf7 7c17 7c0d 7bf6 7c23 -7c27 7c2a 7c1f 7c37 7c2b 7c3d 7c4c 7c43 -7c54 7c4f 7c40 7c50 7c58 7c5f 7c64 7c56 -7c65 7c6c 7c75 7c83 7c90 7ca4 7cad 7ca2 -7cab 7ca1 7ca8 7cb3 7cb2 7cb1 7cae 7cb9 -7cbd 7cc0 7cc5 7cc2 7cd8 7cd2 7cdc 7ce2 -9b3b 7cef 7cf2 7cf4 7cf6 7cfa 7d06 -1 - -1 -1 -1 -1 -1 7d02 7d1c 7d15 -7d0a 7d45 7d4b 7d2e 7d32 7d3f 7d35 7d46 -7d73 7d56 7d4e 7d72 7d68 7d6e 7d4f 7d63 -7d93 7d89 7d5b 7d8f 7d7d 7d9b 7dba 7dae -7da3 7db5 7dc7 7dbd 7dab 7e3d 7da2 7daf -7ddc 7db8 7d9f 7db0 7dd8 7ddd 7de4 7dde -7dfb 7df2 7de1 7e05 7e0a 7e23 7e21 7e12 -7e31 7e1f 7e09 7e0b 7e22 7e46 7e66 7e3b -7e35 7e39 7e43 7e37 7e32 7e3a 7e67 7e5d -7e56 7e5e 7e59 7e5a 7e79 7e6a 7e69 7e7c -7e7b 7e83 7dd5 7e7d 8fae 7e7f 7e88 7e89 -7e8c 7e92 7e90 7e93 7e94 7e96 7e8e 7e9b -7e9c 7f38 7f3a -1 -1 -1 -1 -1 - -1 7f45 7f4c 7f4d 7f4e 7f50 7f51 7f55 -7f54 7f58 7f5f 7f60 7f68 7f69 7f67 7f78 -7f82 7f86 7f83 7f88 7f87 7f8c 7f94 7f9e -7f9d 7f9a 7fa3 7faf 7fb2 7fb9 7fae 7fb6 -7fb8 8b71 7fc5 7fc6 7fca 7fd5 7fd4 7fe1 -7fe6 7fe9 7ff3 7ff9 98dc 8006 8004 800b -8012 8018 8019 801c 8021 8028 803f 803b -804a 8046 8052 8058 805a 805f 8062 8068 -8073 8072 8070 8076 8079 807d 807f 8084 -8086 8085 809b 8093 809a 80ad 5190 80ac -80db 80e5 80d9 80dd 80c4 80da 80d6 8109 -80ef 80f1 811b 8129 8123 812f 814b -1 - -1 -1 -1 -1 -1 968b 8146 813e -8153 8151 80fc 8171 816e 8165 8166 8174 -8183 8188 818a 8180 8182 81a0 8195 81a4 -81a3 815f 8193 81a9 81b0 81b5 81be 81b8 -81bd 81c0 81c2 81ba 81c9 81cd 81d1 81d9 -81d8 81c8 81da 81df 81e0 81e7 81fa 81fb -81fe 8201 8202 8205 8207 820a 820d 8210 -8216 8229 822b 8238 8233 8240 8259 8258 -825d 825a 825f 8264 8262 8268 826a 826b -822e 8271 8277 8278 827e 828d 8292 82ab -829f 82bb 82ac 82e1 82e3 82df 82d2 82f4 -82f3 82fa 8393 8303 82fb 82f9 82de 8306 -82dc 8309 82d9 -1 -1 -1 -1 -1 - -1 8335 8334 8316 8332 8331 8340 8339 -8350 8345 832f 832b 8317 8318 8385 839a -83aa 839f 83a2 8396 8323 838e 8387 838a -837c 83b5 8373 8375 83a0 8389 83a8 83f4 -8413 83eb 83ce 83fd 8403 83d8 840b 83c1 -83f7 8407 83e0 83f2 840d 8422 8420 83bd -8438 8506 83fb 846d 842a 843c 855a 8484 -8477 846b 84ad 846e 8482 8469 8446 842c -846f 8479 8435 84ca 8462 84b9 84bf 849f -84d9 84cd 84bb 84da 84d0 84c1 84c6 84d6 -84a1 8521 84ff 84f4 8517 8518 852c 851f -8515 8514 84fc 8540 8563 8558 8548 -1 - -1 -1 -1 -1 -1 8541 8602 854b -8555 8580 85a4 8588 8591 858a 85a8 856d -8594 859b 85ea 8587 859c 8577 857e 8590 -85c9 85ba 85cf 85b9 85d0 85d5 85dd 85e5 -85dc 85f9 860a 8613 860b 85fe 85fa 8606 -8622 861a 8630 863f 864d 4e55 8654 865f -8667 8671 8693 86a3 86a9 86aa 868b 868c -86b6 86af 86c4 86c6 86b0 86c9 8823 86ab -86d4 86de 86e9 86ec 86df 86db 86ef 8712 -8706 8708 8700 8703 86fb 8711 8709 870d -86f9 870a 8734 873f 8737 873b 8725 8729 -871a 8760 875f 8778 874c 874e 8774 8757 -8768 876e 8759 -1 -1 -1 -1 -1 - -1 8753 8763 876a 8805 87a2 879f 8782 -87af 87cb 87bd 87c0 87d0 96d6 87ab 87c4 -87b3 87c7 87c6 87bb 87ef 87f2 87e0 880f -880d 87fe 87f6 87f7 880e 87d2 8811 8816 -8815 8822 8821 8831 8836 8839 8827 883b -8844 8842 8852 8859 885e 8862 886b 8881 -887e 889e 8875 887d 88b5 8872 8882 8897 -8892 88ae 8899 88a2 888d 88a4 88b0 88bf -88b1 88c3 88c4 88d4 88d8 88d9 88dd 88f9 -8902 88fc 88f4 88e8 88f2 8904 890c 890a -8913 8943 891e 8925 892a 892b 8941 8944 -893b 8936 8938 894c 891d 8960 895e -1 - -1 -1 -1 -1 -1 8966 8964 896d -896a 896f 8974 8977 897e 8983 8988 898a -8993 8998 89a1 89a9 89a6 89ac 89af 89b2 -89ba 89bd 89bf 89c0 89da 89dc 89dd 89e7 -89f4 89f8 8a03 8a16 8a10 8a0c 8a1b 8a1d -8a25 8a36 8a41 8a5b 8a52 8a46 8a48 8a7c -8a6d 8a6c 8a62 8a85 8a82 8a84 8aa8 8aa1 -8a91 8aa5 8aa6 8a9a 8aa3 8ac4 8acd 8ac2 -8ada 8aeb 8af3 8ae7 8ae4 8af1 8b14 8ae0 -8ae2 8af7 8ade 8adb 8b0c 8b07 8b1a 8ae1 -8b16 8b10 8b17 8b20 8b33 97ab 8b26 8b2b -8b3e 8b28 8b41 8b4c 8b4f 8b4e 8b49 8b56 -8b5b 8b5a 8b6b -1 -1 -1 -1 -1 - -1 8b5f 8b6c 8b6f 8b74 8b7d 8b80 8b8c -8b8e 8b92 8b93 8b96 8b99 8b9a 8c3a 8c41 -8c3f 8c48 8c4c 8c4e 8c50 8c55 8c62 8c6c -8c78 8c7a 8c82 8c89 8c85 8c8a 8c8d 8c8e -8c94 8c7c 8c98 621d 8cad 8caa 8cbd 8cb2 -8cb3 8cae 8cb6 8cc8 8cc1 8ce4 8ce3 8cda -8cfd 8cfa 8cfb 8d04 8d05 8d0a 8d07 8d0f -8d0d 8d10 9f4e 8d13 8ccd 8d14 8d16 8d67 -8d6d 8d71 8d73 8d81 8d99 8dc2 8dbe 8dba -8dcf 8dda 8dd6 8dcc 8ddb 8dcb 8dea 8deb -8ddf 8de3 8dfc 8e08 8e09 8dff 8e1d 8e1e -8e10 8e1f 8e42 8e35 8e30 8e34 8e4a -1 - -1 -1 -1 -1 -1 8e47 8e49 8e4c -8e50 8e48 8e59 8e64 8e60 8e2a 8e63 8e55 -8e76 8e72 8e7c 8e81 8e87 8e85 8e84 8e8b -8e8a 8e93 8e91 8e94 8e99 8eaa 8ea1 8eac -8eb0 8ec6 8eb1 8ebe 8ec5 8ec8 8ecb 8edb -8ee3 8efc 8efb 8eeb 8efe 8f0a 8f05 8f15 -8f12 8f19 8f13 8f1c 8f1f 8f1b 8f0c 8f26 -8f33 8f3b 8f39 8f45 8f42 8f3e 8f4c 8f49 -8f46 8f4e 8f57 8f5c 8f62 8f63 8f64 8f9c -8f9f 8fa3 8fad 8faf 8fb7 8fda 8fe5 8fe2 -8fea 8fef 9087 8ff4 9005 8ff9 8ffa 9011 -9015 9021 900d 901e 9016 900b 9027 9036 -9035 9039 8ff8 -1 -1 -1 -1 -1 - -1 904f 9050 9051 9052 900e 9049 903e -9056 9058 905e 9068 906f 9076 96a8 9072 -9082 907d 9081 9080 908a 9089 908f 90a8 -90af 90b1 90b5 90e2 90e4 6248 90db 9102 -9112 9119 9132 9130 914a 9156 9158 9163 -9165 9169 9173 9172 918b 9189 9182 91a2 -91ab 91af 91aa 91b5 91b4 91ba 91c0 91c1 -91c9 91cb 91d0 91d6 91df 91e1 91db 91fc -91f5 91f6 921e 91ff 9214 922c 9215 9211 -925e 9257 9245 9249 9264 9248 9295 923f -924b 9250 929c 9296 9293 929b 925a 92cf -92b9 92b7 92e9 930f 92fa 9344 932e -1 - -1 -1 -1 -1 -1 9319 9322 931a -9323 933a 9335 933b 935c 9360 937c 936e -9356 93b0 93ac 93ad 9394 93b9 93d6 93d7 -93e8 93e5 93d8 93c3 93dd 93d0 93c8 93e4 -941a 9414 9413 9403 9407 9410 9436 942b -9435 9421 943a 9441 9452 9444 945b 9460 -9462 945e 946a 9229 9470 9475 9477 947d -945a 947c 947e 9481 947f 9582 9587 958a -9594 9596 9598 9599 95a0 95a8 95a7 95ad -95bc 95bb 95b9 95be 95ca 6ff6 95c3 95cd -95cc 95d5 95d4 95d6 95dc 95e1 95e5 95e2 -9621 9628 962e 962f 9642 964c 964f 964b -9677 965c 965e -1 -1 -1 -1 -1 - -1 965d 965f 9666 9672 966c 968d 9698 -9695 9697 96aa 96a7 96b1 96b2 96b0 96b4 -96b6 96b8 96b9 96ce 96cb 96c9 96cd 894d -96dc 970d 96d5 96f9 9704 9706 9708 9713 -970e 9711 970f 9716 9719 9724 972a 9730 -9739 973d 973e 9744 9746 9748 9742 9749 -975c 9760 9764 9766 9768 52d2 976b 9771 -9779 9785 977c 9781 977a 9786 978b 978f -9790 979c 97a8 97a6 97a3 97b3 97b4 97c3 -97c6 97c8 97cb 97dc 97ed 9f4f 97f2 7adf -97f6 97f5 980f 980c 9838 9824 9821 9837 -983d 9846 984f 984b 986b 986f 9870 -1 - -1 -1 -1 -1 -1 9871 9874 9873 -98aa 98af 98b1 98b6 98c4 98c3 98c6 98e9 -98eb 9903 9909 9912 9914 9918 9921 991d -991e 9924 9920 992c 992e 993d 993e 9942 -9949 9945 9950 994b 9951 9952 994c 9955 -9997 9998 99a5 99ad 99ae 99bc 99df 99db -99dd 99d8 99d1 99ed 99ee 99f1 99f2 99fb -99f8 9a01 9a0f 9a05 99e2 9a19 9a2b 9a37 -9a45 9a42 9a40 9a43 9a3e 9a55 9a4d 9a5b -9a57 9a5f 9a62 9a65 9a64 9a69 9a6b 9a6a -9aad 9ab0 9abc 9ac0 9acf 9ad1 9ad3 9ad4 -9ade 9adf 9ae2 9ae3 9ae6 9aef 9aeb 9aee -9af4 9af1 9af7 -1 -1 -1 -1 -1 - -1 9afb 9b06 9b18 9b1a 9b1f 9b22 9b23 -9b25 9b27 9b28 9b29 9b2a 9b2e 9b2f 9b32 -9b44 9b43 9b4f 9b4d 9b4e 9b51 9b58 9b74 -9b93 9b83 9b91 9b96 9b97 9b9f 9ba0 9ba8 -9bb4 9bc0 9bca 9bb9 9bc6 9bcf 9bd1 9bd2 -9be3 9be2 9be4 9bd4 9be1 9c3a 9bf2 9bf1 -9bf0 9c15 9c14 9c09 9c13 9c0c 9c06 9c08 -9c12 9c0a 9c04 9c2e 9c1b 9c25 9c24 9c21 -9c30 9c47 9c32 9c46 9c3e 9c5a 9c60 9c67 -9c76 9c78 9ce7 9cec 9cf0 9d09 9d08 9ceb -9d03 9d06 9d2a 9d26 9daf 9d23 9d1f 9d44 -9d15 9d12 9d41 9d3f 9d3e 9d46 9d48 -1 - -1 -1 -1 -1 -1 9d5d 9d5e 9d64 -9d51 9d50 9d59 9d72 9d89 9d87 9dab 9d6f -9d7a 9d9a 9da4 9da9 9db2 9dc4 9dc1 9dbb -9db8 9dba 9dc6 9dcf 9dc2 9dd9 9dd3 9df8 -9de6 9ded 9def 9dfd 9e1a 9e1b 9e1e 9e75 -9e79 9e7d 9e81 9e88 9e8b 9e8c 9e92 9e95 -9e91 9e9d 9ea5 9ea9 9eb8 9eaa 9ead 9761 -9ecc 9ece 9ecf 9ed0 9ed4 9edc 9ede 9edd -9ee0 9ee5 9ee8 9eef 9ef4 9ef6 9ef7 9ef9 -9efb 9efc 9efd 9f07 9f08 76b7 9f15 9f21 -9f2c 9f3e 9f4a 9f52 9f54 9f63 9f5f 9f60 -9f61 9f66 9f67 9f6c 9f6a 9f77 9f72 9f76 -9f95 9f9c 9fa0 -1 -1 -1 -1 -1 - -1 582f 69c7 9059 7464 51dc 7199 diff --git a/xc/nls/XLC_LOCALE/ksc5601 b/xc/nls/XLC_LOCALE/ksc5601 deleted file mode 100644 index 2b573b912..000000000 --- a/xc/nls/XLC_LOCALE/ksc5601 +++ /dev/null @@ -1,973 +0,0 @@ - 3000 3001 3002 00b7 2025 2026 00a8 3003 00ad - 2015 2225 ff3c 223c 2018 2019 201c 201d 3014 - 3015 3008 3009 300a 300b 300c 300d 300e 300f - 3010 3011 00b1 00d7 00f7 2260 2264 2265 221e - 2234 00b0 2032 2033 2103 212b ffe0 ffe1 ffe5 - 2642 2640 2220 22a5 2312 2202 2207 2261 2252 - 00a7 203b 2606 2605 25cb 25cf 25ce 25c7 25c6 - 25a1 25a0 25b3 25b2 25bd 25bc 2192 2190 2191 - 2193 2194 3013 226a 226b 221a 223d 221d 2235 - 222b 222c 2208 220b 2286 2287 2282 2283 222a - 2229 2227 2228 ffe2 21d2 21d4 2200 2203 00b4 - ff5e 02c7 02d8 02dd 02da 02d9 00b8 02db 00a1 - 00bf 02d0 222e 2211 220f 00a4 2109 2030 25c1 - 25c0 25b7 25b6 2664 2660 2661 2665 2667 2663 - 25c9 25c8 25a3 25d0 25d1 2592 25a4 25a5 25a8 - 25a7 25a6 25a9 2668 260f 260e 261c 261e 00b6 - 2020 2021 2195 2197 2199 2196 2198 266d 2669 - 266a 266c 327f 321c 2116 33c7 2122 33c2 33d8 - 2121 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 ff01 - ff02 ff03 ff04 ff05 ff06 ff07 ff08 ff09 ff0a - ff0b ff0c ff0d ff0e ff0f ff10 ff11 ff12 ff13 - ff14 ff15 ff16 ff17 ff18 ff19 ff1a ff1b ff1c - ff1d ff1e ff1f ff20 ff21 ff22 ff23 ff24 ff25 - ff26 ff27 ff28 ff29 ff2a ff2b ff2c ff2d ff2e - ff2f ff30 ff31 ff32 ff33 ff34 ff35 ff36 ff37 - ff38 ff39 ff3a ff3b ffe6 ff3d ff3e ff3f ff40 - ff41 ff42 ff43 ff44 ff45 ff46 ff47 ff48 ff49 - ff4a ff4b ff4c ff4d ff4e ff4f ff50 ff51 ff52 - ff53 ff54 ff55 ff56 ff57 ff58 ff59 ff5a ff5b - ff5c ff5d ffe3 3131 3132 3133 3134 3135 3136 - 3137 3138 3139 313a 313b 313c 313d 313e 313f - 3140 3141 3142 3143 3144 3145 3146 3147 3148 - 3149 314a 314b 314c 314d 314e 314f 3150 3151 - 3152 3153 3154 3155 3156 3157 3158 3159 315a - 315b 315c 315d 315e 315f 3160 3161 3162 3163 - 3164 3165 3166 3167 3168 3169 316a 316b 316c - 316d 316e 316f 3170 3171 3172 3173 3174 3175 - 3176 3177 3178 3179 317a 317b 317c 317d 317e - 317f 3180 3181 3182 3183 3184 3185 3186 3187 - 3188 3189 318a 318b 318c 318d 318e 2170 2171 - 2172 2173 2174 2175 2176 2177 2178 2179 0000 - 0000 0000 0000 0000 2160 2161 2162 2163 2164 - 2165 2166 2167 2168 2169 0000 0000 0000 0000 - 0000 0000 0000 0391 0392 0393 0394 0395 0396 - 0397 0398 0399 039a 039b 039c 039d 039e 039f - 03a0 03a1 03a3 03a4 03a5 03a6 03a7 03a8 03a9 - 0000 0000 0000 0000 0000 0000 0000 0000 03b1 - 03b2 03b3 03b4 03b5 03b6 03b7 03b8 03b9 03ba - 03bb 03bc 03bd 03be 03bf 03c0 03c1 03c3 03c4 - 03c5 03c6 03c7 03c8 03c9 0000 0000 0000 0000 - 0000 0000 2500 2502 250c 2510 2518 2514 251c - 252c 2524 2534 253c 2501 2503 250f 2513 251b - 2517 2523 2533 252b 253b 254b 2520 252f 2528 - 2537 253f 251d 2530 2525 2538 2542 2512 2511 - 251a 2519 2516 2515 250e 250d 251e 251f 2521 - 2522 2526 2527 2529 252a 252d 252e 2531 2532 - 2535 2536 2539 253a 253d 253e 2540 2541 2543 - 2544 2545 2546 2547 2548 2549 254a 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 3395 3396 3397 - 2113 3398 33c4 33a3 33a4 33a5 33a6 3399 339a - 339b 339c 339d 339e 339f 33a0 33a1 33a2 33ca - 338d 338e 338f 33cf 3388 3389 33c8 33a7 33a8 - 33b0 33b1 33b2 33b3 33b4 33b5 33b6 33b7 33b8 - 33b9 3380 3381 3382 3383 3384 33ba 33bb 33bc - 33bd 33be 33bf 3390 3391 3392 3393 3394 2126 - 33c0 33c1 338a 338b 338c 33d6 33c5 33ad 33ae - 33af 33db 33a9 33aa 33ab 33ac 33dd 33d0 33d3 - 33c3 33c9 33dc 33c6 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 00c6 00d0 00aa 0126 0000 0132 0000 013f - 0141 00d8 0152 00ba 00de 0166 014a 0000 3260 - 3261 3262 3263 3264 3265 3266 3267 3268 3269 - 326a 326b 326c 326d 326e 326f 3270 3271 3272 - 3273 3274 3275 3276 3277 3278 3279 327a 327b - 24d0 24d1 24d2 24d3 24d4 24d5 24d6 24d7 24d8 - 24d9 24da 24db 24dc 24dd 24de 24df 24e0 24e1 - 24e2 24e3 24e4 24e5 24e6 24e7 24e8 24e9 2460 - 2461 2462 2463 2464 2465 2466 2467 2468 2469 - 246a 246b 246c 246d 246e 00bd 2153 2154 00bc - 00be 215b 215c 215d 215e 00e6 0111 00f0 0127 - 0131 0133 0138 0140 0142 00f8 0153 00df 00fe - 0167 014b 0149 3200 3201 3202 3203 3204 3205 - 3206 3207 3208 3209 320a 320b 320c 320d 320e - 320f 3210 3211 3212 3213 3214 3215 3216 3217 - 3218 3219 321a 321b 249c 249d 249e 249f 24a0 - 24a1 24a2 24a3 24a4 24a5 24a6 24a7 24a8 24a9 - 24aa 24ab 24ac 24ad 24ae 24af 24b0 24b1 24b2 - 24b3 24b4 24b5 2474 2475 2476 2477 2478 2479 - 247a 247b 247c 247d 247e 247f 2480 2481 2482 - 00b9 00b2 00b3 2074 207f 2081 2082 2083 2084 - 3041 3042 3043 3044 3045 3046 3047 3048 3049 - 304a 304b 304c 304d 304e 304f 3050 3051 3052 - 3053 3054 3055 3056 3057 3058 3059 305a 305b - 305c 305d 305e 305f 3060 3061 3062 3063 3064 - 3065 3066 3067 3068 3069 306a 306b 306c 306d - 306e 306f 3070 3071 3072 3073 3074 3075 3076 - 3077 3078 3079 307a 307b 307c 307d 307e 307f - 3080 3081 3082 3083 3084 3085 3086 3087 3088 - 3089 308a 308b 308c 308d 308e 308f 3090 3091 - 3092 3093 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 30a1 30a2 30a3 30a4 30a5 - 30a6 30a7 30a8 30a9 30aa 30ab 30ac 30ad 30ae - 30af 30b0 30b1 30b2 30b3 30b4 30b5 30b6 30b7 - 30b8 30b9 30ba 30bb 30bc 30bd 30be 30bf 30c0 - 30c1 30c2 30c3 30c4 30c5 30c6 30c7 30c8 30c9 - 30ca 30cb 30cc 30cd 30ce 30cf 30d0 30d1 30d2 - 30d3 30d4 30d5 30d6 30d7 30d8 30d9 30da 30db - 30dc 30dd 30de 30df 30e0 30e1 30e2 30e3 30e4 - 30e5 30e6 30e7 30e8 30e9 30ea 30eb 30ec 30ed - 30ee 30ef 30f0 30f1 30f2 30f3 30f4 30f5 30f6 - 0000 0000 0000 0000 0000 0000 0000 0000 0410 - 0411 0412 0413 0414 0415 0401 0416 0417 0418 - 0419 041a 041b 041c 041d 041e 041f 0420 0421 - 0422 0423 0424 0425 0426 0427 0428 0429 042a - 042b 042c 042d 042e 042f 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0430 0431 0432 0433 0434 0435 0451 - 0436 0437 0438 0439 043a 043b 043c 043d 043e - 043f 0440 0441 0442 0443 0444 0445 0446 0447 - 0448 0449 044a 044b 044c 044d 044e 044f 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 3400 3401 3402 - 3403 3404 3405 3406 3407 3408 3409 340a 340b - 340c 340d 340e 340f 3410 3411 3412 3413 3414 - 3415 3416 3417 3418 3419 341a 341b 341c 341d - 341e 341f 3420 3421 3422 3423 3424 3425 3426 - 3427 3428 3429 342a 342b 342c 342d 342e 342f - 3430 3431 3432 3433 3434 3435 3436 3437 3438 - 3439 343a 343b 343c 343d 343e 343f 3440 3441 - 3442 3443 3444 3445 3446 3447 3448 3449 344a - 344b 344c 344d 344e 344f 3450 3451 3452 3453 - 3454 3455 3456 3457 3458 3459 345a 345b 345c - 345d 345e 345f 3460 3461 3462 3463 3464 3465 - 3466 3467 3468 3469 346a 346b 346c 346d 346e - 346f 3470 3471 3472 3473 3474 3475 3476 3477 - 3478 3479 347a 347b 347c 347d 347e 347f 3480 - 3481 3482 3483 3484 3485 3486 3487 3488 3489 - 348a 348b 348c 348d 348e 348f 3490 3491 3492 - 3493 3494 3495 3496 3497 3498 3499 349a 349b - 349c 349d 349e 349f 34a0 34a1 34a2 34a3 34a4 - 34a5 34a6 34a7 34a8 34a9 34aa 34ab 34ac 34ad - 34ae 34af 34b0 34b1 34b2 34b3 34b4 34b5 34b6 - 34b7 34b8 34b9 34ba 34bb 34bc 34bd 34be 34bf - 34c0 34c1 34c2 34c3 34c4 34c5 34c6 34c7 34c8 - 34c9 34ca 34cb 34cc 34cd 34ce 34cf 34d0 34d1 - 34d2 34d3 34d4 34d5 34d6 34d7 34d8 34d9 34da - 34db 34dc 34dd 34de 34df 34e0 34e1 34e2 34e3 - 34e4 34e5 34e6 34e7 34e8 34e9 34ea 34eb 34ec - 34ed 34ee 34ef 34f0 34f1 34f2 34f3 34f4 34f5 - 34f6 34f7 34f8 34f9 34fa 34fb 34fc 34fd 34fe - 34ff 3500 3501 3502 3503 3504 3505 3506 3507 - 3508 3509 350a 350b 350c 350d 350e 350f 3510 - 3511 3512 3513 3514 3515 3516 3517 3518 3519 - 351a 351b 351c 351d 351e 351f 3520 3521 3522 - 3523 3524 3525 3526 3527 3528 3529 352a 352b - 352c 352d 352e 352f 3530 3531 3532 3533 3534 - 3535 3536 3537 3538 3539 353a 353b 353c 353d - 353e 353f 3540 3541 3542 3543 3544 3545 3546 - 3547 3548 3549 354a 354b 354c 354d 354e 354f - 3550 3551 3552 3553 3554 3555 3556 3557 3558 - 3559 355a 355b 355c 355d 355e 355f 3560 3561 - 3562 3563 3564 3565 3566 3567 3568 3569 356a - 356b 356c 356d 356e 356f 3570 3571 3572 3573 - 3574 3575 3576 3577 3578 3579 357a 357b 357c - 357d 357e 357f 3580 3581 3582 3583 3584 3585 - 3586 3587 3588 3589 358a 358b 358c 358d 358e - 358f 3590 3591 3592 3593 3594 3595 3596 3597 - 3598 3599 359a 359b 359c 359d 359e 359f 35a0 - 35a1 35a2 35a3 35a4 35a5 35a6 35a7 35a8 35a9 - 35aa 35ab 35ac 35ad 35ae 35af 35b0 35b1 35b2 - 35b3 35b4 35b5 35b6 35b7 35b8 35b9 35ba 35bb - 35bc 35bd 35be 35bf 35c0 35c1 35c2 35c3 35c4 - 35c5 35c6 35c7 35c8 35c9 35ca 35cb 35cc 35cd - 35ce 35cf 35d0 35d1 35d2 35d3 35d4 35d5 35d6 - 35d7 35d8 35d9 35da 35db 35dc 35dd 35de 35df - 35e0 35e1 35e2 35e3 35e4 35e5 35e6 35e7 35e8 - 35e9 35ea 35eb 35ec 35ed 35ee 35ef 35f0 35f1 - 35f2 35f3 35f4 35f5 35f6 35f7 35f8 35f9 35fa - 35fb 35fc 35fd 35fe 35ff 3600 3601 3602 3603 - 3604 3605 3606 3607 3608 3609 360a 360b 360c - 360d 360e 360f 3610 3611 3612 3613 3614 3615 - 3616 3617 3618 3619 361a 361b 361c 361d 361e - 361f 3620 3621 3622 3623 3624 3625 3626 3627 - 3628 3629 362a 362b 362c 362d 362e 362f 3630 - 3631 3632 3633 3634 3635 3636 3637 3638 3639 - 363a 363b 363c 363d 363e 363f 3640 3641 3642 - 3643 3644 3645 3646 3647 3648 3649 364a 364b - 364c 364d 364e 364f 3650 3651 3652 3653 3654 - 3655 3656 3657 3658 3659 365a 365b 365c 365d - 365e 365f 3660 3661 3662 3663 3664 3665 3666 - 3667 3668 3669 366a 366b 366c 366d 366e 366f - 3670 3671 3672 3673 3674 3675 3676 3677 3678 - 3679 367a 367b 367c 367d 367e 367f 3680 3681 - 3682 3683 3684 3685 3686 3687 3688 3689 368a - 368b 368c 368d 368e 368f 3690 3691 3692 3693 - 3694 3695 3696 3697 3698 3699 369a 369b 369c - 369d 369e 369f 36a0 36a1 36a2 36a3 36a4 36a5 - 36a6 36a7 36a8 36a9 36aa 36ab 36ac 36ad 36ae - 36af 36b0 36b1 36b2 36b3 36b4 36b5 36b6 36b7 - 36b8 36b9 36ba 36bb 36bc 36bd 36be 36bf 36c0 - 36c1 36c2 36c3 36c4 36c5 36c6 36c7 36c8 36c9 - 36ca 36cb 36cc 36cd 36ce 36cf 36d0 36d1 36d2 - 36d3 36d4 36d5 36d6 36d7 36d8 36d9 36da 36db - 36dc 36dd 36de 36df 36e0 36e1 36e2 36e3 36e4 - 36e5 36e6 36e7 36e8 36e9 36ea 36eb 36ec 36ed - 36ee 36ef 36f0 36f1 36f2 36f3 36f4 36f5 36f6 - 36f7 36f8 36f9 36fa 36fb 36fc 36fd 36fe 36ff - 3700 3701 3702 3703 3704 3705 3706 3707 3708 - 3709 370a 370b 370c 370d 370e 370f 3710 3711 - 3712 3713 3714 3715 3716 3717 3718 3719 371a - 371b 371c 371d 371e 371f 3720 3721 3722 3723 - 3724 3725 3726 3727 3728 3729 372a 372b 372c - 372d 372e 372f 3730 3731 3732 3733 3734 3735 - 3736 3737 3738 3739 373a 373b 373c 373d 373e - 373f 3740 3741 3742 3743 3744 3745 3746 3747 - 3748 3749 374a 374b 374c 374d 374e 374f 3750 - 3751 3752 3753 3754 3755 3756 3757 3758 3759 - 375a 375b 375c 375d 375e 375f 3760 3761 3762 - 3763 3764 3765 3766 3767 3768 3769 376a 376b - 376c 376d 376e 376f 3770 3771 3772 3773 3774 - 3775 3776 3777 3778 3779 377a 377b 377c 377d - 377e 377f 3780 3781 3782 3783 3784 3785 3786 - 3787 3788 3789 378a 378b 378c 378d 378e 378f - 3790 3791 3792 3793 3794 3795 3796 3797 3798 - 3799 379a 379b 379c 379d 379e 379f 37a0 37a1 - 37a2 37a3 37a4 37a5 37a6 37a7 37a8 37a9 37aa - 37ab 37ac 37ad 37ae 37af 37b0 37b1 37b2 37b3 - 37b4 37b5 37b6 37b7 37b8 37b9 37ba 37bb 37bc - 37bd 37be 37bf 37c0 37c1 37c2 37c3 37c4 37c5 - 37c6 37c7 37c8 37c9 37ca 37cb 37cc 37cd 37ce - 37cf 37d0 37d1 37d2 37d3 37d4 37d5 37d6 37d7 - 37d8 37d9 37da 37db 37dc 37dd 37de 37df 37e0 - 37e1 37e2 37e3 37e4 37e5 37e6 37e7 37e8 37e9 - 37ea 37eb 37ec 37ed 37ee 37ef 37f0 37f1 37f2 - 37f3 37f4 37f5 37f6 37f7 37f8 37f9 37fa 37fb - 37fc 37fd 37fe 37ff 3800 3801 3802 3803 3804 - 3805 3806 3807 3808 3809 380a 380b 380c 380d - 380e 380f 3810 3811 3812 3813 3814 3815 3816 - 3817 3818 3819 381a 381b 381c 381d 381e 381f - 3820 3821 3822 3823 3824 3825 3826 3827 3828 - 3829 382a 382b 382c 382d 382e 382f 3830 3831 - 3832 3833 3834 3835 3836 3837 3838 3839 383a - 383b 383c 383d 383e 383f 3840 3841 3842 3843 - 3844 3845 3846 3847 3848 3849 384a 384b 384c - 384d 384e 384f 3850 3851 3852 3853 3854 3855 - 3856 3857 3858 3859 385a 385b 385c 385d 385e - 385f 3860 3861 3862 3863 3864 3865 3866 3867 - 3868 3869 386a 386b 386c 386d 386e 386f 3870 - 3871 3872 3873 3874 3875 3876 3877 3878 3879 - 387a 387b 387c 387d 387e 387f 3880 3881 3882 - 3883 3884 3885 3886 3887 3888 3889 388a 388b - 388c 388d 388e 388f 3890 3891 3892 3893 3894 - 3895 3896 3897 3898 3899 389a 389b 389c 389d - 389e 389f 38a0 38a1 38a2 38a3 38a4 38a5 38a6 - 38a7 38a8 38a9 38aa 38ab 38ac 38ad 38ae 38af - 38b0 38b1 38b2 38b3 38b4 38b5 38b6 38b7 38b8 - 38b9 38ba 38bb 38bc 38bd 38be 38bf 38c0 38c1 - 38c2 38c3 38c4 38c5 38c6 38c7 38c8 38c9 38ca - 38cb 38cc 38cd 38ce 38cf 38d0 38d1 38d2 38d3 - 38d4 38d5 38d6 38d7 38d8 38d9 38da 38db 38dc - 38dd 38de 38df 38e0 38e1 38e2 38e3 38e4 38e5 - 38e6 38e7 38e8 38e9 38ea 38eb 38ec 38ed 38ee - 38ef 38f0 38f1 38f2 38f3 38f4 38f5 38f6 38f7 - 38f8 38f9 38fa 38fb 38fc 38fd 38fe 38ff 3900 - 3901 3902 3903 3904 3905 3906 3907 3908 3909 - 390a 390b 390c 390d 390e 390f 3910 3911 3912 - 3913 3914 3915 3916 3917 3918 3919 391a 391b - 391c 391d 391e 391f 3920 3921 3922 3923 3924 - 3925 3926 3927 3928 3929 392a 392b 392c 392d - 392e 392f 3930 3931 3932 3933 3934 3935 3936 - 3937 3938 3939 393a 393b 393c 393d 393e 393f - 3940 3941 3942 3943 3944 3945 3946 3947 3948 - 3949 394a 394b 394c 394d 394e 394f 3950 3951 - 3952 3953 3954 3955 3956 3957 3958 3959 395a - 395b 395c 395d 395e 395f 3960 3961 3962 3963 - 3964 3965 3966 3967 3968 3969 396a 396b 396c - 396d 396e 396f 3970 3971 3972 3973 3974 3975 - 3976 3977 3978 3979 397a 397b 397c 397d 397e - 397f 3980 3981 3982 3983 3984 3985 3986 3987 - 3988 3989 398a 398b 398c 398d 398e 398f 3990 - 3991 3992 3993 3994 3995 3996 3997 3998 3999 - 399a 399b 399c 399d 399e 399f 39a0 39a1 39a2 - 39a3 39a4 39a5 39a6 39a7 39a8 39a9 39aa 39ab - 39ac 39ad 39ae 39af 39b0 39b1 39b2 39b3 39b4 - 39b5 39b6 39b7 39b8 39b9 39ba 39bb 39bc 39bd - 39be 39bf 39c0 39c1 39c2 39c3 39c4 39c5 39c6 - 39c7 39c8 39c9 39ca 39cb 39cc 39cd 39ce 39cf - 39d0 39d1 39d2 39d3 39d4 39d5 39d6 39d7 39d8 - 39d9 39da 39db 39dc 39dd 39de 39df 39e0 39e1 - 39e2 39e3 39e4 39e5 39e6 39e7 39e8 39e9 39ea - 39eb 39ec 39ed 39ee 39ef 39f0 39f1 39f2 39f3 - 39f4 39f5 39f6 39f7 39f8 39f9 39fa 39fb 39fc - 39fd 39fe 39ff 3a00 3a01 3a02 3a03 3a04 3a05 - 3a06 3a07 3a08 3a09 3a0a 3a0b 3a0c 3a0d 3a0e - 3a0f 3a10 3a11 3a12 3a13 3a14 3a15 3a16 3a17 - 3a18 3a19 3a1a 3a1b 3a1c 3a1d 3a1e 3a1f 3a20 - 3a21 3a22 3a23 3a24 3a25 3a26 3a27 3a28 3a29 - 3a2a 3a2b 3a2c 3a2d 3a2e 3a2f 3a30 3a31 3a32 - 3a33 3a34 3a35 3a36 3a37 3a38 3a39 3a3a 3a3b - 3a3c 3a3d 3a3e 3a3f 3a40 3a41 3a42 3a43 3a44 - 3a45 3a46 3a47 3a48 3a49 3a4a 3a4b 3a4c 3a4d - 3a4e 3a4f 3a50 3a51 3a52 3a53 3a54 3a55 3a56 - 3a57 3a58 3a59 3a5a 3a5b 3a5c 3a5d 3a5e 3a5f - 3a60 3a61 3a62 3a63 3a64 3a65 3a66 3a67 3a68 - 3a69 3a6a 3a6b 3a6c 3a6d 3a6e 3a6f 3a70 3a71 - 3a72 3a73 3a74 3a75 3a76 3a77 3a78 3a79 3a7a - 3a7b 3a7c 3a7d 3a7e 3a7f 3a80 3a81 3a82 3a83 - 3a84 3a85 3a86 3a87 3a88 3a89 3a8a 3a8b 3a8c - 3a8d 3a8e 3a8f 3a90 3a91 3a92 3a93 3a94 3a95 - 3a96 3a97 3a98 3a99 3a9a 3a9b 3a9c 3a9d 3a9e - 3a9f 3aa0 3aa1 3aa2 3aa3 3aa4 3aa5 3aa6 3aa7 - 3aa8 3aa9 3aaa 3aab 3aac 3aad 3aae 3aaf 3ab0 - 3ab1 3ab2 3ab3 3ab4 3ab5 3ab6 3ab7 3ab8 3ab9 - 3aba 3abb 3abc 3abd 3abe 3abf 3ac0 3ac1 3ac2 - 3ac3 3ac4 3ac5 3ac6 3ac7 3ac8 3ac9 3aca 3acb - 3acc 3acd 3ace 3acf 3ad0 3ad1 3ad2 3ad3 3ad4 - 3ad5 3ad6 3ad7 3ad8 3ad9 3ada 3adb 3adc 3add - 3ade 3adf 3ae0 3ae1 3ae2 3ae3 3ae4 3ae5 3ae6 - 3ae7 3ae8 3ae9 3aea 3aeb 3aec 3aed 3aee 3aef - 3af0 3af1 3af2 3af3 3af4 3af5 3af6 3af7 3af8 - 3af9 3afa 3afb 3afc 3afd 3afe 3aff 3b00 3b01 - 3b02 3b03 3b04 3b05 3b06 3b07 3b08 3b09 3b0a - 3b0b 3b0c 3b0d 3b0e 3b0f 3b10 3b11 3b12 3b13 - 3b14 3b15 3b16 3b17 3b18 3b19 3b1a 3b1b 3b1c - 3b1d 3b1e 3b1f 3b20 3b21 3b22 3b23 3b24 3b25 - 3b26 3b27 3b28 3b29 3b2a 3b2b 3b2c 3b2d 3b2e - 3b2f 3b30 3b31 3b32 3b33 3b34 3b35 3b36 3b37 - 3b38 3b39 3b3a 3b3b 3b3c 3b3d 3b3e 3b3f 3b40 - 3b41 3b42 3b43 3b44 3b45 3b46 3b47 3b48 3b49 - 3b4a 3b4b 3b4c 3b4d 3b4e 3b4f 3b50 3b51 3b52 - 3b53 3b54 3b55 3b56 3b57 3b58 3b59 3b5a 3b5b - 3b5c 3b5d 3b5e 3b5f 3b60 3b61 3b62 3b63 3b64 - 3b65 3b66 3b67 3b68 3b69 3b6a 3b6b 3b6c 3b6d - 3b6e 3b6f 3b70 3b71 3b72 3b73 3b74 3b75 3b76 - 3b77 3b78 3b79 3b7a 3b7b 3b7c 3b7d 3b7e 3b7f - 3b80 3b81 3b82 3b83 3b84 3b85 3b86 3b87 3b88 - 3b89 3b8a 3b8b 3b8c 3b8d 3b8e 3b8f 3b90 3b91 - 3b92 3b93 3b94 3b95 3b96 3b97 3b98 3b99 3b9a - 3b9b 3b9c 3b9d 3b9e 3b9f 3ba0 3ba1 3ba2 3ba3 - 3ba4 3ba5 3ba6 3ba7 3ba8 3ba9 3baa 3bab 3bac - 3bad 3bae 3baf 3bb0 3bb1 3bb2 3bb3 3bb4 3bb5 - 3bb6 3bb7 3bb8 3bb9 3bba 3bbb 3bbc 3bbd 3bbe - 3bbf 3bc0 3bc1 3bc2 3bc3 3bc4 3bc5 3bc6 3bc7 - 3bc8 3bc9 3bca 3bcb 3bcc 3bcd 3bce 3bcf 3bd0 - 3bd1 3bd2 3bd3 3bd4 3bd5 3bd6 3bd7 3bd8 3bd9 - 3bda 3bdb 3bdc 3bdd 3bde 3bdf 3be0 3be1 3be2 - 3be3 3be4 3be5 3be6 3be7 3be8 3be9 3bea 3beb - 3bec 3bed 3bee 3bef 3bf0 3bf1 3bf2 3bf3 3bf4 - 3bf5 3bf6 3bf7 3bf8 3bf9 3bfa 3bfb 3bfc 3bfd - 3bfe 3bff 3c00 3c01 3c02 3c03 3c04 3c05 3c06 - 3c07 3c08 3c09 3c0a 3c0b 3c0c 3c0d 3c0e 3c0f - 3c10 3c11 3c12 3c13 3c14 3c15 3c16 3c17 3c18 - 3c19 3c1a 3c1b 3c1c 3c1d 3c1e 3c1f 3c20 3c21 - 3c22 3c23 3c24 3c25 3c26 3c27 3c28 3c29 3c2a - 3c2b 3c2c 3c2d 3c2e 3c2f 3c30 3c31 3c32 3c33 - 3c34 3c35 3c36 3c37 3c38 3c39 3c3a 3c3b 3c3c - 3c3d 3c3e 3c3f 3c40 3c41 3c42 3c43 3c44 3c45 - 3c46 3c47 3c48 3c49 3c4a 3c4b 3c4c 3c4d 3c4e - 3c4f 3c50 3c51 3c52 3c53 3c54 3c55 3c56 3c57 - 3c58 3c59 3c5a 3c5b 3c5c 3c5d 3c5e 3c5f 3c60 - 3c61 3c62 3c63 3c64 3c65 3c66 3c67 3c68 3c69 - 3c6a 3c6b 3c6c 3c6d 3c6e 3c6f 3c70 3c71 3c72 - 3c73 3c74 3c75 3c76 3c77 3c78 3c79 3c7a 3c7b - 3c7c 3c7d 3c7e 3c7f 3c80 3c81 3c82 3c83 3c84 - 3c85 3c86 3c87 3c88 3c89 3c8a 3c8b 3c8c 3c8d - 3c8e 3c8f 3c90 3c91 3c92 3c93 3c94 3c95 3c96 - 3c97 3c98 3c99 3c9a 3c9b 3c9c 3c9d 3c9e 3c9f - 3ca0 3ca1 3ca2 3ca3 3ca4 3ca5 3ca6 3ca7 3ca8 - 3ca9 3caa 3cab 3cac 3cad 3cae 3caf 3cb0 3cb1 - 3cb2 3cb3 3cb4 3cb5 3cb6 3cb7 3cb8 3cb9 3cba - 3cbb 3cbc 3cbd 3cbe 3cbf 3cc0 3cc1 3cc2 3cc3 - 3cc4 3cc5 3cc6 3cc7 3cc8 3cc9 3cca 3ccb 3ccc - 3ccd 3cce 3ccf 3cd0 3cd1 3cd2 3cd3 3cd4 3cd5 - 3cd6 3cd7 3cd8 3cd9 3cda 3cdb 3cdc 3cdd 3cde - 3cdf 3ce0 3ce1 3ce2 3ce3 3ce4 3ce5 3ce6 3ce7 - 3ce8 3ce9 3cea 3ceb 3cec 3ced 3cee 3cef 3cf0 - 3cf1 3cf2 3cf3 3cf4 3cf5 3cf6 3cf7 3cf8 3cf9 - 3cfa 3cfb 3cfc 3cfd 3cfe 3cff 3d00 3d01 3d02 - 3d03 3d04 3d05 3d06 3d07 3d08 3d09 3d0a 3d0b - 3d0c 3d0d 3d0e 3d0f 3d10 3d11 3d12 3d13 3d14 - 3d15 3d16 3d17 3d18 3d19 3d1a 3d1b 3d1c 3d1d - 3d1e 3d1f 3d20 3d21 3d22 3d23 3d24 3d25 3d26 - 3d27 3d28 3d29 3d2a 3d2b 3d2c 3d2d 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 - 0000 0000 4f3d 4f73 5047 50f9 52a0 53ef 5475 - 54e5 5609 5ac1 5bb6 6687 67b6 67b7 67ef 6b4c - 73c2 75c2 7a3c 82db 8304 8857 8888 8a36 8cc8 - 8dcf 8efb 8fe6 99d5 523b 5374 5404 606a 6164 - 6bbc 73cf 811a 89ba 89d2 95a3 4f83 520a 58be - 5978 59e6 5e72 5e79 61c7 63c0 6746 67ec 687f - 6f97 764e 770b 78f5 7a08 7aff 7c21 809d 826e - 8271 8aeb 9593 4e6b 559d 66f7 6e34 78a3 7aed - 845b 8910 874e 97a8 52d8 574e 582a 5d4c 611f - 61be 6221 6562 67d1 6a44 6e1b 7518 75b3 76e3 - 77b0 7d3a 90af 9451 9452 9f95 5323 5cac 7532 - 80db 9240 9598 525b 5808 59dc 5ca1 5d17 5eb7 - 5f3a 5f4a 6177 6c5f 757a 7586 7ce0 7d73 7db1 - 7f8c 8154 8221 8591 8941 8b1b 92fc 964d 9c47 - 4ecb 4ef7 500b 51f1 584f 6137 613e 6168 6539 - 69ea 6f11 75a5 7686 76d6 7b87 82a5 84cb f900 - 93a7 958b 5580 5ba2 5751 f901 7cb3 7fb9 91b5 - 5028 53bb 5c45 5de8 62d2 636e 64da 64e7 6e20 - 70ac 795b 8ddd 8e1e f902 907d 9245 92f8 4e7e - 4ef6 5065 5dfe 5efa 6106 6957 8171 8654 8e47 - 9375 9a2b 4e5e 5091 6770 6840 5109 528d 5292 - 6aa2 77bc 9210 9ed4 52ab 602f 8ff2 5048 61a9 - 63ed 64ca 683c 6a84 6fc0 8188 89a1 9694 5805 - 727d 72ac 7504 7d79 7e6d 80a9 898b 8b74 9063 - 9d51 6289 6c7a 6f54 7d50 7f3a 8a23 517c 614a - 7b9d 8b19 9257 938c 4eac 4fd3 501e 50be 5106 - 52c1 52cd 537f 5770 5883 5e9a 5f91 6176 61ac - 64ce 656c 666f 66bb 66f4 6897 6d87 7085 70f1 - 749f 74a5 74ca 75d9 786c 78ec 7adf 7af6 7d45 - 7d93 8015 803f 811b 8396 8b66 8f15 9015 93e1 - 9803 9838 9a5a 9be8 4fc2 5553 583a 5951 5b63 - 5c46 60b8 6212 6842 68b0 68e8 6eaa 754c 7678 - 78ce 7a3d 7cfb 7e6b 7e7c 8a08 8aa1 8c3f 968e - 9dc4 53e4 53e9 544a 5471 56fa 59d1 5b64 5c3b - 5eab 62f7 6537 6545 6572 66a0 67af 69c1 6cbd - 75fc 7690 777e 7a3f 7f94 8003 80a1 818f 82e6 - 82fd 83f0 85c1 8831 88b4 8aa5 f903 8f9c 932e - 96c7 9867 9ad8 9f13 54ed 659b 66f2 688f 7a40 - 8c37 9d60 56f0 5764 5d11 6606 68b1 68cd 6efe - 7428 889e 9be4 6c68 f904 9aa8 4f9b 516c 5171 - 529f 5b54 5de5 6050 606d 62f1 63a7 653b 73d9 - 7a7a 86a3 8ca2 978f 4e32 5be1 6208 679c 74dc - 79d1 83d3 8a87 8ab2 8de8 904e 934b 9846 5ed3 - 69e8 85ff 90ed f905 51a0 5b98 5bec 6163 68fa - 6b3e 704c 742f 74d8 7ba1 7f50 83c5 89c0 8cab - 95dc 9928 522e 605d 62ec 9002 4f8a 5149 5321 - 58d9 5ee3 66e0 6d38 709a 72c2 73d6 7b50 80f1 - 945b 5366 639b 7f6b 4e56 5080 584a 58de 602a - 6127 62d0 69d0 9b41 5b8f 7d18 80b1 8f5f 4ea4 - 50d1 54ac 55ac 5b0c 5da0 5de7 652a 654e 6821 - 6a4b 72e1 768e 77ef 7d5e 7ff9 81a0 854e 86df - 8f03 8f4e 90ca 9903 9a55 9bab 4e18 4e45 4e5d - 4ec7 4ff1 5177 52fe 5340 53e3 53e5 548e 5614 - 5775 57a2 5bc7 5d87 5ed0 61fc 62d8 6551 67b8 - 67e9 69cb 6b50 6bc6 6bec 6c42 6e9d 7078 72d7 - 7396 7403 77bf 77e9 7a76 7d7f 8009 81fc 8205 - 820a 82df 8862 8b33 8cfc 8ec0 9011 90b1 9264 - 92b6 99d2 9a45 9ce9 9dd7 9f9c 570b 5c40 83ca - 97a0 97ab 9eb4 541b 7a98 7fa4 88d9 8ecd 90e1 - 5800 5c48 6398 7a9f 5bae 5f13 7a79 7aae 828e - 8eac 5026 5238 52f8 5377 5708 62f3 6372 6b0a - 6dc3 7737 53a5 7357 8568 8e76 95d5 673a 6ac3 - 6f70 8a6d 8ecc 994b f906 6677 6b78 8cb4 9b3c - f907 53eb 572d 594e 63c6 69fb 73ea 7845 7aba - 7ac5 7cfe 8475 898f 8d73 9035 95a8 52fb 5747 - 7547 7b60 83cc 921e f908 6a58 514b 524b 5287 - 621f 68d8 6975 9699 50c5 52a4 52e4 61c3 65a4 - 6839 69ff 747e 7b4b 82b9 83eb 89b2 8b39 8fd1 - 9949 f909 4eca 5997 64d2 6611 6a8e 7434 7981 - 79bd 82a9 887e 887f 895f f90a 9326 4f0b 53ca - 6025 6271 6c72 7d1a 7d66 4e98 5162 77dc 80af - 4f01 4f0e 5176 5180 55dc 5668 573b 57fa 57fc - 5914 5947 5993 5bc4 5c90 5d0e 5df1 5e7e 5fcc - 6280 65d7 65e3 671e 671f 675e 68cb 68c4 6a5f - 6b3a 6c23 6c7d 6c82 6dc7 7398 7426 742a 7482 - 74a3 7578 757f 7881 78ef 7941 7947 7948 797a - 7b95 7d00 7dba 7f88 8006 802d 808c 8a18 8b4f - 8c48 8d77 9321 9324 98e2 9951 9a0e 9a0f 9a65 - 9e92 7dca 4f76 5409 62ee 6854 91d1 55ab 513a - f90b f90c 5a1c 61e6 f90d 62cf 62ff f90e f90f - f910 f911 f912 f913 90a3 f914 f915 f916 f917 - f918 8afe f919 f91a f91b f91c 6696 f91d 7156 - f91e f91f 96e3 f920 634f 637a 5357 f921 678f - 6960 6e73 f922 7537 f923 f924 f925 7d0d f926 - f927 8872 56ca 5a18 f928 f929 f92a f92b f92c - 4e43 f92d 5167 5948 67f0 8010 f92e 5973 5e74 - 649a 79ca 5ff5 606c 62c8 637b 5be7 5bd7 52aa - f92f 5974 5f29 6012 f930 f931 f932 7459 f933 - f934 f935 f936 f937 f938 99d1 f939 f93a f93b - f93c f93d f93e f93f f940 f941 f942 f943 6fc3 - f944 f945 81bf 8fb2 60f1 f946 f947 8166 f948 - f949 5c3f f94a f94b f94c f94d f94e f94f f950 - f951 5ae9 8a25 677b 7d10 f952 f953 f954 f955 - f956 f957 80fd f958 f959 5c3c 6ce5 533f 6eba - 591a 8336 4e39 4eb6 4f46 55ae 5718 58c7 5f56 - 65b7 65e6 6a80 6bb5 6e4d 77ed 7aef 7c1e 7dde - 86cb 8892 9132 935b 64bb 6fbe 737a 75b8 9054 - 5556 574d 61ba 64d4 66c7 6de1 6e5b 6f6d 6fb9 - 75f0 8043 81bd 8541 8983 8ac7 8b5a 931f 6c93 - 7553 7b54 8e0f 905d 5510 5802 5858 5e62 6207 - 649e 68e0 7576 7cd6 87b3 9ee8 4ee3 5788 576e - 5927 5c0d 5cb1 5e36 5f85 6234 64e1 73b3 81fa - 888b 8cb8 968a 9edb 5b85 5fb7 60b3 5012 5200 - 5230 5716 5835 5857 5c0e 5c60 5cf6 5d8b 5ea6 - 5f92 60bc 6311 6389 6417 6843 68f9 6ac2 6dd8 - 6e21 6ed4 6fe4 71fe 76dc 7779 79b1 7a3b 8404 - 89a9 8ced 8df3 8e48 9003 9014 9053 90fd 934d - 9676 97dc 6bd2 7006 7258 72a2 7368 7763 79bf - 7be4 7e9b 8b80 58a9 60c7 6566 65fd 66be 6c8c - 711e 71c9 8c5a 9813 4e6d 7a81 4edd 51ac 51cd - 52d5 540c 61a7 6771 6850 68df 6d1e 6f7c 75bc - 77b3 7ae5 80f4 8463 9285 515c 6597 675c 6793 - 75d8 7ac7 8373 f95a 8c46 9017 982d 5c6f 81c0 - 829a 9041 906f 920d 5f97 5d9d 6a59 71c8 767b - 7b49 85e4 8b04 9127 9a30 5587 61f6 f95b 7669 - 7f85 863f 87ba 88f8 908f f95c 6d1b 70d9 73de - 7d61 843d f95d 916a 99f1 f95e 4e82 5375 6b04 - 6b12 703e 721b 862d 9e1e 524c 8fa3 5d50 64e5 - 652c 6b16 6feb 7c43 7e9c 85cd 8964 89bd 62c9 - 81d8 881f 5eca 6717 6d6a 72fc 7405 746f 8782 - 90de 4f86 5d0d 5fa0 840a 51b7 63a0 7565 4eae - 5006 5169 51c9 6881 6a11 7cae 7cb1 7ce7 826f - 8ad2 8f1b 91cf 4fb6 5137 52f5 5442 5eec 616e - 623e 65c5 6ada 6ffe 792a 85dc 8823 95ad 9a62 - 9a6a 9e97 9ece 529b 66c6 6b77 701d 792b 8f62 - 9742 6190 6200 6523 6f23 7149 7489 7df4 806f - 84ee 8f26 9023 934a 51bd 5217 52a3 6d0c 70c8 - 88c2 5ec9 6582 6bae 6fc2 7c3e 7375 4ee4 4f36 - 56f9 f95f 5cba 5dba 601c 73b2 7b2d 7f9a 7fce - 8046 901e 9234 96f6 9748 9818 9f61 4f8b 6fa7 - 79ae 91b4 96b7 52de f960 6488 64c4 6ad3 6f5e - 7018 7210 76e7 8001 8606 865c 8def 8f05 9732 - 9b6f 9dfa 9e75 788c 797f 7da0 83c9 9304 9e7f - 9e93 8ad6 58df 5f04 6727 7027 74cf 7c60 807e - 5121 7028 7262 78ca 8cc2 8cda 8cf4 96f7 4e86 - 50da 5bee 5ed6 6599 71ce 7642 77ad 804a 84fc - 907c 9b27 9f8d 58d8 5a41 5c62 6a13 6dda 6f0f - 763b 7d2f 7e37 851e 8938 93e4 964b 5289 65d2 - 67f3 69b4 6d41 6e9c 700f 7409 7460 7559 7624 - 786b 8b2c 985e 516d 622e 9678 4f96 502b 5d19 - 6dea 7db8 8f2a 5f8b 6144 6817 f961 9686 52d2 - 808b 51dc 51cc 695e 7a1c 7dbe 83f1 9675 4fda - 5229 5398 540f 550e 5c65 60a7 674e 68a8 6d6c - 7281 72f8 7406 7483 f962 75e2 7c6c 7f79 7fb8 - 8389 88cf 88e1 91cc 91d0 96e2 9bc9 541d 6f7e - 71d0 7498 85fa 8eaa 96a3 9c57 9e9f 6797 6dcb - 7433 81e8 9716 782c 7acb 7b20 7c92 6469 746a - 75f2 78bc 78e8 99ac 9b54 9ebb 5bde 5e55 6f20 - 819c 83ab 9088 4e07 534d 5a29 5dd2 5f4e 6162 - 633d 6669 66fc 6eff 6f2b 7063 779e 842c 8513 - 883b 8f13 9945 9c3b 551c 62b9 672b 6cab 8309 - 896a 977a 4ea1 5984 5fd8 5fd9 671b 7db2 7f54 - 8292 832b 83bd 8f1e 9099 57cb 59b9 5a92 5bd0 - 6627 679a 6885 6bcf 7164 7f75 8cb7 8ce3 9081 - 9b45 8108 8c8a 964c 9a40 9ea5 5b5f 6c13 731b - 76f2 76df 840c 51aa 8993 514d 5195 52c9 68c9 - 6c94 7704 7720 7dbf 7dec 9762 9eb5 6ec5 8511 - 51a5 540d 547d 660e 669d 6927 6e9f 76bf 7791 - 8317 84c2 879f 9169 9298 9cf4 8882 4fae 5192 - 52df 59c6 5e3d 6155 6478 6479 66ae 67d0 6a21 - 6bcd 6bdb 725f 7261 7441 7738 77db 8017 82bc - 8305 8b00 8b28 8c8c 6728 6c90 7267 76ee 7766 - 7a46 9da9 6b7f 6c92 5922 6726 8499 536f 5893 - 5999 5edf 63cf 6634 6773 6e3a 732b 7ad7 82d7 - 9328 52d9 5deb 61ae 61cb 620a 62c7 64ab 65e0 - 6959 6b66 6bcb 7121 73f7 755d 7e46 821e 8302 - 856a 8aa3 8cbf 9727 9d61 58a8 9ed8 5011 520e - 543b 554f 6587 6c76 7d0a 7d0b 805e 868a 9580 - 96ef 52ff 6c95 7269 5473 5a9a 5c3e 5d4b 5f4c - 5fae 672a 68b6 6963 6e3c 6e44 7709 7c73 7f8e - 8587 8b0e 8ff7 9761 9ef4 5cb7 60b6 610d 61ab - 654f 65fb 65fc 6c11 6cef 739f 73c9 7de1 9594 - 5bc6 871c 8b10 525d 535a 62cd 640f 64b2 6734 - 6a38 6cca 73c0 749e 7b94 7c95 7e1b 818a 8236 - 8584 8feb 96f9 99c1 4f34 534a 53cd 53db 62cc - 642c 6500 6591 69c3 6cee 6f58 73ed 7554 7622 - 76e4 76fc 78d0 78fb 792c 7d46 822c 87e0 8fd4 - 9812 98ef 52c3 62d4 64a5 6e24 6f51 767c 8dcb - 91b1 9262 9aee 9b43 5023 508d 574a 59a8 5c28 - 5e47 5f77 623f 653e 65b9 65c1 6609 678b 699c - 6ec2 78c5 7d21 80aa 8180 822b 82b3 84a1 868c - 8a2a 8b17 90a6 9632 9f90 500d 4ff3 f963 57f9 - 5f98 62dc 6392 676f 6e43 7119 76c3 80cc 80da - 88f4 88f5 8919 8ce0 8f29 914d 966a 4f2f 4f70 - 5e1b 67cf 6822 767d 767e 9b44 5e61 6a0a 7169 - 71d4 756a f964 7e41 8543 85e9 98dc 4f10 7b4f - 7f70 95a5 51e1 5e06 68b5 6c3e 6c4e 6cdb 72af - 7bc4 8303 6cd5 743a 50fb 5288 58c1 64d8 6a97 - 74a7 7656 78a7 8617 95e2 9739 f965 535e 5f01 - 8b8a 8fa8 8faf 908a 5225 77a5 9c49 9f08 4e19 - 5002 5175 5c5b 5e77 661e 663a 67c4 68c5 70b3 - 7501 75c5 79c9 7add 8f27 9920 9a08 4fdd 5821 - 5831 5bf6 666e 6b65 6d11 6e7a 6f7d 73e4 752b - 83e9 88dc 8913 8b5c 8f14 4f0f 50d5 5310 535c - 5b93 5fa9 670d 798f 8179 832f 8514 8907 8986 - 8f39 8f3b 99a5 9c12 672c 4e76 4ff8 5949 5c01 - 5cef 5cf0 6367 68d2 70fd 71a2 742b 7e2b 84ec - 8702 9022 92d2 9cf3 4e0d 4ed8 4fef 5085 5256 - 526f 5426 5490 57e0 592b 5a66 5b5a 5b75 5bcc - 5e9c f966 6276 6577 65a7 6d6e 6ea5 7236 7b26 - 7c3f 7f36 8150 8151 819a 8240 8299 83a9 8a03 - 8ca0 8ce6 8cfb 8d74 8dba 90e8 91dc 961c 9644 - 99d9 9ce7 5317 5206 5429 5674 58b3 5954 596e - 5fff 61a4 626e 6610 6c7e 711a 76c6 7c89 7cde - 7d1b 82ac 8cc1 96f0 f967 4f5b 5f17 5f7f 62c2 - 5d29 670b 68da 787c 7e43 9d6c 4e15 5099 5315 - 532a 5351 5983 5a62 5e87 60b2 618a 6249 6279 - 6590 6787 69a7 6bd4 6bd6 6bd7 6bd8 6cb8 f968 - 7435 75fa 7812 7891 79d5 79d8 7c83 7dcb 7fe1 - 80a5 813e 81c2 83f2 871a 88e8 8ab9 8b6c 8cbb - 9119 975e 98db 9f3b 56ac 5b2a 5f6c 658c 6ab3 - 6baf 6d5c 6ff1 7015 725d 73ad 8ca7 8cd3 983b - 6191 6c37 8058 9a01 4e4d 4e8b 4e9b 4ed5 4f3a - 4f3c 4f7f 4fdf 50ff 53f2 53f8 5506 55e3 56db - 58eb 5962 5a11 5beb 5bfa 5c04 5df3 5e2b 5f99 - 601d 6368 659c 65af 67f6 67fb 68ad 6b7b 6c99 - 6cd7 6e23 7009 7345 7802 793e 7940 7960 79c1 - 7be9 7d17 7d72 8086 820d 838e 84d1 86c7 88df - 8a50 8a5e 8b1d 8cdc 8d66 8fad 90aa 98fc 99df - 9e9d 524a f969 6714 f96a 5098 522a 5c71 6563 - 6c55 73ca 7523 759d 7b97 849c 9178 9730 4e77 - 6492 6bba 715e 85a9 4e09 f96b 6749 68ee 6e17 - 829f 8518 886b 63f7 6f81 9212 98af 4e0a 50b7 - 50cf 511f 5546 55aa 5617 5b40 5c19 5ce0 5e38 - 5e8a 5ea0 5ec2 60f3 6851 6a61 6e58 723d 7240 - 72c0 76f8 7965 7bb1 7fd4 88f3 89f4 8a73 8c61 - 8cde 971c 585e 74bd 8cfd 55c7 f96c 7a61 7d22 - 8272 7272 751f 7525 f96d 7b19 5885 58fb 5dbc - 5e8f 5eb6 5f90 6055 6292 637f 654d 6691 66d9 - 66f8 6816 68f2 7280 745e 7b6e 7d6e 7dd6 7f72 - 80e5 8212 85af 897f 8a93 901d 92e4 9ecd 9f20 - 5915 596d 5e2d 60dc 6614 6673 6790 6c50 6dc5 - 6f5f 77f3 78a9 84c6 91cb 932b 4ed9 50ca 5148 - 5584 5b0b 5ba3 6247 657e 65cb 6e32 717d 7401 - 7444 7487 74bf 766c 79aa 7dda 7e55 7fa8 817a - 81b3 8239 861a 87ec 8a75 8de3 9078 9291 9425 - 994d 9bae 5368 5c51 6954 6cc4 6d29 6e2b 820c - 859b 893b 8a2d 8aaa 96ea 9f67 5261 66b9 6bb2 - 7e96 87fe 8d0d 9583 965d 651d 6d89 71ee f96e - 57ce 59d3 5bac 6027 60fa 6210 661f 665f 7329 - 73f9 76db 7701 7b6c 8056 8072 8165 8aa0 9192 - 4e16 52e2 6b72 6d17 7a05 7b39 7d30 f96f 8cb0 - 53ec 562f 5851 5bb5 5c0f 5c11 5de2 6240 6383 - 6414 662d 68b3 6cbc 6d88 6eaf 701f 70a4 71d2 - 7526 758f 758e 7619 7b11 7be0 7c2b 7d20 7d39 - 852c 856d 8607 8a34 900d 9061 90b5 92b7 97f6 - 9a37 4fd7 5c6c 675f 6d91 7c9f 7e8c 8b16 8d16 - 901f 5b6b 5dfd 640d 84c0 905c 98e1 7387 5b8b - 609a 677e 6dde 8a1f 8aa6 9001 980c 5237 f970 - 7051 788e 9396 8870 91d7 4fee 53d7 55fd 56da - 5782 58fd 5ac2 5b88 5cab 5cc0 5e25 6101 620d - 624b 6388 641c 6536 6578 6a39 6b8a 6c34 6d19 - 6f31 71e7 72e9 7378 7407 74b2 7626 7761 79c0 - 7a57 7aea 7cb9 7d8f 7dac 7e61 7f9e 8129 8331 - 8490 84da 85ea 8896 8ab0 8b90 8f38 9042 9083 - 916c 9296 92b9 968b 96a7 96a8 96d6 9700 9808 - 9996 9ad3 9b1a 53d4 587e 5919 5b70 5bbf 6dd1 - 6f5a 719f 7421 74b9 8085 83fd 5de1 5f87 5faa - 6042 65ec 6812 696f 6a53 6b89 6d35 6df3 73e3 - 76fe 77ac 7b4d 7d14 8123 821c 8340 84f4 8563 - 8a62 8ac4 9187 931e 9806 99b4 620c 8853 8ff0 - 9265 5d07 5d27 5d69 745f 819d 8768 6fd5 62fe - 7fd2 8936 8972 4e1e 4e58 50e7 52dd 5347 627f - 6607 7e69 8805 965e 4f8d 5319 5636 59cb 5aa4 - 5c38 5c4e 5c4d 5e02 5f11 6043 65bd 662f 6642 - 67be 67f4 731c 77e2 793a 7fc5 8494 84cd 8996 - 8a66 8a69 8ae1 8c55 8c7a 57f4 5bd4 5f0f 606f - 62ed 690d 6b96 6e5c 7184 7bd2 8755 8b58 8efe - 98df 98fe 4f38 4f81 4fe1 547b 5a20 5bb8 613c - 65b0 6668 71fc 7533 795e 7d33 814e 81e3 8398 - 85aa 85ce 8703 8a0a 8eab 8f9b f971 8fc5 5931 - 5ba4 5be6 6089 5be9 5c0b 5fc3 6c81 f972 6df1 - 700b 751a 82af 8af6 4ec0 5341 f973 96d9 6c0f - 4e9e 4fc4 5152 555e 5a25 5ce8 6211 7259 82bd - 83aa 86fe 8859 8a1d 963f 96c5 9913 9d09 9d5d - 580a 5cb3 5dbd 5e44 60e1 6115 63e1 6a02 6e25 - 9102 9354 984e 9c10 9f77 5b89 5cb8 6309 664f - 6848 773c 96c1 978d 9854 9b9f 65a1 8b01 8ecb - 95bc 5535 5ca9 5dd6 5eb5 6697 764c 83f4 95c7 - 58d3 62bc 72ce 9d28 4ef0 592e 600f 663b 6b83 - 79e7 9d26 5393 54c0 57c3 5d16 611b 66d6 6daf - 788d 827e 9698 9744 5384 627c 6396 6db2 7e0a - 814b 984d 6afb 7f4c 9daf 9e1a 4e5f 503b 51b6 - 591c 60f9 63f6 6930 723a 8036 f974 91ce 5f31 - f975 f976 7d04 82e5 846f 84bb 85e5 8e8d f977 - 4f6f f978 f979 58e4 5b43 6059 63da 6518 656d - 6698 f97a 694a 6a23 6d0b 7001 716c 75d2 760d - 79b3 7a70 f97b 7f8a f97c 8944 f97d 8b93 91c0 - 967d f97e 990a 5704 5fa1 65bc 6f01 7600 79a6 - 8a9e 99ad 9b5a 9f6c 5104 61b6 6291 6a8d 81c6 - 5043 5830 5f66 7109 8a00 8afa 5b7c 8616 4ffa - 513c 56b4 5944 63a9 6df9 5daa 696d 5186 4e88 - 4f59 f97f f980 f981 5982 f982 f983 6b5f 6c5d - f984 74b5 7916 f985 8207 8245 8339 8f3f 8f5d - f986 9918 f987 f988 f989 4ea6 f98a 57df 5f79 - 6613 f98b f98c 75ab 7e79 8b6f f98d 9006 9a5b - 56a5 5827 59f8 5a1f 5bb4 f98e 5ef6 f98f f990 - 6350 633b f991 693d 6c87 6cbf 6d8e 6d93 6df5 - 6f14 f992 70df 7136 7159 f993 71c3 71d5 f994 - 784f 786f f995 7b75 7de3 f996 7e2f f997 884d - 8edf f998 f999 f99a 925b f99b 9cf6 f99c f99d - f99e 6085 6d85 f99f 71b1 f9a0 f9a1 95b1 53ad - f9a2 f9a3 f9a4 67d3 f9a5 708e 7130 7430 8276 - 82d2 f9a6 95bb 9ae5 9e7d 66c4 f9a7 71c1 8449 - f9a8 f9a9 584b f9aa f9ab 5db8 5f71 f9ac 6620 - 668e 6979 69ae 6c38 6cf3 6e36 6f41 6fda 701b - 702f 7150 71df 7370 f9ad 745b f9ae 74d4 76c8 - 7a4e 7e93 f9af f9b0 82f1 8a60 8fce f9b1 9348 - f9b2 9719 f9b3 f9b4 4e42 502a f9b5 5208 53e1 - 66f3 6c6d 6fca 730a 777f 7a62 82ae 85dd 8602 - f9b6 88d4 8a63 8b7d 8c6b f9b7 92b3 f9b8 9713 - 9810 4e94 4f0d 4fc9 50b2 5348 543e 5433 55da - 5862 58ba 5967 5a1b 5be4 609f f9b9 61ca 6556 - 65ff 6664 68a7 6c5a 6fb3 70cf 71ac 7352 7b7d - 8708 8aa4 9c32 9f07 5c4b 6c83 7344 7389 923a - 6eab 7465 761f 7a69 7e15 860a 5140 58c5 64c1 - 74ee 7515 7670 7fc1 9095 96cd 9954 6e26 74e6 - 7aa9 7aaa 81e5 86d9 8778 8a1b 5a49 5b8c 5b9b - 68a1 6900 6d63 73a9 7413 742c 7897 7de9 7feb - 8118 8155 839e 8c4c 962e 9811 66f0 5f80 65fa - 6789 6c6a 738b 502d 5a03 6b6a 77ee 5916 5d6c - 5dcd 7325 754f f9ba f9bb 50e5 51f9 582f 592d - 5996 59da 5be5 f9bc f9bd 5da2 62d7 6416 6493 - 64fe f9be 66dc f9bf 6a48 f9c0 71ff 7464 f9c1 - 7a88 7aaf 7e47 7e5e 8000 8170 f9c2 87ef 8981 - 8b20 9059 f9c3 9080 9952 617e 6b32 6d74 7e1f - 8925 8fb1 4fd1 50ad 5197 52c7 57c7 5889 5bb9 - 5eb8 6142 6995 6d8c 6e67 6eb6 7194 7462 7528 - 752c 8073 8338 84c9 8e0a 9394 93de f9c4 4e8e - 4f51 5076 512a 53c8 53cb 53f3 5b87 5bd3 5c24 - 611a 6182 65f4 725b 7397 7440 76c2 7950 7991 - 79b9 7d06 7fbd 828b 85d5 865e 8fc2 9047 90f5 - 91ea 9685 96e8 96e9 52d6 5f67 65ed 6631 682f - 715c 7a36 90c1 980a 4e91 f9c5 6a52 6b9e 6f90 - 7189 8018 82b8 8553 904b 9695 96f2 97fb 851a - 9b31 4e90 718a 96c4 5143 539f 54e1 5713 5712 - 57a3 5a9b 5ac4 5bc3 6028 613f 63f4 6c85 6d39 - 6e72 6e90 7230 733f 7457 82d1 8881 8f45 9060 - f9c6 9662 9858 9d1b 6708 8d8a 925e 4f4d 5049 - 50de 5371 570d 59d4 5a01 5c09 6170 6690 6e2d - 7232 744b 7def 80c3 840e 8466 853f 875f 885b - 8918 8b02 9055 97cb 9b4f 4e73 4f91 5112 516a - f9c7 552f 55a9 5b7a 5ba5 5e7c 5e7d 5ebe 60a0 - 60df 6108 6109 63c4 6538 6709 f9c8 67d4 67da - f9c9 6961 6962 6cb9 6d27 f9ca 6e38 f9cb 6fe1 - 7336 7337 f9cc 745c 7531 f9cd 7652 f9ce f9cf - 7dad 81fe 8438 88d5 8a98 8adb 8aed 8e30 8e42 - 904a 903e 907a 9149 91c9 936e f9d0 f9d1 5809 - f9d2 6bd3 8089 80b2 f9d3 f9d4 5141 596b 5c39 - f9d5 f9d6 6f64 73a7 80e4 8d07 f9d7 9217 958f - f9d8 f9d9 f9da f9db 807f 620e 701c 7d68 878d - f9dc 57a0 6069 6147 6bb7 8abe 9280 96b1 4e59 - 541f 6deb 852d 9670 97f3 98ee 63d6 6ce3 9091 - 51dd 61c9 81ba 9df9 4f9d 501a 5100 5b9c 610f - 61ff 64ec 6905 6bc5 7591 77e3 7fa9 8264 858f - 87fb 8863 8abc 8b70 91ab 4e8c 4ee5 4f0a f9dd - f9de 5937 59e8 f9df 5df2 5f1b 5f5b 6021 f9e0 - f9e1 f9e2 f9e3 723e 73e5 f9e4 7570 75cd f9e5 - 79fb f9e6 800c 8033 8084 82e1 8351 f9e7 f9e8 - 8cbd 8cb3 9087 f9e9 f9ea 98f4 990c f9eb f9ec - 7037 76ca 7fca 7fcc 7ffc 8b1a 4eba 4ec1 5203 - 5370 f9ed 54bd 56e0 59fb 5bc5 5f15 5fcd 6e6e - f9ee f9ef 7d6a 8335 f9f0 8693 8a8d f9f1 976d - 9777 f9f2 f9f3 4e00 4f5a 4f7e 58f9 65e5 6ea2 - 9038 93b0 99b9 4efb 58ec 598a 59d9 6041 f9f4 - f9f5 7a14 f9f6 834f 8cc3 5165 5344 f9f7 f9f8 - f9f9 4ecd 5269 5b55 82bf 4ed4 523a 54a8 59c9 - 59ff 5b50 5b57 5b5c 6063 6148 6ecb 7099 716e - 7386 74f7 75b5 78c1 7d2b 8005 81ea 8328 8517 - 85c9 8aee 8cc7 96cc 4f5c 52fa 56bc 65ab 6628 - 707c 70b8 7235 7dbd 828d 914c 96c0 9d72 5b71 - 68e7 6b98 6f7a 76de 5c91 66ab 6f5b 7bb4 7c2a - 8836 96dc 4e08 4ed7 5320 5834 58bb 58ef 596c - 5c07 5e33 5e84 5f35 638c 66b2 6756 6a1f 6aa3 - 6b0c 6f3f 7246 f9fa 7350 748b 7ae0 7ca7 8178 - 81df 81e7 838a 846c 8523 8594 85cf 88dd 8d13 - 91ac 9577 969c 518d 54c9 5728 5bb0 624d 6750 - 683d 6893 6e3d 6ed3 707d 7e21 88c1 8ca1 8f09 - 9f4b 9f4e 722d 7b8f 8acd 931a 4f47 4f4e 5132 - 5480 59d0 5e95 62b5 6775 696e 6a17 6cae 6e1a - 72d9 732a 75bd 7bb8 7d35 82e7 83f9 8457 85f7 - 8a5b 8caf 8e87 9019 90b8 96ce 9f5f 52e3 540a - 5ae1 5bc2 6458 6575 6ef4 72c4 f9fb 7684 7a4d - 7b1b 7c4d 7e3e 7fdf 837b 8b2b 8cca 8d64 8de1 - 8e5f 8fea 8ff9 9069 93d1 4f43 4f7a 50b3 5168 - 5178 524d 526a 5861 587c 5960 5c08 5c55 5edb - 609b 6230 6813 6bbf 6c08 6fb1 714e 7420 7530 - 7538 7551 7672 7b4c 7b8b 7bad 7bc6 7e8f 8a6e - 8f3e 8f49 923f 9293 9322 942b 96fb 985a 986b - 991e 5207 622a 6298 6d59 7664 7aca 7bc0 7d76 - 5360 5cbe 5e97 6f38 70b9 7c98 9711 9b8e 9ede - 63a5 647a 8776 4e01 4e95 4ead 505c 5075 5448 - 59c3 5b9a 5e40 5ead 5ef7 5f81 60c5 633a 653f - 6574 65cc 6676 6678 67fe 6968 6a89 6b63 6c40 - 6dc0 6de8 6e1f 6e5e 701e 70a1 738e 73fd 753a - 775b 7887 798e 7a0b 7a7d 7cbe 7d8e 8247 8a02 - 8aea 8c9e 912d 914a 91d8 9266 92cc 9320 9706 - 9756 975c 9802 9f0e 5236 5291 557c 5824 5e1d - 5f1f 608c 63d0 68af 6fdf 796d 7b2c 81cd 85ba - 88fd 8af8 8e44 918d 9664 969b 973d 984c 9f4a - 4fce 5146 51cb 52a9 5632 5f14 5f6b 63aa 64cd - 65e9 6641 66fa 66f9 671d 689d 68d7 69fd 6f15 - 6f6e 7167 71e5 722a 74aa 773a 7956 795a 79df - 7a20 7a95 7c97 7cdf 7d44 7e70 8087 85fb 86a4 - 8a54 8abf 8d99 8e81 9020 906d 91e3 963b 96d5 - 9ce5 65cf 7c07 8db3 93c3 5b58 5c0a 5352 62d9 - 731d 5027 5b97 5f9e 60b0 616b 68d5 6dd9 742e - 7a2e 7d42 7d9c 7e31 816b 8e2a 8e35 937e 9418 - 4f50 5750 5de6 5ea7 632b 7f6a 4e3b 4f4f 4f8f - 505a 59dd 80c4 546a 5468 55fe 594f 5b99 5dde - 5eda 665d 6731 67f1 682a 6ce8 6d32 6e4a 6f8d - 70b7 73e0 7587 7c4c 7d02 7d2c 7da2 821f 86db - 8a3b 8a85 8d70 8e8a 8f33 9031 914e 9152 9444 - 99d0 7af9 7ca5 4fca 5101 51c6 57c8 5bef 5cfb - 6659 6a3d 6d5a 6e96 6fec 710c 756f 7ae3 8822 - 9021 9075 96cb 99ff 8301 4e2d 4ef2 8846 91cd - 537d 6adb 696b 6c41 847a 589e 618e 66fe 62ef - 70dd 7511 75c7 7e52 84b8 8b49 8d08 4e4b 53ea - 54ab 5730 5740 5fd7 6301 6307 646f 652f 65e8 - 667a 679d 67b3 6b62 6c60 6c9a 6f2c 77e5 7825 - 7949 7957 7d19 80a2 8102 81f3 829d 82b7 8718 - 8a8c f9fc 8d04 8dbe 9072 76f4 7a19 7a37 7e54 - 8077 5507 55d4 5875 632f 6422 6649 664b 686d - 699b 6b84 6d25 6eb1 73cd 7468 74a1 755b 75b9 - 76e1 771e 778b 79e6 7e09 7e1d 81fb 852f 8897 - 8a3a 8cd1 8eeb 8fb0 9032 93ad 9663 9673 9707 - 4f84 53f1 59ea 5ac9 5e19 684e 74c6 75be 79e9 - 7a92 81a3 86ed 8cea 8dcc 8fed 659f 6715 f9fd - 57f7 6f57 7ddd 8f2f 93f6 96c6 5fb5 61f2 6f84 - 4e14 4f98 501f 53c9 55df 5d6f 5dee 6b21 6b64 - 78cb 7b9a f9fe 8e49 8eca 906e 6349 643e 7740 - 7a84 932f 947f 9f6a 64b0 6faf 71e6 74a8 74da - 7ac4 7c12 7e82 7cb2 7e98 8b9a 8d0a 947d 9910 - 994c 5239 5bdf 64e6 672d 7d2e 50ed 53c3 5879 - 6158 6159 61fa 65ac 7ad9 8b92 8b96 5009 5021 - 5275 5531 5a3c 5ee0 5f70 6134 655e 660c 6636 - 66a2 69cd 6ec4 6f32 7316 7621 7a93 8139 8259 - 83d6 84bc 50b5 57f0 5bc0 5be8 5f69 63a1 7826 - 7db5 83dc 8521 91c7 91f5 518a 67f5 7b56 8cac - 51c4 59bb 60bd 8655 501c f9ff 5254 5c3a 617d - 621a 62d3 64f2 65a5 6ecc 7620 810a 8e60 965f - 96bb 4edf 5343 5598 5929 5ddd 64c5 6cc9 6dfa - 7394 7a7f 821b 85a6 8ce4 8e10 9077 91e7 95e1 - 9621 97c6 51f8 54f2 5586 5fb9 64a4 6f88 7db4 - 8f1f 8f4d 9435 50c9 5c16 6cbe 6dfb 751b 77bb - 7c3d 7c64 8a79 8ac2 581e 59be 5e16 6377 7252 - 758a 776b 8adc 8cbc 8f12 5ef3 6674 6df8 807d - 83c1 8acb 9751 9bd6 fa00 5243 66ff 6d95 6eef - 7de0 8ae6 902e 905e 9ad4 521d 527f 54e8 6194 - 6284 62db 68a2 6912 695a 6a35 7092 7126 785d - 7901 790e 79d2 7a0d 8096 8278 82d5 8349 8549 - 8c82 8d85 9162 918b 91ae 4fc3 56d1 71ed 77d7 - 8700 89f8 5bf8 5fd6 6751 90a8 53e2 585a 5bf5 - 60a4 6181 6460 7e3d 8070 8525 9283 64ae 50ac - 5d14 6700 589c 62bd 63a8 690e 6978 6a1e 6e6b - 76ba 79cb 82bb 8429 8acf 8da8 8ffd 9112 914b - 919c 9310 9318 939a 96db 9a36 9c0d 4e11 755c - 795d 7afa 7b51 7bc9 7e2e 84c4 8e59 8e74 8ef8 - 9010 6625 693f 7443 51fa 672e 9edc 5145 5fe0 - 6c96 87f2 885d 8877 60b4 81b5 8403 8d05 53d6 - 5439 5634 5a36 5c31 708a 7fe0 805a 8106 81ed - 8da3 9189 9a5f 9df2 5074 4ec4 53a0 60fb 6e2c - 5c64 4f88 5024 55e4 5cd9 5e5f 6065 6894 6cbb - 6dc4 71be 75d4 75f4 7661 7a1a 7a49 7dc7 7dfb - 7f6e 81f4 86a9 8f1c 96c9 99b3 9f52 5247 52c5 - 98ed 89aa 4e03 67d2 6f06 4fb5 5be2 6795 6c88 - 6d78 741b 7827 91dd 937c 87c4 79e4 7a31 5feb - 4ed6 54a4 553e 58ae 59a5 60f0 6253 62d6 6736 - 6955 8235 9640 99b1 99dd 502c 5353 5544 577c - fa01 6258 fa02 64e2 666b 67dd 6fc1 6fef 7422 - 7438 8a17 9438 5451 5606 5766 5f48 619a 6b4e - 7058 70ad 7dbb 8a95 596a 812b 63a2 7708 803d - 8caa 5854 642d 69bb 5b95 5e11 6e6f fa03 8569 - 514c 53f0 592a 6020 614b 6b86 6c70 6cf0 7b1e - 80ce 82d4 8dc6 90b0 98b1 fa04 64c7 6fa4 6491 - 6504 514e 5410 571f 8a0e 615f 6876 fa05 75db - 7b52 7d71 901a 5806 69cc 817f 892a 9000 9839 - 5078 5957 59ac 6295 900f 9b2a 615d 7279 95d6 - 5761 5a46 5df4 628a 64ad 64fa 6777 6ce2 6d3e - 722c 7436 7834 7f77 82ad 8ddb 9817 5224 5742 - 677f 7248 74e3 8ca9 8fa6 9211 962a 516b 53ed - 634c 4f69 5504 6096 6557 6c9b 6d7f 724c 72fd - 7a17 8987 8c9d 5f6d 6f8e 70f9 81a8 610e 4fbf - 504f 6241 7247 7bc7 7de8 7fe9 904d 97ad 9a19 - 8cb6 576a 5e73 67b0 840d 8a55 5420 5b16 5e63 - 5ee2 5f0a 6583 80ba 853d 9589 965b 4f48 5305 - 530d 530f 5486 54fa 5703 5e03 6016 629b 62b1 - 6355 fa06 6ce1 6d66 75b1 7832 80de 812f 82de - 8461 84b2 888d 8912 900b 92ea 98fd 9b91 5e45 - 66b4 66dd 7011 7206 fa07 4ff5 527d 5f6a 6153 - 6753 6a19 6f02 74e2 7968 8868 8c79 98c7 98c4 - 9a43 54c1 7a1f 6953 8af7 8c4a 98a8 99ae 5f7c - 62ab 75b2 76ae 88ab 907f 9642 5339 5f3c 5fc5 - 6ccc 73cc 7562 758b 7b46 82fe 999d 4e4f 903c - 4e0b 4f55 53a6 590f 5ec8 6630 6cb3 7455 8377 - 8766 8cc0 9050 971e 9c15 58d1 5b78 8650 8b14 - 9db4 5bd2 6068 608d 65f1 6c57 6f22 6fa3 701a - 7f55 7ff0 9591 9592 9650 97d3 5272 8f44 51fd - 542b 54b8 5563 558a 6abb 6db5 7dd8 8266 929c - 9677 9e79 5408 54c8 76d2 86e4 95a4 95d4 965c - 4ea2 4f09 59ee 5ae6 5df7 6052 6297 676d 6841 - 6c86 6e2f 7f38 809b 822a fa08 fa09 9805 4ea5 - 5055 54b3 5793 595a 5b69 5bb3 61c8 6977 6d77 - 7023 87f9 89e3 8a72 8ae7 9082 99ed 9ab8 52be - 6838 5016 5e78 674f 8347 884c 4eab 5411 56ae - 73e6 9115 97ff 9909 9957 9999 5653 589f 865b - 8a31 61b2 6af6 737b 8ed2 6b47 96aa 9a57 5955 - 7200 8d6b 9769 4fd4 5cf4 5f26 61f8 665b 6ceb - 70ab 7384 73b9 73fe 7729 774d 7d43 7d62 7e23 - 8237 8852 fa0a 8ce2 9249 986f 5b51 7a74 8840 - 9801 5acc 4fe0 5354 593e 5cfd 633e 6d79 72f9 - 8105 8107 83a2 92cf 9830 4ea8 5144 5211 578b - 5f62 6cc2 6ece 7005 7050 70af 7192 73e9 7469 - 834a 87a2 8861 9008 90a2 93a3 99a8 516e 5f57 - 60e0 6167 66b3 8559 8e4a 91af 978b 4e4e 4e92 - 547c 58d5 58fa 597d 5cb5 5f27 6236 6248 660a - 6667 6beb 6d69 6dcf 6e56 6ef8 6f94 6fe0 6fe9 - 705d 72d0 7425 745a 74e0 7693 795c 7cca 7e1e - 80e1 82a6 846b 84bf 864e 865f 8774 8b77 8c6a - 93ac 9800 9865 60d1 6216 9177 5a5a 660f 6df7 - 6e3e 743f 9b42 5ffd 60da 7b0f 54c4 5f18 6c5e - 6cd3 6d2a 70d8 7d05 8679 8a0c 9d3b 5316 548c - 5b05 6a3a 706b 7575 798d 79be 82b1 83ef 8a71 - 8b41 8ca8 9774 fa0b 64f4 652b 78ba 78bb 7a6b - 4e38 559a 5950 5ba6 5e7b 60a3 63db 6b61 6665 - 6853 6e19 7165 74b0 7d08 9084 9a69 9c25 6d3b - 6ed1 733e 8c41 95ca 51f0 5e4c 5fa8 604d 60f6 - 6130 614c 6643 6644 69a5 6cc1 6e5f 6ec9 6f62 - 714c 749c 7687 7bc1 7c27 8352 8757 9051 968d - 9ec3 532f 56de 5efb 5f8a 6062 6094 61f7 6666 - 6703 6a9c 6dee 6fae 7070 736a 7e6a 81be 8334 - 86d4 8aa8 8cc4 5283 7372 5b96 6a6b 9404 54ee - 5686 5b5d 6548 6585 66c9 689f 6d8d 6dc6 723b - 80b4 9175 9a4d 4faf 5019 539a 540e 543c 5589 - 55c5 5e3f 5f8c 673d 7166 73dd 9005 52db 52f3 - 5864 58ce 7104 718f 71fb 85b0 8a13 6688 85a8 - 55a7 6684 714a 8431 5349 5599 6bc1 5f59 5fbd - 63ee 6689 7147 8af1 8f1d 9ebe 4f11 643a 70cb - 7566 8667 6064 8b4e 9df8 5147 51f6 5308 6d36 - 80f8 9ed1 6615 6b23 7098 75d5 5403 5c79 7d07 - 8a16 6b20 6b3d 6b46 5438 6070 6d3d 7fd5 8208 - 50d6 51de 559c 566b 56cd 59ec 5b09 5e0c 6199 - 6198 6231 665e 66e6 7199 71b9 71ba 72a7 79a7 - 7a00 7fb2 8a70 - 0 diff --git a/xc/nls/XLC_LOCALE/tab8859_1 b/xc/nls/XLC_LOCALE/tab8859_1 deleted file mode 100644 index 04e2f9d2a..000000000 --- a/xc/nls/XLC_LOCALE/tab8859_1 +++ /dev/null @@ -1,16 +0,0 @@ -00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f -10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f -20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f -30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f -40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f -50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f -60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f -70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f -80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f -90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f -a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aa ab ac ad ae af -b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 ba bb bc bd be bf -c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 ca cb cc cd ce cf -d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 da db dc dd de df -e0 e1 e2 e3 e4 e5 e6 e7 e8 e9 ea eb ec ed ee ef -f0 f1 f2 f3 f4 f5 f6 f7 f8 f9 fa fb fc fd fe ff diff --git a/xc/nls/XLC_LOCALE/tab8859_10 b/xc/nls/XLC_LOCALE/tab8859_10 deleted file mode 100644 index 15eb69dd6..000000000 --- a/xc/nls/XLC_LOCALE/tab8859_10 +++ /dev/null @@ -1,22 +0,0 @@ -00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f -10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f -20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f -30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f -40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f -50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f -60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f -70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f -80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f -90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f -00a0 0104 0112 0122 012a 0128 0136 00a7 -013b 0110 0160 0166 017d 00ad 016a 014a -00b0 0105 0113 0123 012b 0129 0137 00b7 -013c 0111 0161 0167 017e 2015 016b 014b -0100 00c1 00c2 00c3 00c4 00c5 00c6 012e -010c 00c9 0118 00cb 0116 00cd 00ce 00cf -00d0 0145 014c 00d3 00d4 00d5 00d6 0168 -00d8 0172 00da 00db 00dc 00dd 00de 00df -0101 00e1 00e2 00e3 00e4 00e5 00e6 012f -010d 00e9 0119 00eb 0117 00ed 00ee 00ef -00f0 0146 014d 00f3 00f4 00f5 00f6 0169 -00f8 0173 00fa 00fb 00fc 00fd 00fe 0138 diff --git a/xc/nls/XLC_LOCALE/tab8859_14 b/xc/nls/XLC_LOCALE/tab8859_14 deleted file mode 100644 index fdce73eb2..000000000 --- a/xc/nls/XLC_LOCALE/tab8859_14 +++ /dev/null @@ -1,22 +0,0 @@ -00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f -10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f -20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f -30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f -40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f -50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f -60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f -70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f -80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f -90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f -00a0 1e02 1e03 00a3 010a 010b 1e0a 00a7 -1e80 00a9 1e82 1e0b 1ef2 00ad 00ae 0178 -1e1e 1e1f 0120 0121 1e40 1e41 00b6 1e56 -1e81 1e57 1e83 1e60 1ef3 1e84 1e85 1e61 -00c0 00c1 00c2 00c3 00c4 00c5 00c6 00c7 -00c8 00c9 00ca 00cb 00cc 00cd 00ce 00cf -0174 00d1 00d2 00d3 00d4 00d5 00d6 1e6a -00d8 00d9 00da 00db 00dc 00dd 0176 00df -00e0 00e1 00e2 00e3 00e4 00e5 00e6 00e7 -00e8 00e9 00ea 00eb 00ec 00ed 00ee 00ef -0175 00f1 00f2 00f3 00f4 00f5 00f6 1e6b -00f8 00f9 00fa 00fb 00fc 00fd 0177 00ff diff --git a/xc/nls/XLC_LOCALE/tab8859_15 b/xc/nls/XLC_LOCALE/tab8859_15 deleted file mode 100644 index b203b55b0..000000000 --- a/xc/nls/XLC_LOCALE/tab8859_15 +++ /dev/null @@ -1,16 +0,0 @@ -00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f -10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f -20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f -30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f -40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f -50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f -60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f -70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f -80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f -90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f -a0 a1 a2 a3 20ac a5 0160 a7 0161 a9 aa ab ac ad ae af -b0 b1 b2 b3 017d b5 b6 b7 017e b9 ba bb 0152 0153 0178 bf -c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 ca cb cc cd ce cf -d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 da db dc dd de df -e0 e1 e2 e3 e4 e5 e6 e7 e8 e9 ea eb ec ed ee ef -f0 f1 f2 f3 f4 f5 f6 f7 f8 f9 fa fb fc fd fe ff diff --git a/xc/nls/XLC_LOCALE/tab8859_2 b/xc/nls/XLC_LOCALE/tab8859_2 deleted file mode 100644 index f1d67a959..000000000 --- a/xc/nls/XLC_LOCALE/tab8859_2 +++ /dev/null @@ -1,22 +0,0 @@ -00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f -10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f -20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f -30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f -40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f -50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f -60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f -70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f -80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f -90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f -00a0 0104 02d8 0141 00a4 013d 015a 00a7 -00a8 0160 015e 0164 0179 00ad 017d 017b -00b0 0105 02db 0142 00b4 013e 015b 02c7 -00b8 0161 015f 0165 017a 02dd 017e 017c -0154 00c1 00c2 0102 00c4 0139 0106 00c7 -010c 00c9 0118 00cb 011a 00cd 00ce 010e -0110 0143 0147 00d3 00d4 0150 00d6 00d7 -0158 016e 00da 0170 00dc 00dd 0162 00df -0155 00e1 00e2 0103 00e4 013a 0107 00e7 -010d 00e9 0119 00eb 011b 00ed 00ee 010f -0111 0144 0148 00f3 00f4 0151 00f6 00f7 -0159 016f 00fa 0171 00fc 00fd 0163 02d9 diff --git a/xc/nls/XLC_LOCALE/tab8859_3 b/xc/nls/XLC_LOCALE/tab8859_3 deleted file mode 100644 index 40357d1c8..000000000 --- a/xc/nls/XLC_LOCALE/tab8859_3 +++ /dev/null @@ -1,22 +0,0 @@ -00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f -10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f -20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f -30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f -40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f -50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f -60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f -70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f -80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f -90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f -00a0 0126 02d8 00a3 00a4 -1 0124 00a7 -00a8 0130 015e 011e 0134 00ad -1 017b -00b0 0127 00b2 00b3 00b4 00b5 0125 00b7 -00b8 0131 015f 011f 0135 00bd -1 017c -00c0 00c1 00c2 -1 00c4 010a 0108 00c7 -00c8 00c9 00ca 00cb 00cc 00cd 00ce 00cf - -1 00d1 00d2 00d3 00d4 0120 00d6 00d7 -011c 00d9 00da 00db 00dc 016c 015c 00df -00e0 00e1 00e2 -1 00e4 010b 0109 00e7 -00e8 00e9 00ea 00eb 00ec 00ed 00ee 00ef - -1 00f1 00f2 00f3 00f4 0121 00f6 00f7 -011d 00f9 00fa 00fb 00fc 016d 015d 02d9 diff --git a/xc/nls/XLC_LOCALE/tab8859_4 b/xc/nls/XLC_LOCALE/tab8859_4 deleted file mode 100644 index 860aae951..000000000 --- a/xc/nls/XLC_LOCALE/tab8859_4 +++ /dev/null @@ -1,22 +0,0 @@ -00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f -10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f -20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f -30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f -40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f -50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f -60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f -70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f -80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f -90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f -00a0 0104 0138 0156 00a4 0128 013b 00a7 -00a8 0160 0112 0122 0166 00ad 017d 00af -00b0 0105 02db 0157 00b4 0129 013c 02c7 -00b8 0161 0113 0123 0167 014a 017e 014b -0100 00c1 00c2 00c3 00c4 00c5 00c6 012e -010c 00c9 0118 00cb 0116 00cd 00ce 012a -0110 0145 014c 0136 00d4 00d5 00d6 00d7 -00d8 0172 00da 00db 00dc 0168 016a 00df -0101 00e1 00e2 00e3 00e4 00e5 00e6 012f -010d 00e9 0119 00eb 0117 00ed 00ee 012b -0111 0146 014d 0137 00f4 00f5 00f6 00f7 -00f8 0173 00fa 00fb 00fc 0169 016b 02d9 diff --git a/xc/nls/XLC_LOCALE/tab8859_5 b/xc/nls/XLC_LOCALE/tab8859_5 deleted file mode 100644 index 2c29a2e1e..000000000 --- a/xc/nls/XLC_LOCALE/tab8859_5 +++ /dev/null @@ -1,22 +0,0 @@ -00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f -10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f -20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f -30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f -40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f -50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f -60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f -70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f -80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f -90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f -00a0 0401 0402 0403 0404 0405 0406 0407 -0408 0409 040a 040b 040c 00ad 040e 040f -0410 0411 0412 0413 0414 0415 0416 0417 -0418 0419 041a 041b 041c 041d 041e 041f -0420 0421 0422 0423 0424 0425 0426 0427 -0428 0429 042a 042b 042c 042d 042e 042f -0430 0431 0432 0433 0434 0435 0436 0437 -0438 0439 043a 043b 043c 043d 043e 043f -0440 0441 0442 0443 0444 0445 0446 0447 -0448 0449 044a 044b 044c 044d 044e 044f -2116 0451 0452 0453 0454 0455 0456 0457 -0458 0459 045a 045b 045c 00a7 045e 045f diff --git a/xc/nls/XLC_LOCALE/tab8859_6 b/xc/nls/XLC_LOCALE/tab8859_6 deleted file mode 100644 index ef4e0b5a5..000000000 --- a/xc/nls/XLC_LOCALE/tab8859_6 +++ /dev/null @@ -1,22 +0,0 @@ -00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f -10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f -20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f -0660 0661 0662 0663 0664 0665 0666 0667 0668 0669 3a 3b 3c 3d 3e 3f -40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f -50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f -60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f -70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f -80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f -90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f -00a0 -1 -1 -1 00a4 -1 -1 -1 - -1 -1 -1 -1 060c 00ad -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 061b -1 -1 -1 061f - -1 0621 0622 0623 0624 0625 0626 0627 -0628 0629 062a 062b 062c 062d 062e 062f -0630 0631 0632 0633 0634 0635 0636 0637 -0638 0639 063a -1 -1 -1 -1 -1 -0640 0641 0642 0643 0644 0645 0646 0647 -0648 0649 064a 064b 064c 064d 064e 064f -0650 0651 0652 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 diff --git a/xc/nls/XLC_LOCALE/tab8859_7 b/xc/nls/XLC_LOCALE/tab8859_7 deleted file mode 100644 index af5a42592..000000000 --- a/xc/nls/XLC_LOCALE/tab8859_7 +++ /dev/null @@ -1,22 +0,0 @@ -00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f -10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f -20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f -30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f -40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f -50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f -60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f -70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f -80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f -90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f -00a0 02bd 02bc 00a3 -1 -1 00a6 00a7 -00a8 00a9 -1 00ab 00ac 00ad -1 2015 -00b0 00b1 00b2 00b3 0384 0385 0386 00b7 -0388 0389 038a 00bb 038c 00bd 038e 038f -0390 0391 0392 0393 0394 0395 0396 0397 -0398 0399 039a 039b 039c 039d 039e 039f -03a0 03a1 -1 03a3 03a4 03a5 03a6 03a7 -03a8 03a9 03aa 03ab 03ac 03ad 03ae 03af -03b0 03b1 03b2 03b3 03b4 03b5 03b6 03b7 -03b8 03b9 03ba 03bb 03bc 03bd 03be 03bf -03c0 03c1 03c2 03c3 03c4 03c5 03c6 03c7 -03c8 03c9 03ca 03cb 03cc 03cd 03ce -1 diff --git a/xc/nls/XLC_LOCALE/tab8859_8 b/xc/nls/XLC_LOCALE/tab8859_8 deleted file mode 100644 index 8f34a100a..000000000 --- a/xc/nls/XLC_LOCALE/tab8859_8 +++ /dev/null @@ -1,22 +0,0 @@ -00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f -10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f -20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f -30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f -40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f -50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f -60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f -70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f -80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f -90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f -00a0 -1 00a2 00a3 00a4 00a5 00a6 00a7 -00a8 00a9 00d7 00ab 00ac 00ad 00ae 203e -00b0 00b1 00b2 00b3 00b4 00b5 00b6 00b7 -00b8 00b9 00f7 00bb 00bc 00bd 00be -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 -1 - -1 -1 -1 -1 -1 -1 -1 2017 -05d0 05d1 05d2 05d3 05d4 05d5 05d6 05d7 -05d8 05d9 05da 05db 05dc 05dd 05de 05df -05e0 05e1 05e2 05e3 05e4 05e5 05e6 05e7 -05e8 05e9 05ea -1 -1 -1 -1 -1 diff --git a/xc/nls/XLC_LOCALE/tab8859_9 b/xc/nls/XLC_LOCALE/tab8859_9 deleted file mode 100644 index 0c2001766..000000000 --- a/xc/nls/XLC_LOCALE/tab8859_9 +++ /dev/null @@ -1,22 +0,0 @@ -00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f -10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f -20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f -30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f -40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f -50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f -60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f -70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f -80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f -90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f -00a0 00a1 00a2 00a3 00a4 00a5 00a6 00a7 -00a8 00a9 00aa 00ab 00ac 00ad 00ae 00af -00b0 00b1 00b2 00b3 00b4 00b5 00b6 00b7 -00b8 00b9 00ba 00bb 00bc 00bd 00be 00bf -00c0 00c1 00c2 00c3 00c4 00c5 00c6 00c7 -00c8 00c9 00ca 00cb 00cc 00cd 00ce 00cf -011e 00d1 00d2 00d3 00d4 00d5 00d6 00d7 -00d8 00d9 00da 00db 00dc 0130 015e 00df -00e0 00e1 00e2 00e3 00e4 00e5 00e6 00e7 -00e8 00e9 00ea 00eb 00ec 00ed 00ee 00ef -011f 00f1 00f2 00f3 00f4 00f5 00f6 00f7 -00f8 00f9 00fa 00fb 00fc 0131 015f 00ff diff --git a/xc/nls/XLC_LOCALE/tabarmscii_8 b/xc/nls/XLC_LOCALE/tabarmscii_8 deleted file mode 100644 index 331f84064..000000000 --- a/xc/nls/XLC_LOCALE/tabarmscii_8 +++ /dev/null @@ -1,22 +0,0 @@ -00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f -10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f -20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f -30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f -40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f -50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f -60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f -70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f -80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f -90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f -00a0 ffff 00a7 0589 0029 002a 00bb 00ab -2014 002d 055d 002c 2013 058a 2026 055c -055b 055e 0531 0561 0532 0562 0533 0563 -0534 0564 0535 0565 0536 0566 0537 0567 -0538 0568 0539 0569 053a 056a 053b 056b -053c 056c 053d 056d 053e 056e 053f 056f -0540 0570 0541 0571 0542 0572 0543 0573 -0544 0574 0545 0575 0546 0576 0547 0577 -0548 0578 0549 0579 054a 057a 054b 057b -054c 057c 054d 057d 054e 057e 054f 057f -0550 0580 0551 0581 0552 0582 0553 0583 -0554 0584 0555 0585 0556 0586 02bc 0587 diff --git a/xc/nls/XLC_LOCALE/tabgeorgian_academy b/xc/nls/XLC_LOCALE/tabgeorgian_academy deleted file mode 100644 index f5317b991..000000000 --- a/xc/nls/XLC_LOCALE/tabgeorgian_academy +++ /dev/null @@ -1,20 +0,0 @@ -00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f -10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f -20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f -30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f -40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f -50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f -60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f -70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f -80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f -90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f -a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aa ab ac ad ae af -b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 ba bb bc bd be bf -10d0 10d1 10d2 10d3 10d4 10d5 10d6 10d7 -10d8 10d9 10da 10db 10dc 10dd 10de 10df -10e0 10e1 10e2 10e3 10e4 10e5 10e6 10e7 -10e8 10e9 10ea 10eb 10ec 10ed 10ee 10ef -10f0 10f1 10f2 10f3 10f4 10f5 10f6 e7 - e8 e9 ea eb ec ed ee ef - f0 f1 f2 f3 f4 f5 f6 f7 - f8 f9 fa fb fc fd fe ff diff --git a/xc/nls/XLC_LOCALE/tabgeorgian_ps b/xc/nls/XLC_LOCALE/tabgeorgian_ps deleted file mode 100644 index 198640174..000000000 --- a/xc/nls/XLC_LOCALE/tabgeorgian_ps +++ /dev/null @@ -1,20 +0,0 @@ -00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f -10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f -20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f -30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f -40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f -50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f -60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f -70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f -80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f -90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f -a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aa ab ac ad ae af -b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 ba bb bc bd be bf -10d0 10d1 10d2 10d3 10d4 10d5 10d6 10f1 -10d7 10d8 10d9 10da 10db 10dc 10f2 10dd -10de 10df 1ee0 10e1 10e2 10f3 10e3 10e4 -10e5 10e6 10e7 10e8 10e9 10ea 10eb 10ec -10ed 10ee 10f4 10ef 10f0 10f5 10f6 e7 - e8 e9 ea eb ec ed ee ef - f0 f1 f2 f3 f4 f5 f6 f7 - f8 f9 fa fb fc fd fe ff diff --git a/xc/nls/XLC_LOCALE/tabibm_cp1133 b/xc/nls/XLC_LOCALE/tabibm_cp1133 deleted file mode 100644 index 6a537da7f..000000000 --- a/xc/nls/XLC_LOCALE/tabibm_cp1133 +++ /dev/null @@ -1,22 +0,0 @@ -00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f -10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f -20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f -30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f -40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f -50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f -60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f -70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f -80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f -90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f -00a0 0e81 0e82 0e84 0e87 0e88 0eaa 0e8a -0e8d 0e94 0e95 0e96 0e97 0e99 0e9a 0e9b -0e9c 0e9d 0e9e 0e9f 0ea1 0ea2 0ea3 0ea5 -0ea7 0eab 0ead 0eae bc bd be 0eaf -0eb0 0eb2 0eb3 0eb4 0eb5 0eb6 0eb7 0eb8 -0eb9 0ebc 0eb1 0ebb 0ebd cd ce cf -0ec0 0ec1 0ec2 0ec3 0ec4 0ec8 0ec9 0eca -0ecb 0ecc 0ecd 0ec6 dc 0edc 0edd 20ad - e0 e1 e2 e3 e4 e5 e6 e7 - e8 e9 ea eb ec ed ee ef -0ed0 0ed1 0ed2 0ed3 0ed4 0ed5 0ed6 0ed7 -0ed8 0ed9 fa fb 00a2 00ac 00a6 ff diff --git a/xc/nls/XLC_LOCALE/tabkoi8_r b/xc/nls/XLC_LOCALE/tabkoi8_r deleted file mode 100644 index 6b0b8d74f..000000000 --- a/xc/nls/XLC_LOCALE/tabkoi8_r +++ /dev/null @@ -1,24 +0,0 @@ -00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f -10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f -20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f -30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f -40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f -50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f -60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f -70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f -2500 2502 250c 2510 2514 2518 251c 2524 -252c 2534 253c 2580 2584 2588 258c 2590 -2591 2592 2593 2320 25a0 2219 221a 2248 -2264 2265 00a0 2321 00b0 00b2 00b7 00f7 -2550 2551 2552 0451 2553 2554 2555 2556 -2557 2558 2559 255a 255b 255c 255d 255e -255f 2560 2561 0401 2562 2563 2564 2565 -2566 2567 2568 2569 256a 256b 256c 00a9 -044e 0430 0431 0446 0434 0435 0444 0433 -0445 0438 0439 043a 043b 043c 043d 043e -043f 044f 0440 0441 0442 0443 0436 0432 -044c 044b 0437 0448 044d 0449 0447 044a -042e 0410 0411 0426 0414 0415 0424 0413 -0425 0418 0419 041a 041b 041c 041d 041e -041f 042f 0420 0421 0422 0423 0416 0412 -042c 042b 0417 0428 042d 0429 0427 042a diff --git a/xc/nls/XLC_LOCALE/tabkoi8_u b/xc/nls/XLC_LOCALE/tabkoi8_u deleted file mode 100644 index 5d0c66165..000000000 --- a/xc/nls/XLC_LOCALE/tabkoi8_u +++ /dev/null @@ -1,24 +0,0 @@ -00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f -10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f -20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f -30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f -40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f -50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f -60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f -70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f -2500 2502 250c 2510 2514 2518 251c 2524 -252c 2534 253c 2580 2584 2588 258c 2590 -2591 2592 2593 2320 25a0 2219 221a 2248 -2264 2265 00a0 2321 00b0 00b2 00b7 00f7 -2550 2551 2552 0451 0454 2554 0456 0457 -2557 2558 2559 255a 255b 0491 255d 255e -255f 2560 2561 0401 0404 2563 0406 0407 -2566 2567 2568 2569 256a 0490 256c 00a9 -044e 0430 0431 0446 0434 0435 0444 0433 -0445 0438 0439 043a 043b 043c 043d 043e -043f 044f 0440 0441 0442 0443 0436 0432 -044c 044b 0437 0448 044d 0449 0447 044a -042e 0410 0411 0426 0414 0415 0424 0413 -0425 0418 0419 041a 041b 041c 041d 041e -041f 042f 0420 0421 0422 0423 0416 0412 -042c 042b 0417 0428 042d 0429 0427 042a diff --git a/xc/nls/XLC_LOCALE/tabmulelao_1 b/xc/nls/XLC_LOCALE/tabmulelao_1 deleted file mode 100644 index f1f65f9f3..000000000 --- a/xc/nls/XLC_LOCALE/tabmulelao_1 +++ /dev/null @@ -1,22 +0,0 @@ -00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f -10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f -20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f -30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f -40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f -50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f -60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f -70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f -80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f -90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f -00a0 0e81 0e82 a3 0e84 a5 a6 0e87 -0e88 a9 0e8a ab ac 0e8d ae af - b0 b1 b2 b3 0e94 0e95 0e96 0e97 - b8 0e99 0e9a 0e9b 0e9c 0e9d 0e9e 0e9f - c0 0ea1 0ea2 0ea3 c4 0ea5 c6 0ea7 - c8 c9 0eaa 0eab cc 0ead 0eae 0eaf -0eb0 0eb1 0eb2 0eb3 0eb4 0eb5 0eb6 0eb7 -0eb8 0eb9 da 0ebb 0ebc 0ebd de 20ad -0ec0 0ec1 0ec2 0ec3 0ec4 e5 0ec6 e7 -0ec8 0ec9 0eca 0ecb 0ecc 0ecd ee ef -0ed0 0ed1 0ed2 0ed3 0ed4 0ed5 0ed6 0ed7 -0ed8 0ed9 fa 0edc 0edd fd fe ff diff --git a/xc/nls/XLC_LOCALE/tabtcvn b/xc/nls/XLC_LOCALE/tabtcvn deleted file mode 100644 index 1a28daff8..000000000 --- a/xc/nls/XLC_LOCALE/tabtcvn +++ /dev/null @@ -1,22 +0,0 @@ - 00 00da 1ee4 03 1eea 1eec 1ee7 07 08 09 0a 0b 0c 0d 0e 0f - 10 1ee8 1ef0 1ef2 1ef6 1ef8 00dd 1ef4 18 19 1a 1b 1c 1d 1e 1f -20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f -30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f -40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f -50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f -60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f -70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f -00c0 1ea2 00c3 00c1 1ea0 1eb6 1eac 00c8 1eba 1ebc 00c9 1eb8 1ec6 00cc 1ec8 0128 -00cd 1eca 00d2 1ece 00d5 00d3 1ecc 1ed8 1edc 1ede 1ee0 1eda 1ee2 00d9 1ee6 0168 -00a0 0102 00c2 00ca 00d4 01a0 01af 0110 -0103 00e2 00ea 00f4 01a1 01b0 0111 1eb0 -0300 0309 0303 0301 0323 00e0 1ea3 00e3 -00e1 1ea1 1eb2 1eb1 1eb3 1eb5 1eaf 1eb4 -1eae 1ea6 1ea8 1eaa 1ea4 1ec0 1eb7 1ea7 -1ea9 1eab 1ea5 1ead 00e8 1ec2 1eb5 1ebd -00e9 1eb9 1ec1 1ec3 1ec5 1ebf 1ec7 00ec -1ec9 1ec4 1ebe 1ed2 0129 00ed 1ecb 00f2 -1ed4 1ecf 00f5 00f3 1ecd 1ed3 1ed5 1ed7 -1ed1 1ed9 1edd 1edf 1ee1 1edb 1ee3 00f9 -1ed6 1ee7 0169 00fa 1ee5 1eeb 1eed 1eef -1ee9 1ef1 1ef3 1ef7 1ef9 00fd 1ef5 1ed0 diff --git a/xc/nls/XLC_LOCALE/tabtis620 b/xc/nls/XLC_LOCALE/tabtis620 deleted file mode 100644 index 1564c5d41..000000000 --- a/xc/nls/XLC_LOCALE/tabtis620 +++ /dev/null @@ -1,22 +0,0 @@ -00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f -10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f -20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f -30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f -40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f -50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f -60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f -70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f -80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f -90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f -00a0 0e01 0e02 0e03 0e04 0e05 0e06 0e07 -0e08 0e09 0e0a 0e0b 0e0c 0e0d 0e0e 0e0f -0e10 0e11 0e12 0e13 0e14 0e15 0e16 0e17 -0e18 0e19 0e1a 0e1b 0e1c 0e1d 0e1e 0e1f -0e20 0e21 0e22 0e23 0e24 0e25 0e26 0e27 -0e28 0e29 0e2a 0e2b 0e2c 0e2d 0e2e 0e2f -0e30 0e31 0e32 0e33 0e34 0e35 0e36 0e37 -0e38 0e39 0e3a db dc dd de 0e3f -0e40 0e41 0e42 0e43 0e44 0e45 0e46 0e47 -0e48 0e49 0e4a 0e4b 0e4c 0e4d 0e4e 0e4f -0e50 0e51 0e52 0e53 0e54 0e55 0e56 0e57 -0e58 0e59 0e5a 0e5b fc fd fe ff diff --git a/xc/nls/XLC_LOCALE/tabviscii b/xc/nls/XLC_LOCALE/tabviscii deleted file mode 100644 index 112e25033..000000000 --- a/xc/nls/XLC_LOCALE/tabviscii +++ /dev/null @@ -1,24 +0,0 @@ -00 01 1eb2 03 04 1eb4 1eaa 07 08 09 0a 0b 0c 0d 0e 0f -10 11 12 13 1ef6 15 16 17 18 1ef8 1a 1b 1c 1d 1ef4 1f -20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f -30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f -40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f -50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f -60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f -70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f -1ea0 1aae 1eb0 1eb6 1ea4 1ea6 1ea8 1eac -1ebc 1eb8 1ebe 1ec0 1ec2 1ec4 1ec6 1ed0 -1ed2 1ed4 1ed6 1ed8 1ee2 1eda 1edc 1ede -1eca 1ece 1ecc 1ec8 1ee6 0168 1ee4 1ef2 -00d5 1eaf 1eb1 1eb7 1ea5 1ea7 1ea9 1ead -1ebd 1eb9 1ebf 1ec1 1ec3 1ec5 1ec7 1ed1 -1ed3 1ed5 1ed7 1ee0 01a0 1ed9 1edd 1edf -1ecb 1ef0 1ee8 1eea 1eec 01a1 1edb 01af -00c0 00c1 00c2 00c3 1ea2 0102 1eb3 1eb5 -00c8 00c9 00ca 1eba 00cc 00cd 0128 1ef3 -0110 1ee9 00d2 00d3 00d4 1ea1 1ef7 1eeb -1eed 00d9 00da 1ef9 1ef5 00dd 1ee1 01b0 -00e0 00e1 00e2 00e3 1ea3 0103 1eef 1eab -00e8 00e9 00ea 1ebb 00ec 00ed 0129 1ec9 -0111 1ef1 00f2 00f3 00f4 00f5 1ecf 1ecd -1ee5 00f9 00fa 0169 1ee7 00fd 1ee3 1eee diff --git a/xc/programs/Xserver/GL/dri/dri.c b/xc/programs/Xserver/GL/dri/dri.c index 26fc6a40e..bbc8622db 100644 --- a/xc/programs/Xserver/GL/dri/dri.c +++ b/xc/programs/Xserver/GL/dri/dri.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/dri/dri.c,v 1.19 2000/06/25 16:03:43 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/dri/dri.c,v 1.21 2000/09/26 15:57:01 tsi Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -651,11 +651,9 @@ DRICreateContext(ScreenPtr pScreen, VisualPtr visual, contextStore=DRIGetContextStore(pDRIContextPriv); if (pDRIPriv->pDriverInfo->CreateContext) { - if (!((*pDRIPriv->pDriverInfo->CreateContext)(pScreen, - visual, - *pHWContext, - *pVisualConfigPriv, - (int)contextStore))) { + if (!((*pDRIPriv->pDriverInfo->CreateContext)(pScreen, visual, + *pHWContext, *pVisualConfigPriv, + (DRIContextType)(long)contextStore))) { DRIDestroyContextPriv(pDRIContextPriv); return FALSE; } @@ -687,8 +685,7 @@ DRIContextPrivDelete(pointer pResource, XID id) if (pDRIPriv->pDriverInfo->DestroyContext) { contextStore=DRIGetContextStore(pDRIContextPriv); (pDRIPriv->pDriverInfo->DestroyContext)(pDRIContextPriv->pScreen, - pDRIContextPriv->hwContext, - (int)contextStore); + pDRIContextPriv->hwContext, (DRIContextType)(long)contextStore); } return DRIDestroyContextPriv(pDRIContextPriv); } diff --git a/xc/programs/Xserver/GL/dri/sarea.h b/xc/programs/Xserver/GL/dri/sarea.h index 24ce045e0..54838251f 100644 --- a/xc/programs/Xserver/GL/dri/sarea.h +++ b/xc/programs/Xserver/GL/dri/sarea.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/dri/sarea.h,v 1.4 2000/02/23 04:46:52 martin Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/dri/sarea.h,v 1.6 2000/09/26 15:57:02 tsi Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -37,8 +37,10 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define _SAREA_H_ /* SAREA area needs to be at least a page */ -#ifdef __alpha__ +#if defined(__alpha__) #define SAREA_MAX 0x2000 +#elif defined(__ia64__) +#define SAREA_MAX 0x10000 /* 64kB */ #else #define SAREA_MAX 0x1000 #endif diff --git a/xc/programs/Xserver/GL/dri/xf86dri.c b/xc/programs/Xserver/GL/dri/xf86dri.c index b35e5680b..e18185f61 100644 --- a/xc/programs/Xserver/GL/dri/xf86dri.c +++ b/xc/programs/Xserver/GL/dri/xf86dri.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/dri/xf86dri.c,v 1.8 2000/06/25 16:03:43 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/dri/xf86dri.c,v 1.9 2000/09/24 13:51:22 alanh Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. diff --git a/xc/programs/Xserver/GL/mesa/src/Imakefile b/xc/programs/Xserver/GL/mesa/src/Imakefile index 509077014..c2ead442c 100644 --- a/xc/programs/Xserver/GL/mesa/src/Imakefile +++ b/xc/programs/Xserver/GL/mesa/src/Imakefile @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/Imakefile,v 1.15 2000/08/01 20:28:39 dawes Exp $ +XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/Imakefile,v 1.16 2000/09/24 13:51:22 alanh Exp $ #define IHaveModules #include <Server.tmpl> diff --git a/xc/programs/Xserver/Imakefile b/xc/programs/Xserver/Imakefile index 4ed670b60..6ab52168c 100644 --- a/xc/programs/Xserver/Imakefile +++ b/xc/programs/Xserver/Imakefile @@ -2,7 +2,7 @@ XCOMM $TOG: Imakefile /main/249 1997/12/11 11:18:14 kaleb $ /* * Server Master Makefile */ -XCOMM $XFree86: xc/programs/Xserver/Imakefile,v 3.195 2000/09/22 05:56:35 keithp Exp $ +XCOMM $XFree86: xc/programs/Xserver/Imakefile,v 3.199 2000/10/26 17:57:50 dawes Exp $ #ifndef InstallXserverSetUID #define InstallXserverSetUID NO @@ -247,8 +247,12 @@ XPFBLIBS = dix/LibraryTargetName(xpstubs) DIX = dix/LibraryTargetName(dix) FONTBASE = $(FONTLIBSRC)/fontbase.o \ $(FONTLIBSRC)/LibraryTargetName(fontbase) - FONT = $(XFONTLIB) $(XPFBLIBS) - FONTLIBS = $(LDPRELIB) $(FONT) +#if XserverStaticFontLib + FONT = $(FONTLIBSRC)/LibraryTargetName(Xfont) +#else + FONT = $(LDPRELIB) $(XFONTLIB) +#endif + FONTLIBS = $(FONT) $(XPFBLIBS) #if UsbMouseSupport #if !HasLibUsb USB = $(XF86OSSRC)/bsd/libusb/LibraryTargetName(usb) @@ -590,6 +594,9 @@ XF1BPPLIB = $(XF86SRC)/xf1bpp/LibraryTargetName(xf1bpp) #if XF4Bpp XF4BPPLIB = $(XF86SRC)/xf4bpp/LibraryTargetName(xf4bpp) #endif +#if XF8_32Wid +XF8_32WIDLIB = $(XF86SRC)/xf8_32wid/LibraryTargetName(xf8_32wid) +#endif #if XF8_32Bpp XF8_32BPPLIB = $(XF86SRC)/xf8_32bpp/LibraryTargetName(xf8_32bpp) #endif @@ -628,7 +635,8 @@ XF86IDRIVERLIB = $(XF86SRC)/input/LibraryTargetName(idriver) XF86DRVOBJS = $(XF86SRC)/drivers/drvConf.o XF86DRVLIBS = $(XF86DRIVERLIB) $(XF86RAMDACLIB) $(XF86DDCLIB) $(XF86I2CLIB) \ $(XF86XAALIB) $(XF86VGAHWLIB) $(XF86FBDEVHWLIB) \ - $(XF8_32BPPLIB) $(XF8_16BPPLIB) $(XF24_32BPPLIB) \ + $(XF8_32WIDLIB) $(XF8_32BPPLIB) \ + $(XF8_16BPPLIB) $(XF24_32BPPLIB) \ $(XF4BPPLIB) $(XF1BPPLIB) $(XFSHADOWFBLIB) $(AFBLIB) XF86IDRVOBJS = $(XF86SRC)/input/drvConf.o XF86IDRVLIBS = $(XF86IDRIVERLIB) @@ -689,7 +697,7 @@ XCOMM SHADOWDIR = miext/shadow KD = $(KDRIVE)/LibraryTargetName(kdrive) KDFBDEV = $(KDRIVE)/fbdev/LibraryTargetName(fbdev) - + #define StdKdDirs $(KDRIVE) $(KDOSDIR) $(PSEUDO8DIR) fb $(DEPDIRS) #define StdKdSysLibs $(FONTLIBS) $(SYSLIBS) @@ -705,7 +713,9 @@ XCOMM KDDIRS = StdKdDirs - FBDEVDIRS = $(STDDIRS) $(KDDIRS) $(FBDEVDIR) + SHADOWDIR = miext/shadow + + FBDEVDIRS = $(STDDIRS) $(KDDIRS) $(FBDEVDIR) $(SHADOWDIR) FBDEVLIBS = PreFbLibs $(FBDEV) KdLibs FbPostFbLibs FBDEVSYSLIBS = StdKdSysLibs @@ -1060,7 +1070,7 @@ ServerTarget(Xvfb,$(XVFBDIRS),$(XVFBOBJS), \ #endif /* XVirtualFramebufferServer */ -#if XWinServer && !MakeDllModules +#if XWinServer XCOMM XCOMM server with DirectX framebuffer for Windows XCOMM @@ -1069,16 +1079,13 @@ CFB8DIR = cfb CFB16DIR = cfb16 CFB24DIR = cfb24 CFB32DIR = cfb32 -#ifndef Win32Architecture XWINDDXDIR = hw/xwin -#else -XWINDDXDIR = hw -#endif +DDXDIR2 = $(XWINDDXDIR) XWINDIRS = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(CFB16DIR) $(CFB24DIR) $(CFB32DIR) $(XWINDDXDIR) $(DEPDIRS) #if BuildDPMS -XWINOBJS = hw/xwin/InitInput.o hw/xwin/InitOutput.o hw/xwin/stubs.o hw/xwin/directx.o hw/xwin/dpmsstubs.o dix/main.o hw/xwin/ntux_xf.o +XWINOBJS = hw/xwin/InitInput.o hw/xwin/InitOutput.o hw/xwin/stubs.o hw/xwin/directx.o hw/xwin/dpmsstubs.o dix/main.o #else -XWINOBJS = hw/xwin/InitInput.o hw/xwin/InitOutput.o hw/xwin/stubs.o hw/xwin/directx.o dix/main.o hw/xwin/ntux_xf.o +XWINOBJS = hw/xwin/InitInput.o hw/xwin/InitOutput.o hw/xwin/stubs.o hw/xwin/directx.o dix/main.o #endif XWIN = hw/xwin/LibraryTargetName(XWin) XWINLIBS = PreFbLibs $(XWIN) $(CFB) PostFbLibs $(MI) $(SURFLIB) diff --git a/xc/programs/Xserver/fb/fboverlay.c b/xc/programs/Xserver/fb/fboverlay.c index 0c0106e04..7fc4fd12f 100644 --- a/xc/programs/Xserver/fb/fboverlay.c +++ b/xc/programs/Xserver/fb/fboverlay.c @@ -1,5 +1,5 @@ /* - * $XFree86: xc/programs/Xserver/fb/fboverlay.c,v 1.3 2000/08/09 17:50:52 keithp Exp $ + * $XFree86: xc/programs/Xserver/fb/fboverlay.c,v 1.4 2000/09/26 15:57:03 tsi Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -236,7 +236,7 @@ fbOverlayCopyWindow(WindowPtr pWin, fbCopyRegion (&pPixmap->drawable, &pPixmap->drawable, 0, &layerRgn[i], dx, dy, pScrPriv->CopyWindow, 0, - (void *) i); + (void *)(long) i); } } /* diff --git a/xc/programs/Xserver/fb/fbpict.c b/xc/programs/Xserver/fb/fbpict.c index 7b4e3eb6a..7d7f15dfc 100644 --- a/xc/programs/Xserver/fb/fbpict.c +++ b/xc/programs/Xserver/fb/fbpict.c @@ -1,5 +1,5 @@ /* - * $XFree86$ + * $XFree86: xc/programs/Xserver/fb/fbpict.c,v 1.3 2000/10/21 00:26:48 keithp Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -26,25 +26,7 @@ #include "fb.h" #include "picturestr.h" #include "mipict.h" - -typedef void (*CompositeFunc) (CARD8 op, - PicturePtr pSrc, - PicturePtr pMask, - PicturePtr pDst, - INT16 xSrc, - INT16 ySrc, - INT16 xMask, - INT16 yMask, - INT16 xDst, - INT16 yDst, - CARD16 width, - CARD16 height); - -#define INT_MULT(a,b,t) ( (t) = (a) * (b) + 0x80, ( ( ( (t)>>8 ) + (t) )>>8 ) ) -#define GET8(v,i) ((CARD16) (CARD8) ((v) >> i)) -#define OVER(x,y,i,a,t) ((t) = INT_MULT(GET8(y,i),(a),(t)) + GET8(x,i),\ - (CARD32) ((CARD8) ((t) | (0 - ((t) >> 8)))) << (i)) -#define IN(x,i,a,t) ((CARD32) INT_MULT(GET8(x,i),(a),(t)) << (i)) +#include "fbpict.h" #define cvt8888to0565(s) ((((s) >> 3) & 0x001f) | \ (((s) >> 5) & 0x07e0) | \ @@ -73,31 +55,31 @@ typedef void (*CompositeFunc) (CARD8 op, (*((a)+2) = (CARD8) ((v) >> 16)))) #endif -static CARD32 +CARD32 fbOver (CARD32 x, CARD32 y) { CARD16 a = ~x >> 24; CARD16 t; CARD32 m,n,o,p; - m = OVER(x,y,0,a,t); - n = OVER(x,y,8,a,t); - o = OVER(x,y,16,a,t); - p = OVER(x,y,24,a,t); + m = FbOver(x,y,0,a,t); + n = FbOver(x,y,8,a,t); + o = FbOver(x,y,16,a,t); + p = FbOver(x,y,24,a,t); return m|n|o|p; } -static CARD32 +CARD32 fbIn (CARD32 x, CARD8 y) { CARD16 a = y; CARD16 t; CARD32 m,n,o,p; - m = IN(x,0,a,t); - n = IN(x,8,a,t); - o = IN(x,16,a,t); - p = IN(x,24,a,t); + m = FbIn(x,0,a,t); + n = FbIn(x,8,a,t); + o = FbIn(x,16,a,t); + p = FbIn(x,24,a,t); return m|n|o|p; } @@ -107,19 +89,19 @@ fbIn (CARD32 x, CARD8 y) * opSRCxMASKxDST */ -static void +void fbCompositeSolidMask_nx8x8888 (CARD8 op, - PicturePtr pSrc, - PicturePtr pMask, - PicturePtr pDst, - INT16 xSrc, - INT16 ySrc, - INT16 xMask, - INT16 yMask, - INT16 xDst, - INT16 yDst, - CARD16 width, - CARD16 height) + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst, + CARD16 width, + CARD16 height) { CARD32 src, srca; CARD32 *dstLine, *dst, d, dstMask; @@ -188,7 +170,7 @@ fbCompositeSolidMask_nx8x8888 (CARD8 op, } } -static void +void fbCompositeSolidMask_nx8x0888 (CARD8 op, PicturePtr pSrc, PicturePtr pMask, @@ -273,7 +255,7 @@ fbCompositeSolidMask_nx8x0888 (CARD8 op, } } -static void +void fbCompositeSolidMask_nx8x0565 (CARD8 op, PicturePtr pSrc, PicturePtr pMask, @@ -359,7 +341,7 @@ fbCompositeSolidMask_nx8x0565 (CARD8 op, } } -static void +void fbCompositeSrc_8888x8888 (CARD8 op, PicturePtr pSrc, PicturePtr pMask, @@ -413,7 +395,7 @@ fbCompositeSrc_8888x8888 (CARD8 op, } } -static void +void fbCompositeSrc_8888x0888 (CARD8 op, PicturePtr pSrc, PicturePtr pMask, @@ -471,7 +453,7 @@ fbCompositeSrc_8888x0888 (CARD8 op, } } -static void +void fbCompositeSrc_8888x0565 (CARD8 op, PicturePtr pSrc, PicturePtr pMask, @@ -532,7 +514,7 @@ fbCompositeSrc_8888x0565 (CARD8 op, } } -static void +void fbCompositeSrc_0565x0565 (CARD8 op, PicturePtr pSrc, PicturePtr pMask, @@ -577,6 +559,63 @@ fbCompositeSrc_0565x0565 (CARD8 op, } void +fbCompositeSrcAdd_8000x8000 (CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst, + CARD16 width, + CARD16 height) +{ + CARD8 *dstLine, *dst; + CARD8 *srcLine, *src; + FbBits *dstBits, *srcBits; + FbStride dstStride, srcStride; + int dstBpp, srcBpp; + CARD8 w; + CARD8 s, d; + CARD16 t; + + fbGetDrawable(pSrc->pDrawable, srcBits, srcStride, srcBpp); + srcLine = (CARD8 *) srcBits; + srcStride = srcStride * sizeof (FbBits) / sizeof (CARD8); + srcLine += srcStride * ySrc + xSrc; + + fbGetDrawable(pDst->pDrawable, dstBits, dstStride, dstBpp); + dstLine = (CARD8 *) dstBits; + dstStride = dstStride * sizeof (FbBits) / sizeof (CARD8); + dstLine += dstStride * yDst + xDst; + + while (height--) + { + dst = dstLine; + dstLine += dstStride; + src = srcLine; + srcLine += srcStride; + w = width; + + while (w--) + { + s = *src++; + if (s != 0xff) + { + d = *dst; + t = d + s; + s = t | (0 - (t >> 8)); + } + *dst++ = s; + } + } +} + +# define mod(a,b) ((b) == 1 ? 0 : (a) >= 0 ? (a) % (b) : (b) - (-a) % (b)) + +void fbComposite (CARD8 op, PicturePtr pSrc, PicturePtr pMask, @@ -594,6 +633,10 @@ fbComposite (CARD8 op, int n; BoxPtr pbox; CompositeFunc func; + Bool srcRepeat = pSrc->repeat; + Bool maskRepeat = FALSE; + int x_msk, y_msk, x_src, y_src, x_dst, y_dst; + int w, h, w_this, h_this; xDst += pDst->pDrawable->x; yDst += pDst->pDrawable->y; @@ -603,6 +646,7 @@ fbComposite (CARD8 op, { xMask += pMask->pDrawable->x; yMask += pMask->pDrawable->y; + maskRepeat = pMask->repeat; } if (!miComputeCompositeRegion (®ion, @@ -619,110 +663,160 @@ fbComposite (CARD8 op, height)) return; - func = 0; - if (pMask) - { - if (pMask->repeat) - { - ; - } - else + func = fbCompositeGeneral; + switch (op) { + case PictOpOver: + if (pMask) { - if (pSrc->repeat) + if (srcRepeat && + pSrc->pDrawable->width == 1 && + pSrc->pDrawable->height == 1) { - if (pSrc->pDrawable->width == 1 && - pSrc->pDrawable->height == 1) - { - switch (pSrc->pDrawable->bitsPerPixel) { - case 32: - case 24: - case 16: - switch (pMask->pDrawable->bitsPerPixel) { - case 8: - switch (pDst->pDrawable->bitsPerPixel) { - case 16: - func = fbCompositeSolidMask_nx8x0565; - break; - case 24: - func = fbCompositeSolidMask_nx8x0888; - break; - case 32: - func = fbCompositeSolidMask_nx8x8888; - break; - } + srcRepeat = FALSE; + if (PICT_FORMAT_COLOR(pSrc->format)) { + switch (pMask->format) { + case PICT_a8: + switch (pDst->format) { + case PICT_r5g6b5: + case PICT_b5g6r5: + func = fbCompositeSolidMask_nx8x0565; + break; + case PICT_r8g8b8: + case PICT_b8g8r8: + func = fbCompositeSolidMask_nx8x0888; + break; + case PICT_a8r8g8b8: + case PICT_x8r8g8b8: + case PICT_a8b8g8r8: + case PICT_x8b8g8r8: + func = fbCompositeSolidMask_nx8x8888; break; } break; } } - else - { - ; - } - } - else - { - ; - } - } - } - else - { - if (pSrc->repeat) - { - if (pSrc->pDrawable->width == 1 && - pSrc->pDrawable->height == 1) - { - ; - } - else - { - ; } } else { - switch (pSrc->pDrawable->bitsPerPixel) { - case 32: - switch (pDst->pDrawable->bitsPerPixel) { - case 32: + switch (pSrc->format) { + case PICT_a8r8g8b8: + case PICT_x8r8g8b8: + switch (pDst->format) { + case PICT_a8r8g8b8: + case PICT_x8r8g8b8: + func = fbCompositeSrc_8888x8888; + break; + case PICT_r8g8b8: + func = fbCompositeSrc_8888x0888; + break; + case PICT_r5g6b5: + func = fbCompositeSrc_8888x0565; + break; + } + break; + case PICT_a8b8g8r8: + case PICT_x8b8g8r8: + switch (pDst->format) { + case PICT_a8b8g8r8: + case PICT_x8b8g8r8: func = fbCompositeSrc_8888x8888; break; - case 24: + case PICT_b8g8r8: func = fbCompositeSrc_8888x0888; break; - case 16: + case PICT_b5g6r5: func = fbCompositeSrc_8888x0565; break; } break; - case 16: - switch (pDst->pDrawable->bitsPerPixel) { - case 16: + case PICT_r5g6b5: + switch (pDst->format) { + case PICT_r5g6b5: + func = fbCompositeSrc_0565x0565; + break; + } + break; + case PICT_b5g6r5: + switch (pDst->format) { + case PICT_b5g6r5: func = fbCompositeSrc_0565x0565; break; } break; } } + break; + case PictOpAdd: + if (pMask == 0) + { + switch (pSrc->format) { + case PICT_a8: + switch (pDst->format) { + case PICT_a8: + func = fbCompositeSrcAdd_8000x8000; + break; + } + } + } + break; } - if (func) + n = REGION_NUM_RECTS (®ion); + pbox = REGION_RECTS (®ion); + while (n--) { - n = REGION_NUM_RECTS (®ion); - pbox = REGION_RECTS (®ion); - while (n--) + h = pbox->y2 - pbox->y1; + y_src = pbox->y1 - yDst + ySrc; + y_msk = pbox->y1 - yDst + yMask; + y_dst = pbox->y1; + while (h) { - (*func) (op, pSrc, pMask, pDst, - pbox->x1 - xDst + xSrc, - pbox->y1 - yDst + ySrc, - pbox->x1 - xDst + xMask, - pbox->y1 - yDst + yMask, - pbox->x1, - pbox->y1, - pbox->x2 - pbox->x1, - pbox->y2 - pbox->y1); - pbox++; + h_this = h; + w = pbox->x2 - pbox->x1; + x_src = pbox->x1 - xDst + xSrc; + x_msk = pbox->x1 - xDst + xMask; + x_dst = pbox->x1; + if (maskRepeat) + { + y_msk = mod (y_msk, pMask->pDrawable->height); + if (h_this > pMask->pDrawable->height - y_msk) + h_this = pMask->pDrawable->height - y_msk; + } + if (srcRepeat) + { + y_src = mod (y_src, pSrc->pDrawable->height); + if (h_this > pSrc->pDrawable->height - y_src) + h_this = pSrc->pDrawable->height - y_src; + } + while (w) + { + w_this = w; + if (maskRepeat) + { + x_msk = mod (x_msk, pMask->pDrawable->width); + if (w_this > pMask->pDrawable->width - x_msk) + w_this = pMask->pDrawable->width - x_msk; + } + if (srcRepeat) + { + x_src = mod (x_src, pSrc->pDrawable->width); + if (w_this > pSrc->pDrawable->width - x_src) + w_this = pSrc->pDrawable->width - x_src; + } + (*func) (op, pSrc, pMask, pDst, + x_src, y_src, x_msk, y_msk, x_dst, y_dst, + w_this, h_this); + w -= w_this; + x_src += w_this; + x_msk += w_this; + x_dst += w_this; + } + h -= h_this; + y_src += h_this; + y_msk += h_this; + y_dst += h_this; } + pbox++; } REGION_UNINIT (pDst->pDrawable->pScreen, ®ion); } diff --git a/xc/programs/Xserver/hw/kdrive/kshadow.c b/xc/programs/Xserver/hw/kdrive/kshadow.c index 57796c987..d780a56bc 100644 --- a/xc/programs/Xserver/hw/kdrive/kshadow.c +++ b/xc/programs/Xserver/hw/kdrive/kshadow.c @@ -1,5 +1,5 @@ /* - * $XFree86$ + * $XFree86: xc/programs/Xserver/hw/kdrive/kshadow.c,v 1.3 2000/09/27 20:47:37 keithp Exp $ * * Copyright © 1999 Keith Packard * @@ -30,6 +30,8 @@ KdShadowScreenInit (KdScreenInfo *screen) void *buf; buf = shadowAlloc (screen->width, screen->height, screen->fb[0].bitsPerPixel); + if (!buf) + return FALSE; screen->fb[0].frameBuffer = buf; screen->fb[0].byteStride = BitmapBytePad (screen->width * screen->fb[0].bitsPerPixel); screen->fb[0].pixelStride = screen->fb[0].byteStride * 8 / screen->fb[0].bitsPerPixel; @@ -44,3 +46,10 @@ KdShadowInitScreen (ScreenPtr pScreen, ShadowUpdateProc update, ShadowWindowProc return shadowInit (pScreen, update, window); } + +void +KdShadowScreenFini (KdScreenInfo *screen) +{ + if (screen->fb[0].frameBuffer) + xfree (screen->fb[0].frameBuffer); +} diff --git a/xc/programs/Xserver/hw/kdrive/vesa/Imakefile b/xc/programs/Xserver/hw/kdrive/vesa/Imakefile index b891e70b3..be071fd5c 100644 --- a/xc/programs/Xserver/hw/kdrive/vesa/Imakefile +++ b/xc/programs/Xserver/hw/kdrive/vesa/Imakefile @@ -1,10 +1,10 @@ -XCOMM $XFree86$ +XCOMM $XFree86: xc/programs/Xserver/hw/kdrive/vesa/Imakefile,v 1.3 2000/10/20 00:19:50 keithp Exp $ KDRIVE=.. #include "../Kdrive.tmpl" -SRCS = vesa.c vesainit.c vbe.c +SRCS = vesa.c vesainit.c vbe.c vga.c vm86.c -OBJS = vesa.o vesainit.o vbe.o +OBJS = vesa.o vesainit.o vbe.o vga.o vm86.o INCLUDES = -I. $(KDINCS) diff --git a/xc/programs/Xserver/hw/kdrive/vesa/Xvesa.man b/xc/programs/Xserver/hw/kdrive/vesa/Xvesa.man index 958934aa9..04ae7f154 100644 --- a/xc/programs/Xserver/hw/kdrive/vesa/Xvesa.man +++ b/xc/programs/Xserver/hw/kdrive/vesa/Xvesa.man @@ -1,4 +1,4 @@ -.\" $XFree86$ +.\" $XFree86: xc/programs/Xserver/hw/kdrive/vesa/Xvesa.man,v 1.3 2000/10/20 00:19:50 keithp Exp $ .TH Xvesa 1 .SH NAME Xvesa \- VESA VBE tiny X server @@ -11,10 +11,13 @@ Xvesa \- VESA VBE tiny X server is a generic X server for Linux on the x86 platform. .B Xvesa doesn't know about any particular hardware, and sets the video mode by -running the video BIOS in VM86 mode. +running the video BIOS in VM86 mode. .B Xvesa therefore runs untrusted code with full priviledges, and is one of the most insecure X servers available. +.B Xvesa +uses both standard VGA BIOS modes and any modes advertised by a VESA 2.0 +BIOS if available. .B Run at your own risk. .SH OPTIONS In addition to the normal tiny-X server's options (to be described in @@ -28,9 +31,9 @@ specifies the VESA video mode to use. If mode is not supported by your BIOS and hardware, .B Xvesa will fail, hang your system, or make your monitor explode; you are on -your own. This option is ignored if the +your own. This option overrides any .B -screen -option was used. +options. .TP 8 .B -listmodes tells the server to list all supported video modes. If @@ -55,8 +58,11 @@ don't use a linear framebuffer even if one is available. You don't want to use this option. .TP 8 .B -swaprgb -pass RGB values in the order that works on my machine. Use this if +pass RGB values in the order that works on broken BIOSes. Use this if the colours are wrong in PseudoColor modes. +.TP 8 +.B -verbose +emit diagnostic messages during BIOS initialization and teardown. .SH KEYBOARD Xvesa handles the keyboard in the same manner as the .B Xfbdev @@ -69,10 +75,17 @@ assumed to be buggy. Allowing your users to run is a major security hole. Allowing yourself to run .B Xvesa is probably a mistake. +.B Xvesa +records the current BIOS mode when it starts and restores that mode on +termination; if the video card has been reprogrammed by another application, +the display will almost certainly be trashed. The alternative of saving and +restoring the complete video card state has proven unreliable on most video +cards. .SH SEE ALSO X(1), Xserver(1), xdm(1), xinit(1), Xfbdev(1). .SH AUTHORS The tiny-X server was written by Keith Packard, and the VESA driver was added by Juliusz Chroboczek who didn't realise what he was doing until it was too late. Tiny-X uses code from XFree86, which in turn -is based on the Sample Implementation. +is based on the Sample Implementation. Keith Packard then added support for +standard VGA BIOS modes and is especially proud of 320x200 16 color mode. diff --git a/xc/programs/Xserver/hw/kdrive/vesa/vbe.c b/xc/programs/Xserver/hw/kdrive/vesa/vbe.c index fecb05803..8bd35b4b4 100644 --- a/xc/programs/Xserver/hw/kdrive/vesa/vbe.c +++ b/xc/programs/Xserver/hw/kdrive/vesa/vbe.c @@ -19,537 +19,409 @@ 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. */ -/* $XFree86$ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/vesa/vbe.c,v 1.6 2000/10/20 00:19:50 keithp Exp $ */ -#include <stdlib.h> -#include <errno.h> -#include <unistd.h> -#include <fcntl.h> -#include <sys/mman.h> -#include <sys/vm86.h> -#include <sys/io.h> -#include "vbe.h" +#include "vesa.h" -#ifdef NOT_IN_X_SERVER -#include <stdio.h> -#include <stdarg.h> -#include <malloc.h> -static void ErrorF(char*, ...); -#define xalloc(a) malloc(a) -#define xcalloc(a,b) calloc(a,b) -#define xfree(a) free(a) -#else -#include "X.h" -#include "Xproto.h" -#include "Xos.h" -#include "os.h" -#endif - -static int vm86old(struct vm86_struct *vms); -static int vm86_loop(VbeInfoPtr vi); - -static U8 rev_ints[32] = -{ 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0x80, -}; - -static U8 retcode_data[2] = -{ 0xCD, 0xFF }; - -#define LM(vi,i) (((char*)vi->loMem)[i-LOMEM_BASE]) -#define LMW(vi,i) (*(U16*)(&LM(vi,i))) -#define LML(vi,i) (*(U32*)(&LM(vi,i))) -#define MM(vi,i) (((char*)vi->magicMem)[i-MAGICMEM_BASE]) -#define MMW(vi,i) (*(U16*)(&MM(vi,i))) -#define MML(vi,i) (*(U32*)(&MM(vi,i))) -#define HM(vi,i) (((char*)vi->hiMem)[i-HIMEM_BASE]) -#define HMW(vi,i) (*(U16*)(&MM(vi,i))) -#define HML(vi,i) (*(U32*)(&MM(vi,i))) - -#define PUSHW(vi, i) \ -{ vi->vms.regs.esp -= 2;\ - LMW(vi,MAKE_POINTER(vi->vms.regs.ss, vi->vms.regs.esp)) = i;} - -VbeInfoPtr -VbeSetup() +int +VbeGetVib (Vm86InfoPtr vi, VbeInfoBlock *vib) { - int devmem = -1, devzero = -1; - void *magicMem, *loMem, *hiMem; - U32 stack_base, vib_base, vmib_base, ret_code; - VbeInfoPtr vi = NULL; - - devmem = open("/dev/mem", O_RDWR); - if(devmem < 0) { - perror("open /dev/mem"); - goto fail; - } - - devzero = open("/dev/zero", O_RDWR); - if(devmem < 0) { - perror("open /dev/zero"); - goto fail; - } - - - magicMem = mmap((void*)MAGICMEM_BASE, MAGICMEM_SIZE, - PROT_READ | PROT_WRITE | PROT_EXEC, - MAP_PRIVATE | MAP_FIXED, devmem, MAGICMEM_BASE); - if(magicMem == MAP_FAILED) { - ErrorF("Couldn't map magic memory\n"); - goto fail; - } - - loMem = mmap((void*)LOMEM_BASE, LOMEM_SIZE, - PROT_READ | PROT_WRITE | PROT_EXEC, - MAP_PRIVATE | MAP_FIXED, devzero, LOMEM_BASE); - if(loMem == MAP_FAILED) { - ErrorF("Couldn't map low memory\n"); - munmap(magicMem, MAGICMEM_SIZE); - goto fail; - } - - hiMem = mmap((void*)HIMEM_BASE, HIMEM_SIZE, - PROT_READ | PROT_WRITE | PROT_EXEC, - MAP_SHARED | MAP_FIXED, - devmem, HIMEM_BASE); - if(hiMem == MAP_FAILED) { - ErrorF("Couldn't map high memory\n"); - munmap(magicMem, MAGICMEM_SIZE); - munmap(loMem, LOMEM_SIZE); - goto fail; + int code; + int mark; + int vib_base; + VbeInfoBlock *vib_low; + + mark = Vm86MarkMemory (vi); + vib_base = Vm86AllocateMemory (vi, sizeof (VbeInfoBlock)); + vib_low = (VbeInfoBlock*)&(LM(vi, vib_base)); + vi->vms.regs.eax = 0x4F00; + vi->vms.regs.es = POINTER_SEGMENT(vib_base); + vi->vms.regs.edi = POINTER_OFFSET(vib_base); + memcpy(vib_low->VbeSignature, "VBE2", 4); + code = VbeDoInterrupt10(vi); + if(code >= 0) + { + if(memcmp(vib_low->VbeSignature, "VESA", 4) == 0) + *vib = *vib_low; + else + code = -1; } + Vm86ReleaseMemory (vi, mark); + return code; +} - vi = xalloc(sizeof(VbeInfoRec)); - if (!vi) - goto unmapfail; - - vi->devmem = devmem; - vi->devzero = devzero; - vi->magicMem = magicMem; - vi->loMem = loMem; - vi->hiMem = hiMem; - vi->brk = LOMEM_BASE; - - stack_base = VbeAllocateMemory(vi, STACK_SIZE); - if(stack_base == ALLOC_FAIL) - goto unmapfail; - ret_code = VbeAllocateMemory(vi, sizeof(retcode_data)); - if(ret_code == ALLOC_FAIL) - goto unmapfail; - vib_base = VbeAllocateMemory(vi, sizeof(VbeInfoBlock)); - if(vib_base == ALLOC_FAIL) - goto unmapfail; - vmib_base = VbeAllocateMemory(vi, sizeof(VbeModeInfoBlock)); - if(vmib_base == ALLOC_FAIL) - goto unmapfail; - - vi->stack_base = stack_base; - vi->ret_code = ret_code; - vi->vib_base = vib_base; - vi->vmib_base = vmib_base; - vi->statebuffer_base = ~0; - vi->palette_scratch_base = ~0; - vi->palette_format = 6; - vi->palette_wait = 0; - vi->windowA_offset = vi->windowB_offset = -1; - vi->last_window = 1; - vi->vga_palette = 1; +int +VbeGetVmib (Vm86InfoPtr vi, int mode, VbeModeInfoBlock *vmib) +{ + int code; + int mark; + int vib_base; + int vmib_base; + VbeModeInfoBlock *vmib_low; - memset(&vi->vms, 0, sizeof(struct vm86_struct)); - vi->vms.flags = 0; - vi->vms.screen_bitmap = 0; - vi->vms.cpu_type = CPU_586; - memcpy(&vi->vms.int_revectored, rev_ints, sizeof(rev_ints)); - - ioperm(0, 0x400, 1); - iopl(3); - - return vi; - - unmapfail: - munmap(magicMem, MAGICMEM_SIZE); - munmap(loMem, LOMEM_SIZE); - munmap(hiMem, HIMEM_SIZE); - fail: - if(devmem >= 0) - close(devmem); - if(devzero >= 0) - close(devzero); - if(vi) - xfree(vi); - return NULL; + mark = Vm86MarkMemory (vi); + + vmib_base = Vm86AllocateMemory (vi, sizeof (VbeModeInfoBlock)); + vmib_low = (VbeModeInfoBlock*)&(LM(vi, vmib_base)); + + vi->vms.regs.eax = 0x4F01; + vi->vms.regs.ecx = mode&0xFFFF; + vi->vms.regs.es = POINTER_SEGMENT(vmib_base); + vi->vms.regs.edi = POINTER_OFFSET(vmib_base); + code = VbeDoInterrupt10(vi); + + if(code >= 0) + *vmib = *vmib_low; + Vm86ReleaseMemory (vi, mark); + return code; } void -VbeCleanup(VbeInfoPtr vi) +VbeReportInfo (Vm86InfoPtr vi) { - munmap(vi->magicMem, MAGICMEM_SIZE); - munmap(vi->loMem, LOMEM_SIZE); - munmap(vi->hiMem, HIMEM_SIZE); - xfree(vi); -} + VbeInfoBlock vib; + int code; -VbeInfoBlock * -VbeGetInfo(VbeInfoPtr vi) -{ - int code; - VbeInfoBlock *vib = (VbeInfoBlock*)&(LM(vi, vi->vib_base)); - vi->vms.regs.eax = 0x4F00; - vi->vms.regs.es = POINTER_SEGMENT(vi->vib_base); - vi->vms.regs.edi = POINTER_OFFSET(vi->vib_base); - memcpy(vib->VbeSignature, "VBE2", 4); - code = VbeDoInterrupt10(vi); - if(code < 0) - return NULL; - if(memcmp(vib->VbeSignature, "VESA", 4) != 0) { - ErrorF("Int 10 didn't return VESA signature in info block"); - return NULL; - } - return vib; + code = VbeGetVib (vi, &vib); + if (code >= 0) + VbeReportVib(vi, &vib); } -VbeModeInfoBlock * -VbeGetModeInfo(VbeInfoPtr vi, int mode) +int +VbeGetNmode (Vm86InfoPtr vi) { - int code; - U32 p; - VbeInfoBlock *vib = (VbeInfoBlock*)&(LM(vi, vi->vib_base)); - VbeModeInfoBlock *vmib = (VbeModeInfoBlock*)&(LM(vi, vi->vmib_base)); - p = MAKE_POINTER_1(vib->VideoModePtr); - if(!VbeIsMemory(vi, p)) { - ErrorF("VideoModePtr 0x%08X doesn't point at low memory\n", - vib->VideoModePtr); - return NULL; + VbeInfoBlock vib; + int code; + int ret = 0; + unsigned int p; + int n; + int mode; + + code = VbeGetVib (vi, &vib); + if (code >= 0) + { + p = MAKE_POINTER_1(vib.VideoModePtr); + for (n = 0; ; n++) + { + mode = Vm86MemoryW(vi, p); + if (mode == 0xffff) + break; + p += 2; + } + code = n; } - vi->vms.regs.eax = 0x4F01; - vi->vms.regs.ecx = mode&0xFFFF; - vi->vms.regs.es = POINTER_SEGMENT(vi->vmib_base); - vi->vms.regs.edi = POINTER_OFFSET(vi->vmib_base); - code = VbeDoInterrupt10(vi); - if(code < 0) - return NULL; - else - return vmib; + return code; } int -VbeSetMode(VbeInfoPtr vi, int mode, int linear) +VbeGetModes (Vm86InfoPtr vi, VesaModePtr modes, int nmode) { - int code; + VbeInfoBlock vib; + int code; + int ret = 0; + unsigned int p; + int n; + int mode; + VbeModeInfoBlock vmib; - vi->windowA_offset = vi->windowB_offset = -1; - vi->last_window = 1; + code = VbeGetVib (vi, &vib); + if (code < 0) + return code; + + memset (modes, '\0', n * sizeof (VesaModeRec)); - vi->vms.regs.eax = 0x4F02; - vi->vms.regs.ebx = (mode & 0xFFFF) | 0x8000; - if(linear) - vi->vms.regs.ebx |= 0x4000; - code = VbeDoInterrupt10(vi); - if(code < 0) - return -1; - return 0; + p = MAKE_POINTER_1(vib.VideoModePtr); + for (n = 0; n < nmode; n++) + { + mode = Vm86MemoryW(vi, p); + if (mode == 0xffff) + break; + modes[n].mode = mode; + modes[n].vbe = 1; + p += 2; + } + + nmode = n; + + for (n = 0; n < nmode; n++) + { + code = VbeGetVmib (vi, modes[n].mode, &vmib); + if (code >= 0) + { + modes[n].ModeAttributes = vmib.ModeAttributes; + modes[n].NumberOfPlanes = vmib.NumberOfPlanes; + modes[n].BitsPerPixel = vmib.BitsPerPixel; + modes[n].MemoryModel = vmib.MemoryModel; + modes[n].RedMaskSize = vmib.RedMaskSize; + modes[n].RedFieldPosition = vmib.RedFieldPosition; + modes[n].GreenMaskSize = vmib.GreenMaskSize; + modes[n].GreenFieldPosition = vmib.GreenFieldPosition; + modes[n].BlueMaskSize = vmib.BlueMaskSize; + modes[n].BlueFieldPosition = vmib.BlueFieldPosition; + modes[n].RsvdMaskSize = vmib.RsvdMaskSize; + modes[n].RsvdFieldPosition = vmib.RsvdFieldPosition; + modes[n].DirectColorModeInfo = vmib.DirectColorModeInfo; + modes[n].XResolution = vmib.XResolution; + modes[n].YResolution = vmib.YResolution; + modes[n].BytesPerScanLine = vmib.BytesPerScanLine; + } + } + + return nmode; } -int -VbeGetMode(VbeInfoPtr vi, int *mode) +VbeInfoPtr +VbeInit (Vm86InfoPtr vi) { - int code; - vi->vms.regs.eax = 0x4F03; - code = VbeDoInterrupt10(vi); - if(code < 0) - return - 1; - *mode = vi->vms.regs.ebx & 0xFFFF; - return 0; -} + VbeInfoPtr vbe; + int code; + VbeInfoBlock vib; -int -VbeSetupStateBuffer(VbeInfoPtr vi) -{ - int code; - if(vi->statebuffer_base != ~0) - return 0; - vi->vms.regs.eax = 0x4F04; - vi->vms.regs.edx = 0x0000; - vi->vms.regs.ecx = 0x000F; - code = VbeDoInterrupt10(vi); - if(code < 0) - return -1; - vi->statebuffer_base = VbeAllocateMemory(vi, vi->vms.regs.ebx & 0xFFFF); - return 0; + code = VbeGetVib (vi, &vib); + if (code < 0) + return 0; + + vbe = xalloc (sizeof (VbeInfoRec)); + if (!vbe) + return 0; + vbe->palette_format = 6; + vbe->palette_wait = TRUE; + return vbe; } -int -VbeSaveState(VbeInfoPtr vi) +void +VbeCleanup (Vm86InfoPtr vi, VbeInfoPtr vbe) { - int code; - code = VbeSetupStateBuffer(vi); - if(code < 0) - return -1; - vi->vms.regs.eax = 0x4F04; - vi->vms.regs.edx = 0x0001; - vi->vms.regs.ecx = 0x000F; - vi->vms.regs.es = POINTER_SEGMENT(vi->statebuffer_base); - vi->vms.regs.ebx = POINTER_OFFSET(vi->statebuffer_base); - code = VbeDoInterrupt10(vi); - if(code < 0) - return -1; - return 0; + xfree (vbe); } int -VbeRestoreState(VbeInfoPtr vi) +VbeSetMode (Vm86InfoPtr vi, VbeInfoPtr vbe, int mode, int linear) { - int code; - vi->vms.regs.eax = 0x4F04; - vi->vms.regs.edx = 0x0002; - vi->vms.regs.ecx = 0x000F; - vi->vms.regs.es = POINTER_SEGMENT(vi->statebuffer_base); - vi->vms.regs.ebx = POINTER_OFFSET(vi->statebuffer_base); + int code; + VbeInfoBlock vib; + int palette_wait = 0, palette_hi = 0; + + code = VbeGetVib (vi, &vib); + if (code < 0) + return -1; + + code = VbeGetVmib (vi, mode, &vbe->vmib); + if (code < 0) + return -1; + + mode = (mode & 0xffff) | 0x8000; + if (linear) + mode |= 0x4000; + + vi->vms.regs.eax = 0x4F02; + vi->vms.regs.ebx = mode; code = VbeDoInterrupt10(vi); if(code < 0) return -1; + + vbe->windowA_offset = vbe->windowB_offset = -1; + vbe->last_window = 1; + + if(vib.Capabilities[0] & 1) + palette_hi = 1; + if(vib.Capabilities[0] & 4) + palette_wait = 1; + + if(palette_hi || palette_wait) + VbeSetPaletteOptions(vi, vbe, palette_hi?8:6, palette_wait); + return 0; } -int -VbeSetTextMode(VbeInfoPtr vi, int mode) +int +VbeGetMode(Vm86InfoPtr vi, int *mode) { int code; - vi->vms.regs.eax = mode & 0x7f; + vi->vms.regs.eax = 0x4F03; code = VbeDoInterrupt10(vi); if(code < 0) - return -1; + return - 1; + *mode = vi->vms.regs.ebx & 0xFFFF; return 0; } void * -VbeMapFramebuffer(VbeInfoPtr vi, - VbeModeInfoBlock *vmib) -{ - U8 *fb; - VbeInfoBlock *vib = (VbeInfoBlock*)&(LM(vi, vi->vib_base)); - int size; - int pagesize = getpagesize(), before, after; - - size = 1024 * 64L * vib->TotalMemory; +VbeMapFramebuffer(Vm86InfoPtr vi, VbeInfoPtr vbe, int mode, int *ret_size) +{ + U8 *fb; + VbeInfoBlock vib; + VbeModeInfoBlock vmib; + int size; + int pagesize = getpagesize(); + int before, after; + int devmem; + + if (VbeGetVib (vi, &vib) < 0) + return 0; + + if (VbeGetVmib (vi, mode, &vmib) < 0) + return 0; + + size = 1024 * 64L * vib.TotalMemory; + + *ret_size = size; - before = vmib->PhysBasePtr % pagesize; - after = pagesize - ((vmib->PhysBasePtr + size) % pagesize); + before = vmib.PhysBasePtr % pagesize; + after = pagesize - ((vmib.PhysBasePtr + size) % pagesize); if(after == pagesize) after = 0; - fb = mmap(0, before + size + after, - PROT_READ | PROT_WRITE, MAP_SHARED, - vi->devmem, vmib->PhysBasePtr - before); - if(fb == MAP_FAILED) { - ErrorF("Failed to map framebuffer: %d\n", errno); + fb = KdMapDevice (vmib.PhysBasePtr - before, before + size + after); + + if(fb == 0) + { + ErrorF("Failed to map framebuffer\n"); return NULL; } return fb + before; } -int -VbeUnmapFramebuffer(VbeInfoPtr vi, - VbeModeInfoBlock *vmib, - void *fb) +void +VbeUnmapFramebuffer(Vm86InfoPtr vi, VbeInfoPtr vbe, int mode, void *fb) { - int code; - VbeInfoBlock *vib = (VbeInfoBlock*)&(LM(vi, vi->vib_base)); - int size; - int pagesize = getpagesize(), before, after; + VbeInfoBlock vib; + VbeModeInfoBlock vmib; + int size; + int pagesize = getpagesize(); + int before, after; - size = 1024 * 64L * vib->TotalMemory; + if (VbeGetVib (vi, &vib) < 0) + return; + + if (VbeGetVmib (vi, mode, &vmib) < 0) + return; + + size = 1024 * 64L * vib.TotalMemory; - before = vmib->PhysBasePtr % pagesize; - after = pagesize - ((vmib->PhysBasePtr + size) % pagesize); + before = vmib.PhysBasePtr % pagesize; + after = pagesize - ((vmib.PhysBasePtr + size) % pagesize); if(after == pagesize) after = 0; fb = (void *) ((char *) fb - before); - code = munmap(fb, before + size + after); - if(code) { - ErrorF("Couldn't unmap framebuffer: %d\n", errno); - return -1; - } - return 0; -} - -static int -PreparePalette(VbeInfoPtr vi) -{ - int code; - if(vi->palette_scratch_base == ~0) { - vi->palette_scratch_base = VbeAllocateMemory(vi, 4*256); - if(vi->palette_scratch_base == ALLOC_FAIL) { - ErrorF("Couldn't allocate scratch area for palette transfer\n"); - return -1; - } - } - if(!vi->palette_format) { - /* This isn't used currently */ - vi->vms.regs.eax = 0x4F08; - vi->vms.regs.ebx = 0x01; - code = VbeDoInterrupt10(vi); - if(code < 0) - return -1; - vi->palette_format = vi->vms.regs.ebx & 0xFF; - } - return 0; + KdUnmapDevice (fb, before + size + after); } int -VbeSetPalette(VbeInfoPtr vi, int first, int number, U8 *entries) +VbeSetPalette(Vm86InfoPtr vi, VbeInfoPtr vbe, int first, int number, U8 *entries) { - U8 *palette_scratch; - int i, j, code; + U8 *palette_scratch; + int mark; + int palette_base; + int i, j, code; if(number == 0) return 0; - code = PreparePalette(vi); - if(code < 0) - return -1; - if(first < 0 || number < 0 || first + number > 256) { ErrorF("Cannot set %d, %d palette entries\n", first, number); return -1; } - palette_scratch = &LM(vi, vi->palette_scratch_base); - - if(vi->palette_format < 6 || vi->palette_format > 8) { - ErrorF("Impossible palette format %d\n", vi->palette_format); + if(vbe->palette_format < 6 || vbe->palette_format > 8) { + ErrorF("Impossible palette format %d\n", vbe->palette_format); return -1; } - if (vi->vga_palette) - { - vi->vms.regs.eax = 0x1012; - vi->vms.regs.ebx = first; - vi->vms.regs.ecx = number; - vi->vms.regs.es = POINTER_SEGMENT(vi->palette_scratch_base); - vi->vms.regs.edx = POINTER_OFFSET(vi->palette_scratch_base); - j = 0; - i = 0; - while (number--) - { - palette_scratch[j++] = entries[i++] >> (8-vi->palette_format); - palette_scratch[j++] = entries[i++] >> (8-vi->palette_format); - palette_scratch[j++] = entries[i++] >> (8-vi->palette_format); - i++; - } - } + mark = Vm86MarkMemory (vi); + palette_base = Vm86AllocateMemory (vi, 4 * 256); + + palette_scratch = &LM(vi, palette_base); + + for(i=0; i<number*4; i++) + palette_scratch[i] = entries[i] >> (8 - vbe->palette_format); + + vi->vms.regs.eax = 0x4F09; + if(vbe->palette_wait) + vi->vms.regs.ebx = 0x80; else - { - for(i=0; i<number*4; i++) - palette_scratch[i] = entries[i] >> (8 - vi->palette_format); - - vi->vms.regs.eax = 0x4F09; - if(vi->palette_wait) - vi->vms.regs.ebx = 0x80; - else - vi->vms.regs.ebx = 0x00; - vi->vms.regs.ecx = number; - vi->vms.regs.edx = first; - vi->vms.regs.es = POINTER_SEGMENT(vi->palette_scratch_base); - vi->vms.regs.edi = POINTER_OFFSET(vi->palette_scratch_base); - } + vi->vms.regs.ebx = 0x00; + vi->vms.regs.ecx = number; + vi->vms.regs.edx = first; + vi->vms.regs.es = POINTER_SEGMENT(palette_base); + vi->vms.regs.edi = POINTER_OFFSET(palette_base); code = VbeDoInterrupt10(vi); + Vm86ReleaseMemory (vi, mark); + if(code < 0) return -1; return 0; -} +} int -VbeGetPalette(VbeInfoPtr vi, int first, int number, U8 *entries) +VbeGetPalette(Vm86InfoPtr vi, VbeInfoPtr vbe, int first, int number, U8 *entries) { - U8 *palette_scratch; - int i, j, code; + U8 *palette_scratch; + int mark; + int palette_base; + int i, j, code; - code = PreparePalette(vi); - if(code < 0) - return -1; + if(number == 0) + return 0; - if(first< 0 || number < 0 || first + number > 256) { + if(first < 0 || number < 0 || first + number > 256) { ErrorF("Cannot get %d, %d palette entries\n", first, number); return -1; } - palette_scratch = &LM(vi, vi->palette_scratch_base); - - if(vi->palette_format < 6 || vi->palette_format > 8) { - ErrorF("Impossible palette format %d\n", vi->palette_format); + if(vbe->palette_format < 6 || vbe->palette_format > 8) { + ErrorF("Impossible palette format %d\n", vbe->palette_format); return -1; } -retry: - if (vi->vga_palette) - { - vi->vms.regs.eax = 0x1017; - vi->vms.regs.ebx = first; - vi->vms.regs.ecx = number; - vi->vms.regs.es = POINTER_SEGMENT(vi->palette_scratch_base); - vi->vms.regs.edx = POINTER_OFFSET(vi->palette_scratch_base); - code = VbeDoInterrupt10(vi); - if(code < 0) - return -1; - j = 0; - i = 0; - while (number--) - { - entries[i++] = palette_scratch[j++] << (8-vi->palette_format); - entries[i++] = palette_scratch[j++] << (8-vi->palette_format); - entries[i++] = palette_scratch[j++] << (8-vi->palette_format); - entries[i++] = 0; - } - } - else - { - vi->vms.regs.eax = 0x4F09; - vi->vms.regs.ebx = 0x01; - vi->vms.regs.ecx = number; - vi->vms.regs.edx = first; - vi->vms.regs.es = POINTER_SEGMENT(vi->palette_scratch_base); - vi->vms.regs.edi = POINTER_OFFSET(vi->palette_scratch_base); - code = VbeDoInterrupt10(vi); - if(code < 0) - { - vi->vga_palette = TRUE; - goto retry; - } + mark = Vm86MarkMemory (vi); + palette_base = Vm86AllocateMemory (vi, 4 * 256); + palette_scratch = &LM(vi, palette_base); + + vi->vms.regs.eax = 0x4F09; + vi->vms.regs.ebx = 0x01; + vi->vms.regs.ecx = number; + vi->vms.regs.edx = first; + vi->vms.regs.es = POINTER_SEGMENT(palette_base); + vi->vms.regs.edi = POINTER_OFFSET(palette_base); + code = VbeDoInterrupt10(vi); + if(code >= 0) + { for(i=0; i<number*4; i++) - entries[i] = palette_scratch[i] << (8-vi->palette_format); + entries[i] = palette_scratch[i] << (8-vbe->palette_format); } + Vm86ReleaseMemory (vi, mark); return 0; } int -VbeSetPaletteOptions(VbeInfoPtr vi, U8 bits, int wait) +VbeSetPaletteOptions(Vm86InfoPtr vi, VbeInfoPtr vbe, U8 bits, int wait) { int code; + if(bits < 6 || bits > 8) { - ErrorF("Impossible palette format %d\n", vi->palette_format); + ErrorF("Impossible palette format %d\n", bits); return -1; } - if(bits != vi->palette_format) { - vi->palette_format = 0; + if(bits != vbe->palette_format) + { + vbe->palette_format = 0; vi->vms.regs.eax = 0x4F08; vi->vms.regs.ebx = bits << 8; code = VbeDoInterrupt10(vi); if(code < 0) return -1; - vi->palette_format = bits; + vbe->palette_format = bits; } - vi->palette_wait = wait; + vbe->palette_wait = wait; return 0; } static int -VbeReallySetWindow(VbeInfoPtr vi, U8 window, U16 winnum) +VbeReallySetWindow(Vm86InfoPtr vi, U8 window, U16 winnum) { int code; vi->vms.regs.eax = 0x4F05; @@ -562,82 +434,66 @@ VbeReallySetWindow(VbeInfoPtr vi, U8 window, U16 winnum) } void * -VbeSetWindow(VbeInfoPtr vi, int offset, int purpose, int *size_return) +VbeSetWindow(Vm86InfoPtr vi, VbeInfoPtr vbe, int offset, int purpose, int *size_return) { - VbeModeInfoBlock *vmib = (VbeModeInfoBlock*)&(LM(vi, vi->vmib_base)); - int window_size = vmib->WinSize * 1024; + int window_size = vbe->vmib.WinSize * 1024; int code; int winnum; - if(vi->windowA_offset >= 0) - if(vi->windowA_offset <= offset && vi->windowA_offset + window_size > offset) - if(vmib->WinAAttributes & purpose) - goto windowA; + if(vbe->windowA_offset >= 0) + if(vbe->windowA_offset <= offset && vbe->windowA_offset + window_size > offset) + if(vbe->vmib.WinAAttributes & purpose) + goto windowA; - if(vi->windowB_offset >= 0) - if(vi->windowB_offset <= offset && vi->windowB_offset + window_size > offset) - if(vmib->WinBAttributes & purpose) - goto windowB; + if(vbe->windowB_offset >= 0) + if(vbe->windowB_offset <= offset && vbe->windowB_offset + window_size > offset) + if(vbe->vmib.WinBAttributes & purpose) + goto windowB; - if(!(vmib->WinBAttributes & purpose) || - !(vmib->WinBAttributes & VBE_WINDOW_RELOCATE)) - goto set_windowA; + if(!(vbe->vmib.WinBAttributes & purpose) || + !(vbe->vmib.WinBAttributes & VBE_WINDOW_RELOCATE)) + goto set_windowA; - if(!(vmib->WinAAttributes & purpose) || - !(vmib->WinAAttributes & VBE_WINDOW_RELOCATE)) - goto set_windowB; + if(!(vbe->vmib.WinAAttributes & purpose) || + !(vbe->vmib.WinAAttributes & VBE_WINDOW_RELOCATE)) + goto set_windowB; - if(vi->last_window) - goto set_windowA; + if(vbe->last_window) + goto set_windowA; else - goto set_windowB; + goto set_windowB; - set_windowA: - winnum = offset / (vmib->WinGranularity * 1024); +set_windowA: + winnum = offset / (vbe->vmib.WinGranularity * 1024); code = VbeReallySetWindow(vi, 0, winnum); if(code < 0) { - ErrorF("Couldn't set window A to %d*%d\n", - (int)winnum, (int)vmib->WinGranularity); - return NULL; - } - vi->windowA_offset = winnum * vmib->WinGranularity * 1024; - windowA: - vi->last_window = 0; - *size_return = vmib->WinSize * 1024 - (offset - vi->windowA_offset); - return ((U8*)&(LM(vi, MAKE_POINTER(vmib->WinASegment, 0)))) + - offset - vi->windowA_offset; - - set_windowB: - winnum = offset / (vmib->WinGranularity * 1024); + ErrorF("Couldn't set window A to %d*%d\n", + (int)winnum, (int)vbe->vmib.WinGranularity); + return NULL; + } + vbe->windowA_offset = winnum * vbe->vmib.WinGranularity * 1024; +windowA: + vbe->last_window = 0; + *size_return = vbe->vmib.WinSize * 1024 - (offset - vbe->windowA_offset); + return ((U8*)&(LM(vi, MAKE_POINTER(vbe->vmib.WinASegment, 0)))) + offset - vbe->windowA_offset; + +set_windowB: + winnum = offset / (vbe->vmib.WinGranularity * 1024); code = VbeReallySetWindow(vi, 1, winnum); if(code < 0) { - ErrorF("Couldn't set window B to %d*%d\n", - (int)winnum, (int)vmib->WinGranularity); - return NULL; + ErrorF("Couldn't set window B to %d*%d\n", + (int)winnum, (int)vbe->vmib.WinGranularity); + return NULL; } - vi->windowB_offset = winnum * vmib->WinGranularity * 1024; - windowB: - vi->last_window = 1; - *size_return = vmib->WinSize * 1024 - (offset - vi->windowB_offset); - return ((U8*)&(LM(vi, MAKE_POINTER(vmib->WinBSegment, 0)))) + offset - vi->windowB_offset; -} - -int -VbeSetWritePlaneMask(VbeInfoPtr vi, int mask) -{ - asm volatile ("outb %b0,%w1" : : "a" (2), "d" (0x3c4)); - asm volatile ("outb %b0,%w1" : : "a" (mask), "d" (0x3c5)); -} - -int -VbeSetReadPlaneMap(VbeInfoPtr vi, int map) -{ - asm volatile ("outb %b0,%w1" : : "a" (4), "d" (0x3ce)); - asm volatile ("outb %b0,%w1" : : "a" (map), "d" (0x3cf)); + vbe->windowB_offset = winnum * vbe->vmib.WinGranularity * 1024; +windowB: + vbe->last_window = 1; + *size_return = vbe->vmib.WinSize * 1024 - (offset - vbe->windowB_offset); + return ((U8*)&(LM(vi, MAKE_POINTER(vbe->vmib.WinBSegment, 0)))) + offset - vbe->windowB_offset; } int -VbeReportInfo(VbeInfoPtr vi, VbeInfoBlock *vib) +VbeReportVib(Vm86InfoPtr vi, VbeInfoBlock *vib) { U32 i, p; unsigned char c; @@ -647,9 +503,10 @@ VbeReportInfo(VbeInfoPtr vi, VbeInfoBlock *vib) (vib->VbeVersion & 0xFF)+'0'); p = vib->OemStringPtr; for(i = 0; 1; i++) { - c = VbeMemory(vi, MAKE_POINTER_1(p+i)); + c = Vm86Memory(vi, MAKE_POINTER_1(p+i)); if(!c) break; - ErrorF("%c", c); + if (c >= ' ') + ErrorF("%c", c); if (i > 32000) { error = 1; break; @@ -667,7 +524,7 @@ VbeReportInfo(VbeInfoPtr vi, VbeInfoBlock *vib) } int -VbeReportModeInfo(VbeInfoPtr vi, U16 mode, VbeModeInfoBlock *vmib) +VbeReportModeInfo(Vm86InfoPtr vi, U16 mode, VbeModeInfoBlock *vmib) { int supported = (vmib->ModeAttributes&0x1)?1:0; int colour = (vmib->ModeAttributes&0x8)?1:0; @@ -723,526 +580,43 @@ VbeReportModeInfo(VbeInfoPtr vi, U16 mode, VbeModeInfoBlock *vmib) ErrorF("\n"); return 0; } + int -VbeDoInterrupt10(VbeInfoPtr vi) +VbeDoInterrupt10(Vm86InfoPtr vi) { int code; int oldax; oldax = vi->vms.regs.eax & 0xFFFF; - code = VbeDoInterrupt(vi, 0x10); - + code = Vm86DoInterrupt(vi, 0x10); if(code < 0) - return -1; + return -1; if((vi->vms.regs.eax & 0xFFFF) != 0x4F && (oldax & 0xFF00) == 0x4F00) { - ErrorF("Int 10h (0x%04X) failed: 0x%04X", - oldax, vi->vms.regs.eax & 0xFFFF); - if((oldax & 0xFF00) == 0x4F00) { - switch((vi->vms.regs.eax & 0xFF00)>>8) { - case 0: - ErrorF(" (success)\n"); - break; - case 1: - ErrorF(" (function call failed)\n"); - break; - case 2: - ErrorF(" (function not supported on this hardware)\n"); - break; - case 3: - ErrorF(" (function call invalid in this video mode)\n"); - break; - default: - ErrorF(" (unknown error)\n"); - break; - } - return -1; - } else { - ErrorF("\n"); - } + ErrorF("Int 10h (0x%04X) failed: 0x%04X", + oldax, vi->vms.regs.eax & 0xFFFF); + if((oldax & 0xFF00) == 0x4F00) { + switch((vi->vms.regs.eax & 0xFF00)>>8) { + case 0: + ErrorF(" (success)\n"); + return 0; + case 1: + ErrorF(" (function call failed)\n"); + break; + case 2: + ErrorF(" (function not supported on this hardware)\n"); + break; + case 3: + ErrorF(" (function call invalid in this video mode)\n"); + break; + default: + ErrorF(" (unknown error)\n"); + break; + } return -1; + } else { + ErrorF("\n"); + } } return code; } - -int -VbeDoInterrupt(VbeInfoPtr vi, int num) -{ - U16 seg, off; - int code; - - if(num < 0 || num>256) { - ErrorF("Interrupt %d doesn't exist\n"); - return -1; - } - seg = MMW(vi,num * 4 + 2); - off = MMW(vi,num * 4); - if(MAKE_POINTER(seg, off) < ROM_BASE || - MAKE_POINTER(seg, off) >= ROM_BASE + ROM_SIZE) { - ErrorF("Interrupt pointer doesn't point at ROM\n"); - return -1; - } - memcpy(&(LM(vi,vi->ret_code)), retcode_data, sizeof(retcode_data)); - vi->vms.regs.eflags = IF_MASK | IOPL_MASK; - vi->vms.regs.ss = POINTER_SEGMENT(vi->stack_base); - vi->vms.regs.esp = STACK_SIZE; - PUSHW(vi, IF_MASK | IOPL_MASK); - PUSHW(vi, POINTER_SEGMENT(vi->ret_code)); - PUSHW(vi, POINTER_OFFSET(vi->ret_code)); - vi->vms.regs.cs = seg; - vi->vms.regs.eip = off; - OsBlockSignals (); - code = vm86_loop(vi); - OsReleaseSignals (); - if(code < 0) { - perror("vm86 failed"); - return -1; - } else if(code != 0) { - ErrorF("vm86 returned 0x%04X\n", code); - return -1; - } else - return 0; -} - -static inline U8 -vm86_inb(U16 port) -{ - U8 value; - asm volatile ("inb %w1,%b0" : "=a" (value) : "d" (port)); - return value; -} - -static inline U16 -vm86_inw(U16 port) -{ - U16 value; - asm volatile ("inw %w1,%w0" : "=a" (value) : "d" (port)); - return value; -} - -static inline U32 -vm86_inl(U16 port) -{ - U32 value; - asm volatile ("inl %w1,%0" : "=a" (value) : "d" (port)); - return value; -} - -static inline void -vm86_outb(U16 port, U8 value) -{ - asm volatile ("outb %b0,%w1" : : "a" (value), "d" (port)); -} - -static inline void -vm86_outw(U16 port, U16 value) -{ - asm volatile ("outw %w0,%w1" : : "a" (value), "d" (port)); -} - -static inline void -vm86_outl(U16 port, U32 value) -{ - asm volatile ("outl %0,%w1" : : "a" (value), "d" (port)); -} - -#define SEG_CS 1 -#define SEG_DS 2 -#define SEG_ES 3 -#define SEG_SS 4 -#define SEG_GS 5 -#define SEG_FS 6 -#define REP 1 -#define REPNZ 2 -#define SET_8(_x, _y) (_x) = (_x & ~0xFF) | (_y & 0xFF); -#define SET_16(_x, _y) (_x) = (_x & ~0xFFFF) | (_y & 0xFFFF); -#define INC_IP(_i) SET_16(regs->eip, (regs->eip + _i)) -#define AGAIN INC_IP(1); goto again; - -static int -vm86_emulate(VbeInfoPtr vi) -{ - struct vm86_regs *regs = &vi->vms.regs; - U8 opcode; - int size; - int pref_seg = 0, pref_rep = 0, pref_66 = 0, pref_67 = 0; - U32 count; - int code; - - again: - if(!VbeIsMemory(vi, MAKE_POINTER(regs->cs, regs->eip))) { - ErrorF("Trying to execute unmapped memory\n"); - return -1; - } - opcode = VbeMemory(vi, MAKE_POINTER(regs->cs, regs->eip)); - switch(opcode) { - case 0x2E: pref_seg = SEG_CS; AGAIN; - case 0x3E: pref_seg = SEG_DS; AGAIN; - case 0x26: pref_seg = SEG_ES; AGAIN; - case 0x36: pref_seg = SEG_SS; AGAIN; - case 0x65: pref_seg = SEG_GS; AGAIN; - case 0x64: pref_seg = SEG_FS; AGAIN; - case 0x66: pref_66 = 1; AGAIN; - case 0x67: pref_67 = 1; AGAIN; - case 0xF2: pref_rep = REPNZ; AGAIN; - case 0xF3: pref_rep = REP; AGAIN; - - case 0xEC: /* IN AL, DX */ - SET_8(regs->eax, vm86_inb(regs->edx & 0xFFFF)); - INC_IP(1); - break; - case 0xED: /* IN AX, DX */ - if(pref_66) - regs->eax = vm86_inl(regs->edx & 0xFFFF); - else - SET_16(regs->eax, vm86_inw(regs->edx & 0xFFFF)); - INC_IP(1); - break; - case 0xE4: /* IN AL, imm8 */ - SET_8(regs->eax, - vm86_inb(VbeMemory(vi, MAKE_POINTER(regs->cs, regs->eip+1)))); - INC_IP(2); - break; - case 0xE5: /* IN AX, imm8 */ - if(pref_66) - regs->eax = - vm86_inl(VbeMemory(vi, MAKE_POINTER(regs->cs, regs->eip+1))); - else - SET_16(regs->eax, - vm86_inw(VbeMemory(vi, MAKE_POINTER(regs->cs, regs->eip+1)))); - INC_IP(2); - break; - case 0x6C: /* INSB */ - case 0x6D: /* INSW */ - if(opcode == 0x6C) { - VbeWriteMemory(vi, MAKE_POINTER(regs->es, regs->edi), - vm86_inb(regs->edx & 0xFFFF)); - size = 1; - } else if(pref_66) { - VbeWriteMemoryL(vi, MAKE_POINTER(regs->es, regs->edi), - vm86_inl(regs->edx & 0xFFFF)); - size = 4; - } else { - VbeWriteMemoryW(vi, MAKE_POINTER(regs->es, regs->edi), - vm86_inw(regs->edx & 0xFFFF)); - size = 2; - } - if(regs->eflags & (1<<10)) - regs->edi -= size; - else - regs->edi += size; - if(pref_rep) { - if(pref_66) { - regs->ecx--; - if(regs->ecx != 0) { - goto again; - } else { - SET_16(regs->ecx, regs->ecx - 1); - if(regs->ecx & 0xFFFF != 0) - goto again; - } - } - } - INC_IP(1); - break; - - case 0xEE: /* OUT DX, AL */ - vm86_outb(regs->edx & 0xFFFF, regs->eax & 0xFF); - INC_IP(1); - break; - case 0xEF: /* OUT DX, AX */ - if(pref_66) - vm86_outl(regs->edx & 0xFFFF, regs->eax); - else - vm86_outw(regs->edx & 0xFFFF, regs->eax & 0xFFFF); - INC_IP(1); - break; - case 0xE6: /* OUT imm8, AL */ - vm86_outb(VbeMemory(vi, MAKE_POINTER(regs->cs, regs->eip+1)), - regs->eax & 0xFF); - INC_IP(2); - break; - case 0xE7: /* OUT imm8, AX */ - if(pref_66) - vm86_outl(VbeMemory(vi, MAKE_POINTER(regs->cs, regs->eip+1)), - regs->eax); - else - vm86_outw(VbeMemory(vi, MAKE_POINTER(regs->cs, regs->eip+1)), - regs->eax & 0xFFFF); - INC_IP(2); - break; - case 0x6E: /* OUTSB */ - case 0x6F: /* OUTSW */ - if(opcode == 0x6E) { - vm86_outb(regs->edx & 0xFFFF, - VbeMemory(vi, MAKE_POINTER(regs->es, regs->edi))); - size = 1; - } else if(pref_66) { - vm86_outl(regs->edx & 0xFFFF, - VbeMemory(vi, MAKE_POINTER(regs->es, regs->edi))); - size = 4; - } else { - vm86_outw(regs->edx & 0xFFFF, - VbeMemory(vi, MAKE_POINTER(regs->es, regs->edi))); - size = 2; - } - if(regs->eflags & (1<<10)) - regs->edi -= size; - else - regs->edi += size; - if(pref_rep) { - if(pref_66) { - regs->ecx--; - if(regs->ecx != 0) { - goto again; - } else { - SET_16(regs->ecx, regs->ecx - 1); - if(regs->ecx & 0xFFFF != 0) - goto again; - } - } - } - INC_IP(1); - break; - - case 0x0F: - ErrorF("Hit 0F trap in VM86 code\n"); - return -1; - case 0xF0: - ErrorF("Hit lock prefix in VM86 code\n"); - return -1; - case 0xF4: - ErrorF("Hit HLT in VM86 code\n"); - return -1; - - default: - ErrorF("Unhandled GP fault in VM86 code (opcode = 0x%02X)\n", - opcode); - return -1; - } - return 0; -} -#undef SEG_CS -#undef SEG_DS -#undef SEG_ES -#undef SEG_SS -#undef SEG_GS -#undef SEG_FS -#undef REP -#undef REPNZ -#undef SET_8 -#undef SET_16 -#undef INC_IP -#undef AGAIN - -static int -vm86_loop(VbeInfoPtr vi) -{ - int code; - - while(1) { - code = vm86old(&vi->vms); - switch(VM86_TYPE(code)) { - case VM86_SIGNAL: - continue; - case VM86_UNKNOWN: - code = vm86_emulate(vi); - if(code < 0) { - VbeDebug(vi); - return -1; - } - break; - case VM86_INTx: - if(VM86_ARG(code) == 0xFF) - return 0; - else { - PUSHW(vi, vi->vms.regs.eflags) - PUSHW(vi, vi->vms.regs.cs); - PUSHW(vi, vi->vms.regs.eip); - vi->vms.regs.cs = MMW(vi,VM86_ARG(code) * 4 + 2); - vi->vms.regs.eip = MMW(vi,VM86_ARG(code) * 4); - } - break; - case VM86_STI: - ErrorF("VM86 code enabled interrupts\n"); - VbeDebug(vi); - return -1; - default: - ErrorF("Unexpected result code 0x%X from vm86\n", code); - VbeDebug(vi); - return -1; - } - } -} - -int -VbeIsMemory(VbeInfoPtr vi, U32 i) -{ - if(i >= MAGICMEM_BASE && i< MAGICMEM_BASE + MAGICMEM_SIZE) - return 1; - else if(i >= LOMEM_BASE && i< LOMEM_BASE + LOMEM_SIZE) - return 1; - else if(i >= HIMEM_BASE && i< HIMEM_BASE + HIMEM_SIZE) - return 1; - else - return 0; -} - -U8 -VbeMemory(VbeInfoPtr vi, U32 i) -{ - if(i >= MAGICMEM_BASE && i< MAGICMEM_BASE + MAGICMEM_SIZE) - return MM(vi, i); - else if(i >= LOMEM_BASE && i< LOMEM_BASE + LOMEM_SIZE) - return LM(vi, i); - else if(i >= HIMEM_BASE && i< HIMEM_BASE + HIMEM_SIZE) - return HM(vi, i); - else { - ErrorF("Reading unmapped memory at 0x%08X\n", i); - } -} - -U16 -VbeMemoryW(VbeInfoPtr vi, U32 i) -{ - if(i >= MAGICMEM_BASE && i< MAGICMEM_BASE + MAGICMEM_SIZE) - return MMW(vi, i); - else if(i >= LOMEM_BASE && i< LOMEM_BASE + LOMEM_SIZE) - return LMW(vi, i); - else if(i >= HIMEM_BASE && i< HIMEM_BASE + HIMEM_SIZE) - return HMW(vi, i); - else { - ErrorF("Reading unmapped memory at 0x%08X\n", i); - return 0; - } -} - -U32 -VbeMemoryL(VbeInfoPtr vi, U32 i) -{ - if(i >= MAGICMEM_BASE && i< MAGICMEM_BASE + MAGICMEM_SIZE) - return MML(vi, i); - else if(i >= LOMEM_BASE && i< LOMEM_BASE + LOMEM_SIZE) - return LML(vi, i); - else if(i >= HIMEM_BASE && i< HIMEM_BASE + HIMEM_SIZE) - return HML(vi, i); - else { - ErrorF("Reading unmapped memory at 0x%08X\n", i); - return 0; - } -} - -void -VbeWriteMemory(VbeInfoPtr vi, U32 i, U8 val) -{ - if(i >= MAGICMEM_BASE && i< MAGICMEM_BASE + MAGICMEM_SIZE) - MM(vi, i) = val; - else if(i >= LOMEM_BASE && i< LOMEM_BASE + LOMEM_SIZE) - LM(vi, i) = val; - else if(i >= HIMEM_BASE && i< HIMEM_BASE + HIMEM_SIZE) - HM(vi, i) = val; - else { - ErrorF("Writing unmapped memory at 0x%08X\n", i); - } -} - -void -VbeWriteMemoryW(VbeInfoPtr vi, U32 i, U16 val) -{ - if(i >= MAGICMEM_BASE && i< MAGICMEM_BASE + MAGICMEM_SIZE) - MMW(vi, i) = val; - else if(i >= LOMEM_BASE && i< LOMEM_BASE + LOMEM_SIZE) - LMW(vi, i) = val; - else if(i >= HIMEM_BASE && i< HIMEM_BASE + HIMEM_SIZE) - HMW(vi, i) = val; - else { - ErrorF("Writing unmapped memory at 0x%08X\n", i); - } -} - -void -VbeWriteMemoryL(VbeInfoPtr vi, U32 i, U32 val) -{ - if(i >= MAGICMEM_BASE && i< MAGICMEM_BASE + MAGICMEM_SIZE) - MML(vi, i) = val; - else if(i >= LOMEM_BASE && i< LOMEM_BASE + LOMEM_SIZE) - LML(vi, i) = val; - else if(i >= HIMEM_BASE && i< HIMEM_BASE + HIMEM_SIZE) - HML(vi, i) = val; - else { - ErrorF("Writing unmapped memory at 0x%08X\n", i); - } -} - -int -VbeAllocateMemory(VbeInfoPtr vi, int n) -{ - int ret; - if(n<0) { - ErrorF("Asked to allocate negative amount of memory\n"); - return vi->brk; - } - - n = (n + 15) & ~15; - if(vi->brk + n > LOMEM_BASE + LOMEM_SIZE) { - ErrorF("Out of low memory\n"); - exit(2); - } - ret = vi->brk; - vi->brk += n; - return ret; -} - -static int -vm86old(struct vm86_struct *vm) -{ - int res; - - asm volatile ( - "pushl %%ebx\n\t" - "movl %2, %%ebx\n\t" - "movl %1,%%eax\n\t" - "int $0x80\n\t" - "popl %%ebx" - : "=a" (res) : "n" (113), "r" (vm)); - if(res < 0) { - errno = -res; - res = -1; - } else - errno = 0; - OsReleaseSignals (); - return res; -} - -void -VbeDebug(VbeInfoPtr vi) -{ - struct vm86_regs *regs = &vi->vms.regs; - int i; - - ErrorF("eax=0x%08lX ebx=0x%08lX ecx=0x%08lX edx=0x%08lX\n", - regs->eax, regs->ebx, regs->ecx, regs->edx); - ErrorF("esi=0x%08lX edi=0x%08lX ebp=0x%08lX\n", - regs->esi, regs->edi, regs->ebp); - ErrorF("eip=0x%08lX esp=0x%08lX eflags=0x%08lX\n", - regs->eip, regs->esp, regs->eflags); - ErrorF("cs=0x%04lX ds=0x%04lX es=0x%04lX fs=0x%04lX gs=0x%04lX\n", - regs->cs, regs->ds, regs->es, regs->fs, regs->gs); - for(i=-7; i<8; i++) { - ErrorF(" %s%02X", - i==0?"->":"", - VbeMemory(vi, MAKE_POINTER(regs->cs, regs->eip + i))); - } - ErrorF("\n"); -} - -#ifdef NOT_IN_X_SERVER -static void -ErrorF(char *f, ...) -{ - va_list args; - va_start(args, f); - vfprintf(stderr, f, args); - va_end(args); -} -#endif diff --git a/xc/programs/Xserver/hw/kdrive/vesa/vbe.h b/xc/programs/Xserver/hw/kdrive/vesa/vbe.h index 29210310a..0633e4084 100644 --- a/xc/programs/Xserver/hw/kdrive/vesa/vbe.h +++ b/xc/programs/Xserver/hw/kdrive/vesa/vbe.h @@ -19,7 +19,7 @@ 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. */ -/* $XFree86$ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/vesa/vbe.h,v 1.5 2000/10/20 00:19:50 keithp Exp $ */ #ifndef _VBE_H #define _VBE_H @@ -28,56 +28,6 @@ THE SOFTWARE. #define VBE_WINDOW_READ 2 #define VBE_WINDOW_WRITE 4 -#ifndef U8 -#define U8 unsigned char -#define U16 unsigned short -#define U32 unsigned int -#endif - -/* The whole addressable memory */ -#define SYSMEM_BASE 0x00000 -#define SYSMEM_SIZE 0x100000 - -/* Interrupt vectors and BIOS data area */ -/* This is allocated privately from /dev/mem */ -#define MAGICMEM_BASE 0x00000 -#define MAGICMEM_SIZE 0x01000 - -/* The low memory, allocated privately from /dev/zero */ -/* 64KB should be enough for anyone, as they used to say */ -#define LOMEM_BASE 0x10000 -#define LOMEM_SIZE 0x10000 - -/* The video memory and BIOS ROM, allocated shared from /dev/mem */ -#define HIMEM_BASE 0xA0000 -#define HIMEM_SIZE (SYSMEM_BASE + SYSMEM_SIZE - HIMEM_BASE) - -/* The BIOS ROM */ -#define ROM_BASE 0xC0000 -#define ROM_SIZE 0x30000 - -#define STACK_SIZE 0x1000 - -#define POINTER_SEGMENT(ptr) (((unsigned int)ptr)>>4) -#define POINTER_OFFSET(ptr) (((unsigned int)ptr)&0x000F) -#define MAKE_POINTER(seg, off) (((((unsigned int)(seg))<<4) + (unsigned int)(off))) -#define MAKE_POINTER_1(lw) MAKE_POINTER(((lw)&0xFFFF0000)/0x10000, (lw)&0xFFFF) -#define ALLOC_FAIL ((U32)-1) - -typedef struct _VbeInfoRec { - int devmem, devzero; - void *magicMem, *loMem, *hiMem; - U32 brk; - struct vm86_struct vms; - U32 ret_code, stack_base, vib_base, vmib_base, statebuffer_base, palette_scratch_base; - U8 palette_format; - int palette_wait; - int windowA_offset; - int windowB_offset; - int last_window; - int vga_palette; -} VbeInfoRec, *VbeInfoPtr; - typedef struct _VbeInfoBlock { U8 VbeSignature[4]; /* VBE Signature */ U16 VbeVersion; /* VBE Version */ @@ -134,6 +84,15 @@ typedef struct _VbeModeInfoBlock { U8 Reserved2[206]; /* remainder of ModeInfoBlock */ } __attribute__((packed)) VbeModeInfoBlock; +typedef struct _VbeInfoRec { + U8 palette_format; + int palette_wait; + int windowA_offset; + int windowB_offset; + int window_size; + int last_window; + VbeModeInfoBlock vmib; +} VbeInfoRec, *VbeInfoPtr; typedef struct _SupVbeInfoBlock { U8 SupVbeSignature[7]; /* Supplemental VBE Signature */ @@ -147,32 +106,58 @@ typedef struct _SupVbeInfoBlock { U8 Reserved[221]; /* Reserved */ } __attribute__((packed)) SupVbeInfoBlock; -VbeInfoPtr VbeSetup(void); -void VbeCleanup(VbeInfoPtr vi); -VbeInfoBlock *VbeGetInfo(VbeInfoPtr vi); -VbeModeInfoBlock *VbeGetModeInfo(VbeInfoPtr vi, int mode); -int VbeSetMode(VbeInfoPtr vi, int mode, int linear); -int VbeGetMode(VbeInfoPtr vi, int *mode); -int VbeSetupStateBuffer(VbeInfoPtr vi); -int VbeSaveState(VbeInfoPtr vi); -int VbeRestoreState(VbeInfoPtr vi); -void *VbeMapFramebuffer(VbeInfoPtr vi, VbeModeInfoBlock *vmib); -int VbeUnmapFrambuffer(VbeInfoPtr vi, VbeModeInfoBlock *vmib, void *fb); -int VbeSetPalette(VbeInfoPtr vi, int first, int number, U8 *entries); -int VbeSetPaletteOptions(VbeInfoPtr vi, U8 bits, int wait); -void *VbeSetWindow(VbeInfoPtr vi, int offset, int purpose, int *size_return); -int VbeReportInfo(VbeInfoPtr, VbeInfoBlock *); -int VbeReportModeInfo(VbeInfoPtr, U16 mode, VbeModeInfoBlock *); - -int VbeDoInterrupt(VbeInfoPtr, int num); -int VbeDoInterrupt10(VbeInfoPtr vi); -int VbeIsMemory(VbeInfoPtr vi, U32 i); -U8 VbeMemory(VbeInfoPtr, U32); -U16 VbeMemoryW(VbeInfoPtr, U32); -U32 VbeMemoryL(VbeInfoPtr, U32); -void VbeWriteMemory(VbeInfoPtr, U32, U8); -void VbeWriteMemoryW(VbeInfoPtr, U32, U16); -void VbeWriteMemoryL(VbeInfoPtr, U32, U32); -int VbeAllocateMemory(VbeInfoPtr, int); -void VbeDebug(VbeInfoPtr vi); +int +VbeGetVib (Vm86InfoPtr vi, VbeInfoBlock *vib); + +int +VbeGetVmib (Vm86InfoPtr vi, int mode, VbeModeInfoBlock *vmib); + +void +VbeReportInfo (Vm86InfoPtr vi); + +int +VbeGetNmode (Vm86InfoPtr vi); + +int +VbeGetModes (Vm86InfoPtr vi, VesaModePtr modes, int nmode); + +int +VbeGetModeInfo(Vm86InfoPtr vi, int m, VesaModePtr mode); + +VbeInfoPtr +VbeInit (Vm86InfoPtr vi); + +int +VbeSetMode (Vm86InfoPtr vi, VbeInfoPtr vbe, int mode, int linear); + +int +VbeGetMode(Vm86InfoPtr vi, int *mode); + +void * +VbeMapFramebuffer(Vm86InfoPtr vi, VbeInfoPtr vbe, int mode, int *size); + +void +VbeUnmapFramebuffer(Vm86InfoPtr vi, VbeInfoPtr vbe, int mode, void *fb); + +int +VbeSetPalette(Vm86InfoPtr vi, VbeInfoPtr vbe, int first, int number, U8 *entries); + +int +VbeGetPalette(Vm86InfoPtr vi, VbeInfoPtr vbe, int first, int number, U8 *entries); + +int +VbeSetPaletteOptions(Vm86InfoPtr vi, VbeInfoPtr vbe, U8 bits, int wait); + +void * +VbeSetWindow(Vm86InfoPtr vi, VbeInfoPtr vbe, int offset, int purpose, int *size_return); + +int +VbeReportVib(Vm86InfoPtr vi, VbeInfoBlock *vib); + +int +VbeReportModeInfo(Vm86InfoPtr vi, U16 mode, VbeModeInfoBlock *vmib); + +int +VbeDoInterrupt10(Vm86InfoPtr vi); + #endif diff --git a/xc/programs/Xserver/hw/kdrive/vesa/vesa.c b/xc/programs/Xserver/hw/kdrive/vesa/vesa.c index 4542611c0..d2329a6e7 100644 --- a/xc/programs/Xserver/hw/kdrive/vesa/vesa.c +++ b/xc/programs/Xserver/hw/kdrive/vesa/vesa.c @@ -19,7 +19,7 @@ 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. */ -/* $XFree86: xc/programs/Xserver/hw/kdrive/vesa/vesa.c,v 1.5 2000/09/15 07:25:13 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/vesa/vesa.c,v 1.8 2000/10/20 00:19:50 keithp Exp $ */ #include "vesa.h" @@ -30,6 +30,7 @@ Bool vesa_shadow = FALSE; Bool vesa_linear_fb = TRUE; Bool vesa_restore = FALSE; Bool vesa_rotate = FALSE; +Bool vesa_verbose = FALSE; #define VesaPriv(scr) ((VesaScreenPrivPtr) (scr)->driver) @@ -38,166 +39,216 @@ Bool vesa_rotate = FALSE; #define vesaHeight(scr,vmib) (ScreenRotated(scr) ? vmib->XResolution : vmib->YResolution) static Bool -vesaModeSupported(VbeInfoPtr vi, VbeModeInfoBlock *vmib, Bool complain) +vesaModeSupportable (VesaModePtr mode, Bool complain) { - if((vmib->ModeAttributes & 0x10) == 0) { - if(complain) - ErrorF("Text mode specified.\n"); - return FALSE; + if((mode->ModeAttributes & 0x10) == 0) { + if(complain) + ErrorF("Text mode specified.\n"); + return FALSE; } - if(vmib->MemoryModel != 0x06 && vmib->MemoryModel != 0x04 && vmib->MemoryModel != 0x03) { - if(complain) - ErrorF("Unsupported memory model 0x%X\n", vmib->MemoryModel); - return FALSE; + if(mode->MemoryModel != 0x06 && mode->MemoryModel != 0x04 && mode->MemoryModel != 0x03) { + if(complain) + ErrorF("Unsupported memory model 0x%X\n", mode->MemoryModel); + return FALSE; } - if((vmib->ModeAttributes & 0x80) == 0) { - if ((vmib->WinAAttributes & 0x5) != 0x5) { + if((mode->ModeAttributes & 0x80) == 0) { + if ((mode->ModeAttributes & 0x40) != 0) { if(complain) ErrorF("Neither linear nor windowed framebuffer available in this mode\n"); return FALSE; } } - if(!(vmib->ModeAttributes & 1)) { - if(complain) - ErrorF("Mode not supported on this hardware\n"); - return FALSE; + if(!(mode->ModeAttributes & 1)) { + if(complain) + ErrorF("Mode not supported on this hardware\n"); + return FALSE; } return TRUE; } -Bool -vesaListModes() +static Bool +vesaModeSupported (VesaCardPrivPtr priv, VesaModePtr mode, Bool complain) { - int code; - VbeInfoPtr vi = NULL; - VbeInfoBlock *vib; - VbeModeInfoBlock *vmib; - unsigned p, num_modes, i; - CARD16 *modes_list = NULL; - - vi = VbeSetup(); - if(!vi) - goto fail; - - vib = VbeGetInfo(vi); - if(!vib) - goto fail; - - VbeReportInfo(vi, vib); - /* The spec says you need to copy the list */ - p = MAKE_POINTER_1(vib->VideoModePtr); - num_modes = 0; - while(VbeMemoryW(vi, p) != 0xFFFF) { - num_modes++; - p+=2; - } - modes_list = ALLOCATE_LOCAL(num_modes * sizeof(CARD16)); - if(!modes_list) - goto fail; - p = MAKE_POINTER_1(vib->VideoModePtr); - for(i=0; i<num_modes; i++) { - modes_list[i] = VbeMemoryW(vi, p); - p += 2; - } - - for(i=0; i<num_modes; i++) { - vmib = VbeGetModeInfo(vi, modes_list[i]); - if(!vmib) - goto fail; - if(vesa_force_mode || vesaModeSupported(vi, vmib, FALSE)) - VbeReportModeInfo(vi, modes_list[i], vmib); - } - - if(modes_list) - DEALLOCATE_LOCAL(modes_list); - VbeCleanup(vi); - return TRUE; - - fail: - if(modes_list) - DEALLOCATE_LOCAL(modes_list); - VbeCleanup(vi); - return FALSE; + if (!priv->vbeInfo && mode->vbe) { + if (complain) + ErrorF("VBE bios mode not usable.\n"); + return FALSE; + } + return vesaModeSupportable (mode, complain); } -Bool -vesaGetModes (KdCardInfo *card, VesaCardPrivPtr priv) +void +vesaReportMode (VesaModePtr mode) { - VesaModePtr mode; - int nmode; - unsigned int i; - VbeInfoPtr vi = priv->vi; - VbeInfoBlock *vib = priv->vib; - VbeModeInfoBlock *vmib; - - /* The spec says you need to copy the list */ - i = MAKE_POINTER_1(vib->VideoModePtr); - nmode = 0; - while(VbeMemoryW(vi, i) != 0xFFFF) { - nmode++; - i+=2; - } - if (!nmode) - return FALSE; - priv->modes = xalloc (nmode * sizeof (VesaModeRec)); - if (!priv->modes) - return FALSE; - priv->nmode = nmode; - i = MAKE_POINTER_1(vib->VideoModePtr); - nmode = 0; - while(nmode < priv->nmode) { - priv->modes[nmode].mode = VbeMemoryW(vi, i); - nmode++; - i+=2; - } - i = MAKE_POINTER_1(vib->VideoModePtr); - nmode = 0; - while(nmode < priv->nmode) { - vmib = VbeGetModeInfo(vi, priv->modes[nmode].mode); - if(!vmib) - break; - priv->modes[nmode].vmib = *vmib; - i += 2; - nmode++; + int supported = (mode->ModeAttributes&MODE_SUPPORTED)?1:0; + int colour = (mode->ModeAttributes&MODE_COLOUR)?1:0; + int graphics = (mode->ModeAttributes&MODE_GRAPHICS)?1:0; + int vga_compatible = !((mode->ModeAttributes&MODE_VGA)?1:0); + int linear_fb = (mode->ModeAttributes&MODE_LINEAR)?1:0; + + ErrorF("0x%04X: %dx%dx%d%s", + (unsigned)mode->mode, + (int)mode->XResolution, (int)mode->YResolution, + vesaDepth (mode), + colour?"":" (monochrome)"); + switch(mode->MemoryModel) { + case MEMORY_TEXT: + ErrorF(" text mode"); + break; + case MEMORY_CGA: + ErrorF(" CGA graphics"); + break; + case MEMORY_HERCULES: + ErrorF(" Hercules graphics"); + break; + case MEMORY_PLANAR: + ErrorF(" Planar (%d planes)", mode->NumberOfPlanes); + break; + case MEMORY_PSEUDO: + ErrorF(" PseudoColor"); + break; + case MEMORY_NONCHAIN: + ErrorF(" Non-chain 4, 256 colour"); + break; + case MEMORY_DIRECT: + if(mode->DirectColorModeInfo & MODE_DIRECT) + ErrorF(" DirectColor"); + else + ErrorF(" TrueColor"); + ErrorF(" [%d:%d:%d:%d]", + mode->RedMaskSize, mode->GreenMaskSize, mode->BlueMaskSize, + mode->RsvdMaskSize); + if(mode->DirectColorModeInfo & 2) + ErrorF(" (reserved bits are reserved)"); + break; + case MEMORY_YUV: + ErrorF("YUV"); + break; + default: + ErrorF("unknown MemoryModel 0x%X ", mode->MemoryModel); } - return TRUE; + if(!supported) + ErrorF(" (unsupported)"); + else if(!linear_fb) + ErrorF(" (no linear framebuffer)"); + ErrorF("\n"); } +VesaModePtr +vesaGetModes (Vm86InfoPtr vi, int *ret_nmode) +{ + VesaModePtr modes; + int nmode, nmodeVbe, nmodeVga; + int code; + + code = VgaGetNmode (vi); + if (code <= 0) + nmodeVga = 0; + else + nmodeVga = code; + + code = VbeGetNmode (vi); + if (code <= 0) + nmodeVbe = 0; + else + nmodeVbe = code; + + nmode = nmodeVga + nmodeVbe; + if (nmode <= 0) + return 0; + + modes = xalloc (nmode * sizeof (VesaModeRec)); + + if (nmodeVga) + { + code = VgaGetModes (vi, modes, nmodeVga); + if (code <= 0) + nmodeVga = 0; + else + nmodeVga = code; + } + + if (nmodeVbe) + { + code = VbeGetModes (vi, modes + nmodeVga, nmodeVbe); + if (code <= 0) + nmodeVbe = 0; + else + nmodeVbe = code; + } + + nmode = nmodeVga + nmodeVbe; + + if (nmode == 0) + { + xfree (modes); + modes = 0; + return 0; + } + *ret_nmode = nmode; + return modes; +} Bool vesaInitialize (KdCardInfo *card, VesaCardPrivPtr priv) { int code; - - priv->vi = VbeSetup(); - if(!priv->vi) - goto fail; - - priv->vib = VbeGetInfo(priv->vi); - if(!priv->vib) - goto fail; - code = VbeSetupStateBuffer(priv->vi); - if(code < 0) - goto fail; - - code = VbeSaveState(priv->vi); - if(code<0) - goto fail; + priv->vi = Vm86Setup(); + if(!priv->vi) + goto fail; - if (!vesaGetModes (card, priv)) + priv->modes = vesaGetModes (priv->vi, &priv->nmode); + + if (!priv->modes) goto fail; + + priv->vbeInfo = VbeInit (priv->vi); card->driver = priv; return TRUE; - fail: +fail: if(priv->vi) - VbeCleanup(priv->vi); + Vm86Cleanup(priv->vi); return FALSE; } +void +vesaListModes (void) +{ + Vm86InfoPtr vi; + VesaModePtr modes; + int nmode; + int n; + + vi = Vm86Setup (); + if (!vi) + { + ErrorF ("Can't setup vm86\n"); + } + else + { + modes = vesaGetModes (vi, &nmode); + if (!modes) + { + ErrorF ("No modes available\n"); + } + else + { + VbeReportInfo (vi); + for (n = 0; n < nmode; n++) + { + if (vesa_force_mode || vesaModeSupportable (modes+n, 0)) + vesaReportMode (modes+n); + } + xfree (modes); + } + Vm86Cleanup (vi); + } +} + Bool vesaCardInit(KdCardInfo *card) { @@ -217,19 +268,19 @@ vesaCardInit(KdCardInfo *card) } int -vesaDepth (VbeModeInfoBlock *m) +vesaDepth (VesaModePtr mode) { - if (m->MemoryModel == 0x06) - return (m->RedMaskSize + - m->GreenMaskSize + - m->BlueMaskSize); + if (mode->MemoryModel == MEMORY_DIRECT) + return (mode->RedMaskSize + + mode->GreenMaskSize + + mode->BlueMaskSize); else - return m->BitsPerPixel; + return mode->BitsPerPixel; } Bool -vesaModeGood (KdScreenInfo *screen, - VbeModeInfoBlock *a) +vesaModeGood (KdScreenInfo *screen, + VesaModePtr a) { if (vesaWidth(screen,a) <= screen->width && vesaHeight(screen,a) <= screen->height && @@ -242,8 +293,8 @@ vesaModeGood (KdScreenInfo *screen, #define vabs(a) ((a) >= 0 ? (a) : -(a)) int -vesaSizeError (KdScreenInfo *screen, - VbeModeInfoBlock *a) +vesaSizeError (KdScreenInfo *screen, + VesaModePtr a) { int xdist, ydist; xdist = vabs (screen->width - vesaWidth(screen,a)); @@ -252,9 +303,9 @@ vesaSizeError (KdScreenInfo *screen, } Bool -vesaModeBetter (KdScreenInfo *screen, - VbeModeInfoBlock *a, - VbeModeInfoBlock *b) +vesaModeBetter (KdScreenInfo *screen, + VesaModePtr a, + VesaModePtr b) { int aerr, berr; @@ -290,21 +341,21 @@ vesaSelectMode (KdScreenInfo *screen) { for (best = 0; best < priv->nmode; best++) if (priv->modes[best].mode == vesa_video_mode && - (vesaModeSupported (priv->vi, &priv->modes[best].vmib, FALSE) || + (vesaModeSupported (priv, &priv->modes[best], FALSE) || vesa_force_mode)) return &priv->modes[best]; } for (best = 0; best < priv->nmode; best++) { - if (vesaModeSupported (priv->vi, &priv->modes[best].vmib, FALSE)) + if (vesaModeSupported (priv, &priv->modes[best], FALSE)) break; } if (best == priv->nmode) return 0; for (i = best + 1; i < priv->nmode; i++) - if (vesaModeSupported (priv->vi, &priv->modes[i].vmib, FALSE) && - vesaModeBetter (screen, &priv->modes[i].vmib, - &priv->modes[best].vmib)) + if (vesaModeSupported (priv, &priv->modes[i], FALSE) && + vesaModeBetter (screen, &priv->modes[i], + &priv->modes[best])) best = i; return &priv->modes[best]; } @@ -313,19 +364,43 @@ Bool vesaScreenInitialize (KdScreenInfo *screen, VesaScreenPrivPtr pscr) { VesaCardPrivPtr priv = screen->card->driver; - VbeModeInfoBlock *vmib; + VesaModePtr mode; Pixel allbits; int depth; - int bpp; + int bpp, fbbpp; screen->driver = pscr; pscr->rotate = FALSE; if (screen->width < screen->height) pscr->rotate = TRUE; + + if (!screen->width || !screen->height) + { + screen->width = 640; + screen->height = 480; + } + if (!screen->fb[0].depth) + screen->fb[0].depth = 4; + + if (vesa_verbose) + ErrorF ("Mode requested %dx%dx%d\n", + screen->width, screen->height, screen->fb[0].depth); + pscr->mode = vesaSelectMode (screen); + if (!pscr->mode) + { + if (vesa_verbose) + ErrorF ("No selectable mode\n"); return FALSE; + } + if (vesa_verbose) + { + ErrorF ("\t"); + vesaReportMode (pscr->mode); + } + pscr->shadow = vesa_shadow; pscr->origDepth = screen->fb[0].depth; if (vesa_linear_fb) @@ -333,21 +408,35 @@ vesaScreenInitialize (KdScreenInfo *screen, VesaScreenPrivPtr pscr) else pscr->mapping = VESA_WINDOWED; - vmib = &pscr->mode->vmib; + mode = pscr->mode; - depth = vesaDepth (vmib); - bpp = vmib->BitsPerPixel; + depth = vesaDepth (mode); + bpp = mode->BitsPerPixel; + + if (bpp > 24) + bpp = 32; + else if (bpp > 16) + bpp = 24; + else if (bpp > 8) + bpp = 16; + else if (bpp > 4) + bpp = 8; + else if (bpp > 1) + bpp = 4; + else + bpp = 1; + fbbpp = bpp; - switch (vmib->MemoryModel) { - case 0x06: + switch (mode->MemoryModel) { + case MEMORY_DIRECT: /* TrueColor or DirectColor */ screen->fb[0].visuals = (1 << TrueColor); screen->fb[0].redMask = - FbStipMask(vmib->RedFieldPosition, vmib->RedMaskSize); + FbStipMask(mode->RedFieldPosition, mode->RedMaskSize); screen->fb[0].greenMask = - FbStipMask(vmib->GreenFieldPosition, vmib->GreenMaskSize); + FbStipMask(mode->GreenFieldPosition, mode->GreenMaskSize); screen->fb[0].blueMask = - FbStipMask(vmib->BlueFieldPosition, vmib->BlueMaskSize); + FbStipMask(mode->BlueFieldPosition, mode->BlueMaskSize); allbits = screen->fb[0].redMask | screen->fb[0].greenMask | @@ -355,8 +444,14 @@ vesaScreenInitialize (KdScreenInfo *screen, VesaScreenPrivPtr pscr) depth = 32; while (depth && !(allbits & (1 << (depth - 1)))) depth--; + if (vesa_verbose) + ErrorF ("\tTrue Color bpp %d depth %d red 0x%x green 0x%x blue 0x%x\n", + bpp, depth, + screen->fb[0].redMask, + screen->fb[0].greenMask, + screen->fb[0].blueMask); break; - case 0x04: + case MEMORY_PSEUDO: /* PseudoColor */ screen->fb[0].visuals = ((1 << StaticGray) | (1 << GrayScale) | @@ -367,43 +462,73 @@ vesaScreenInitialize (KdScreenInfo *screen, VesaScreenPrivPtr pscr) screen->fb[0].blueMask = 0x00; screen->fb[0].greenMask = 0x00; screen->fb[0].redMask = 0x00; + if (vesa_verbose) + ErrorF ("\tPseudo Color bpp %d depth %d\n", + bpp, depth); break; - case 0x03: + case MEMORY_PLANAR: /* 4 plane planar */ - screen->fb[0].visuals = (1 << StaticColor); + if (mode->ModeAttributes & MODE_COLOUR) + screen->fb[0].visuals = (1 << StaticColor); + else + screen->fb[0].visuals = (1 << StaticGray); screen->fb[0].blueMask = 0x00; screen->fb[0].greenMask = 0x00; screen->fb[0].redMask = 0x00; - bpp = screen->fb[0].bitsPerPixel; - if (bpp != 8) - bpp = 4; - depth = bpp; - pscr->mapping = VESA_PLANAR; + if (bpp == 4) + { + bpp = screen->fb[0].bitsPerPixel; + if (bpp != 8) + bpp = 4; + depth = bpp; + } + if (bpp == 1) + { + pscr->mapping = VESA_MONO; + if (vesa_verbose) + ErrorF ("\tMonochrome\n"); + } + else + { + pscr->mapping = VESA_PLANAR; + if (vesa_verbose) + ErrorF ("\tStatic color bpp %d depth %d\n", + bpp, depth); + } pscr->rotate = FALSE; break; default: ErrorF("Unsupported VESA MemoryModel 0x%02X\n", - vmib->MemoryModel); + mode->MemoryModel); return FALSE; } - screen->width = vesaWidth(screen, vmib); - screen->height = vesaHeight(screen, vmib); + screen->width = vesaWidth(screen, mode); + screen->height = vesaHeight(screen, mode); screen->fb[0].depth = depth; screen->fb[0].bitsPerPixel = bpp; - screen->fb[0].byteStride = vmib->BytesPerScanLine; - screen->fb[0].pixelStride = ((vmib->BytesPerScanLine * 8) / - vmib->BitsPerPixel); + screen->fb[0].byteStride = mode->BytesPerScanLine; + screen->fb[0].pixelStride = ((mode->BytesPerScanLine * 8) / fbbpp); - if (pscr->mapping == VESA_LINEAR && !(vmib->ModeAttributes & 0x80)) + if (pscr->mapping == VESA_LINEAR && !(mode->ModeAttributes & MODE_LINEAR)) pscr->mapping = VESA_WINDOWED; if (pscr->rotate) pscr->shadow = TRUE; switch (pscr->mapping) { + case VESA_MONO: + pscr->shadow = TRUE; + /* fall through */ case VESA_LINEAR: - pscr->fb = VbeMapFramebuffer(priv->vi, vmib); + if (mode->vbe) + pscr->fb = VbeMapFramebuffer(priv->vi, priv->vbeInfo, + pscr->mode->mode, + &pscr->fb_size); + else + pscr->fb = VgaMapFramebuffer (priv->vi, + pscr->mode->mode, + &pscr->fb_size); break; case VESA_WINDOWED: pscr->fb = NULL; @@ -424,6 +549,10 @@ vesaScreenInitialize (KdScreenInfo *screen, VesaScreenPrivPtr pscr) if (pscr->shadow) return KdShadowScreenInit (screen); + if (vesa_verbose) + ErrorF ("Mode selected %dx%dx%d\n", + screen->width, screen->height, screen->fb[0].depth); + return TRUE; } @@ -441,7 +570,7 @@ vesaScreenInit(KdScreenInfo *screen) } void * -vesaWindowPlanar (ScreenPtr pScreen, +vesaSetWindowPlanar(ScreenPtr pScreen, CARD32 row, CARD32 offset, int mode, @@ -450,25 +579,96 @@ vesaWindowPlanar (ScreenPtr pScreen, KdScreenPriv(pScreen); VesaCardPrivPtr priv = pScreenPriv->card->driver; VesaScreenPrivPtr pscr = pScreenPriv->screen->driver; - VbeModeInfoBlock *vmib = &pscr->mode->vmib; static int plane; int winSize; void *base; - if (!pScreenPriv->enabled) - return 0; plane = offset & 3; - VbeSetWritePlaneMask (priv->vi, (1 << plane)); + VgaSetWritePlaneMask (priv->vi, (1 << plane)); offset = offset >> 2; - base = VbeSetWindow (priv->vi, - vmib->BytesPerScanLine * row + offset, - mode, - &winSize); + if (pscr->mode->vbe) + { + base = VbeSetWindow (priv->vi, + priv->vbeInfo, + pscr->mode->BytesPerScanLine * row + offset, + mode, + &winSize); + } + else + { + base = VgaSetWindow (priv->vi, + pscr->mode->mode, + pscr->mode->BytesPerScanLine * row + offset, + mode, + &winSize); + } *size = (CARD32) winSize; return base; } void * +vesaSetWindowLinear (ScreenPtr pScreen, + CARD32 row, + CARD32 offset, + int mode, + CARD32 *size) +{ + KdScreenPriv(pScreen); + VesaCardPrivPtr priv = pScreenPriv->card->driver; + VesaScreenPrivPtr pscr = pScreenPriv->screen->driver; + + *size = pscr->mode->BytesPerScanLine; + return (CARD8 *) pscr->fb + row * pscr->mode->BytesPerScanLine + offset; +} + +void * +vesaSetWindowWindowed (ScreenPtr pScreen, + CARD32 row, + CARD32 offset, + int mode, + CARD32 *size) +{ + KdScreenPriv(pScreen); + VesaCardPrivPtr priv = pScreenPriv->card->driver; + VesaScreenPrivPtr pscr = pScreenPriv->screen->driver; + int winSize; + void *base; + + if (pscr->mode->vbe) + { + base = VbeSetWindow (priv->vi, + priv->vbeInfo, + pscr->mode->BytesPerScanLine * row + offset, + mode, + &winSize); + } + else + { + base = VgaSetWindow (priv->vi, + pscr->mode->mode, + pscr->mode->BytesPerScanLine * row + offset, + mode, + &winSize); + } + *size = (CARD32) winSize; + return base; +} + +void * +vesaWindowPlanar (ScreenPtr pScreen, + CARD32 row, + CARD32 offset, + int mode, + CARD32 *size) +{ + KdScreenPriv(pScreen); + + if (!pScreenPriv->enabled) + return 0; + return vesaSetWindowPlanar (pScreen, row, offset, mode, size); +} + +void * vesaWindowLinear (ScreenPtr pScreen, CARD32 row, CARD32 offset, @@ -476,14 +676,10 @@ vesaWindowLinear (ScreenPtr pScreen, CARD32 *size) { KdScreenPriv(pScreen); - VesaCardPrivPtr priv = pScreenPriv->card->driver; - VesaScreenPrivPtr pscr = pScreenPriv->screen->driver; - VbeModeInfoBlock *vmib = &pscr->mode->vmib; if (!pScreenPriv->enabled) return 0; - *size = vmib->BytesPerScanLine; - return (CARD8 *) pscr->fb + row * vmib->BytesPerScanLine + offset; + return vesaSetWindowLinear (pScreen, row, offset, mode, size); } void * @@ -494,41 +690,114 @@ vesaWindowWindowed (ScreenPtr pScreen, CARD32 *size) { KdScreenPriv(pScreen); + + if (!pScreenPriv->enabled) + return 0; + return vesaSetWindowWindowed (pScreen, row, offset, mode, size); +} + +#define vesaInvertBits32(v) { \ + v = ((v & 0x55555555) << 1) | ((v >> 1) & 0x55555555); \ + v = ((v & 0x33333333) << 2) | ((v >> 2) & 0x33333333); \ + v = ((v & 0x0f0f0f0f) << 4) | ((v >> 4) & 0x0f0f0f0f); \ +} + +void * +vesaWindowCga (ScreenPtr pScreen, + CARD32 row, + CARD32 offset, + int mode, + CARD32 *size) +{ + KdScreenPriv(pScreen); VesaCardPrivPtr priv = pScreenPriv->card->driver; VesaScreenPrivPtr pscr = pScreenPriv->screen->driver; - VbeModeInfoBlock *vmib = &pscr->mode->vmib; - int winSize; - void *base; - + int line; + if (!pScreenPriv->enabled) return 0; - base = VbeSetWindow (priv->vi, - vmib->BytesPerScanLine * row + offset, - mode, - &winSize); - *size = (CARD32) winSize; - return base; + *size = pscr->mode->BytesPerScanLine; + line = ((row & 1) << 13) + (row >> 1) * pscr->mode->BytesPerScanLine; + return (CARD8 *) pscr->fb + line + offset; } -static CARD16 vga16Colors[16][3] = { -#if 0 - { 0, 0, 0, }, /* 0 */ - { 0, 0, 0x80,}, /* 1 */ - { 0, 0x80,0, }, /* 2 */ - { 0, 0x80,0x80,}, /* 3 */ - { 0x80,0, 0, }, /* 4 */ - { 0x80,0, 0x80,}, /* 5 */ - { 0x80,0x80,0, }, /* 6 */ - { 0xC0,0xC0,0xC0,}, /* 7 */ - { 0x80,0x80,0x80,}, /* 8 */ - { 0, 0, 0xFF,}, /* 9 */ - { 0, 0xFF,0 ,}, /* 10 */ - { 0, 0xFF,0xFF,}, /* 11 */ - { 0xFF,0, 0 ,}, /* 12 */ - { 0xFF,0, 0xFF,}, /* 13 */ - { 0xFF,0xFF,0 ,}, /* 14 */ - { 0xFF,0xFF,0xFF,}, /* 15 */ -#else +void +vesaUpdateMono (ScreenPtr pScreen, + PixmapPtr pShadow, + RegionPtr damage) +{ + shadowScrPriv(pScreen); + int nbox = REGION_NUM_RECTS (damage); + BoxPtr pbox = REGION_RECTS (damage); + FbBits *shaBase, *shaLine, *sha; + FbBits s; + FbStride shaStride; + int scrBase, scrLine, scr; + int shaBpp; + int x, y, w, h, width; + int i; + FbBits *winBase, *winLine, *win; + CARD32 winSize; + FbBits bits; + int plane; + + fbGetDrawable (&pShadow->drawable, shaBase, shaStride, shaBpp); + while (nbox--) + { + x = pbox->x1 * shaBpp; + y = pbox->y1; + w = (pbox->x2 - pbox->x1) * shaBpp; + h = pbox->y2 - pbox->y1; + + scrLine = (x >> FB_SHIFT); + shaLine = shaBase + y * shaStride + (x >> FB_SHIFT); + + x &= FB_MASK; + w = (w + x + FB_MASK) >> FB_SHIFT; + + while (h--) + { + winSize = 0; + scrBase = 0; + width = w; + scr = scrLine; + sha = shaLine; + while (width) { + /* how much remains in this window */ + i = scrBase + winSize - scr; + if (i <= 0 || scr < scrBase) + { + winBase = (FbBits *) (*pScrPriv->window) (pScreen, + y, + scr * sizeof (FbBits), + SHADOW_WINDOW_WRITE, + &winSize); + if(!winBase) + return; + scrBase = scr; + winSize /= sizeof (FbBits); + i = winSize; + } + win = winBase + (scr - scrBase); + if (i > width) + i = width; + width -= i; + scr += i; + while (i--) + { + bits = *sha++; + vesaInvertBits32(bits); + *win++ = bits; + } + } + shaLine += shaStride; + y++; + } + pbox++; + } +} + +static const CARD16 vga16Colors[16][3] = { { 0, 0, 0, }, /* 0 */ { 0, 0, 0xAA,}, /* 1 */ { 0, 0xAA,0, }, /* 2 */ @@ -545,7 +814,6 @@ static CARD16 vga16Colors[16][3] = { { 0xFF,0x55,0xFF,}, /* 13 */ { 0xFF,0xFF,0x55,}, /* 14 */ { 0xFF,0xFF,0xFF,}, /* 15 */ -#endif }; Bool @@ -586,26 +854,20 @@ vesaInitScreen(ScreenPtr pScreen) case VESA_PLANAR: pScreen->CreateColormap = vesaCreateColormap16; if (pScreenPriv->screen->fb[0].bitsPerPixel == 8) - { -#if 0 - int i; - - for (i = 0; i < pScreen->numVisuals; i++) - { - if (pScreen->visuals[i].nplanes == - pScreenPriv->screen->fb[0].depth) - { - pScreen->visuals[i].ColormapEntries = 16; - } - } -#endif update = shadowUpdatePlanar4x8; - } else update = shadowUpdatePlanar4; window = vesaWindowPlanar; pscr->rotate = FALSE; break; + case VESA_MONO: + update = vesaUpdateMono; + if (pscr->mode->mode < 8) + window = vesaWindowCga; + else + window = vesaWindowLinear; + pscr->rotate = FALSE; + break; } if (pscr->rotate) { @@ -629,55 +891,41 @@ Bool vesaEnable(ScreenPtr pScreen) { KdScreenPriv(pScreen); - VesaCardPrivPtr priv = pScreenPriv->card->driver; + VesaCardPrivPtr priv = pScreenPriv->card->driver; VesaScreenPrivPtr pscr = pScreenPriv->screen->driver; - int code; - int palette_wait = 0, palette_hi = 0; - int i; - int size; - char *p; + int code; + int i; + CARD32 size; + char *p; KdMouseMatrix m; - code = VbeSetMode(priv->vi, pscr->mode->mode, pscr->mapping == VESA_LINEAR); - if(code < 0) - return FALSE; - + if (pscr->mode->vbe) { - int p; - CARD8 scratch[4] = {0x40,0x40,0x40,0}; - for (p = 0; p < 256; p++) - { - if (20 <= p && p < 21) - { - scratch[0] = 255; - scratch[1] = 255; - scratch[2] = 255; - } - else - { - scratch[0] = 0; - scratch[1] = 0; - scratch[2] = 0; - } - VbeSetPalette(priv->vi, p, 1, scratch); - } + if (vesa_verbose) + ErrorF ("Enable VBE mode 0x%x\n", pscr->mode->mode); + code = VbeSetMode(priv->vi, priv->vbeInfo, pscr->mode->mode, + pscr->mapping == VESA_LINEAR); + } + else + { + if (vesa_verbose) + ErrorF ("Enable BIOS mode 0x%x\n", pscr->mode->mode); + code = VgaSetMode (priv->vi, pscr->mode->mode); } - if(priv->vib->Capabilities[0] & 1) - palette_hi = 1; - if(priv->vib->Capabilities[0] & 4) - palette_wait = 1; - if(palette_hi || palette_wait) - VbeSetPaletteOptions(priv->vi, palette_hi?8:6, palette_wait); - + if(code < 0) + return FALSE; + switch (pscr->mapping) { + case VESA_MONO: + VgaSetWritePlaneMask (priv->vi, 0x1); case VESA_LINEAR: memcpy (priv->text, pscr->fb, VESA_TEXT_SAVE); break; case VESA_WINDOWED: for (i = 0; i < VESA_TEXT_SAVE;) { - p = VbeSetWindow(priv->vi, i, VBE_WINDOW_READ, &size); + p = vesaSetWindowWindowed (pScreen, 0, i, VBE_WINDOW_READ, &size); if(!p) { ErrorF("Couldn't set window for saving VGA font\n"); break; @@ -689,10 +937,9 @@ vesaEnable(ScreenPtr pScreen) } break; case VESA_PLANAR: - p = VbeSetWindow (priv->vi, 0, VBE_WINDOW_READ, &size); for (i = 0; i < 4; i++) { - VbeSetReadPlaneMap (priv->vi, i); + p = vesaSetWindowPlanar (pScreen, 0, i, VBE_WINDOW_READ, &size); memcpy (((char *)priv->text) + i * (VESA_TEXT_SAVE/4), p, (VESA_TEXT_SAVE/4)); } @@ -716,19 +963,20 @@ void vesaDisable(ScreenPtr pScreen) { KdScreenPriv(pScreen); - VesaCardPrivPtr priv = pScreenPriv->card->driver; + VesaCardPrivPtr priv = pScreenPriv->card->driver; VesaScreenPrivPtr pscr = pScreenPriv->screen->driver; - int i=0; - int size; - char *p; + int i=0; + CARD32 size; + char *p; switch (pscr->mapping) { case VESA_LINEAR: + case VESA_MONO: memcpy(pscr->fb, priv->text, VESA_TEXT_SAVE); break; case VESA_WINDOWED: while(i < VESA_TEXT_SAVE) { - p = VbeSetWindow(priv->vi, i, VBE_WINDOW_WRITE, &size); + p = vesaSetWindowWindowed (pScreen, 0, i, VBE_WINDOW_WRITE, &size); if(!p) { ErrorF("Couldn't set window for restoring VGA font\n"); break; @@ -740,10 +988,9 @@ vesaDisable(ScreenPtr pScreen) } break; case VESA_PLANAR: - p = VbeSetWindow (priv->vi, 0, VBE_WINDOW_WRITE, &size); for (i = 0; i < 4; i++) { - VbeSetWritePlaneMask (priv->vi, 1 << i); + p = vesaSetWindowPlanar (pScreen, 0, i, VBE_WINDOW_WRITE, &size); memcpy (p, ((char *)priv->text) + i * (VESA_TEXT_SAVE/4), (VESA_TEXT_SAVE/4)); @@ -761,29 +1008,49 @@ vesaPreserve(KdCardInfo *card) /* The framebuffer might not be valid at this point, so we cannot save the VGA fonts now; we do it in vesaEnable. */ - code = VbeSaveState(priv->vi); - if(code < 0) - FatalError("Couldn't save state\n"); + if (VbeGetMode (priv->vi, &priv->old_vbe_mode) < 0) + priv->old_vbe_mode = -1; - return; + if (VgaGetMode (priv->vi, &priv->old_vga_mode) < 0) + priv->old_vga_mode = -1; + + if (vesa_verbose) + ErrorF ("Previous modes: VBE 0x%x BIOS 0x%x\n", + priv->old_vbe_mode, priv->old_vga_mode); } void vesaRestore(KdCardInfo *card) { VesaCardPrivPtr priv = card->driver; - VbeRestoreState(priv->vi); - return; + int n; + + for (n = 0; n < priv->nmode; n++) + if (priv->modes[n].vbe && priv->modes[n].mode == (priv->old_vbe_mode&0x3fff)) + break; + + if (n < priv->nmode) + { + if (vesa_verbose) + ErrorF ("Restore VBE mode 0x%x\n", priv->old_vbe_mode); + VbeSetMode (priv->vi, priv->vbeInfo, priv->old_vbe_mode, 0); + } + else + { + if (vesa_verbose) + ErrorF ("Restore BIOS mode 0x%x\n", priv->old_vga_mode); + VgaSetMode (priv->vi, priv->old_vga_mode); + } } void vesaCardFini(KdCardInfo *card) { VesaCardPrivPtr priv = card->driver; - if (vesa_restore) - VbeSetTextMode(priv->vi,3); - VbeCleanup(priv->vi); - return; + + if (priv->vbeInfo) + VbeCleanup (priv->vi, priv->vbeInfo); + Vm86Cleanup(priv->vi); } void @@ -793,12 +1060,47 @@ vesaScreenFini(KdScreenInfo *screen) VesaCardPrivPtr priv = screen->card->driver; if (pscr->fb) - VbeUnmapFramebuffer(priv->vi, &pscr->mode->vmib, pscr->fb); + { + if (pscr->mode->vbe) + VbeUnmapFramebuffer(priv->vi, priv->vbeInfo, pscr->mode->mode, pscr->fb); + else + VgaUnmapFramebuffer (priv->vi); + } + if (pscr->shadow) + KdShadowScreenFini (screen); screen->fb[0].depth = pscr->origDepth; - return; } +int +vesaSetPalette(VesaCardPrivPtr priv, int first, int number, U8 *entries) +{ + if (priv->vga_palette) + return VgaSetPalette (priv->vi, first, number, entries); + else + return VbeSetPalette (priv->vi, priv->vbeInfo, first, number, entries); +} + + +int +vesaGetPalette(VesaCardPrivPtr priv, int first, int number, U8 *entries) +{ + int code; + + if (priv->vga_palette) + code = VgaGetPalette (priv->vi, first, number, entries); + else + { + code = VbeGetPalette (priv->vi, priv->vbeInfo, first, number, entries); + if (code < 0) + { + priv->vga_palette = 1; + code = VgaGetPalette (priv->vi, first, number, entries); + } + } + return code; +} + void vesaPutColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs) { @@ -839,15 +1141,15 @@ vesaPutColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs) */ if (p < 16) { - VbeSetPalette (priv->vi, p, 1, scratch); + vesaSetPalette (priv, p, 1, scratch); if (p >= 8) - VbeSetPalette (priv->vi, p+0x30, 1, scratch); + vesaSetPalette (priv, p+0x30, 1, scratch); else if (p == 6) - VbeSetPalette (priv->vi, 0x14, 1, scratch); + vesaSetPalette (priv, 0x14, 1, scratch); } } else - VbeSetPalette(priv->vi, p, 1, scratch); + vesaSetPalette(priv, p, 1, scratch); } } @@ -874,7 +1176,7 @@ vesaGetColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs) } for(i = 0; i<n; i++) { - VbeGetPalette(priv->vi, pdefs[i].pixel, 1, scratch); + vesaGetPalette(priv, pdefs[i].pixel, 1, scratch); pdefs[i].red = scratch[red]<<8; pdefs[i].green = scratch[green]<<8; pdefs[i].blue = scratch[blue]<<8; @@ -905,8 +1207,8 @@ vesaProcessArgument (int argc, char **argv, int i) } else if(!strcmp(argv[i], "-nolinear")) { vesa_linear_fb = FALSE; return 1; - } else if(!strcmp(argv[i], "-restore")) { - vesa_restore = TRUE; + } else if(!strcmp(argv[i], "-verbose")) { + vesa_verbose = TRUE; return 1; } diff --git a/xc/programs/Xserver/hw/kdrive/vesa/vesa.h b/xc/programs/Xserver/hw/kdrive/vesa/vesa.h index 8ded2ab67..2f23ec054 100644 --- a/xc/programs/Xserver/hw/kdrive/vesa/vesa.h +++ b/xc/programs/Xserver/hw/kdrive/vesa/vesa.h @@ -19,60 +19,133 @@ 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. */ -/* $XFree86: xc/programs/Xserver/hw/kdrive/vesa/vesa.h,v 1.5 2000/09/15 07:25:13 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/vesa/vesa.h,v 1.7 2000/10/20 00:19:50 keithp Exp $ */ #ifndef _VESA_H_ #define _VESA_H_ #include "kdrive.h" -#include <sys/vm86.h> -#include "vbe.h" +#include "vm86.h" #define VESA_TEXT_SAVE (64*1024) +#define MODE_SUPPORTED 0x01 +#define MODE_COLOUR 0x08 +#define MODE_GRAPHICS 0x10 +#define MODE_VGA 0x20 +#define MODE_LINEAR 0x80 + +#define MODE_DIRECT 0x1 + +#define MEMORY_TEXT 0 +#define MEMORY_CGA 1 +#define MEMORY_HERCULES 2 +#define MEMORY_PLANAR 3 +#define MEMORY_PSEUDO 4 +#define MEMORY_NONCHAIN 5 +#define MEMORY_DIRECT 6 +#define MEMORY_YUV 7 + typedef struct _VesaMode { - int mode; - VbeModeInfoBlock vmib; + int mode; /* mode number */ + int vbe; /* a VBE mode */ + int ModeAttributes; /* mode attributes */ + int NumberOfPlanes; /* number of memory planes */ + int BitsPerPixel; /* bits per pixel */ + int MemoryModel; /* memory model type */ + int RedMaskSize; /* size of direct color red mask in bits */ + int RedFieldPosition; /* bit position of lsb of red mask */ + int GreenMaskSize; /* size of direct color green mask in bits */ + int GreenFieldPosition; /* bit position of lsb of green mask */ + int BlueMaskSize; /* size of direct color blue mask in bits */ + int BlueFieldPosition; /* bit position of lsb of blue mask */ + int RsvdMaskSize; /* size of direct color reserved mask bits*/ + int RsvdFieldPosition; /* bit position of lsb of reserved mask */ + int DirectColorModeInfo; /* direct color mode attributes */ + int XResolution; /* horizontal resolution */ + int YResolution; /* vertical resolution */ + int BytesPerScanLine; /* bytes per scan line */ } VesaModeRec, *VesaModePtr; +#include "vbe.h" +#include "vga.h" + typedef struct _VesaCardPriv { - VbeInfoPtr vi; - VbeInfoBlock *vib; + int vbe; + Vm86InfoPtr vi; VesaModePtr modes; - int nmode; - char text[VESA_TEXT_SAVE]; + int nmode; + int vga_palette; + int old_vbe_mode; + int old_vga_mode; + VbeInfoPtr vbeInfo; + char text[VESA_TEXT_SAVE]; } VesaCardPrivRec, *VesaCardPrivPtr; #define VESA_LINEAR 0 #define VESA_WINDOWED 1 #define VESA_PLANAR 2 +#define VESA_MONO 3 + typedef struct _VesaScreenPriv { VesaModePtr mode; Bool shadow; Bool rotate; int mapping; int origDepth; - void *fb; + void *fb; + int fb_size; } VesaScreenPrivRec, *VesaScreenPrivPtr; extern int vesa_video_mode; extern Bool vesa_force_mode; -Bool vesaListModes(void); -Bool vesaInitialize(KdCardInfo *card, VesaCardPrivPtr priv); -Bool vesaCardInit(KdCardInfo *card); -Bool vesaInitialize (KdCardInfo *card, VesaCardPrivPtr priv); -Bool vesaScreenInitialize (KdScreenInfo *screen, VesaScreenPrivPtr pscr); -Bool vesaScreenInit(KdScreenInfo *screen); -Bool vesaInitScreen(ScreenPtr pScreen); -Bool vesaEnable(ScreenPtr pScreen); -void vesaDisable(ScreenPtr pScreen); -void vesaPreserve(KdCardInfo *card); -void vesaRestore(KdCardInfo *card); -void vesaCardFini(KdCardInfo *card); -void vesaScreenFini(KdScreenInfo *screen); -void vesaPutColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs); -void vesaGetColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs); -int vesaProcessArgument (int argc, char **argv, int i); +void +vesaListModes(void); + +Bool +vesaInitialize(KdCardInfo *card, VesaCardPrivPtr priv); + +Bool +vesaCardInit(KdCardInfo *card); + +Bool +vesaInitialize (KdCardInfo *card, VesaCardPrivPtr priv); + +Bool +vesaScreenInitialize (KdScreenInfo *screen, VesaScreenPrivPtr pscr); + +Bool +vesaScreenInit(KdScreenInfo *screen); + +Bool +vesaInitScreen(ScreenPtr pScreen); + +Bool +vesaEnable(ScreenPtr pScreen); + +void +vesaDisable(ScreenPtr pScreen); + +void +vesaPreserve(KdCardInfo *card); + +void +vesaRestore(KdCardInfo *card); + +void +vesaCardFini(KdCardInfo *card); + +void +vesaScreenFini(KdScreenInfo *screen); + +void +vesaPutColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs); + +void +vesaGetColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs); + +int +vesaProcessArgument (int argc, char **argv, int i); #endif _VESA_H_ diff --git a/xc/programs/Xserver/hw/kdrive/vesa/vesainit.c b/xc/programs/Xserver/hw/kdrive/vesa/vesainit.c index 580977058..d5cd99cdb 100644 --- a/xc/programs/Xserver/hw/kdrive/vesa/vesainit.c +++ b/xc/programs/Xserver/hw/kdrive/vesa/vesainit.c @@ -19,11 +19,11 @@ 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. */ -/* $XFree86$ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/vesa/vesainit.c,v 1.4 2000/10/20 00:19:50 keithp Exp $ */ #include "vesa.h" -KdCardFuncs vesaFuncs = { +const KdCardFuncs vesaFuncs = { vesaCardInit, /* cardinit */ vesaScreenInit, /* scrinit */ vesaInitScreen, /* initScreen */ diff --git a/xc/programs/Xserver/hw/xfree86/OS_cygwin.c b/xc/programs/Xserver/hw/xfree86/OS_cygwin.c deleted file mode 100644 index 997815e8b..000000000 --- a/xc/programs/Xserver/hw/xfree86/OS_cygwin.c +++ /dev/null @@ -1,221 +0,0 @@ -/* - * (c) Copyright 1998,1999 by Sebastien Marineau <sebastien@qnx.com> - * - * 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 - * OREST ZBOROWSKI 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 Orest Zborowski shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from Orest Zborowski. - * - * $XFree86: xc/programs/Xserver/hw/xfree86/OS_cygwin.c,v 3.1 2000/08/10 17:40:32 dawes Exp $ - */ - -#include "Probe.h" - -#include <errno.h> -#include <fcntl.h> -#include <sys/types.h> -#include <unistd.h> -#include <windows.h> -#include <sys/mman.h> -#include <sys/cygwin.h> - -static int VT_fd = -1; -static int BIOS_fd = -1; - -/* - * OpenVideo -- - * - * Enable access to the installed video hardware. - */ -int OpenVideo() -{ - int fd; - char fn[20]; - - if (geteuid() != 0) { - fprintf(stderr, "%s: Must be run as root\n", MyName); - return(-1); - } - - if ((fd = open("/dev/conin", O_WRONLY, 0)) < 0) { - fprintf(stderr, "%s: Cannot open /dev/conin\n", MyName); - return(-1); - } - - return fd; -} - -/* - * CloseVideo -- - * - * Disable access to the video hardware. - */ -void CloseVideo() -{ - int fd; - - if (VT_fd > 0) { - close(VT_fd); - } -} - -/* - * MapVGA -- - * - * Map the VGA memory window (0xA0000-0xAFFFF) as read/write memory for - * the process for use in probing memory. - */ -Byte *MapVGA() -{ - return( MapMem(0xA0000,0x10000) ); -} - -Byte *MapMem(address, size) - unsigned long address; - unsigned long size; -{ - int fd; - Byte *base; - - if ((fd = open("/dev/zero", O_RDWR)) < 0) { - fprintf(stderr, "%s: Failed to open /dev/zero\n", MyName); - return((Byte *)0); - } - - base = (Byte *)mmap((void *)0, size, PROT_READ|PROT_WRITE, - MAP_SHARED, fd, (off_t)address); - close(fd); - - if ((long)base == -1) { - fprintf(stderr, "%s: Failed to mmap framebuffer\n", MyName); - return((Byte *)0); - } - - return base; -} - -/* - * UnMapVGA -- - * - * Unmap the VGA memory window. - */ -void UnMapVGA(base) - Byte *base; -{ - UnMapMem(base,0x10000); - return; -} - -void UnMapMem(base,size) - Byte *base; - unsigned long size; -{ - munmap((void *)base, size); - return; -} - -/* - * ReadBIOS -- - * - * Read 'Len' bytes from the video BIOS at address 'Bios_Base'+'Offset' into - * buffer 'Buffer'. - */ -int ReadBIOS(Offset, Buffer, Len) -unsigned Offset; -Byte *Buffer; -int Len; -{ - Word tmp; - Byte *Base = Bios_Base + Offset; - Byte *mybase; - off_t myoffset; - int mysize; - - if (BIOS_fd == -1) { - if ((BIOS_fd = open("/dev/mem", O_RDONLY, 0)) < 0) { - fprintf(stderr, "%s: cannot open /dev/mem\n", MyName); - return(-1); - } - } - - if ((off_t)((off_t)Base & 0x7FFF) != (off_t)0) { - /* - * Sanity check... - */ - (void)lseek(BIOS_fd, (off_t)((off_t)Base & 0xF8000), SEEK_SET); - (void)read(BIOS_fd, &tmp, 2); - if (tmp != (Word)0xAA55) { - fprintf(stderr, "%s: BIOS sanity check failed, addr=%x\n", - MyName, (int)Base); - return(-1); - } - } - - if (lseek(BIOS_fd, (off_t)Base, SEEK_SET) < 0) { - fprintf(stderr, "%s: BIOS seek failed\n", MyName); - return(-1); - } - - if (read(BIOS_fd, Buffer, Len) != Len) { - fprintf(stderr, "%s: BIOS read failed\n", MyName); - return(-1); - } - - return Len; -} - -/* - * EnableIOPort -- - * - * Enable access to 'NumPorts' IO ports listed in array 'Ports'. - */ - -/*ARGSUSED*/ -int EnableIOPorts(NumPorts, Ports) -CONST int NumPorts; -CONST Word *Ports; -{ - return(0); -} - -/* - * DisableIOPort -- - * - * Disable access to 'NumPorts' IO ports listed in array 'Ports'. - */ - -/*ARGSUSED*/ -int DisableIOPorts(NumPorts, Port) -CONST int NumPorts; -CONST Word *Port; -{ - return(0); -} - -/* - * ShortSleep -- - * - * Sleep for the number of milliseconds specified in 'Delay'. - */ -void ShortSleep(Delay) -int Delay; -{ - usleep(Delay * 1000); -} diff --git a/xc/programs/Xserver/hw/xfree86/XF86Config.cpp b/xc/programs/Xserver/hw/xfree86/XF86Config.cpp index 96597ff11..47f084a5c 100644 --- a/xc/programs/Xserver/hw/xfree86/XF86Config.cpp +++ b/xc/programs/Xserver/hw/xfree86/XF86Config.cpp @@ -1,4 +1,4 @@ -.\" $XFree86: xc/programs/Xserver/hw/xfree86/XF86Config.cpp,v 1.10 2000/06/20 05:08:42 dawes Exp $ +.\" $XFree86: xc/programs/Xserver/hw/xfree86/XF86Config.cpp,v 1.11 2000/10/24 18:07:49 dawes Exp $ .\" shorthand for double quote that works everywhere. .ds q \N'34' .TH XF86Config __filemansuffix__ "Version 4.0.1" "XFree86" @@ -516,6 +516,9 @@ This option affects the way that bus resource sizes are estimated. Default: 0. .BI "Option \*qNoPM\*q \*q" boolean \*q Disables something to do with power management events. Default: PM enabled on platforms that support it. +.TP 7 +.BI "Option \*qXinerama\*q \*q" boolean \*q +enable or disable XINERAMA extension. Default is disabled. .SH MODULE SECTION The .B Module diff --git a/xc/programs/Xserver/hw/xfree86/common/xf86Config.c b/xc/programs/Xserver/hw/xfree86/common/xf86Config.c index 4a64bc21b..383b00039 100644 --- a/xc/programs/Xserver/hw/xfree86/common/xf86Config.c +++ b/xc/programs/Xserver/hw/xfree86/common/xf86Config.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Config.c,v 3.230 2000/09/19 12:46:12 eich Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Config.c,v 3.233 2000/10/24 18:07:50 dawes Exp $ */ /* @@ -692,7 +692,8 @@ typedef enum { FLAG_PIXMAP, FLAG_PC98, FLAG_ESTIMATE_SIZES_AGGRESSIVELY, - FLAG_NOPM + FLAG_NOPM, + FLAG_XINERAMA } FlagValues; static OptionInfoRec FlagOptions[] = { @@ -742,6 +743,8 @@ static OptionInfoRec FlagOptions[] = { {0}, FALSE }, { FLAG_NOPM, "NoPM", OPTV_BOOLEAN, {0}, FALSE }, + { FLAG_XINERAMA, "Xinerama", OPTV_BOOLEAN, + {0}, FALSE }, { -1, NULL, OPTV_NONE, {0}, FALSE } }; @@ -770,6 +773,7 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) int i; Pix24Flags pix24 = Pix24DontCare; Bool value; + MessageType from; if(flagsconf == NULL) return TRUE; @@ -779,11 +783,11 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) */ optp = NULL; if (flagsconf->flg_option_lst) - optp = OptionListDup(flagsconf->flg_option_lst); + optp = xf86optionListDup(flagsconf->flg_option_lst); if (layoutopts) { - tmp = OptionListDup(layoutopts); + tmp = xf86optionListDup(layoutopts); if (optp) - optp = OptionListMerge(optp, tmp); + optp = xf86optionListMerge(optp, tmp); else optp = tmp; } @@ -912,6 +916,18 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) } #endif +#ifdef PANORAMIX + from = X_DEFAULT; + if (!noPanoramiXExtension) + from = X_CMDLINE; + else if (xf86GetOptValBool(FlagOptions, FLAG_XINERAMA, &value)) { + noPanoramiXExtension = !value; + from = X_CONFIG; + } + if (!noPanoramiXExtension) + xf86Msg(from, "Xinerama: enabled\n"); +#endif + return TRUE; } @@ -1127,7 +1143,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) } if (!havePointer) { if (xf86PointerName) { - confInput = xf86FindInput(xf86PointerName, + confInput = xf86findInput(xf86PointerName, xf86configptr->conf_input_lst); if (!confInput) { xf86Msg(X_ERROR, "No InputDevice section called \"%s\"\n", @@ -1137,10 +1153,10 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) from = X_CMDLINE; } else { from = X_DEFAULT; - confInput = xf86FindInput(CONF_IMPLICIT_POINTER, + confInput = xf86findInput(CONF_IMPLICIT_POINTER, xf86configptr->conf_input_lst); if (!confInput && implicitLayout) { - confInput = xf86FindInputByDriver("mouse", + confInput = xf86findInputByDriver("mouse", xf86configptr->conf_input_lst); } } @@ -1149,7 +1165,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) } if (!haveKeyboard) { if (xf86KeyboardName) { - confInput = xf86FindInput(xf86KeyboardName, + confInput = xf86findInput(xf86KeyboardName, xf86configptr->conf_input_lst); if (!confInput) { xf86Msg(X_ERROR, "No InputDevice section called \"%s\"\n", @@ -1159,10 +1175,10 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) from = X_CMDLINE; } else { from = X_DEFAULT; - confInput = xf86FindInput(CONF_IMPLICIT_KEYBOARD, + confInput = xf86findInput(CONF_IMPLICIT_KEYBOARD, xf86configptr->conf_input_lst); if (!confInput && implicitLayout) { - confInput = xf86FindInputByDriver("keyboard", + confInput = xf86findInputByDriver("keyboard", xf86configptr->conf_input_lst); } } @@ -1173,7 +1189,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) count++; indp = xnfrealloc(servlayoutp->inputs, (count + 1) * sizeof(IDevRec)); indp[count - 1] = Pointer; - indp[count - 1].extraOptions = addNewOption(NULL, "CorePointer", NULL); + indp[count - 1].extraOptions = xf86addNewOption(NULL, "CorePointer", NULL); indp[count].identifier = NULL; servlayoutp->inputs = indp; } else if (!havePointer) { @@ -1187,7 +1203,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) count++; indp = xnfrealloc(servlayoutp->inputs, (count + 1) * sizeof(IDevRec)); indp[count - 1] = Keyboard; - indp[count - 1].extraOptions = addNewOption(NULL, "CoreKeyboard", NULL); + indp[count - 1].extraOptions = xf86addNewOption(NULL, "CoreKeyboard", NULL); indp[count].identifier = NULL; servlayoutp->inputs = indp; } else if (!haveKeyboard) { @@ -1237,7 +1253,7 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout, from = X_CONFIG; } if (xf86LayoutName != NULL) { - if ((l = xf86FindLayout(xf86LayoutName, conf_layout)) == NULL) { + if ((l = xf86findLayout(xf86LayoutName, conf_layout)) == NULL) { xf86Msg(X_ERROR, "No ServerLayout section called \"%s\"\n", xf86LayoutName); return FALSE; @@ -1440,17 +1456,6 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout, servlayoutp->inputs = indp; servlayoutp->options = conf_layout->lay_option_lst; from = X_DEFAULT; -#ifdef PANORAMIX - if (!noPanoramiXExtension) - from = X_CMDLINE; - else if (xf86FindOption(conf_layout->lay_option_lst, "Xinerama")) { - noPanoramiXExtension = - !xf86SetBoolOption(conf_layout->lay_option_lst, "Xinerama", FALSE); - from = X_CONFIG; - } - if (!noPanoramiXExtension) - xf86Msg(from, "Xinerama: enabled\n"); -#endif if (!checkCoreInputDevices(servlayoutp, FALSE)) return FALSE; @@ -1486,7 +1491,7 @@ configImpliedLayout(serverLayoutPtr servlayoutp, XF86ConfScreenPtr conf_screen) from = X_CONFIG; if (xf86ScreenName != NULL) { - if ((s = xf86FindScreen(xf86ScreenName, conf_screen)) == NULL) { + if ((s = xf86findScreen(xf86ScreenName, conf_screen)) == NULL) { xf86Msg(X_ERROR, "No Screen section called \"%s\"\n", xf86ScreenName); return FALSE; @@ -1660,16 +1665,20 @@ configMonitor(MonPtr monitorp, XF86ConfMonitorPtr conf_monitor) */ while(modeslnk) { - modes = xf86FindModes (modeslnk->ml_modes_str, - xf86configptr->conf_modes_lst); - modeslnk->ml_modes = modes; + /* We may want to reuse the monitor section */ + if (!modeslnk->ml_modes) { + modes = xf86findModes (modeslnk->ml_modes_str, + xf86configptr->conf_modes_lst); + modeslnk->ml_modes = modes; + - /* now add the modes found in the modes - section to the list of modes for this - monitor */ - conf_monitor->mon_modeline_lst = (XF86ConfModeLinePtr) - addListItem((GenericListPtr)conf_monitor->mon_modeline_lst, + /* now add the modes found in the modes + section to the list of modes for this + monitor */ + conf_monitor->mon_modeline_lst = (XF86ConfModeLinePtr) + xf86addListItem((GenericListPtr)conf_monitor->mon_modeline_lst, (GenericListPtr)modes->mon_modeline_lst); + } modeslnk = modeslnk->list.next; } @@ -1758,7 +1767,7 @@ lookupVisual(const char *visname) return -1; for (i = 0; i <= DirectColor; i++) { - if (!NameCompare(visname, xf86VisualNames[i])) + if (!xf86nameCompare(visname, xf86VisualNames[i])) break; } @@ -2006,7 +2015,7 @@ xf86HandleConfigFile(void) if (xf86ConfigFile) from = X_CMDLINE; - filename = xf86OpenConfigFile(searchpath, xf86ConfigFile, PROJECTROOT); + filename = xf86openConfigFile(searchpath, xf86ConfigFile, PROJECTROOT); if (filename) { xf86MsgVerb(from, 0, "Using config file: \"%s\"\n", filename); } else { @@ -2016,11 +2025,11 @@ xf86HandleConfigFile(void) xf86ErrorFVerb(0, "\n"); return FALSE; } - if ((xf86configptr = xf86ReadConfigFile ()) == NULL) { + if ((xf86configptr = xf86readConfigFile ()) == NULL) { xf86Msg(X_ERROR, "Problem parsing the config file\n"); return FALSE; } - xf86CloseConfigFile (); + xf86closeConfigFile (); /* Initialise a few things. */ @@ -2119,12 +2128,12 @@ xf86HandleConfigFile(void) Bool xf86PathIsAbsolute(const char *path) { - return (PathIsAbsolute(path) != 0); + return (xf86pathIsAbsolute(path) != 0); } Bool xf86PathIsSafe(const char *path) { - return (PathIsSafe(path) != 0); + return (xf86pathIsSafe(path) != 0); } diff --git a/xc/programs/Xserver/hw/xfree86/common/xf86Debug.c b/xc/programs/Xserver/hw/xfree86/common/xf86Debug.c index 916003230..eb8d4456d 100644 --- a/xc/programs/Xserver/hw/xfree86/common/xf86Debug.c +++ b/xc/programs/Xserver/hw/xfree86/common/xf86Debug.c @@ -1,3 +1,5 @@ +/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Debug.c,v 1.3 2000/09/26 15:57:08 tsi Exp $ */ + #include <sys/time.h> #include <unistd.h> #include "X.h" diff --git a/xc/programs/Xserver/hw/xfree86/common/xf86PciInfo.h b/xc/programs/Xserver/hw/xfree86/common/xf86PciInfo.h index c58bd5073..39b6472e7 100644 --- a/xc/programs/Xserver/hw/xfree86/common/xf86PciInfo.h +++ b/xc/programs/Xserver/hw/xfree86/common/xf86PciInfo.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86PciInfo.h,v 1.72 2000/09/13 15:47:31 martin Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86PciInfo.h,v 1.75 2000/10/23 21:16:45 tsi Exp $ */ /* * PCI Probe * @@ -233,6 +233,10 @@ #define PCI_CHIP_RAGE128ML 0x4D4C #define PCI_CHIP_RAGE128PF 0x5046 #define PCI_CHIP_RAGE128PR 0x5052 +#define PCI_CHIP_RADEON_QD 0x5144 +#define PCI_CHIP_RADEON_QE 0x5145 +#define PCI_CHIP_RADEON_QF 0x5146 +#define PCI_CHIP_RADEON_QG 0x5147 #define PCI_CHIP_RAGE128RE 0x5245 #define PCI_CHIP_RAGE128RF 0x5246 #define PCI_CHIP_RAGE128RK 0x524B @@ -783,6 +787,10 @@ static pciVendorDeviceInfo xf86PCIVendorInfoData[] = { {PCI_CHIP_RAGE128ML, "Rage 128 Mobility ML",0}, {PCI_CHIP_RAGE128PF, "Rage 128 Pro PF",0}, {PCI_CHIP_RAGE128PR, "Rage 128 Pro PR",0}, + {PCI_CHIP_RADEON_QD, "Radeon QD",0}, + {PCI_CHIP_RADEON_QE, "Radeon QE",0}, + {PCI_CHIP_RADEON_QF, "Radeon QF",0}, + {PCI_CHIP_RADEON_QG, "Radeon QG",0}, {PCI_CHIP_RAGE128RE, "Rage 128 RE",0}, {PCI_CHIP_RAGE128RF, "Rage 128 RF",0}, {PCI_CHIP_RAGE128RK, "Rage 128 RK",0}, @@ -1078,6 +1086,7 @@ static pciVendorDeviceInfo xf86PCIVendorInfoData[] = { {PCI_VENDOR_SUN, { {0x1000, "EBUS",0 }, {0x1001, "Happy Meal",0 }, + {0x5000, "Advanced PCI bridge",0 }, {0x8000, "PCI Bus Module",0 }, {0x0000, NULL,0}}}, {PCI_VENDOR_CMD, { diff --git a/xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c b/xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c index a6c217cfd..9b44afe8f 100644 --- a/xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c +++ b/xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c,v 3.21 2000/09/19 12:46:13 eich Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c,v 3.24 2000/10/26 11:47:45 tsi Exp $ */ /* * Copyright (c) 1997-1999 by The XFree86 Project, Inc. @@ -116,6 +116,8 @@ pciVendorDeviceInfo * xf86PCIVendorInfo; static void getPciClassFlags(pciConfigPtr *pcrpp); +static void +pciConvertListToHost(int bus, int dev, int func, resPtr list); static void FindPCIVideoInfo(void) @@ -227,8 +229,9 @@ FindPCIVideoInfo(void) mem64 = TRUE; #if defined LONG64 || defined WORD64 info->memBase[0] |= - (memType)PCIGETMEMORY64HIGH(pcrp->pci_base0) << 32; + (memType)PCIGETMEMORY64HIGH(pcrp->pci_base1) << 32; #else + if (pcrp->pci_base1) info->memBase[0] = 0; #endif } @@ -246,13 +249,14 @@ FindPCIVideoInfo(void) mem64 = TRUE; #if defined LONG64 || defined WORD64 info->memBase[1] |= - (memType)PCIGETMEMORY64HIGH(pcrp->pci_base1) << 32; + (memType)PCIGETMEMORY64HIGH(pcrp->pci_base2) << 32; #else + if (pcrp->pci_base2) info->memBase[1] = 0; #endif } } - } else if (mem64) + } else mem64 = FALSE; if (pcrp->pci_base2 && !mem64) { @@ -265,14 +269,15 @@ FindPCIVideoInfo(void) if (PCI_MAP_IS64BITMEM(pcrp->pci_base2)) { mem64 = TRUE; #if defined LONG64 || defined WORD64 - info->memBase[1] |= - (memType)PCIGETMEMORY64HIGH(pcrp->pci_base1) << 32; + info->memBase[2] |= + (memType)PCIGETMEMORY64HIGH(pcrp->pci_base3) << 32; #else - info->memBase[1] = 0; + if (pcrp->pci_base3) + info->memBase[2] = 0; #endif } } - } else if (mem64) + } else mem64 = FALSE; if (pcrp->pci_base3 && !mem64) { @@ -286,13 +291,14 @@ FindPCIVideoInfo(void) mem64 = TRUE; #if defined LONG64 || defined WORD64 info->memBase[3] |= - (memType)PCIGETMEMORY64HIGH(pcrp->pci_base3) << 32; + (memType)PCIGETMEMORY64HIGH(pcrp->pci_base4) << 32; #else + if (pcrp->pci_base4) info->memBase[3] = 0; #endif } } - } else if (mem64) + } else mem64 = FALSE; if (pcrp->pci_base4 && !mem64) { @@ -306,13 +312,14 @@ FindPCIVideoInfo(void) mem64 = TRUE; #if defined LONG64 || defined WORD64 info->memBase[4] |= - (memType)PCIGETMEMORY64HIGH(pcrp->pci_base4) << 32; + (memType)PCIGETMEMORY64HIGH(pcrp->pci_base5) << 32; #else + if (pcrp->pci_base5) info->memBase[4] = 0; #endif } } - } else if (mem64) + } else mem64 = FALSE; if (pcrp->pci_base5 && !mem64) { @@ -323,7 +330,8 @@ FindPCIVideoInfo(void) info->type[5] = pcrp->pci_base5 & PCI_MAP_MEMORY_ATTR_MASK; info->memBase[5] = (memType)PCIGETMEMORY(pcrp->pci_base5); } - } + } else + mem64 = FALSE; info->listed_class = pcrp->listed_class; } i++; @@ -992,11 +1000,14 @@ fixPciResource(int prt, memType alignment, pciVideoPtr pvp, long type) resRange range; resPtr resSize = NULL; resPtr w_tmp, w = NULL, w_2nd = NULL; - PCITAG tag = pciTag(pvp->bus,pvp->device,pvp->func); + PCITAG tag; PciBusPtr pbp = xf86PciBus, pbp1 = xf86PciBus; + pciConfigPtr pcp; resPtr tmp; if (!pvp) return FALSE; + tag = pciTag(pvp->bus,pvp->device,pvp->func); + pcp = pvp->thisCard; type &= ResAccMask; if (!type) type = ResShared; @@ -1090,8 +1101,7 @@ fixPciResource(int prt, memType alignment, pciVideoPtr pvp, long type) } /* convert bus based entries in avoid list to host base */ - xf86ConvertListToHost( - xf86GetPciEntity(pvp->bus,pvp->device,pvp->func), avoid); + pciConvertListToHost(pvp->bus,pvp->device,pvp->func, avoid); if (!w) w = xf86DupResList(ResRange); @@ -1240,19 +1250,34 @@ fixPciResource(int prt, memType alignment, pciVideoPtr pvp, long type) (*p_base) = H2B(tag,range.rBegin,type); #ifdef DEBUG ErrorF("New PCI res %i base: 0x%lx, size: 0x%lx, type %s\n", - res_n,(*p_base),(1 << (*p_size)),type | ResMem ? "Mem" : "Io"); + res_n,(*p_base),(1 << (*p_size)), (type & ResMem) ? "Mem" : "Io"); #endif if (res_n != 0xff) { - pciWriteLong(tag,PCI_CMD_BASE_REG + res_n * sizeof(CARD32), - (CARD32)(*p_base) | (CARD32)(p_type)); + if (type & ResMem) + pvp->memBase[prt] = range.rBegin; + else + pvp->ioBase[prt] = range.rBegin; + ((CARD32 *)(&(pcp->pci_base0)))[res_n] = + (CARD32)(*p_base) | (CARD32)(p_type); + pciWriteLong(tag, PCI_CMD_BASE_REG + res_n * sizeof(CARD32), + ((CARD32 *)(&(pcp->pci_base0)))[res_n]); + if (PCI_MAP_IS64BITMEM(p_type)) { #if defined LONG64 || defined WORD64 - if (PCI_MAP_IS64BITMEM(p_type)) - pciWriteLong(tag,PCI_CMD_BASE_REG + (res_n + 1) * sizeof(CARD32), - (CARD32)(*p_base >> 32)); + ((CARD32 *)(&(pcp->pci_base0)))[res_n + 1] = + (CARD32)(*p_base >> 32); + pciWriteLong(tag, PCI_CMD_BASE_REG + (res_n + 1) * sizeof(CARD32), + ((CARD32 *)(&(pcp->pci_base0)))[res_n + 1]); +#else + ((CARD32 *)(&(pcp->pci_base0)))[res_n + 1] = 0; + pciWriteLong(tag, PCI_CMD_BASE_REG + (res_n + 1) * sizeof(CARD32), + 0); #endif + } } else { - CARD32 val = pciReadLong(tag,PCI_CMD_BIOS_REG) & 0x01; - pciWriteLong(tag,PCI_CMD_BIOS_REG,(CARD32)(*p_base) | val); + pvp->biosBase = range.rBegin; + pcp->pci_baserom = (pciReadLong(tag,PCI_CMD_BIOS_REG) & 0x01) | + (CARD32)(*p_base); + pciWriteLong(tag, PCI_CMD_BIOS_REG, pcp->pci_baserom); } /* @@@ fake BIOS allocated resource */ range.type |= ResBios; @@ -1384,8 +1409,7 @@ getValidBIOSBase(PCITAG tag, int num) } pbp = pbp->next; } - xf86ConvertListToHost( - xf86GetPciEntity(pvp->bus,pvp->device,pvp->func), avoid); + pciConvertListToHost(pvp->bus,pvp->device,pvp->func, avoid); if (pvp->biosBase) { /* try biosBase first */ P_M_RANGE(range, TAG(pvp),pvp->biosBase,biosSize,ResExcMemBlock); @@ -1476,6 +1500,46 @@ printBridgeInfo(PciBusPtr PciBus) xf86PrintResList(3, PciBus->preferred_pmem); } +/* + * This Sun PCI-->PCI bridge must be handled specially since it does + * not report the decoded I/O and MEM ranges in the usual way. + */ +#define APB_IO_ADDRESS_MAP 0xde +#define APB_MEM_ADDRESS_MAP 0xdf + +static void +get_sun_apb_ranges(PciBusPtr PciBus, pciConfigPtr pcrp) +{ + unsigned char iomap, memmap; + resRange range; + int i; + + iomap = pciReadByte(pcrp->tag, APB_IO_ADDRESS_MAP); + memmap = pciReadByte(pcrp->tag, APB_MEM_ADDRESS_MAP); + + /* if (pcrp->pci_command & PCI_CMD_IO_ENABLE) */ { /* ??? */ + for (i = 0; i < 8; i++) { + if ((iomap & (1 << i)) != 0) { + PCI_I_RANGE(range, pcrp->tag, + (i << 21), (i << 21) + ((1 << 21) - 1), + ResIo | ResBlock | ResExclusive); + PciBus->io = xf86AddResToList(PciBus->io, &range, -1); + } + } + } + + /* if (pcrp->pci_command & PCI_CMD_MEM_ENABLE) */ { /* ??? */ + for (i = 0; i < 8; i++) { + if ((memmap & (1 << i)) != 0) { + PCI_M_RANGE(range, pcrp->tag, + (i << 29), (i << 29) + ((1 << 29) - 1), + ResMem | ResBlock | ResExclusive); + PciBus->mem = xf86AddResToList(PciBus->mem, &range, -1); + } + } + } +} + PciBusPtr xf86GetPciBridgeInfo(const pciConfigPtr *pciInfo) { @@ -1519,7 +1583,14 @@ xf86GetPciBridgeInfo(const pciConfigPtr *pciInfo) PciBus->subclass = sub_class; PciBus->interface = pcrp->pci_prog_if; PciBus->brcontrol = pcrp->pci_bridge_control; - if (pcrp->pci_command & PCI_CMD_IO_ENABLE) { + if (pcrp->pci_vendor == PCI_VENDOR_SUN && + pcrp->pci_device == 0x5000) { + get_sun_apb_ranges(PciBus, pcrp); + break; + } + if ((pcrp->pci_command & PCI_CMD_IO_ENABLE) && + (pcrp->pci_upper_io_base || pcrp->pci_io_base || + pcrp->pci_upper_io_limit || pcrp->pci_io_limit)) { base = (pcrp->pci_upper_io_base << 16) | ((pcrp->pci_io_base & 0xf0u) << 8); limit = (pcrp->pci_upper_io_limit << 16) | @@ -1545,7 +1616,14 @@ xf86GetPciBridgeInfo(const pciConfigPtr *pciInfo) PciBus->preferred_io, &range, -1); } } - if (pcrp->pci_command & PCI_CMD_MEM_ENABLE) { + if (pcrp->pci_command & PCI_CMD_MEM_ENABLE) { + /* + * The P2P spec requires these next two, but some bridges + * don't comply. Err on the side of caution, making the not + * so bold assumption that no bridge would ever re-route the + * bottom megabyte. + */ + if (pcrp->pci_mem_base || pcrp->pci_mem_limit) { base = pcrp->pci_mem_base & 0xfff0u; limit = pcrp->pci_mem_limit & 0xfff0u; if (base <= limit) { @@ -1555,6 +1633,12 @@ xf86GetPciBridgeInfo(const pciConfigPtr *pciInfo) PciBus->preferred_mem = xf86AddResToList(NULL, &range, -1); } + } + + if (pcrp->pci_prefetch_mem_base || + pcrp->pci_prefetch_mem_limit || + pcrp->pci_prefetch_upper_mem_base || + pcrp->pci_prefetch_upper_mem_limit) { base = pcrp->pci_prefetch_mem_base & 0xfff0u; limit = pcrp->pci_prefetch_mem_limit & 0xfff0u; #if defined(LONG64) || defined(WORD64) @@ -1568,6 +1652,7 @@ xf86GetPciBridgeInfo(const pciConfigPtr *pciInfo) PciBus->preferred_pmem = xf86AddResToList(NULL, &range, -1); } + } } break; case PCI_SUBCLASS_BRIDGE_ISA: @@ -1864,8 +1949,7 @@ ValidatePci(void) if (res_m_io == NULL) res_m_io = xf86DupResList(ResRange); - xf86ConvertListToHost( - xf86GetPciEntity(pvp->bus,pvp->device,pvp->func), avoid); + pciConvertListToHost(pvp->bus,pvp->device,pvp->func, avoid); #ifdef DEBUG xf86MsgVerb(X_INFO, 3,"avoid:\n"); @@ -2790,11 +2874,9 @@ pciTestMultiDeviceCard(int bus, int dev, int func, PCITAG** pTag) return j; } -void -pciConvertRange2Host(int entityIndex, resRange *pRange) +static void +pciTagConvertRange2Host(PCITAG tag, resRange *pRange) { - PCITAG tag = TAG(xf86GetPciInfoForEntity(entityIndex)); - switch(pRange->type & ResPhysMask) { case ResMem: switch(pRange->type & ResExtMask) { @@ -2827,3 +2909,21 @@ pciConvertRange2Host(int entityIndex, resRange *pRange) } } +static void +pciConvertListToHost(int bus, int dev, int func, resPtr list) +{ + PCITAG tag = pciTag(bus,dev,func); + while (list) { + pciTagConvertRange2Host(tag, &list->val); + list = list->next; + } +} + + +void +pciConvertRange2Host(int entityIndex, resRange *pRange) +{ + PCITAG tag = TAG(xf86GetPciInfoForEntity(entityIndex)); + pciTagConvertRange2Host(tag, pRange); +} + diff --git a/xc/programs/Xserver/hw/xfree86/doc/sgml/DRI.sgml b/xc/programs/Xserver/hw/xfree86/doc/sgml/DRI.sgml index 90373c9fd..633ef6b09 100644 --- a/xc/programs/Xserver/hw/xfree86/doc/sgml/DRI.sgml +++ b/xc/programs/Xserver/hw/xfree86/doc/sgml/DRI.sgml @@ -15,7 +15,7 @@ <date>24 October 2000 <ident> - $XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/DRI.sgml,v 1.7 2000/08/28 18:24:15 dawes Exp $ + $XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/DRI.sgml,v 1.8 2000/09/24 13:51:26 alanh Exp $ </ident> <toc> diff --git a/xc/programs/Xserver/hw/xfree86/doc/sgml/DRIcomp.sgml b/xc/programs/Xserver/hw/xfree86/doc/sgml/DRIcomp.sgml index 3830c5821..821effd12 100644 --- a/xc/programs/Xserver/hw/xfree86/doc/sgml/DRIcomp.sgml +++ b/xc/programs/Xserver/hw/xfree86/doc/sgml/DRIcomp.sgml @@ -15,7 +15,7 @@ <date>29 October 2000 <ident> - $XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/DRIcomp.sgml,v 1.5 2000/08/28 18:24:15 dawes Exp $ + $XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/DRIcomp.sgml,v 1.6 2000/09/24 13:51:26 alanh Exp $ </ident> <toc> diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/atidga.c b/xc/programs/Xserver/hw/xfree86/drivers/ati/atidga.c index a2c5acd04..6a8147fcd 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/ati/atidga.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/atidga.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/atidga.c,v 1.3 2000/08/04 21:07:13 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/atidga.c,v 1.4 2000/10/11 22:52:55 tsi Exp $ */ /* * Copyright 2000 by Marc Aurele La France (TSI @ UQV), tsi@ualberta.ca * @@ -22,12 +22,13 @@ */ #include "ati.h" -#include "atiadapter.h" #include "atiadjust.h" #include "atichip.h" #include "atidac.h" #include "atidga.h" #include "atiident.h" +#include "atimode.h" +#include "atistruct.h" #include "dgaproc.h" @@ -120,7 +121,7 @@ ATIDGASetMode pATI->XModifier = pATI->bitsPerPixel / UnitOf(pATI->bitsPerPixel); ATIAdjustPreInit(pATI); - ATIAdapterPreInit(pScreenInfo, pATI, &pATI->NewHW); + ATIModePreInit(pScreenInfo, pATI, &pATI->NewHW); if (!(*pScreenInfo->SwitchMode)(scrnIndex, pMode, 0)) return FALSE; diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/atiio.c b/xc/programs/Xserver/hw/xfree86/drivers/ati/atiio.c deleted file mode 100644 index f055f2029..000000000 --- a/xc/programs/Xserver/hw/xfree86/drivers/ati/atiio.c +++ /dev/null @@ -1,119 +0,0 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/atiio.c,v 1.3 1999/07/06 11:38:31 dawes Exp $ */ -/* - * Copyright 1997 through 1999 by Marc Aurele La France (TSI @ UQV), tsi@ualberta.ca - * - * 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 Marc Aurele La France not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. Marc Aurele La France makes no representations - * about the suitability of this software for any purpose. It is provided - * "as-is" without express or implied warranty. - * - * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO - * EVENT SHALL MARC AURELE LA FRANCE 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. - */ - -#include "atichip.h" -#include "atiio.h" - -/* - * ATISetVGAIOBase -- - * - * This sets vgaIOBase according to the value of the passed value of the - * miscellaneous output register. - */ -void -ATISetVGAIOBase -( - ATIPtr pATI, - const CARD8 misc -) -{ - pATI->CPIO_VGABase = (misc & 0x01U) ? ColourIOBase : MonochromeIOBase; -} - -/* - * ATIModifyExtReg -- - * - * This function is called to modify certain bits in an ATI extended VGA - * register while preserving its other bits. The function will not write the - * register if it turns out its value would not change. This helps prevent - * server hangs on older adapters. - */ -void -ATIModifyExtReg -( - ATIPtr pATI, - const CARD8 Index, - int CurrentValue, - const CARD8 CurrentMask, - CARD8 NewValue -) -{ - /* Possibly retrieve the current value */ - if (CurrentValue < 0) - CurrentValue = ATIGetExtReg(Index); - - /* Compute new value */ - NewValue &= (CARD8)(~CurrentMask); - NewValue |= CurrentValue & CurrentMask; - - /* Check if value will be changed */ - if (CurrentValue == NewValue) - return; - - /* - * The following is taken from ATI's VGA Wonder programmer's reference - * manual which says that this is needed to "ensure the proper state of the - * 8/16 bit ROM toggle". I suspect a timing glitch appeared in the 18800 - * after its die was cast. 18800-1 and later chips do not exhibit this - * problem. - */ - if ((pATI->Chip <= ATI_CHIP_18800) && (Index == 0xB2U) && - ((NewValue ^ 0x40U) & CurrentValue & 0x40U)) - { - CARD8 misc = inb(R_GENMO); - CARD8 bb = ATIGetExtReg(0xBBU); - - outb(GENMO, (misc & 0xF3U) | 0x04U | ((bb & 0x10U) >> 1)); - CurrentValue &= (CARD8)(~0x40U); - ATIPutExtReg(0xB2U, CurrentValue); - ATIDelay(5); - outb(GENMO, misc); - ATIDelay(5); - if (CurrentValue != NewValue) - ATIPutExtReg(0xB2U, NewValue); - } - else - ATIPutExtReg(Index, NewValue); -} - -/* - * ATIAccessMach64PLLReg -- - * - * This function sets up the addressing required to access, for read or write, - * a 264xT's PLL registers. - */ -void -ATIAccessMach64PLLReg -( - ATIPtr pATI, - const CARD8 Index, - const Bool Write -) -{ - CARD8 clock_cntl1 = inb(pATI->CPIO_CLOCK_CNTL + 1) & - ~GetByte(PLL_WR_EN | PLL_ADDR, 1); - - /* Set PLL register to be read or written */ - outb(pATI->CPIO_CLOCK_CNTL + 1, clock_cntl1 | - GetByte(SetBits(Index, PLL_ADDR) | SetBits(Write, PLL_WR_EN), 1)); -} diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/atimach64io.h b/xc/programs/Xserver/hw/xfree86/drivers/ati/atimach64io.h index 663e06918..e19c4019f 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/ati/atimach64io.h +++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/atimach64io.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/atimach64io.h,v 1.3 2000/08/22 21:54:30 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/atimach64io.h,v 1.4 2000/10/11 22:52:56 tsi Exp $ */ /* * Copyright 2000 by Marc Aurele La France (TSI @ UQV), tsi@ualberta.ca * @@ -31,6 +31,7 @@ #define ___ATIMACH64IO_H___ 1 #include "atiio.h" +#include "atistruct.h" /* * A few important notes on some of the I/O statements provided: diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/atimodule.h b/xc/programs/Xserver/hw/xfree86/drivers/ati/atimodule.h deleted file mode 100644 index 0aea97208..000000000 --- a/xc/programs/Xserver/hw/xfree86/drivers/ati/atimodule.h +++ /dev/null @@ -1,32 +0,0 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/atimodule.h,v 1.1 1999/07/06 11:38:32 dawes Exp $ */ -/* - * Copyright 1997 through 1999 by Marc Aurele La France (TSI @ UQV), tsi@ualberta.ca - * - * 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 Marc Aurele La France not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. Marc Aurele La France makes no representations - * about the suitability of this software for any purpose. It is provided - * "as-is" without express or implied warranty. - * - * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO - * EVENT SHALL MARC AURELE LA FRANCE 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. - */ - -#if defined(XFree86LOADER) && !defined(___ATI_MODULE_H___) -#define ___ATI_MODULE_H___ 1 - -#include "atiproto.h" -#include "xf86str.h" - -extern Bool ATILoadModules FunctionPrototype((ScrnInfoPtr)); - -#endif diff --git a/xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_driver.c b/xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_driver.c index 3873c2f08..fe055b55e 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_driver.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_driver.c @@ -11,7 +11,7 @@ * Guy DESBIEF */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_driver.c,v 1.14 2000/09/22 11:12:32 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_driver.c,v 1.15 2000/10/09 23:37:11 alanh Exp $ */ /* All drivers should typically include these */ #include "xf86.h" @@ -1660,6 +1660,8 @@ AlpScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) */ xf86SetBlackWhitePixels(pScreen); + xf86SetSilkenMouse(pScreen); + /* Initialise cursor functions */ miDCInitialize(pScreen, xf86GetPointerScreenFuncs()); diff --git a/xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_xaa.c b/xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_xaa.c index 52aabaed9..b28025d6d 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_xaa.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_xaa.c @@ -1,6 +1,6 @@ /* (c) Itai Nahshon */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_xaa.c,v 1.3 2000/09/22 11:12:32 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_xaa.c,v 1.4 2000/10/23 12:10:14 alanh Exp $ */ #include "xf86.h" #include "xf86_OSproc.h" @@ -18,6 +18,32 @@ #define WAIT outb(0x3CE,0x31); while(inb(0x3CF) & pCir->chip.alp->waitMsk){}; #define WAIT_1 outb(0x3CE,0x31); while(inb(0x3CF) & 0x1){}; +static const CARD16 translated_rop[] = +{ + /* GXclear */ 0x0032U, + /* GXand */ 0x0532U, + /* GXandreverse */ 0x0932U, + /* GXcopy */ 0x0D32U, + /* GXandinversted */ 0x5032U, + /* GXnoop */ 0x0632U, + /* GXxor */ 0x5932U, + /* GXor */ 0x6D32U, + /* GXnor */ 0x9032U, + /* GXequiv */ 0x9532U, + /* GXinvert */ 0x0B32U, + /* GXorReverse */ 0xAD32U, + /* GXcopyInverted */ 0xD032U, + /* GXorInverted */ 0xD632U, + /* GXnand */ 0xDA32U, + /* GXset */ 0x0E32U +}; + +#if 1 +#define SetupForRop(rop) outw(0x3CE, translated_rop[rop]) +#else +#define SetupForRop(rop) outw(0x3CE, 0x0D32) +#endif + static void AlpSync(ScrnInfoPtr pScrn) { #ifdef ALP_DEBUG @@ -29,8 +55,8 @@ static void AlpSync(ScrnInfoPtr pScrn) static void AlpSetupForScreenToScreenCopy(ScrnInfoPtr pScrn, int xdir, int ydir, - int rop, unsigned int planemask, - int trans_color) + int rop, unsigned int planemask, + int trans_color) { CirPtr pCir = CIRPTR(pScrn); int pitch = pCir->pitch; @@ -40,7 +66,7 @@ AlpSetupForScreenToScreenCopy(ScrnInfoPtr pScrn, int xdir, int ydir, xdir, ydir, rop, planemask, trans_color); #endif WAIT; - outw(0x3CE,0x0d32); + SetupForRop(rop); /* Set dest pitch */ outw(0x3CE, ((pitch << 8) & 0xff00) | 0x24); outw(0x3CE, ((pitch) & 0x1f00) | 0x25); @@ -118,8 +144,7 @@ AlpSetupForSolidFill(ScrnInfoPtr pScrn, int color, int rop, #endif WAIT; - /* GR32 = 0x0D => verbatim source copy (no logical op) */ - outw(0x3CE, 0x0D32); + SetupForRop(rop); switch (pCir -> Chipset) { @@ -210,8 +235,7 @@ AlpSetupForMono8x8PatternFill(ScrnInfoPtr pScrn, #endif WAIT; - /* GR32 = 0x0D => verbatim source copy (no logical op) */ - outw(0x3CE, 0x0D32); + SetupForRop(rop); { int source = pAlp->monoPattern8x8; @@ -313,8 +337,7 @@ AlpSetupForCPUToScreenColorExpandFill(ScrnInfoPtr pScrn, #endif WAIT; - /* GR32 = 0x0D => verbatim source copy (no logical op) */ - outw(0x3CE, 0x0D32); + SetupForRop(rop); /* GR30 = color expansion, CPU->display copy */ /* Choses 8bpp / 16bpp color expansion */ @@ -409,8 +432,7 @@ AlpSetupForScanlineCPUToScreenColorExpandFill(ScrnInfoPtr pScrn, #endif WAIT; - /* GR32 = 0x0D => verbatim source copy (no logical op) */ - outw(0x3CE, 0x0D32); + SetupForRop(rop); /* GR30 = color expansion, CPU->display copy */ /* Choses 8bpp / 16bpp color expansion */ @@ -559,7 +581,8 @@ AlpXAAInit(ScreenPtr pScreen) XAAPtr->SetupForScreenToScreenCopy = AlpSetupForScreenToScreenCopy; XAAPtr->SubsequentScreenToScreenCopy = AlpSubsequentScreenToScreenCopy; - XAAPtr->ScreenToScreenCopyFlags = GXCOPY_ONLY|NO_TRANSPARENCY|NO_PLANEMASK; + XAAPtr->ScreenToScreenCopyFlags = + NO_TRANSPARENCY | NO_PLANEMASK; switch (pCir->Chipset) { @@ -568,15 +591,15 @@ AlpXAAInit(ScreenPtr pScreen) XAAPtr->SetupForSolidFill = AlpSetupForSolidFill; XAAPtr->SubsequentSolidFillRect = AlpSubsequentSolidFillRect; XAAPtr->SubsequentSolidFillTrap = NULL; - XAAPtr->SolidFillFlags = GXCOPY_ONLY|NO_PLANEMASK; + XAAPtr->SolidFillFlags = NO_PLANEMASK; XAAPtr->SetupForMono8x8PatternFill = AlpSetupForMono8x8PatternFill; XAAPtr->SubsequentMono8x8PatternFillRect = AlpSubsequentMono8x8PatternFillRect; XAAPtr->SubsequentMono8x8PatternFillTrap = NULL; XAAPtr->Mono8x8PatternFillFlags = - GXCOPY_ONLY|NO_PLANEMASK| - HARDWARE_PATTERN_PROGRAMMED_BITS|BIT_ORDER_IN_BYTE_MSBFIRST; + NO_PLANEMASK | + HARDWARE_PATTERN_PROGRAMMED_BITS | BIT_ORDER_IN_BYTE_MSBFIRST; #if 0 /* Currently disabled: XF86 sends DWORD-padded data, @@ -587,9 +610,9 @@ AlpXAAInit(ScreenPtr pScreen) AlpSubsequentCPUToScreenColorExpandFill; XAAPtr->ColorExpandBase = pCir->FbBase + 4; XAAPtr->CPUToScreenColorExpandFillFlags = - GXCOPY_ONLY|NO_PLANEMASK|BIT_ORDER_IN_BYTE_MSBFIRST| - SCANLINE_PAD_DWORD| - CPU_TRANSFER_PAD_DWORD|CPU_TRANSFER_BASE_FIXED; + NO_PLANEMASK | BIT_ORDER_IN_BYTE_MSBFIRST | + SCANLINE_PAD_DWORD | ROP_NEEDS_SOURCE | + CPU_TRANSFER_PAD_DWORD | CPU_TRANSFER_BASE_FIXED; #endif #if 1 /* kludge: since XF86 does not support byte-padded @@ -622,8 +645,8 @@ AlpXAAInit(ScreenPtr pScreen) malloc(buffer_size); } XAAPtr->ScanlineCPUToScreenColorExpandFillFlags = - GXCOPY_ONLY|NO_PLANEMASK|BIT_ORDER_IN_BYTE_MSBFIRST| - SCANLINE_PAD_DWORD; + NO_PLANEMASK | BIT_ORDER_IN_BYTE_MSBFIRST | + SCANLINE_PAD_DWORD | ROP_NEEDS_SOURCE; #endif break; @@ -632,7 +655,7 @@ AlpXAAInit(ScreenPtr pScreen) XAAPtr->SetupForSolidFill = AlpSetupForSolidFill; XAAPtr->SubsequentSolidFillRect = AlpSubsequentSolidFillRect; XAAPtr->SubsequentSolidFillTrap = NULL; - XAAPtr->SolidFillFlags = GXCOPY_ONLY|NO_TRANSPARENCY|NO_PLANEMASK; + XAAPtr->SolidFillFlags = NO_TRANSPARENCY|NO_PLANEMASK; outw(0x3CE, 0x200E); /* enable writes to gr33 */ break; } diff --git a/xc/programs/Xserver/hw/xfree86/drivers/glint/README.pm3 b/xc/programs/Xserver/hw/xfree86/drivers/glint/README.pm3 index 8502a81e8..3d5835856 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/glint/README.pm3 +++ b/xc/programs/Xserver/hw/xfree86/drivers/glint/README.pm3 @@ -1,51 +1,44 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/README.pm3,v 1.2 2000/09/19 14:12:31 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/README.pm3,v 1.3 2000/10/17 09:07:03 alanh Exp $ */ -STATUS as of Sat, 9 Sep 2000 11:34:31 +0200 +STATUS as of Mon, 16 Oct 2000 21:24:51 +0200 Working : * Unaccelerated : Depth 8, 15, 16 and 24 are ok. I tested them upto 1280x1024 only as my monitor don't support higher modes. * HW cursor. - * Partial 2D Accels. * ShadowFb works. - -Not Working (see below for more detail) : - * Dual head : Dual head should work, but there is still a bug in the vga - functions mmio vs io issue. When run in dual head mode, the console, - altough still there will show no output. Blind typing will work though. - Well ctr-alt-del will work and is especially friendly to your partitions. - * Full 2D Accels. - * Video Overlay. - * DRI. - * Initialization on non Appian J2000 boards, if not done by the BIOS will - cause problems. - -Dual head : - - * glint_driver.c:2322-2325: - The problem is that the usage of mmio functions for vga graphics index & - port (GraphicsIndexReg : 0x63ce, GraphicsPort : 0x3cf) corrupts the - console font for pm3 and pm2v. Using IO functions for it solve this, but - breaks dualheaded as there is no more console ouput then. - -2D Accels [WORK IN PROGRESS] : - - * Only little endian is supported right now. Big endian may work also, - but i don't have a big endian box to test it on. - * Implemented are : - - Screen to screen copy. - - Solid fills. + * Full 2D Accels. (Need testing and tuning on big endian systems.) + - Sync. - Pixmap cache. - Offscreen pixmaps. - - Sync. - Clipping. - * Screen to screen copy present two problems : - - when doing the copy, there are temporary noise around the area getting - copied. - - when doing very small copies from left to right (as when the window - manager is doing opaque moves) there is corruption on the left side of - the window. Using ONLY_LEFT_TO_RIGHT_BITBLT solves this. But still, the - pm3 should be able to handle this. + - Screen to screen copy. + - Solid fills. + - HorVert Solid Lines . + - 8x8 Mono Pattern Fills. + - Color Expansion Fills. + - Images Writes. + * Appian J2000 second head initialization. + * Dual head : The console fonts will get trashed, but dual head works. +Not Working : + * 2D Accel hooks not implemented : + - Solid & Dashed Lines are not possible on glint hardware. + - 8x8 Color Pattern Fill is almost never used. + * Video Overlay. + * DRI. + +Known Problem : + + * Console gets broken when using dual headed mode. The culprit seems to be + the vga graphics index & port (GraphicsIndexReg : 0x63ce, GraphicsPort : + 0x3cf). I had to use IO acces for both these two, because if not, console + fonts would get trashed even in mono headed mode. + * R-B inversion. Sometimes, all of a sudden, it seems as the RGB order + gets changed. going to console and back solves this. + * [TRIGGERED IN ENLIGTHENMENT ONLY] When moving a window around a lot + quicly, the video outputs dies. I have to switch to a console and back + to have it restored. Is it possible that the accel engine gets + overloaded or something such ? Video Overlay [NOTHING DONE YET] : @@ -53,25 +46,12 @@ Video Overlay [NOTHING DONE YET] : DRI/3D Accels [NOTHING DONE YET] : - * Current Gamma support only works with dualmx boards and the like where - the gamma chip is actually doing the rendering, and the rasterizer chip - are slaves of the gamma chip. - - * The approach taken by the current pm3 driver is to have each pm3 having - its own driver instance. We thus need a setup for sharing the gamma between - both pm3. Such a setup was already done for the G400 dual head feature. - Need to investigate this. - - * One alternative could be to use the pm3 for 3D Accels, but as the pm3 has - only a Delta unit, this is not optimal. However it would be nice for - pm3 boards lacking gamma chip, and could maybe be shared with pm2 boards ? - - * Also it could maybe be possible to share the workload between the Gamma - and the pm3. Don't know about this though ... - -Initialization [NEED TESTING ON NON J2000 BOARD] : - - * Second head of Jeronimo 2000 is not initialized by the bios, So memory - timings need to be set. I set them only if subsysVendor & subsysCard are - matching J2000. Need feedback of other dual pm3 boards. + * First approach would be to use the gamma for one head only (most probably + the first head, it could be configurable though). + * Sharing the gamma between both driver instances would need a setup similar + of what was done for the Matrox dualheaded G400 (mga driver). + * Alternatively it could be possible to use DRI with the gamma on one head, + and DRI with the pm3 alone on the second head. This would need writing a + pm3 drm kernel driver as well as a pm3 OpenGL driver. Could be useful for + boards without gamma chips though. diff --git a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint.cpp b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint.cpp index e96e9e40b..9aeedfe1f 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint.cpp +++ b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint.cpp @@ -1,4 +1,4 @@ -.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/glint.cpp,v 1.8 2000/09/19 14:12:31 alanh Exp $ +.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/glint.cpp,v 1.9 2000/10/17 09:07:04 alanh Exp $ .\" shorthand for double quote that works everywhere. .ds q \N'34' .TH GLINT __drivermansuffix__ "Version 4.0.1" "XFree86" @@ -18,15 +18,6 @@ is an XFree86 driver for 3Dlabs & Texas Instruments GLINT/Permedia based video cards. The driver is rather fully accelerated, and provides support for the following framebuffer depths: 8, 15 (may give bad results with FBDev support), 16, 24 (32 bpp recommended, 24 bpp has problems), 30, and an 8+24 overlay mode. -For the -.B Glint Permedia 3 -, the driver supports unaccelerated modes of depth 8 (bpp 8), 15 and 16 (bpp 16) -and 24 (bppi 32) in single headed mode. -2D Acceleration is working, but there are some visual artifacts with the -ScreenToScreenCopy accel. -Dual head (on the Appian J2000 board) is working, but the console screen will -get corrupted, blind typing still works though. -See the README.pm3 file for more details. .SH SUPPORTED HARDWARE The .B glint @@ -119,4 +110,5 @@ option. .SH "SEE ALSO" XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(__miscmansuffix__) .SH AUTHORS -Authors include: Alan Hourihane, Dirk Hohndel, Stefan Dirsch, Michel Dänzer +Authors include: Alan Hourihane, Dirk Hohndel, Stefan Dirsch, Michel Dänzer, +Sven Luther diff --git a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint.h b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint.h index 9da2b8c26..41adfd348 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint.h +++ b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/glint.h,v 1.34 2000/09/19 19:19:22 eich Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/glint.h,v 1.36 2000/10/17 09:07:04 alanh Exp $ */ /* * Copyright 1997,1998 by Alan Hourihane <alanh@fairlite.demon.co.uk> * @@ -96,7 +96,7 @@ typedef struct { int planemask; int realMXWidth; CARD32 IOAddress; - CARD32 FbAddress; + unsigned long FbAddress; int irq; unsigned char * IOBase; unsigned char * IOBaseVGA; @@ -144,6 +144,7 @@ typedef struct { CARD32 RasterizerSwap; int PM3_Config2D; int PM3_Render2D; + int PM3_AreaStippleMode; int PM3_VideoControl; #ifdef XF86DRI Bool directRenderingEnabled; @@ -209,14 +210,16 @@ Bool Permedia2VInit(ScrnInfoPtr pScrn, DisplayModePtr mode); Bool Permedia2vHWCursorInit(ScreenPtr pScreen); /* pm3_dac.c */ -void Permedia3PreInit(ScrnInfoPtr pScrn, GLINTPtr pGlint); +void Permedia3PreInit(ScrnInfoPtr pScrn); int Permedia3MemorySizeDetect(ScrnInfoPtr pScrn); void Permedia3Restore(ScrnInfoPtr pScrn, GLINTRegPtr glintReg); void Permedia3Save(ScrnInfoPtr pScrn, GLINTRegPtr glintReg); Bool Permedia3Init(ScrnInfoPtr pScrn, DisplayModePtr mode); /* pm3_accel.c */ -Bool Permedia3AccelInit(ScreenPtr pScreen); +/* Not needed, ... is it ever called outside of pm3_accel.c ? void Permedia3Sync(ScrnInfoPtr pScrn); +*/ +Bool Permedia3AccelInit(ScreenPtr pScreen); void Permedia3InitializeEngine(ScrnInfoPtr pScrn); /* End of pm3 stuff */ diff --git a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_driver.c b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_driver.c index b63dabd90..8744c7c91 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_driver.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_driver.c @@ -28,7 +28,7 @@ * this work is sponsored by S.u.S.E. GmbH, Fuerth, Elsa GmbH, Aachen, * Siemens Nixdorf Informationssysteme and Appian Graphics. */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/glint_driver.c,v 1.96 2000/09/19 14:12:31 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/glint_driver.c,v 1.98 2000/10/17 09:07:04 alanh Exp $ */ #include "fb.h" #include "cfb8_32.h" @@ -1300,7 +1300,7 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags) * than a J2000, as memory timings will surely change. */ GLINTMapMem(pScrn); - Permedia3PreInit(pScrn, pGlint); + Permedia3PreInit(pScrn); GLINTUnmapMem(pScrn); pScrn->videoRam = Permedia3MemorySizeDetect(pScrn); } else if (pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_PERMEDIA2V) { @@ -2039,7 +2039,6 @@ GLINTUnmapMem(ScrnInfoPtr pScrn) return TRUE; } - /* * This function saves the video state. */ @@ -2306,10 +2305,11 @@ GLINTScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) if (!vgaHWMapMem(pScrn)) return FALSE; } + /* Timing problem with PM3 & PM2V chips dont like being blasted */ /* This solves the dual head problem but trahses the console font. */ - if (pGlint->Chipset = PCI_VENDOR_3DLABS_CHIP_PERMEDIA3) { + if (pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_PERMEDIA3) { /* Graphics Index VGA register don't work in mmio mode * for the Permedia3 chip, it thrashes the console font. * Let's keep the IO functions for this instead ... */ @@ -2318,12 +2318,8 @@ GLINTScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) vgaHWSetMmioFuncs(hwp, pGlint->IOBaseVGA, 0); hwp->writeGr = writeGr; hwp->readGr = readGr; - xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "SVEN : Permedia 3 don't use mmio for VGA Graphics Index.\n"); - } - else if (pGlint->Chipset != PCI_VENDOR_3DLABS_CHIP_PERMEDIA2V) + } else if (pGlint->Chipset != PCI_VENDOR_3DLABS_CHIP_PERMEDIA2V) vgaHWSetMmioFuncs(hwp, pGlint->IOBaseVGA, 0); - vgaHWGetIOBase(hwp); } @@ -2634,6 +2630,7 @@ GLINTSwitchMode(int scrnIndex, DisplayModePtr mode, int flags) pScrn = xf86Screens[scrnIndex]; pGlint = GLINTPTR(pScrn); + TRACE_ENTER("GLINTSwitchMode"); if (pGlint->FBDev) { Bool ret = fbdevHWSwitchMode(scrnIndex, mode, flags); @@ -2666,9 +2663,11 @@ GLINTSwitchMode(int scrnIndex, DisplayModePtr mode, int flags) } } + TRACE_EXIT("GLINTSwitchMode (fbdev ?)"); return ret; } + TRACE_EXIT("GLINTSwitchMode (normal)"); return GLINTModeInit(xf86Screens[scrnIndex], mode); } @@ -2687,9 +2686,11 @@ GLINTAdjustFrame(int scrnIndex, int x, int y, int flags) pScrn = xf86Screens[scrnIndex]; pGlint = GLINTPTR(pScrn); + TRACE_ENTER("GLINTAdjustFrame"); if (pGlint->FBDev) { fbdevHWAdjustFrame(scrnIndex, x, y, flags); + TRACE_EXIT("GLINTAdjustFrame (fbdev)"); return; } @@ -2708,6 +2709,7 @@ GLINTAdjustFrame(int scrnIndex, int x, int y, int flags) GLINT_SLOW_WRITE_REG(base, PMScreenBase); break; } + TRACE_EXIT("GLINTAdjustFrame (normal)"); } diff --git a/xc/programs/Xserver/hw/xfree86/drivers/glint/pm3_accel.c b/xc/programs/Xserver/hw/xfree86/drivers/glint/pm3_accel.c index 7c512d542..db94756b2 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/glint/pm3_accel.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/glint/pm3_accel.c @@ -1,36 +1,32 @@ /* - * Copyright 1997,1998 by Alan Hourihane, Wigan, England. + * Copyright 2000 by Sven Luther <luther@dpt-info.u-strasbg.fr>. * * 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 Sven Luther 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 + * specific, written prior permission. Sven Luther 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, + * SVEN LUTHER 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 SVEN LUTHER 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> - * Dirk Hohndel, <hohndel@suse.de> - * Stefan Dirsch, <sndirsch@suse.de> - * Mark Vojkovich, <mvojkovi@ucsd.edu> - * Michel Dänzer, <michdaen@iiic.ethz.ch> - * Sven Luther, <luther@dpt-info.u-strasbg.fr> + * Authors: Sven Luther, <luther@dpt-info.u-strasbg.fr> + * Alan Hourihane, <alanh@fairlite.demon.co.uk> * * this work is sponsored by Appian Graphics. * * Permedia 3 accelerated options. */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/pm3_accel.c,v 1.3 2000/09/11 16:58:56 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/pm3_accel.c,v 1.5 2000/10/26 17:57:56 dawes Exp $ */ #include "Xarch.h" #include "xf86.h" @@ -45,6 +41,7 @@ #include "fb.h" #include "glint_regs.h" +#include "pm3_regs.h" #include "glint.h" #include "xaalocal.h" /* For replacements */ @@ -52,23 +49,22 @@ #define DEBUG 0 #if DEBUG -# define TRACE_ENTER(str) ErrorF("pm2_accel: " str " %d\n",pScrn->scrnIndex) -# define TRACE_EXIT(str) ErrorF("pm2_accel: " str " done\n") -# define TRACE(str) ErrorF("pm2_accel trace: " str "\n") +# define TRACE_ENTER(str) ErrorF("pm3_accel: " str " %d\n",pScrn->scrnIndex) +# define TRACE_EXIT(str) ErrorF("pm3_accel: " str " done\n") +# define TRACE(str) ErrorF("pm3_accel trace: " str "\n") #else # define TRACE_ENTER(str) # define TRACE_EXIT(str) # define TRACE(str) #endif -static void Permedia3SetupForFillRectSolid(ScrnInfoPtr pScrn, int color, - int rop, unsigned int planemask); -static void Permedia3SubsequentFillRectSolid(ScrnInfoPtr pScrn, int x, - int y, int w, int h); -static void Permedia3SetupForFillRectSolid24bpp(ScrnInfoPtr pScrn,int color, - int rop, unsigned int planemask); -static void Permedia3SubsequentFillRectSolid24bpp(ScrnInfoPtr pScrn, int x, - int y, int w, int h); +/* Sync */ +void Permedia3Sync(ScrnInfoPtr pScrn); +/* Clipping */ +static void Permedia3SetClippingRectangle(ScrnInfoPtr pScrn, int x, int y, + int w, int h); +static void Permedia3DisableClipping(ScrnInfoPtr pScrn); +/* ScreenToScreenCopy */ static void Permedia3SubsequentScreenToScreenCopy(ScrnInfoPtr pScrn, int x1, int y1, int x2, int y2, int w, int h); @@ -76,157 +72,264 @@ static void Permedia3SetupForScreenToScreenCopy(ScrnInfoPtr pScrn, int xdir, int ydir, int rop, unsigned int planemask, int transparency_color); -static void Permedia3SubsequentScreenToScreenCopy2432bpp(ScrnInfoPtr pScrn, - int x1, int y1, int x2, int y2, int w, int h); -static void Permedia3SetupForScreenToScreenCopy2432bpp(ScrnInfoPtr pScrn, - int xdir, int ydir, int rop, - unsigned int planemask, - int transparency_color); -static void Permedia3SetClippingRectangle(ScrnInfoPtr pScrn, int x, int y, - int w, int h); -static void Permedia3DisableClipping(ScrnInfoPtr pScrn); -static void Permedia3SetupForSolidLine(ScrnInfoPtr pScrn, int color, +/* SolidFill */ +static void Permedia3SetupForFillRectSolid(ScrnInfoPtr pScrn, int color, int rop, unsigned int planemask); -static void Permedia3SubsequentHorVertLine(ScrnInfoPtr pScrn, int x, int y, - int len, int dir); -static void Permedia3SubsequentSolidBresenhamLine(ScrnInfoPtr pScrn, - int x, int y, int dmaj, int dmin, int e, - int len, int octant); -static void Permedia3WriteBitmap(ScrnInfoPtr pScrn, int x, int y, int w, int h, - unsigned char *src, int srcwidth, int skipleft, - int fg, int bg, int rop,unsigned int planemask); +static void Permedia3SubsequentFillRectSolid(ScrnInfoPtr pScrn, int x, + int y, int w, int h); +/* 8x8 Mono Pattern Fills */ static void Permedia3SetupForMono8x8PatternFill(ScrnInfoPtr pScrn, - int patternx, int patterny, int fg, int bg, + int patternx, int patterny, int fg, int bg, int rop, unsigned int planemask); static void Permedia3SubsequentMono8x8PatternFillRect(ScrnInfoPtr pScrn, - int patternx, int patterny, int x, int y, + int x_offset, int y_offset, int x, int y, int w, int h); -static void Permedia3SetupForMono8x8PatternFill24bpp(ScrnInfoPtr pScrn, - int patternx, int patterny, int fg, int bg, - int rop, unsigned int planemask); -static void Permedia3SubsequentMono8x8PatternFillRect24bpp(ScrnInfoPtr pScrn, - int patternx, int patterny, int x, int y, - int w, int h); -static void Permedia3WritePixmap8bpp(ScrnInfoPtr pScrn, int x, int y, int w, - int h, unsigned char *src, int srcwidth, - int rop, unsigned int planemask, - int transparency_color, int bpp, int depth); -static void Permedia3WritePixmap16bpp(ScrnInfoPtr pScrn, int x, int y, int w, - int h, unsigned char *src, int srcwidth, - int rop, unsigned int planemask, - int transparency_color, int bpp, int depth); -#if 0 -static void Permedia3WritePixmap24bpp(ScrnInfoPtr pScrn, int x, int y, int w, - int h, unsigned char *src, int srcwidth, - int rop, unsigned int planemask, - int transparency_color, int bpp, int depth); -#endif -static void Permedia3WritePixmap32bpp(ScrnInfoPtr pScrn, int x, int y, int w, - int h, unsigned char *src, int srcwidth, - int rop, unsigned int planemask, - int transparency_color, int bpp, int depth); +/* Color Expansion Fills */ static void Permedia3SetupForCPUToScreenColorExpandFill(ScrnInfoPtr pScrn, int fg, int bg, int rop,unsigned int planemask); static void Permedia3SubsequentCPUToScreenColorExpandFill(ScrnInfoPtr pScrn, int x, int y, int w, int h, int skipleft); -static void Permedia3SetupForScanlineCPUToScreenColorExpandFill( - ScrnInfoPtr pScrn, - int fg, int bg, int rop, - unsigned int planemask); -static void Permedia3SubsequentScanlineCPUToScreenColorExpandFill( - ScrnInfoPtr pScrn, int x, - int y, int w, int h, int skipleft); -static void Permedia3SubsequentColorExpandScanline(ScrnInfoPtr pScrn, int bufno); -static void Permedia3LoadCoord(ScrnInfoPtr pScrn, int x, int y, int w, int h); -static void Permedia3PolylinesThinSolidWrapper(DrawablePtr pDraw, GCPtr pGC, - int mode, int npt, DDXPointPtr pPts); -static void Permedia3PolySegmentThinSolidWrapper(DrawablePtr pDraw, GCPtr pGC, - int nseg, xSegment *pSeg); +/* Images Writes */ +static void Permedia3SetupForImageWrite(ScrnInfoPtr pScrn, int rop, + unsigned int planemask, int trans_color, + int bpp, int depth); +static void Permedia3SubsequentImageWriteRect(ScrnInfoPtr pScrn, + int x, int y, int w, int h, int skipleft); #define MAX_FIFO_ENTRIES 256 +/* Mirror stipple pattern horizontally */ #if X_BYTE_ORDER == X_BIG_ENDIAN -# define STIPPLE_SWAP 1<<18 /* Mirror stipple pattern horizontally */ +# define STIPPLE_SWAP 1<<18 #else # define STIPPLE_SWAP 0 #endif + void Permedia3InitializeEngine(ScrnInfoPtr pScrn) { GLINTPtr pGlint = GLINTPTR(pScrn); + int colorformat = 0; /* Initialize the Accelerator Engine to defaults */ - TRACE_ENTER("Permedia3InitializeEngine"); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, ScissorMode); - GLINT_SLOW_WRITE_REG(UNIT_ENABLE | FBWM_Enable0, FBWriteMode); - GLINT_SLOW_WRITE_REG(0, dXSub); - GLINT_SLOW_WRITE_REG(GWIN_DisableLBUpdate, GLINTWindow); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, DitherMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, AlphaBlendMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, ColorDDAMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, TextureColorMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, TextureAddressMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, PMTextureReadMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, AlphaBlendMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, TexelLUTMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, YUVMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, DepthMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, RouterMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, FogMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, AntialiasMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, AlphaTestMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, StencilMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, AreaStippleMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, LogicalOpMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, DepthMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, StatisticMode); + /* Host out PreInit */ + /* Set filter mode to enable sync tag & data output */ GLINT_SLOW_WRITE_REG(0xc00, FilterMode); - GLINT_SLOW_WRITE_REG(0xffffffff, FBHardwareWriteMask); - GLINT_SLOW_WRITE_REG(0xffffffff, FBSoftwareWriteMask); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, RasterizerMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, GLINTDepth); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, FBSourceOffset); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, FBPixelOffset); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, LBSourceOffset); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, WindowOrigin); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, FBWindowBase); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, FBSourceBase); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, LBWindowBase); + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, StatisticMode); + Permedia3Sync(pScrn); + + TRACE("Permedia3InitializeEngine : first sync"); + /* Disable most units by default */ + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, PM3DeltaMode); + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, RasterizerMode); + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, ScissorMode); + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, LineStippleMode); + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, AreaStippleMode); + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, PM3GIDMode); + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, DepthMode); + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, StencilMode); + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, ColorDDAMode); + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, PM3TextureCoordMode); + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, PM3TextureIndexMode0); + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, PM3TextureIndexMode1); + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, TextureReadMode); + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, PM3LUTMode); + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, TextureFilterMode); + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, PM3TextureCompositeMode); + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, PM3TextureApplicationMode); + GLINT_SLOW_WRITE_REG(0, PM3TextureCompositeColorMode1); + GLINT_SLOW_WRITE_REG(0, PM3TextureCompositeAlphaMode1); + GLINT_SLOW_WRITE_REG(0, PM3TextureCompositeColorMode0); + GLINT_SLOW_WRITE_REG(0, PM3TextureCompositeAlphaMode0); + + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, FogMode); + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, ChromaTestMode); + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, AlphaTestMode); + /* Not done in P3Lib ??? */ + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, AntialiasMode); + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, PM3AlphaTestMode); + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, YUVMode); + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, PM3AlphaBlendColorMode); + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, PM3AlphaBlendAlphaMode); + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, DitherMode); + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, LogicalOpMode); + + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, StatisticMode); + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, RouterMode); + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, PM3Window); + GLINT_SLOW_WRITE_REG(0, PM3Config2D); + + GLINT_SLOW_WRITE_REG(0xffffffff, PM3SpanColorMask); + + GLINT_SLOW_WRITE_REG(0, PM3XBias); + GLINT_SLOW_WRITE_REG(0, PM3YBias); + + GLINT_SLOW_WRITE_REG(0, PM3DeltaControl); + + GLINT_SLOW_WRITE_REG(0xffffffff, BitMaskPattern); + Permedia3Sync(pScrn); + + /* ScissorStippleUnit Initialization (is it needed ?) */ + pGlint->ClippingOn = FALSE; + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, ScissorMode); + /* We never use Screen Scissor ... + GLINT_SLOW_WRITE_REG( + (pScrn->virtualX&0xffff)|((pScrn->virtualY&0xffff)<<16), + ScreenSize); + GLINT_SLOW_WRITE_REG( + (0&0xffff)|((0&0xffff)<<16), + WindowOrigin); + */ + Permedia3Sync(pScrn); + + /* StencilDepthUnit Initialization */ + GLINT_SLOW_WRITE_REG(0, PM3Window); + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, DepthMode); + GLINT_SLOW_WRITE_REG(UNIT_DISABLE, StencilMode); + GLINT_SLOW_WRITE_REG(0, StencilData); + Permedia3Sync(pScrn); + + /* FBReadUnit Initialization */ + TRACE("Permedia3InitializeEngine : only syncs upto now"); + GLINT_SLOW_WRITE_REG( + PM3FBDestReadEnables_E(0xff) | + PM3FBDestReadEnables_R(0xff) | + PM3FBDestReadEnables_ReferenceAlpha(0xff), + PM3FBDestReadEnables); + GLINT_SLOW_WRITE_REG(0, PM3FBDestReadBufferAddr0); + GLINT_SLOW_WRITE_REG(0, PM3FBDestReadBufferOffset0); + GLINT_SLOW_WRITE_REG( + PM3FBDestReadBufferWidth_Width(pScrn->displayWidth), + PM3FBDestReadBufferWidth0); + /* + GLINT_SLOW_WRITE_REG(0, PM3FBDestReadBufferAddr1); + GLINT_SLOW_WRITE_REG(0, PM3FBDestReadBufferOffset1); + GLINT_SLOW_WRITE_REG( + PM3FBDestReadBufferWidth_Width(pScrn->displayWidth), + PM3FBDestReadBufferWidth1); + GLINT_SLOW_WRITE_REG(0, PM3FBDestReadBufferAddr2); + GLINT_SLOW_WRITE_REG(0, PM3FBDestReadBufferOffset2); + GLINT_SLOW_WRITE_REG( + PM3FBDestReadBufferWidth_Width(pScrn->displayWidth), + PM3FBDestReadBufferWidth2); + GLINT_SLOW_WRITE_REG(0, PM3FBDestReadBufferAddr3); + GLINT_SLOW_WRITE_REG(0, PM3FBDestReadBufferOffset3); + GLINT_SLOW_WRITE_REG( + PM3FBDestReadBufferWidth_Width(pScrn->displayWidth), + PM3FBDestReadBufferWidth3); + */ + GLINT_SLOW_WRITE_REG( + PM3FBDestReadMode_ReadEnable | + /* Not needed, since FBDestRead is the same as FBWrite. + PM3FBDestReadMode_Blocking | + */ + PM3FBDestReadMode_Enable0, + PM3FBDestReadMode); + TRACE("Permedia3InitializeEngine : DestRead"); + GLINT_SLOW_WRITE_REG(0, PM3FBSourceReadBufferAddr); + GLINT_SLOW_WRITE_REG(0, PM3FBSourceReadBufferOffset); + GLINT_SLOW_WRITE_REG( + PM3FBSourceReadBufferWidth_Width(pScrn->displayWidth), + PM3FBSourceReadBufferWidth); + GLINT_SLOW_WRITE_REG( + PM3FBSourceReadMode_Blocking | + PM3FBSourceReadMode_ReadEnable, + PM3FBSourceReadMode); + TRACE("Permedia3InitializeEngine : SourceRead"); #if X_BYTE_ORDER == X_BIG_ENDIAN pGlint->RasterizerSwap = 1; #else pGlint->RasterizerSwap = 0; #endif - switch (pScrn->bitsPerPixel) { case 8: - pGlint->PixelWidth = 0x0; /* 8 Bits */ - pGlint->TexMapFormat = pGlint->pprod; + GLINT_SLOW_WRITE_REG(0x2, PixelSize); #if X_BYTE_ORDER == X_BIG_ENDIAN pGlint->RasterizerSwap |= 3<<15; /* Swap host data */ #endif break; case 16: - pGlint->PixelWidth = 0x1; /* 16 Bits */ - pGlint->TexMapFormat = pGlint->pprod | 1<<19; + GLINT_SLOW_WRITE_REG(0x1, PixelSize); #if X_BYTE_ORDER == X_BIG_ENDIAN pGlint->RasterizerSwap |= 2<<15; /* Swap host data */ #endif break; - case 24: - pGlint->PixelWidth = 0x4; /* 24 Bits */ - pGlint->TexMapFormat = pGlint->pprod | 2<<19; + case 32: + GLINT_SLOW_WRITE_REG(0x0, PixelSize); break; + } + TRACE("Permedia3InitializeEngine : PixelSize"); + Permedia3Sync(pScrn); + + /* LogicalOpUnit Initialization */ + GLINT_SLOW_WRITE_REG(0xffffffff, FBSoftwareWriteMask); + Permedia3Sync(pScrn); + + /* FBWriteUnit Initialization */ + GLINT_SLOW_WRITE_REG( + PM3FBWriteMode_WriteEnable| + PM3FBWriteMode_OpaqueSpan| + PM3FBWriteMode_Enable0, + PM3FBWriteMode); + GLINT_SLOW_WRITE_REG(0, PM3FBWriteBufferAddr0); + GLINT_SLOW_WRITE_REG(0, PM3FBWriteBufferOffset0); + GLINT_SLOW_WRITE_REG( + PM3FBWriteBufferWidth_Width(pScrn->displayWidth), + PM3FBWriteBufferWidth0); + Permedia3Sync(pScrn); + /* + GLINT_SLOW_WRITE_REG(0, PM3FBWriteBufferAddr1); + GLINT_SLOW_WRITE_REG(0, PM3FBWriteBufferOffset1); + GLINT_SLOW_WRITE_REG( + PM3FBWriteBufferWidth_Width(pScrn->displayWidth), + PM3FBWriteBufferWidth1); + GLINT_SLOW_WRITE_REG(0, PM3FBWriteBufferAddr2); + GLINT_SLOW_WRITE_REG(0, PM3FBWriteBufferOffset2); + GLINT_SLOW_WRITE_REG( + PM3FBWriteBufferWidth_Width(pScrn->displayWidth), + PM3FBWriteBufferWidth2); + GLINT_SLOW_WRITE_REG(0, PM3FBWriteBufferAddr3); + GLINT_SLOW_WRITE_REG(0, PM3FBWriteBufferOffset3); + GLINT_SLOW_WRITE_REG( + PM3FBWriteBufferWidth_Width(pScrn->displayWidth), + PM3FBWriteBufferWidth3); + */ + TRACE("Permedia3InitializeEngine : FBWrite"); + /* SizeOfframebuffer */ + GLINT_SLOW_WRITE_REG( + pScrn->displayWidth * + (8 * pGlint->FbMapSize / (pScrn->bitsPerPixel * pScrn->displayWidth) + >4095?4095: 8 * pGlint->FbMapSize / + (pScrn->bitsPerPixel * pScrn->displayWidth)), + PM3SizeOfFramebuffer); + GLINT_SLOW_WRITE_REG(0xffffffff, FBHardwareWriteMask); + Permedia3Sync(pScrn); + TRACE("Permedia3InitializeEngine : FBHardwareWriteMask & SizeOfFramebuffer"); + /* Color Format */ + switch (pScrn->depth) { + case 8: + colorformat = 4; + break; + case 15: + colorformat = 2; + break; + case 16: + colorformat = 3; + break; + case 24: case 32: - pGlint->PixelWidth = 0x2; /* 32 Bits */ - pGlint->TexMapFormat = pGlint->pprod | 2<<19; - break; + colorformat = 0; + break; } - pGlint->ClippingOn = FALSE; + GLINT_SLOW_WRITE_REG(UNIT_DISABLE| + ((colorformat&0xf)<<2)|(1<<10), + DitherMode); + + /* Other stuff */ pGlint->startxdom = 0; pGlint->startxsub = 0; pGlint->starty = 0; @@ -238,42 +341,13 @@ Permedia3InitializeEngine(ScrnInfoPtr pScrn) pGlint->h = 0; pGlint->w = 0; pGlint->ROP = 0xFF; - GLINT_SLOW_WRITE_REG(pGlint->PixelWidth, FBReadPixel); - GLINT_SLOW_WRITE_REG(pGlint->TexMapFormat, PMTextureMapFormat); - GLINT_SLOW_WRITE_REG(0, RectangleSize); - GLINT_SLOW_WRITE_REG(0, RectangleOrigin); GLINT_SLOW_WRITE_REG(0, dXDom); + GLINT_SLOW_WRITE_REG(0, dXSub); GLINT_SLOW_WRITE_REG(1<<16, dY); GLINT_SLOW_WRITE_REG(0, StartXDom); GLINT_SLOW_WRITE_REG(0, StartXSub); GLINT_SLOW_WRITE_REG(0, StartY); GLINT_SLOW_WRITE_REG(0, GLINTCount); - - GLINT_SLOW_WRITE_REG(1 | 1<<8, 0xAEE0); - GLINT_SLOW_WRITE_REG(1, 0xAEE0); - GLINT_SLOW_WRITE_REG(pScrn->displayWidth, FBSrcReadBufWidth); - GLINT_SLOW_WRITE_REG(pScrn->displayWidth, FBDstReadBufWidth0); - GLINT_SLOW_WRITE_REG(pScrn->displayWidth, FBWriteBufWidth0); - GLINT_SLOW_WRITE_REG(0, FBSrcReadBufAddr); - GLINT_SLOW_WRITE_REG(0, FBDstReadBufAddr0); - GLINT_SLOW_WRITE_REG(0, FBWriteBufAddr0); - GLINT_SLOW_WRITE_REG(0, FBSrcReadBufOffset0); - GLINT_SLOW_WRITE_REG(0, FBDstReadBufOffset0); - GLINT_SLOW_WRITE_REG(0, FBWriteBufOffset0); - GLINT_SLOW_WRITE_REG(0xff00ffff, FBDstReadEnables); - - switch (pScrn->bitsPerPixel) { - case 8: - GLINT_SLOW_WRITE_REG(0x2, PixelSize); - break; - case 16: - GLINT_SLOW_WRITE_REG(0x1, PixelSize); - break; - case 32: - GLINT_SLOW_WRITE_REG(0x0, PixelSize); - break; - } - TRACE_EXIT("Permedia3InitializeEngine"); } @@ -290,155 +364,109 @@ Permedia3AccelInit(ScreenPtr pScreen) Permedia3InitializeEngine(pScrn); - infoPtr->Flags = PIXMAP_CACHE | - OFFSCREEN_PIXMAPS | - LINEAR_FRAMEBUFFER; + /* Generic accel engine flags */ + infoPtr->Flags = + PIXMAP_CACHE | + OFFSCREEN_PIXMAPS | + LINEAR_FRAMEBUFFER; + /* Synchronization of the accel engine */ infoPtr->Sync = Permedia3Sync; + /* Clipping Setup */ + infoPtr->ClippingFlags = 0; + /* This does not work correctly, i don't know why, but i guess it is + * because the clipping stuff is not ok ... + * Let's disable it for now (also in the respective functions, we + * clear the UserScissorEnable bit in Render2D. + HARDWARE_CLIP_MONO_8x8_FILL | + HARDWARE_CLIP_SOLID_FILL; + */ infoPtr->SetClippingRectangle = Permedia3SetClippingRectangle; infoPtr->DisableClipping = Permedia3DisableClipping; - infoPtr->ClippingFlags = HARDWARE_CLIP_SCREEN_TO_SCREEN_COPY; -#if 0 + /* ScreenToScreenCopy */ + infoPtr->ScreenToScreenCopyFlags = + NO_TRANSPARENCY; + infoPtr->SetupForScreenToScreenCopy = + Permedia3SetupForScreenToScreenCopy; + infoPtr->SubsequentScreenToScreenCopy = + Permedia3SubsequentScreenToScreenCopy; + + /* SolidFill */ infoPtr->SolidFillFlags = 0; - infoPtr->WriteBitmapFlags = 0; - if (pScrn->bitsPerPixel == 24) { - /* SVEN : This should be bad also, - * didn't tested it since 24bpp is broken.... - infoPtr->SetupForSolidFill = - Permedia3SetupFortillRectSolid24bpp; - infoPtr->SubsequentSolidFillRect = - Permedia3SubsequentFillRectSolid24bpp; - */ - } else { - infoPtr->SolidLineFlags = 0; - infoPtr->PolySegmentThinSolidFlags = 0; - infoPtr->PolylinesThinSolidFlags = 0; - infoPtr->SetupForSolidLine = Permedia3SetupForSolidLine; - if (!(pScrn->overlayFlags & OVERLAY_8_32_PLANAR)) - { - infoPtr->SubsequentSolidBresenhamLine = - Permedia3SubsequentSolidBresenhamLine; - } - infoPtr->PolySegmentThinSolid = Permedia3PolySegmentThinSolidWrapper; - infoPtr->PolylinesThinSolid = Permedia3PolylinesThinSolidWrapper; - } infoPtr->SetupForSolidFill = Permedia3SetupForFillRectSolid; infoPtr->SubsequentSolidFillRect = Permedia3SubsequentFillRectSolid; -#endif - - infoPtr->ScreenToScreenCopyFlags = NO_TRANSPARENCY; - infoPtr->SetupForScreenToScreenCopy = - Permedia3SetupForScreenToScreenCopy; - infoPtr->SubsequentScreenToScreenCopy = - Permedia3SubsequentScreenToScreenCopy; -#if 0 + /* 8x8 Mono Pattern Fills */ infoPtr->Mono8x8PatternFillFlags = - HARDWARE_PATTERN_PROGRAMMED_ORIGIN | - HARDWARE_PATTERN_PROGRAMMED_BITS | - HARDWARE_PATTERN_SCREEN_ORIGIN; - + HARDWARE_PATTERN_PROGRAMMED_ORIGIN | + HARDWARE_PATTERN_PROGRAMMED_BITS | + HARDWARE_PATTERN_SCREEN_ORIGIN | + BIT_ORDER_IN_BYTE_LSBFIRST; infoPtr->SetupForMono8x8PatternFill = - Permedia3SetupForMono8x8PatternFill; + Permedia3SetupForMono8x8PatternFill; infoPtr->SubsequentMono8x8PatternFillRect = - Permedia3SubsequentMono8x8PatternFillRect; -#endif - -#if 0 - if (pGlint->UsePCIRetry) { - infoPtr->CPUToScreenColorExpandFillFlags = SYNC_AFTER_COLOR_EXPAND | - BIT_ORDER_IN_BYTE_LSBFIRST | - CPU_TRANSFER_PAD_DWORD; - - infoPtr->ColorExpandBase = pGlint->IOBase + OutputFIFO + 4; - infoPtr->SetupForCPUToScreenColorExpandFill = - Permedia3SetupForCPUToScreenColorExpandFill; - infoPtr->SubsequentCPUToScreenColorExpandFill = - Permedia3SubsequentCPUToScreenColorExpandFill; - } else { - infoPtr->ScanlineCPUToScreenColorExpandFillFlags = - BIT_ORDER_IN_BYTE_LSBFIRST; - - infoPtr->NumScanlineColorExpandBuffers = 1; - infoPtr->ScanlineColorExpandBuffers = - pGlint->XAAScanlineColorExpandBuffers; - pGlint->XAAScanlineColorExpandBuffers[0] = - pGlint->IOBase + OutputFIFO + 4; - - infoPtr->SetupForScanlineCPUToScreenColorExpandFill = - Permedia3SetupForScanlineCPUToScreenColorExpandFill; - infoPtr->SubsequentScanlineCPUToScreenColorExpandFill = - Permedia3SubsequentScanlineCPUToScreenColorExpandFill; - infoPtr->SubsequentColorExpandScanline = - Permedia3SubsequentColorExpandScanline; - } -#endif - - infoPtr->ColorExpandRange = MAX_FIFO_ENTRIES; - -#if 0 - infoPtr->WriteBitmap = Permedia3WriteBitmap; - - if (pScrn->bitsPerPixel == 8) - infoPtr->WritePixmap = Permedia3WritePixmap8bpp; - else - if (pScrn->bitsPerPixel == 16) - infoPtr->WritePixmap = Permedia3WritePixmap16bpp; - else - if (pScrn->bitsPerPixel == 24) { - infoPtr->WritePixmap = Permedia3WritePixmap24bpp; - infoPtr->WritePixmapFlags |= NO_PLANEMASK; - } - else - if (pScrn->bitsPerPixel == 32) - infoPtr->WritePixmap = Permedia3WritePixmap32bpp; -#endif - - /* Now fixup if we are 24bpp */ - if (pScrn->bitsPerPixel == 24) { - infoPtr->SolidFillFlags |= NO_PLANEMASK; - infoPtr->ScreenToScreenCopyFlags |= NO_PLANEMASK; - infoPtr->WriteBitmapFlags |= NO_PLANEMASK; - infoPtr->CPUToScreenColorExpandFillFlags |= NO_PLANEMASK; - infoPtr->ScanlineCPUToScreenColorExpandFillFlags |= NO_PLANEMASK; - infoPtr->Mono8x8PatternFillFlags |= NO_PLANEMASK; - } - + Permedia3SubsequentMono8x8PatternFillRect; + + /* Color Expand Fills */ + infoPtr->CPUToScreenColorExpandFillFlags = + SYNC_AFTER_COLOR_EXPAND | + LEFT_EDGE_CLIPPING | + BIT_ORDER_IN_BYTE_LSBFIRST | + CPU_TRANSFER_BASE_FIXED | + CPU_TRANSFER_PAD_DWORD; + infoPtr->ColorExpandBase = pGlint->IOBase + BitMaskPattern; + infoPtr->ColorExpandRange = 4; + infoPtr->SetupForCPUToScreenColorExpandFill = + Permedia3SetupForCPUToScreenColorExpandFill; + infoPtr->SubsequentCPUToScreenColorExpandFill = + Permedia3SubsequentCPUToScreenColorExpandFill; + + /* Images Writes */ + infoPtr->ImageWriteFlags = + NO_GXCOPY | + SYNC_AFTER_IMAGE_WRITE | + LEFT_EDGE_CLIPPING | + BIT_ORDER_IN_BYTE_LSBFIRST | + CPU_TRANSFER_BASE_FIXED | + CPU_TRANSFER_PAD_DWORD; + infoPtr->ImageWriteBase = pGlint->IOBase + PM3FBSourceData; + infoPtr->ImageWriteRange = 8; + infoPtr->SetupForImageWrite = + Permedia3SetupForImageWrite; + infoPtr->SubsequentImageWriteRect = + Permedia3SubsequentImageWriteRect; + AvailFBArea.x1 = 0; AvailFBArea.y1 = 0; AvailFBArea.x2 = pScrn->displayWidth; - AvailFBArea.y2 = ((pGlint->FbMapSize > 16384*1024) ? 16384*1024 : pGlint->FbMapSize) / (pScrn->displayWidth * + AvailFBArea.y2 = pGlint->FbMapSize / (pScrn->displayWidth * pScrn->bitsPerPixel / 8); + /* Alan does this ??? + AvailFBArea.y2 = ((pGlint->FbMapSize > 16384*1024) ? 16384*1024 : + pGlint->FbMapSize) / (pScrn->displayWidth + pScrn->bitsPerPixel / 8); + */ + /* Permedia3 has a maximum 4096x4096 framebuffer */ if (AvailFBArea.y2 > 4095) AvailFBArea.y2 = 4095; xf86InitFBManager(pScreen, &AvailFBArea); + Permedia3Sync(pScrn); return(XAAInit(pScreen, infoPtr)); } -static void Permedia3LoadCoord( - ScrnInfoPtr pScrn, - int x, int y, - int w, int h -){ - GLINTPtr pGlint = GLINTPTR(pScrn); - - if ((h != pGlint->h) || (w != pGlint->w)) { - pGlint->w = w; - pGlint->h = h; - GLINT_WRITE_REG(((h&0x0FFF)<<16)|(w&0x0FFF), RectangleSize); - } - if ((y != pGlint->y) || (x != pGlint->x)) { - pGlint->x = x; - pGlint->y = y; - GLINT_WRITE_REG(((y&0x0FFF)<<16)|(x&0x0FFF), RectangleOrigin); - } +#define CHECKCLIPPING \ +{ \ + if (pGlint->ClippingOn) { \ + pGlint->ClippingOn = FALSE; \ + GLINT_WAIT(1); \ + GLINT_WRITE_REG(0, ScissorMode); \ + } \ } - void Permedia3Sync(ScrnInfoPtr pScrn) { @@ -451,8 +479,7 @@ Permedia3Sync(ScrnInfoPtr pScrn) GLINT_WRITE_REG(0, GlintSync); do { while(GLINT_READ_REG(OutFIFOWords) == 0); -#define Sync_tag 0x188 - } while (GLINT_READ_REG(OutputFIFO) != Sync_tag); + } while (GLINT_READ_REG(OutputFIFO) != PM3SyncTag); } static void @@ -465,7 +492,6 @@ Permedia3SetClippingRectangle(ScrnInfoPtr pScrn, int x1, int y1, int x2, int y2) GLINT_WRITE_REG(1, ScissorMode); pGlint->ClippingOn = TRUE; } - static void Permedia3DisableClipping(ScrnInfoPtr pScrn) { @@ -473,6 +499,7 @@ Permedia3DisableClipping(ScrnInfoPtr pScrn) CHECKCLIPPING; } +/* ScreenToScreenCopy definition */ static void Permedia3SetupForScreenToScreenCopy(ScrnInfoPtr pScrn, int xdir, int ydir, int rop, @@ -480,232 +507,143 @@ Permedia3SetupForScreenToScreenCopy(ScrnInfoPtr pScrn, { GLINTPtr pGlint = GLINTPTR(pScrn); TRACE_ENTER("Permedia3SetupForScreenToScreenCopy"); - - pGlint->BltScanDirection = 0; - if (xdir == 1) pGlint->BltScanDirection |= 1<<28; - if (ydir == 1) pGlint->BltScanDirection |= 1<<29; - - GLINT_WAIT(5); - DO_PLANEMASK(planemask); - - GLINT_WRITE_REG(UNIT_DISABLE, ColorDDAMode); - GLINT_WRITE_REG(UNIT_ENABLE /*| FBSRM_Blocking*/, FBSrcReadMode); - if ((rop == GXcopy) || (rop == GXcopyInverted)) { - GLINT_WRITE_REG(UNIT_DISABLE, FBDstReadMode); - } else { - GLINT_WRITE_REG(UNIT_ENABLE | FBDRM_Enable0 /*| FBDRM_Blocking*/, FBDstReadMode); + pGlint->PM3_Render2D = + PM3Render2D_SpanOperation | + PM3Render2D_Operation_Normal; + pGlint->ClippingOn = TRUE; + pGlint->PM3_Config2D = + PM3Config2D_UserScissorEnable | + PM3Config2D_ForegroundROPEnable | + PM3Config2D_ForegroundROP(rop) | + PM3Config2D_FBWriteEnable; + if (xdir == 1) pGlint->PM3_Render2D |= PM3Render2D_XPositive; + if (ydir == 1) pGlint->PM3_Render2D |= PM3Render2D_YPositive; + if ((rop!=GXclear)&&(rop!=GXset)&&(rop!=GXnoop)&&(rop!=GXinvert)) { + pGlint->PM3_Render2D |= PM3Render2D_FBSourceReadEnable; + pGlint->PM3_Config2D |= PM3Config2D_Blocking; } - GLINT_WRITE_REG(rop<<1|1, LogicalOpMode); + if ((rop!=GXclear)&&(rop!=GXset)&&(rop!=GXcopy)&&(rop!=GXcopyInverted)) + pGlint->PM3_Config2D |= PM3Config2D_FBDestReadEnable; + GLINT_WAIT(2); + DO_PLANEMASK(planemask); + GLINT_WRITE_REG(pGlint->PM3_Config2D, PM3Config2D); TRACE_EXIT("Permedia3SetupForScreenToScreenCopy"); } - static void Permedia3SubsequentScreenToScreenCopy(ScrnInfoPtr pScrn, int x1, int y1, int x2, int y2, int w, int h) { GLINTPtr pGlint = GLINTPTR(pScrn); - + /* Spans needs to be 32 bit aligned. */ + int x_align = x1 & 0x1f; TRACE_ENTER("Permedia3SubsequentScreenToScreenCopy"); - - GLINT_WAIT(3); - GLINT_WRITE_REG(y2<<16 | x2, RectanglePosition); - GLINT_WRITE_REG((y1-y2)<<16 | (x1-x2) & 0xffff, FBSrcReadBufOffset0); - GLINT_WRITE_REG(w | 3<<14| h<<16 | pGlint->BltScanDirection, Render2D); -} - - - -static void -Permedia3PolylinesThinSolidWrapper( - DrawablePtr pDraw, - GCPtr pGC, - int mode, - int npt, - DDXPointPtr pPts -){ - XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - GLINTPtr pGlint = GLINTPTR(infoRec->pScrn); - pGlint->CurrentGC = pGC; - pGlint->CurrentDrawable = pDraw; - if(infoRec->NeedToSync) (*infoRec->Sync)(infoRec->pScrn); - XAAPolyLines(pDraw, pGC, mode, npt, pPts); -} - -static void -Permedia3PolySegmentThinSolidWrapper( - DrawablePtr pDraw, - GCPtr pGC, - int nseg, - xSegment *pSeg -){ - XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - GLINTPtr pGlint = GLINTPTR(infoRec->pScrn); - pGlint->CurrentGC = pGC; - pGlint->CurrentDrawable = pDraw; - if(infoRec->NeedToSync) (*infoRec->Sync)(infoRec->pScrn); - XAAPolySegment(pDraw, pGC, nseg, pSeg); -} - -static void -Permedia3SetupForSolidLine(ScrnInfoPtr pScrn, int color, - int rop, unsigned int planemask) -{ - GLINTPtr pGlint = GLINTPTR(pScrn); - - GLINT_WAIT(6); - DO_PLANEMASK(planemask); - GLINT_WRITE_REG(UNIT_DISABLE, ColorDDAMode); - GLINT_WRITE_REG(color, GLINTColor); - if (rop == GXcopy) { - GLINT_WRITE_REG(pGlint->pprod, FBReadMode); - } else { - GLINT_WRITE_REG(pGlint->pprod | FBRM_DstEnable, FBReadMode); - } - LOADROP(rop); -} - -static void -Permedia3SubsequentSolidBresenhamLine( ScrnInfoPtr pScrn, - int x, int y, int dmaj, int dmin, int e, int len, int octant) -{ - GLINTPtr pGlint = GLINTPTR(pScrn); - - if(dmaj == dmin) { - GLINT_WAIT(6); - if(octant & YDECREASING) { - GLINT_WRITE_REG(-1<<16, dY); - } else { - GLINT_WRITE_REG(1<<16, dY); - } - - if(octant & XDECREASING) { - GLINT_WRITE_REG(-1<<16, dXDom); - } else { - GLINT_WRITE_REG(1<<16, dXDom); - } - - GLINT_WRITE_REG(x<<16, StartXDom); - GLINT_WRITE_REG(y<<16, StartY); - GLINT_WRITE_REG(len,GLINTCount); - GLINT_WRITE_REG(PrimitiveLine, Render); - return; - } - - fbBres(pGlint->CurrentDrawable, pGlint->CurrentGC, 0, - (octant & XDECREASING) ? -1 : 1, - (octant & YDECREASING) ? -1 : 1, - (octant & YMAJOR) ? Y_AXIS : X_AXIS, - x, y, dmin + e, dmin, -dmaj, len); + GLINT_WAIT(5); + GLINT_WRITE_REG(((y2&0x0fff)<<16)|(x2&0x0fff), ScissorMinXY); + GLINT_WRITE_REG((((y2+h)&0x0fff)<<16)|((x2+w)&0x0fff), ScissorMaxXY); + GLINT_WRITE_REG( + PM3RectanglePosition_XOffset(x2-x_align) | + PM3RectanglePosition_YOffset(y2), + PM3RectanglePosition); + GLINT_WRITE_REG( + PM3FBSourceReadBufferOffset_XOffset(x1-x2)| + PM3FBSourceReadBufferOffset_YOffset(y1-y2), + PM3FBSourceReadBufferOffset); + GLINT_WRITE_REG(pGlint->PM3_Render2D | + PM3Render2D_Width(w+x_align)| + PM3Render2D_Height(h), + PM3Render2D); + TRACE_EXIT("Permedia3SubsequentScreenToScreenCopy"); } +/* Solid Fills */ static void Permedia3SetupForFillRectSolid(ScrnInfoPtr pScrn, int color, int rop, unsigned int planemask) { GLINTPtr pGlint = GLINTPTR(pScrn); TRACE_ENTER("Permedia3SetupForFillRectSolid"); - REPLICATE(color); - GLINT_WAIT(4); + /* Prepapre Common Render2D & Config2D data */ + pGlint->PM3_Render2D = + PM3Render2D_SpanOperation | + PM3Render2D_XPositive | + PM3Render2D_YPositive | + PM3Render2D_Operation_Normal; + pGlint->PM3_Config2D = + PM3Config2D_UseConstantSource | + PM3Config2D_ForegroundROPEnable | + PM3Config2D_ForegroundROP(rop) | + PM3Config2D_FBWriteEnable; + if ((rop!=GXclear)&&(rop!=GXset)&&(rop!=GXcopy)&&(rop!=GXcopyInverted)) + pGlint->PM3_Config2D |= PM3Config2D_FBDestReadEnable; + /* Clipping is not working ok yet, let's disable it. + if (pGlint->ClippingOn) + pGlint->PM3_Config2D |= PM3Config2D_UserScissorEnable; + */ + GLINT_WAIT(3); + /* Using FBClockColor (have to disable SpanOperation) will fill only the + * first 32 pixels of the 64 pixels of a span. Lets use ForegroundColor + * instead (from the LogicOps unit) + GLINT_WRITE_REG(color, PM3FBBlockColor); + */ + GLINT_WRITE_REG(color, PM3ForegroundColor); DO_PLANEMASK(planemask); - GLINT_WRITE_REG(color, FBBlockColor); - if ((rop == GXcopy) || (rop == GXcopyInverted)) { - GLINT_WRITE_REG(UNIT_DISABLE, FBDstReadMode); - } else { - GLINT_WRITE_REG(UNIT_ENABLE | FBDRM_Enable0 /*| FBDRM_Blocking*/, FBDstReadMode); - } - GLINT_WRITE_REG(rop<<1| 1, LogicalOpMode); + GLINT_WRITE_REG(pGlint->PM3_Config2D, PM3Config2D); TRACE_EXIT("Permedia3SetupForFillRectSolid"); } - static void Permedia3SubsequentFillRectSolid(ScrnInfoPtr pScrn, int x, int y, int w, int h) { GLINTPtr pGlint = GLINTPTR(pScrn); TRACE_ENTER("Permedia3SubsequentFillRectSolid"); - - GLINT_WAIT(3); - GLINT_WRITE_REG(y<<16 | x, RectanglePosition); - GLINT_WRITE_REG(w | 3<<28 | h<<16, Render2D); + GLINT_WAIT(2); + GLINT_WRITE_REG( + PM3RectanglePosition_XOffset(x) | + PM3RectanglePosition_YOffset(y), + PM3RectanglePosition); + GLINT_WRITE_REG(pGlint->PM3_Render2D | + PM3Render2D_Width(w) | PM3Render2D_Height(h), + PM3Render2D); TRACE_EXIT("Permedia3SubsequentFillRectSolid"); } - -static void MoveBYTE( - register CARD32* dest, - register unsigned char* src, - register int dwords -) -{ - while(dwords) { - *dest = *src; - src += 1; - dest += 1; - dwords -= 1; - } -} - -static void MoveWORDS( - register CARD32* dest, - register unsigned short* src, - register int dwords -) -{ - while(dwords & ~0x01) { - *dest = *src; - *(dest + 1) = *(src + 1); - src += 2; - dest += 2; - dwords -= 2; - } - switch(dwords) { - case 0: return; - case 1: *dest = *src; - return; - } -} - -static void MoveDWORDS( - register CARD32* dest, - register CARD32* src, - register int dwords ) -{ - while(dwords & ~0x03) { - *dest = *src; - *(dest + 1) = *(src + 1); - *(dest + 2) = *(src + 2); - *(dest + 3) = *(src + 3); - src += 4; - dest += 4; - dwords -= 4; - } - if (!dwords) return; - *dest = *src; - if (dwords == 1) return; - *(dest + 1) = *(src + 1); - if (dwords == 2) return; - *(dest + 2) = *(src + 2); -} - +/* 8x8 Mono Pattern Fills */ static void Permedia3SetupForMono8x8PatternFill(ScrnInfoPtr pScrn, - int patternx, int patterny, - int fg, int bg, int rop, - unsigned int planemask) + int patternx, int patterny, + int fg, int bg, int rop, + unsigned int planemask) { GLINTPtr pGlint = GLINTPTR(pScrn); TRACE_ENTER("Permedia3SetupForMono8x8PatternFill"); - - GLINT_WAIT(14); - - GLINT_WRITE_REG(fg, ForegroundColor); - pGlint->FrameBufferReadMode = 0; - + REPLICATE(fg); + pGlint->PM3_Render2D = + PM3Render2D_AreaStippleEnable | + PM3Render2D_SpanOperation | + PM3Render2D_XPositive | + PM3Render2D_YPositive | + PM3Render2D_Operation_Normal; + pGlint->PM3_Config2D = + PM3Config2D_UseConstantSource | + PM3Config2D_ForegroundROPEnable | + PM3Config2D_ForegroundROP(rop) | + PM3Config2D_FBWriteEnable; + if ((rop!=GXclear)&&(rop!=GXset)&&(rop!=GXcopy)&&(rop!=GXcopyInverted)) + pGlint->PM3_Config2D |= PM3Config2D_FBDestReadEnable; + /* Clipping is not working correctly yet ... + if (pGlint->ClippingOn) + pGlint->PM3_Config2D |= PM3Config2D_UserScissorEnable; + */ + pGlint->PM3_AreaStippleMode = 1; + pGlint->PM3_AreaStippleMode |= (2<<1); + pGlint->PM3_AreaStippleMode |= (2<<4); if (bg != -1) { + REPLICATE(bg); + pGlint->PM3_Config2D |= PM3Config2D_OpaqueSpan; + pGlint->PM3_AreaStippleMode |= 1<<20; + GLINT_WAIT(12); GLINT_WRITE_REG(bg, BackgroundColor); - pGlint->FrameBufferReadMode = 1<<20; } - - DO_PLANEMASK(planemask); + else GLINT_WAIT(11); GLINT_WRITE_REG((patternx & 0xFF), AreaStipplePattern0); GLINT_WRITE_REG((patternx & 0xFF00) >> 8, AreaStipplePattern1); GLINT_WRITE_REG((patternx & 0xFF0000) >> 16, AreaStipplePattern2); @@ -714,848 +652,121 @@ Permedia3SetupForMono8x8PatternFill(ScrnInfoPtr pScrn, GLINT_WRITE_REG((patterny & 0xFF00) >> 8, AreaStipplePattern5); GLINT_WRITE_REG((patterny & 0xFF0000) >> 16, AreaStipplePattern6); GLINT_WRITE_REG((patterny & 0xFF000000) >> 24, AreaStipplePattern7); - - if ((rop == GXcopy) || (rop == GXcopyInverted)) { - GLINT_WRITE_REG(UNIT_DISABLE, FBDstReadMode); - } else { - GLINT_WRITE_REG(UNIT_ENABLE | FBDRM_Enable0 /*| FBDRM_Blocking*/, FBDstReadMode); - } - - GLINT_WRITE_REG(rop<<1 | 1, LogicalOpMode); + GLINT_WRITE_REG(fg, PM3ForegroundColor); + DO_PLANEMASK(planemask); + GLINT_WRITE_REG(pGlint->PM3_Config2D, PM3Config2D); TRACE_EXIT("Permedia3SetupForMono8x8PatternFill"); } - static void Permedia3SubsequentMono8x8PatternFillRect(ScrnInfoPtr pScrn, - int patternx, int patterny, - int x, int y, - int w, int h) + int x_offset, int y_offset, + int x, int y, int w, int h) { GLINTPtr pGlint = GLINTPTR(pScrn); - - TRACE_ENTER("Permedia3SubsequentMono8x8PatternFillRect()"); - - GLINT_WAIT(4); - GLINT_WRITE_REG(pGlint->FrameBufferReadMode|patternx<<7|patterny<<12|2<<1|2<<4|STIPPLE_SWAP|UNIT_ENABLE, AreaStippleMode); - GLINT_WRITE_REG(y<<16 | x, RectanglePosition); - GLINT_WRITE_REG(w | 1<<30 | 3<<28 |h<<16, Render2D); - - TRACE_EXIT("Permedia3SubsequentMono8x8PatternFillRect()"); + TRACE_ENTER("Permedia3SubsequentMono8x8PatternFillRect"); + GLINT_WAIT(3); + GLINT_WRITE_REG( + PM3RectanglePosition_XOffset(x) | + PM3RectanglePosition_YOffset(y), + PM3RectanglePosition); + GLINT_WRITE_REG( + (x_offset&0x7)<<7 | (y_offset&0x7)<<12 | + pGlint->PM3_AreaStippleMode, + AreaStippleMode); + GLINT_WRITE_REG(pGlint->PM3_Render2D | + PM3Render2D_Width(w) | PM3Render2D_Height(h), + PM3Render2D); + TRACE_EXIT("Permedia3SubsequentMono8x8PatternFillRect"); } -static void -Permedia3SetupForCPUToScreenColorExpandFill( - ScrnInfoPtr pScrn, - int fg, int bg, - int rop, - unsigned int planemask -){ +/* Color Expansion Fills */ +static void Permedia3SetupForCPUToScreenColorExpandFill(ScrnInfoPtr pScrn, + int fg, int bg, int rop,unsigned int planemask) +{ GLINTPtr pGlint = GLINTPTR(pScrn); - int dobackground = 0; - TRACE_ENTER("Permedia3SetupForCPUToScreenColorExpandFill"); - if (bg != -1) dobackground |= ForceBackgroundColor; - - GLINT_WAIT(7); - DO_PLANEMASK(planemask); - if (rop == GXcopy) { - GLINT_WRITE_REG(pGlint->pprod, FBReadMode); - } else { - GLINT_WRITE_REG(pGlint->pprod | FBRM_DstEnable, FBReadMode); - } - - pGlint->ForeGroundColor = fg; - pGlint->BackGroundColor = bg; REPLICATE(fg); - REPLICATE(bg); - - if ((pScrn->bitsPerPixel != 24) && (rop == GXcopy)) { - GLINT_WRITE_REG(UNIT_DISABLE, ColorDDAMode); - if (dobackground) { - GLINT_WRITE_REG(bg, FBBlockColor); - } else { - GLINT_WRITE_REG(fg, FBBlockColor); - } - GLINT_WRITE_REG(pGlint->RasterizerSwap,RasterizerMode); - pGlint->FrameBufferReadMode = FastFillEnable; - } else { - GLINT_WRITE_REG(UNIT_ENABLE, ColorDDAMode); - GLINT_WRITE_REG(BitMaskPackingEachScanline|dobackground| - pGlint->RasterizerSwap,RasterizerMode); - GLINT_WRITE_REG(fg, ConstantColor); - if (dobackground) { - pGlint->FrameBufferReadMode = TextureEnable; - GLINT_WRITE_REG(bg, Texel0); - } else - pGlint->FrameBufferReadMode = 0; + pGlint->PM3_Render2D = + PM3Render2D_SpanOperation | + PM3Render2D_XPositive | + PM3Render2D_YPositive | + PM3Render2D_Operation_SyncOnBitMask; + pGlint->PM3_Config2D = + PM3Config2D_UserScissorEnable | + PM3Config2D_UseConstantSource | + PM3Config2D_ForegroundROPEnable | + PM3Config2D_ForegroundROP(rop) | + PM3Config2D_FBWriteEnable; + if ((rop!=GXclear)&&(rop!=GXset)&&(rop!=GXcopy)&&(rop!=GXcopyInverted)) + pGlint->PM3_Config2D |= PM3Config2D_FBDestReadEnable; + if (bg != -1) { + REPLICATE(bg); + pGlint->PM3_Config2D |= PM3Config2D_OpaqueSpan; + GLINT_WAIT(4); + GLINT_WRITE_REG(bg, BackgroundColor); } - LOADROP(rop); + else GLINT_WAIT(3); + GLINT_WRITE_REG(fg, PM3ForegroundColor); + DO_PLANEMASK(planemask); + GLINT_WRITE_REG(pGlint->PM3_Config2D, PM3Config2D); TRACE_EXIT("Permedia3SetupForCPUToScreenColorExpandFill"); } - -static void -Permedia3SubsequentCPUToScreenColorExpandFill( - ScrnInfoPtr pScrn, - int x, int y, int w, int h, - int skipleft -){ +static void Permedia3SubsequentCPUToScreenColorExpandFill(ScrnInfoPtr pScrn, + int x, int y, int w, int h, int skipleft) +{ GLINTPtr pGlint = GLINTPTR(pScrn); - int dwords = ((w + 31) >> 5) * h; - TRACE_ENTER("Permedia3SubsequentCPUToScreenColorExpandFill"); - GLINT_WAIT(8); - Permedia3LoadCoord(pScrn, x, y, w, h); - - if ((pGlint->ROP == GXcopy) && (pGlint->BackGroundColor != -1)) { - GLINT_WRITE_REG(PrimitiveRectangle | XPositive | YPositive | FastFillEnable, Render); - REPLICATE(pGlint->ForeGroundColor) - GLINT_WRITE_REG(pGlint->ForeGroundColor, FBBlockColor); - } - - GLINT_WRITE_REG(PrimitiveRectangle | XPositive | YPositive | SyncOnBitMask | - pGlint->FrameBufferReadMode, Render); - GLINT_WRITE_REG((dwords - 1)<<16 | 0x0D, OutputFIFO); - GLINT_WAIT(dwords); + GLINT_WAIT(4); + GLINT_WRITE_REG(((y&0x0fff)<<16)|((x+skipleft)&0x0fff), ScissorMinXY); + GLINT_WRITE_REG((((y+h)&0x0fff)<<16)|((x+w)&0x0fff), ScissorMaxXY); + GLINT_WRITE_REG( + PM3RectanglePosition_XOffset(x) | + PM3RectanglePosition_YOffset(y), + PM3RectanglePosition); + GLINT_WRITE_REG(pGlint->PM3_Render2D | + PM3Render2D_Width(w) | PM3Render2D_Height(h), + PM3Render2D); TRACE_EXIT("Permedia3SubsequentCPUToScreenColorExpandFill"); } -static void -Permedia3SetupForScanlineCPUToScreenColorExpandFill( - ScrnInfoPtr pScrn, - int fg, int bg, - int rop, - unsigned int planemask -){ - GLINTPtr pGlint = GLINTPTR(pScrn); - int dobackground = 0; - - TRACE_ENTER("Permedia3SetupForScanlineCPUToScreenColorExpandFill"); - if (bg != -1) dobackground |= ForceBackgroundColor; - pGlint->BackGroundColor = bg; - pGlint->ForeGroundColor = fg; - REPLICATE(fg); - REPLICATE(bg); - GLINT_WAIT(7); - DO_PLANEMASK(planemask); - if (rop == GXcopy) { - GLINT_WRITE_REG(pGlint->pprod, FBReadMode); - } else { - GLINT_WRITE_REG(pGlint->pprod|FBRM_DstEnable, FBReadMode); - } - if ((rop == GXcopy) && (pGlint->BackGroundColor == -1)) { - pGlint->FrameBufferReadMode = FastFillEnable; - GLINT_WRITE_REG(UNIT_DISABLE, ColorDDAMode); - GLINT_WRITE_REG(fg, FBBlockColor); - GLINT_WRITE_REG(pGlint->RasterizerSwap,RasterizerMode); - } else { - GLINT_WRITE_REG(UNIT_ENABLE, ColorDDAMode); - GLINT_WRITE_REG(fg, ConstantColor); - GLINT_WRITE_REG(BitMaskPackingEachScanline|dobackground| - pGlint->RasterizerSwap,RasterizerMode); - if (dobackground) { - GLINT_WRITE_REG(bg, Texel0); - pGlint->FrameBufferReadMode = TextureEnable; - } else { - pGlint->FrameBufferReadMode = 0; - } - } - LOADROP(rop); - TRACE_EXIT("Permedia3SetupForScanlineCPUToScreenColorExpandFill"); -} - -static void -Permedia3SubsequentScanlineCPUToScreenColorExpandFill( - ScrnInfoPtr pScrn, - int x, int y, int w, int h, - int skipleft -){ - GLINTPtr pGlint = GLINTPTR(pScrn); - - TRACE_ENTER("Permedia3SubsequentScanlineCPUToScreenColorExpandFill"); - - pGlint->dwords = ((w + 31) >> 5); /* dwords per scanline */ - - pGlint->cpucount = h; - - GLINT_WAIT(6); - Permedia3LoadCoord(pScrn, x, y, w, h); - GLINT_WRITE_REG(PrimitiveRectangle | XPositive | YPositive | pGlint->FrameBufferReadMode | SyncOnBitMask, Render); - GLINT_WRITE_REG(((pGlint->dwords*h)-1)<<16 | 0x0D, OutputFIFO); - GLINT_WAIT(pGlint->dwords); - pGlint->cpucount--; - TRACE_EXIT("Permedia3SubsequentScanlineCPUToScreenColorExpandFill"); -} - -static void -Permedia3SubsequentColorExpandScanline(ScrnInfoPtr pScrn, int bufno) +/* Images Writes */ +static void Permedia3SetupForImageWrite(ScrnInfoPtr pScrn, int rop, + unsigned int planemask, int trans_color, int bpp, int depth) { GLINTPtr pGlint = GLINTPTR(pScrn); - - if (pGlint->cpucount--) - GLINT_WAIT(pGlint->dwords); -} - - -static void -Permedia3WriteBitmap(ScrnInfoPtr pScrn, - int x, int y, int w, int h, - unsigned char *src, - int srcwidth, - int skipleft, - int fg, int bg, - int rop, - unsigned int planemask -) -{ - XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCRNINFOPTR(pScrn); - GLINTPtr pGlint = GLINTPTR(pScrn); - unsigned char *srcpntr; - int dwords, height, mode; - Bool SecondPass = FALSE; - - TRACE_ENTER("Permedia3WriteBitmap"); - - w += skipleft; - x -= skipleft; - dwords = (w + 31) >> 5; - - Permedia3SetClippingRectangle(pScrn,x+skipleft,y,x+w,y+h); - - if (pScrn->bitsPerPixel == 24) { - GLINT_WAIT(10); - } else { - GLINT_WAIT(11); - DO_PLANEMASK(planemask); - } - LOADROP(rop); - Permedia3LoadCoord(pScrn, x&0xFFFF, y, w, h); - if (rop == GXcopy) { - GLINT_WRITE_REG(pGlint->pprod, FBReadMode); - } else { - GLINT_WRITE_REG(pGlint->pprod | FBRM_DstEnable, FBReadMode); - } - if ((pScrn->bitsPerPixel != 24) && (rop == GXcopy)) { - mode = FastFillEnable; - GLINT_WRITE_REG(UNIT_DISABLE, ColorDDAMode); - GLINT_WRITE_REG(pGlint->RasterizerSwap,RasterizerMode); - } else { - mode = 0; - GLINT_WRITE_REG(UNIT_ENABLE, ColorDDAMode); - GLINT_WRITE_REG(BitMaskPackingEachScanline| - pGlint->RasterizerSwap,RasterizerMode); - } - - if(bg == -1) { - /* >>>>> set fg <<<<<<<< */ - REPLICATE(fg); - if ((pScrn->bitsPerPixel != 24) && (rop == GXcopy)) { - GLINT_WRITE_REG(fg, FBBlockColor); - } else { - GLINT_WRITE_REG(fg, ConstantColor); - } - } else if(rop == GXcopy) { - /* >>>>> set bg <<<<<<< */ - /* >>>>> draw rect (x,y,w,h) */ - REPLICATE(bg); - if ((pScrn->bitsPerPixel != 24) && (rop == GXcopy)) { - GLINT_WRITE_REG(bg, FBBlockColor); - } else { - GLINT_WRITE_REG(bg, ConstantColor); - } - GLINT_WRITE_REG(PrimitiveRectangle | XPositive | YPositive |mode,Render); - /* >>>>>> set fg <<<<<< */ - REPLICATE(fg); - if ((pScrn->bitsPerPixel != 24) && (rop == GXcopy)) { - GLINT_WRITE_REG(fg, FBBlockColor); - } else { - GLINT_WRITE_REG(fg, ConstantColor); - } - } else { - SecondPass = TRUE; - /* >>>>> set fg <<<<<<< */ - REPLICATE(fg); - if ((pScrn->bitsPerPixel != 24) && (rop == GXcopy)) { - GLINT_WRITE_REG(fg, FBBlockColor); - } else { - GLINT_WRITE_REG(fg, ConstantColor); - } - } - - /* >>>>>>>>> initiate transfer (x,y,w,h). Skipleft pixels on the - left edge will be clipped <<<<<< */ - -SECOND_PASS: - GLINT_WRITE_REG(PrimitiveRectangle | XPositive | YPositive | mode | SyncOnBitMask, Render); - - height = h; - srcpntr = src; - while(height--) { - GLINT_WAIT(dwords); - /* 0x0D is the TAG value for BitMaskPattern */ - GLINT_WRITE_REG(((dwords - 1) << 16) | 0x0D, OutputFIFO); - MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), - (CARD32 *)srcpntr, dwords); - srcpntr += srcwidth; - } - - if(SecondPass) { - SecondPass = FALSE; - /* >>>>>> invert bitmask and set bg <<<<<<<< */ - REPLICATE(bg); - GLINT_WAIT(3); - if ((pScrn->bitsPerPixel != 24) && (rop == GXcopy)) { - GLINT_WRITE_REG(InvertBitMask|pGlint->RasterizerSwap,RasterizerMode); - GLINT_WRITE_REG(bg, FBBlockColor); - } else { - GLINT_WRITE_REG(InvertBitMask|BitMaskPackingEachScanline| - pGlint->RasterizerSwap, RasterizerMode); - GLINT_WRITE_REG(bg, ConstantColor); - } - goto SECOND_PASS; - } - - GLINT_WAIT(1); - GLINT_WRITE_REG(pGlint->RasterizerSwap, RasterizerMode); - Permedia3DisableClipping(pScrn); - SET_SYNC_FLAG(infoRec); - TRACE_EXIT("Permedia3WriteBitmap"); -} - - -static void -Permedia3WritePixmap8bpp( - ScrnInfoPtr pScrn, - int x, int y, int w, int h, - unsigned char *src, - int srcwidth, - int rop, - unsigned int planemask, - int transparency_color, - int bpp, int depth -) -{ - XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCRNINFOPTR(pScrn); - GLINTPtr pGlint = GLINTPTR(pScrn); - int skipleft, dwords, count; - CARD32* srcp; - unsigned char *srcpbyte; - Bool FastTexLoad = FALSE; - - GLINT_WAIT(3); + TRACE_ENTER("Permedia3SetupForImageWrite"); + pGlint->PM3_Render2D = + PM3Render2D_SpanOperation | + PM3Render2D_XPositive | + PM3Render2D_YPositive | + PM3Render2D_Operation_SyncOnHostData; + pGlint->PM3_Config2D = + PM3Config2D_UserScissorEnable | + PM3Config2D_ForegroundROPEnable | + PM3Config2D_ForegroundROP(rop) | + PM3Config2D_FBWriteEnable; + if ((rop!=GXclear)&&(rop!=GXset)&&(rop!=GXcopy)&&(rop!=GXcopyInverted)) + pGlint->PM3_Config2D |= PM3Config2D_FBDestReadEnable; + GLINT_WAIT(2); DO_PLANEMASK(planemask); - GLINT_WRITE_REG(pGlint->RasterizerSwap,RasterizerMode); - if (rop == GXcopy) { - GLINT_WRITE_REG(pGlint->pprod | FBRM_Packed, FBReadMode); - } else { - GLINT_WRITE_REG(pGlint->pprod | FBRM_DstEnable, FBReadMode); - } - - dwords = (w + 3) >> 2; -#if X_BYTE_ORDER == X_LITTLE_ENDIAN - if((!(x&3)) && (!(w&3))) FastTexLoad = TRUE; -#endif - if((rop != GXcopy) || (planemask != ~0)) - FastTexLoad = FALSE; - - if (rop == GXcopy) { - skipleft = 0; - } else { - if((skipleft = (long)src & 0x03)) { - skipleft /= (bpp>>3); - - x -= skipleft; - w += skipleft; - - src = (unsigned char*)((long)src & ~0x03); - } - } - - - if(FastTexLoad) { - int address; - - GLINT_WAIT(1); - GLINT_WRITE_REG(UNIT_DISABLE, FBWriteMode); - Permedia3Sync(pScrn); /* we are not using the rasterizer */ - while(h--) { - count = dwords; - address = ((y * pScrn->displayWidth) + x) >> 2; - srcp = (CARD32*)src; - GLINT_WRITE_REG(address, TextureDownloadOffset); - while(count >= MAX_FIFO_ENTRIES) { - GLINT_WAIT(MAX_FIFO_ENTRIES); - /* (0x11 << 4) | 0x0D is the TAG for TextureData */ - GLINT_WRITE_REG(((MAX_FIFO_ENTRIES - 2) << 16) | (0x11 << 4) | - 0x0D, OutputFIFO); - MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), - (CARD32*)srcp, MAX_FIFO_ENTRIES - 1); - count -= MAX_FIFO_ENTRIES - 1; - address += MAX_FIFO_ENTRIES - 1; - srcp += MAX_FIFO_ENTRIES - 1; - } - if(count) { - GLINT_WAIT(count + 1); - /* (0x11 << 4) | 0x0D is the TAG for TextureData */ - GLINT_WRITE_REG(((count - 1) << 16) | (0x11 << 4) | 0x0D, - OutputFIFO); - MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), - (CARD32*)srcp, count); - } - src += srcwidth; - y++; - } - GLINT_WAIT(1); - GLINT_WRITE_REG(UNIT_ENABLE, FBWriteMode); - } else { - char align = (x & pGlint->bppalign); - - - GLINT_WRITE_REG(UNIT_DISABLE, ColorDDAMode); - if (rop == GXcopy) { - GLINT_WAIT(6); - Permedia3LoadCoord(pScrn, x>>pGlint->BppShift, y, - (w+pGlint->bppalign)>>pGlint->BppShift, h); - GLINT_WRITE_REG(align<<29|x<<16|(x+w), PackedDataLimits); - } else { - Permedia3SetClippingRectangle(pScrn,x+skipleft,y,x+w,y+h); - GLINT_WAIT(5); - Permedia3LoadCoord(pScrn, x, y, w, h); - } - LOADROP(rop); - GLINT_WRITE_REG(PrimitiveRectangle | XPositive | YPositive | - SyncOnHostData, Render); - - if (rop == GXcopy) { - while(h--) { - count = dwords; - srcp = (CARD32*)src; - while(count >= MAX_FIFO_ENTRIES) { - GLINT_WAIT(MAX_FIFO_ENTRIES); - /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */ - GLINT_WRITE_REG(((MAX_FIFO_ENTRIES - 2) << 16) | (0x15 << 4) | - 0x05, OutputFIFO); - MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), - (CARD32*)srcp, MAX_FIFO_ENTRIES - 1); - count -= MAX_FIFO_ENTRIES - 1; - srcp += MAX_FIFO_ENTRIES - 1; - } - if(count) { - GLINT_WAIT(count + 1); - /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */ - GLINT_WRITE_REG(((count - 1) << 16) | (0x15 << 4) | - 0x05, OutputFIFO); - MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), - (CARD32*)srcp, count); - } - src += srcwidth; - } - } else { - while(h--) { - count = w; - srcpbyte = (unsigned char *)src; - while(count >= MAX_FIFO_ENTRIES) { - GLINT_WAIT(MAX_FIFO_ENTRIES); - /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */ - GLINT_WRITE_REG(((MAX_FIFO_ENTRIES - 2) << 16) | (0x15 << 4) | - 0x05, OutputFIFO); - MoveBYTE((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), - (unsigned char *)srcpbyte, MAX_FIFO_ENTRIES - 1); - count -= MAX_FIFO_ENTRIES - 1; - srcpbyte += MAX_FIFO_ENTRIES - 1; - } - if(count) { - GLINT_WAIT(count + 1); - /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */ - GLINT_WRITE_REG(((count - 1) << 16) | (0x15 << 4) | - 0x05, OutputFIFO); - MoveBYTE((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), - (unsigned char *)srcpbyte, count); - } - src += srcwidth; - } - } - } - - Permedia3DisableClipping(pScrn); - SET_SYNC_FLAG(infoRec); -} - -static void -Permedia3WritePixmap16bpp( - ScrnInfoPtr pScrn, - int x, int y, int w, int h, - unsigned char *src, - int srcwidth, - int rop, - unsigned int planemask, - int transparency_color, - int bpp, int depth -) -{ - XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCRNINFOPTR(pScrn); - GLINTPtr pGlint = GLINTPTR(pScrn); - int skipleft, dwords, count; - CARD32* srcp; - unsigned short* srcpword; - Bool FastTexLoad; - - TRACE_ENTER("Permedia3WritePixmap16bpp"); - GLINT_WAIT(3); - DO_PLANEMASK(planemask); - GLINT_WRITE_REG(pGlint->RasterizerSwap,RasterizerMode); - if (rop == GXcopy) { - GLINT_WRITE_REG(pGlint->pprod | FBRM_Packed, FBReadMode); - } else { - GLINT_WRITE_REG(pGlint->pprod | FBRM_DstEnable, FBReadMode); - } - - FastTexLoad = FALSE; - dwords = (w + 1) >> 1; -#if X_BYTE_ORDER == X_LITTLE_ENDIAN - if((!(x&1)) && (!(w&1))) FastTexLoad = TRUE; -#endif - if((rop != GXcopy) || (planemask != ~0)) - FastTexLoad = FALSE; - - if (rop == GXcopy) { - skipleft = 0; - } else { - if((skipleft = (long)src & 0x03L)) { - skipleft /= (bpp>>3); - - x -= skipleft; - w += skipleft; - - src = (unsigned char*)((long)src & ~0x03L); - } - } - - if(FastTexLoad) { - int address; - - GLINT_WAIT(1); - GLINT_WRITE_REG(UNIT_DISABLE, FBWriteMode); - Permedia3Sync(pScrn); /* we are not using the rasterizer */ - while(h--) { - count = dwords; - address = ((y * pScrn->displayWidth) + x) >> 1; - srcp = (CARD32*)src; - GLINT_WRITE_REG(address, TextureDownloadOffset); - while(count >= MAX_FIFO_ENTRIES) { - GLINT_WAIT(MAX_FIFO_ENTRIES); - /* (0x11 << 4) | 0x0D is the TAG for TextureData */ - GLINT_WRITE_REG(((MAX_FIFO_ENTRIES - 2) << 16) | (0x11 << 4) | - 0x0D, OutputFIFO); - MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), - (CARD32*)srcp, MAX_FIFO_ENTRIES - 1); - count -= MAX_FIFO_ENTRIES - 1; - address += MAX_FIFO_ENTRIES - 1; - srcp += MAX_FIFO_ENTRIES - 1; - } - if(count) { - GLINT_WAIT(count + 1); - /* (0x11 << 4) | 0x0D is the TAG for TextureData */ - GLINT_WRITE_REG(((count - 1) << 16) | (0x11 << 4) | 0x0D, - OutputFIFO); - MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), - (CARD32*)srcp, count); - } - src += srcwidth; - y++; - } - GLINT_WAIT(1); - GLINT_WRITE_REG(UNIT_ENABLE, FBWriteMode); - } else { - char align = (x & pGlint->bppalign); - - - GLINT_WRITE_REG(UNIT_DISABLE, ColorDDAMode); - if (rop == GXcopy) { - GLINT_WAIT(6); - Permedia3LoadCoord(pScrn, x>>pGlint->BppShift, y, - (w+pGlint->bppalign)>>pGlint->BppShift, h); - GLINT_WRITE_REG(align<<29|x<<16|(x+w), PackedDataLimits); - } else { - Permedia3SetClippingRectangle(pScrn,x+skipleft,y,x+w,y+h); - GLINT_WAIT(5); - Permedia3LoadCoord(pScrn, x, y, w, h); - } - LOADROP(rop); - GLINT_WRITE_REG(PrimitiveRectangle | XPositive | YPositive | - SyncOnHostData, Render); - - if (rop == GXcopy) { - while(h--) { - count = dwords; - srcp = (CARD32*)src; - while(count >= MAX_FIFO_ENTRIES) { - GLINT_WAIT(MAX_FIFO_ENTRIES); - /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */ - GLINT_WRITE_REG(((MAX_FIFO_ENTRIES - 2) << 16) | (0x15 << 4) | - 0x05, OutputFIFO); - MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), - (CARD32*)srcp, MAX_FIFO_ENTRIES - 1); - count -= MAX_FIFO_ENTRIES - 1; - srcp += MAX_FIFO_ENTRIES - 1; - } - if(count) { - GLINT_WAIT(count + 1); - /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */ - GLINT_WRITE_REG(((count - 1) << 16) | (0x15 << 4) | - 0x05, OutputFIFO); - MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), - (CARD32*)srcp, count); - } - src += srcwidth; - } - } else { - while(h--) { - count = w; - srcpword = (unsigned short *)src; - while(count >= MAX_FIFO_ENTRIES) { - GLINT_WAIT(MAX_FIFO_ENTRIES); - /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */ - GLINT_WRITE_REG(((MAX_FIFO_ENTRIES - 2) << 16) | (0x15 << 4) | - 0x05, OutputFIFO); - MoveWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), - (unsigned short *)srcpword, MAX_FIFO_ENTRIES - 1); - count -= MAX_FIFO_ENTRIES - 1; - srcpword += MAX_FIFO_ENTRIES - 1; - } - if(count) { - GLINT_WAIT(count + 1); - /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */ - GLINT_WRITE_REG(((count - 1) << 16) | (0x15 << 4) | - 0x05, OutputFIFO); - MoveWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), - (unsigned short *)srcpword, count); - } - src += srcwidth; - } - } - } - - Permedia3DisableClipping(pScrn); - SET_SYNC_FLAG(infoRec); - TRACE_EXIT("Permedia3WritePixmap16bpp"); + GLINT_WRITE_REG(pGlint->PM3_Config2D, PM3Config2D); + TRACE_EXIT("Permedia3SetupForImageWrite"); } - -#if 0 -static void -Permedia3WritePixmap24bpp( - ScrnInfoPtr pScrn, - int x, int y, int w, int h, - unsigned char *src, - int srcwidth, - int rop, - unsigned int planemask, - int transparency_color, - int bpp, int depth -) +static void Permedia3SubsequentImageWriteRect(ScrnInfoPtr pScrn, + int x, int y, int w, int h, int skipleft) { - XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCRNINFOPTR(pScrn); GLINTPtr pGlint = GLINTPTR(pScrn); - int skipleft = 0, dwords, count; - unsigned char* srcpbyte; - CARD32* srcp; - - GLINT_WAIT(3); - GLINT_WRITE_REG(pGlint->RasterizerSwap,RasterizerMode); - GLINT_WRITE_REG(UNIT_DISABLE, ColorDDAMode); - if (rop == GXcopy) { - GLINT_WRITE_REG(pGlint->pprod, FBReadMode); - } else { - GLINT_WRITE_REG(pGlint->pprod | FBRM_DstEnable, FBReadMode); - } - - dwords = ((w+1)*3)>>2; - if((skipleft = (long)src & 0x03L)) { - skipleft = 4 - skipleft; - - x -= skipleft; - w += skipleft; - - src = (unsigned char*)(src - (3*skipleft)); - } - - { - Permedia3SetClippingRectangle(pScrn,x+skipleft,y,x+w,y+h); - - GLINT_WAIT(4); - Permedia3LoadCoord(pScrn, x&0xFFFF, y, w, h); - LOADROP(rop); - GLINT_WRITE_REG(PrimitiveRectangle | XPositive | YPositive | - SyncOnHostData, Render); - -#if 1 - while(h--) { - count = w; - srcpbyte = (unsigned char *)src; - while(count >= MAX_FIFO_ENTRIES) { - GLINT_WAIT(MAX_FIFO_ENTRIES); - /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */ - GLINT_WRITE_REG(((MAX_FIFO_ENTRIES - 2) << 16) | (0x15 << 4) | - 0x05, OutputFIFO); - MoveBYTE((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), - (unsigned char *)srcpbyte, MAX_FIFO_ENTRIES - 1); - count -= MAX_FIFO_ENTRIES - 1; - srcpbyte += MAX_FIFO_ENTRIES - 1; - } - if(count) { - GLINT_WAIT(count + 1); - /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */ - GLINT_WRITE_REG(((count - 1) << 16) | (0x15 << 4) | - 0x05, OutputFIFO); - MoveBYTE((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), - (unsigned char *)srcpbyte, count); - } - src += srcwidth; -#else - while(h--) { - count = dwords; - srcp = (CARD32*)src; - while(count >= MAX_FIFO_ENTRIES) { - GLINT_WAIT(MAX_FIFO_ENTRIES); - /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */ - GLINT_WRITE_REG(((MAX_FIFO_ENTRIES - 2) << 16) | (0x15 << 4) | - 0x05, OutputFIFO); - MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), - (CARD32*)srcp, MAX_FIFO_ENTRIES - 1); - count -= MAX_FIFO_ENTRIES - 1; - srcp += MAX_FIFO_ENTRIES - 1; - } - if(count) { - GLINT_WAIT(count + 1); - /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */ - GLINT_WRITE_REG(((count - 1) << 16) | (0x15 << 4) | - 0x05, OutputFIFO); - MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), - (CARD32*)srcp, count); - } - src += srcwidth; -#endif - } - } - - Permedia3DisableClipping(pScrn); - SET_SYNC_FLAG(infoRec); + TRACE_ENTER("Permedia3SubsequentImageWrite"); + GLINT_WAIT(4); + GLINT_WRITE_REG(((y&0x0fff)<<16)|((x+skipleft)&0x0fff), ScissorMinXY); + GLINT_WRITE_REG((((y+h)&0x0fff)<<16)|((x+w)&0x0fff), ScissorMaxXY); + GLINT_WRITE_REG( + PM3RectanglePosition_XOffset(x) | + PM3RectanglePosition_YOffset(y), + PM3RectanglePosition); + GLINT_WRITE_REG(pGlint->PM3_Render2D | + PM3Render2D_Width(w) | PM3Render2D_Height(h), + PM3Render2D); + TRACE_EXIT("Permedia3SubsequentImageWrite"); } -#endif - -static void -Permedia3WritePixmap32bpp( - ScrnInfoPtr pScrn, - int x, int y, int w, int h, - unsigned char *src, - int srcwidth, - int rop, - unsigned int planemask, - int transparency_color, - int bpp, int depth -) -{ - XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCRNINFOPTR(pScrn); - GLINTPtr pGlint = GLINTPTR(pScrn); - int skipleft, dwords, count; - CARD32* srcp; - Bool FastTexLoad; - - GLINT_WAIT(3); - DO_PLANEMASK(planemask); - GLINT_WRITE_REG(pGlint->RasterizerSwap,RasterizerMode); - if (rop == GXcopy) { - GLINT_WRITE_REG(pGlint->pprod, FBReadMode); - } else { - GLINT_WRITE_REG(pGlint->pprod | FBRM_DstEnable, FBReadMode); - } - - FastTexLoad = TRUE; - dwords = w; - if((rop != GXcopy) || (planemask != ~0)) - FastTexLoad = FALSE; - - if (!FastTexLoad) { - if((skipleft = (long)src & 0x03L)) { - skipleft /= (bpp>>3); - - x -= skipleft; - w += skipleft; - - src = (unsigned char*)((long)src & ~0x03L); - } - } - - if(FastTexLoad) { - int address; - - GLINT_WAIT(1); - GLINT_WRITE_REG(UNIT_DISABLE, FBWriteMode); - Permedia3Sync(pScrn); /* we are not using the rasterizer */ - while(h--) { - count = dwords; - address = (y * pScrn->displayWidth) + x; - srcp = (CARD32*)src; - GLINT_WRITE_REG(address, TextureDownloadOffset); - while(count >= MAX_FIFO_ENTRIES) { - GLINT_WAIT(MAX_FIFO_ENTRIES); - /* (0x11 << 4) | 0x0D is the TAG for TextureData */ - GLINT_WRITE_REG(((MAX_FIFO_ENTRIES - 2) << 16) | (0x11 << 4) | - 0x0D, OutputFIFO); - MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), - (CARD32*)srcp, MAX_FIFO_ENTRIES - 1); - count -= MAX_FIFO_ENTRIES - 1; - address += MAX_FIFO_ENTRIES - 1; - srcp += MAX_FIFO_ENTRIES - 1; - } - if(count) { - GLINT_WAIT(count + 1); - /* (0x11 << 4) | 0x0D is the TAG for TextureData */ - GLINT_WRITE_REG(((count - 1) << 16) | (0x11 << 4) | 0x0D, - OutputFIFO); - MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), - (CARD32*)srcp, count); - } - src += srcwidth; - y++; - } - GLINT_WAIT(1); - GLINT_WRITE_REG(UNIT_ENABLE, FBWriteMode); - } else { - Permedia3SetClippingRectangle(pScrn,x+skipleft,y,x+w,y+h); - - GLINT_WAIT(6); - Permedia3LoadCoord(pScrn, x, y, w, h); - GLINT_WRITE_REG(UNIT_DISABLE, ColorDDAMode); - LOADROP(rop); - GLINT_WRITE_REG(PrimitiveRectangle | XPositive | YPositive | - SyncOnHostData, Render); - - while(h--) { - count = dwords; - srcp = (CARD32*)src; - while(count >= MAX_FIFO_ENTRIES) { - GLINT_WAIT(MAX_FIFO_ENTRIES); - /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */ - GLINT_WRITE_REG(((MAX_FIFO_ENTRIES - 2) << 16) | (0x15 << 4) | - 0x05, OutputFIFO); - MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), - (CARD32*)srcp, MAX_FIFO_ENTRIES - 1); - count -= MAX_FIFO_ENTRIES - 1; - srcp += MAX_FIFO_ENTRIES - 1; - } - if(count) { - GLINT_WAIT(count + 1); - /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */ - GLINT_WRITE_REG(((count - 1) << 16) | (0x15 << 4) | - 0x05, OutputFIFO); - MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), - (CARD32*)srcp, count); - } - src += srcwidth; - } - } - - Permedia3DisableClipping(pScrn); - SET_SYNC_FLAG(infoRec); -} diff --git a/xc/programs/Xserver/hw/xfree86/drivers/glint/pm3_dac.c b/xc/programs/Xserver/hw/xfree86/drivers/glint/pm3_dac.c index 37ee0059f..467d9674f 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/glint/pm3_dac.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/glint/pm3_dac.c @@ -1,35 +1,31 @@ /* - * Copyright 1997,1998 by Alan Hourihane <alanh@fairlite.demon.co.uk> + * Copyright 2000 by Sven Luther <luther@dpt-info.u-strasbg.fr>. * * 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 Sven Luther 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. Sven Luther 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, + * SVEN LUTHER 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 SVEN LUTHER 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: Sven Luther, <luther@dpt-info.u-strasbg.fr> - * Thomas Witzel, <twitzel@nmr.mgh.harvard.edu> - * - * - * - * + * Thomas Witzel, <twitzel@nmr.mgh.harvard.edu> * * this work is sponsored by Appian Graphics. * */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/pm3_dac.c,v 1.6 2000/09/19 14:12:32 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/pm3_dac.c,v 1.8 2000/10/26 13:41:32 alanh Exp $ */ #include "xf86.h" #include "xf86_OSproc.h" @@ -54,43 +50,17 @@ # define TRACE(str) #endif -void -Permedia3PreInit(ScrnInfoPtr pScrn, GLINTPtr pGlint) -{ - TRACE_ENTER("Permedia3PreInit"); - if ((pGlint->PciInfo->subsysVendor == 0x1097) && - (pGlint->PciInfo->subsysCard == 0x3d32)) { - xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Appian Jeronimo 2000 board detected and initialized.\n\t" - "subsysVendor = 0x%04x, subsysCard = 0x%04x.\n", - pGlint->PciInfo->subsysVendor, pGlint->PciInfo->subsysCard); - /* Memory timings for the Appian J2000 board. - * This is needed for the second head which is left unitilialized - * by the bios, thus freezing the machine. - */ - GLINT_SLOW_WRITE_REG(0x02e311B8, PM3LocalMemCaps); - GLINT_SLOW_WRITE_REG(0x07424905, PM3LocalMemTimings); - GLINT_SLOW_WRITE_REG(0x0c000003, PM3LocalMemControl); - GLINT_SLOW_WRITE_REG(0x00000061, PM3LocalMemRefresh); - GLINT_SLOW_WRITE_REG(0x00000000, PM3LocalMemPowerDown); - } - else xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Unknown Glint Permedia3 board detected.\n\t" - "subsysVendor = 0x%04x, subsysCard = 0x%04x.\n", - pGlint->PciInfo->subsysVendor, pGlint->PciInfo->subsysCard); - TRACE_EXIT("Permedia3PreInit"); -} +int PM3QuickFillMemory(ScrnInfoPtr pScrn,int size); int PM3QuickFillMemory(ScrnInfoPtr pScrn,int size) { - GLINTPtr pGlint; + GLINTPtr pGlint = GLINTPTR (pScrn); unsigned int * p; unsigned int p_content; unsigned int i, j; long savemapsize; - pGlint = GLINTPTR (pScrn); savemapsize = pGlint->FbMapSize; pGlint->FbMapSize = size*1024*1024; @@ -214,6 +184,61 @@ PM3DAC_CalculateClock return(actualclock); } +void +Permedia3PreInit(ScrnInfoPtr pScrn) +{ + GLINTPtr pGlint = GLINTPTR(pScrn); + TRACE_ENTER("Permedia3PreInit"); + if ((pGlint->PciInfo->subsysVendor == 0x1097) && + (pGlint->PciInfo->subsysCard == 0x3d32)) { + unsigned char m,n,p; + unsigned long clockused; + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Appian Jeronimo 2000 board detected and initialized.\n\t" + "subsysVendor = 0x%04x, subsysCard = 0x%04x.\n", + pGlint->PciInfo->subsysVendor, pGlint->PciInfo->subsysCard); + + /* Memory timings for the Appian J2000 board. + * This is needed for the second head which is left unitilialized + * by the bios, thus freezing the machine. */ + GLINT_SLOW_WRITE_REG(0x02e311B8, PM3LocalMemCaps); + GLINT_SLOW_WRITE_REG(0x07424905, PM3LocalMemTimings); + GLINT_SLOW_WRITE_REG(0x0c000003, PM3LocalMemControl); + GLINT_SLOW_WRITE_REG(0x00000061, PM3LocalMemRefresh); + GLINT_SLOW_WRITE_REG(0x00000000, PM3LocalMemPowerDown); + + /* Let's program the K, M and S Clocks to the same values as the bios + * does for first head : + * - KClk and MClk are 105Mhz. + * - S Clock is set to PClk. + * Note 1 : pGlint->RefClock is not set yet, so use 14318 instead. + * Note 2 : KClk gets internally halved, so we need to double it. + */ + clockused = PM3DAC_CalculateClock(2*105000, 14318, &m,&n,&p); + Permedia2vOutIndReg(pScrn, PM3RD_KClkPreScale, 0x00, m); + Permedia2vOutIndReg(pScrn, PM3RD_KClkFeedbackScale, 0x00, n); + Permedia2vOutIndReg(pScrn, PM3RD_KClkPostScale, 0x00, p); + Permedia2vOutIndReg(pScrn, PM3RD_KClkControl, 0x00, + PM3RD_KClkControl_STATE_RUN | + PM3RD_KClkControl_SOURCE_PLL | + PM3RD_KClkControl_ENABLE); + Permedia2vOutIndReg(pScrn, PM3RD_MClkControl, 0x00, + PM3RD_MClkControl_STATE_RUN | + PM3RD_MClkControl_SOURCE_KCLK | + PM3RD_MClkControl_ENABLE); + Permedia2vOutIndReg(pScrn, PM3RD_SClkControl, 0x00, + PM3RD_SClkControl_STATE_RUN | + PM3RD_SClkControl_SOURCE_PCLK | + PM3RD_SClkControl_ENABLE); + } + else xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Unknown Glint Permedia3 board detected.\n\t" + "subsysVendor = 0x%04x, subsysCard = 0x%04x.\n\t" + "Let's hope that it is correctly initialized by the bios.\n", + pGlint->PciInfo->subsysVendor, pGlint->PciInfo->subsysCard); + TRACE_EXIT("Permedia3PreInit"); +} + Bool Permedia3Init(ScrnInfoPtr pScrn, DisplayModePtr mode) { @@ -221,19 +246,6 @@ Permedia3Init(ScrnInfoPtr pScrn, DisplayModePtr mode) GLINTRegPtr pReg = &pGlint->ModeReg; CARD32 temp1, temp2, temp3, temp4; - /* Memory timings for the Appian J2000 board - * This is not ideal, since the work here is duplicated - * in the Permedia3PreInit function :((( - */ - if ((pGlint->PciInfo->subsysVendor == 0x1097) && - (pGlint->PciInfo->subsysCard == 0x3d32)) { - pReg->glintRegs[PM3LocalMemCaps >> 3] = 0x02e311B8; - pReg->glintRegs[PM3LocalMemTimings >> 3] = 0x07424905; - pReg->glintRegs[PM3LocalMemControl >> 3] = 0x0c000003; - pReg->glintRegs[PM3LocalMemRefresh >> 3] = 0x00000061; - } - - pReg->glintRegs[PM3LocalMemPowerDown >> 3] = 0x00000000; pReg->glintRegs[PM3MemBypassWriteMask >> 3] = 0xffffffff; pReg->glintRegs[PM3ByAperture1Mode >> 3] = 0x00000000; pReg->glintRegs[PM3ByAperture2Mode >> 3] = 0x00000000; @@ -316,25 +328,6 @@ Permedia3Init(ScrnInfoPtr pScrn, DisplayModePtr mode) unsigned char m,n,p; unsigned long clockused; - /* Let's program the KClk to 100Mhz and set the S & M Clk too. */ -/* clockused = PM3DAC_CalculateClock(100000, - pGlint->RefClock, &m,&n,&p); - pReg->DacRegs[PM3RD_KClkPreScale] = m; - pReg->DacRegs[PM3RD_KClkFeedbackScale] = n; - pReg->DacRegs[PM3RD_KClkPostScale] = p; - pReg->DacRegs[PM3RD_KClkControl] = - PM3RD_KClkControl_STATE_RUN | - PM3RD_KClkControl_SOURCE_PLL | - PM3RD_KClkControl_ENABLE; - pReg->DacRegs[PM3RD_MClkControl] = - PM3RD_MClkControl_STATE_RUN | - PM3RD_MClkControl_SOURCE_KCLK | - PM3RD_MClkControl_ENABLE; - pReg->DacRegs[PM3RD_SClkControl] = - PM3RD_SClkControl_STATE_RUN | - PM3RD_SClkControl_SOURCE_HALF_KCLK | - PM3RD_SClkControl_ENABLE; -*/ /* Let's program the dot clock */ clockused = PM3DAC_CalculateClock(mode->Clock, pGlint->RefClock, &m,&n,&p); @@ -356,6 +349,13 @@ Permedia3Init(ScrnInfoPtr pScrn, DisplayModePtr mode) if (!(mode->Flags & V_PVSYNC)) pReg->DacRegs[PM2VDACRDSyncControl] |= 0x08; /* invert vsync */ +#if 0 /* Currently commented out while testing Flat Panel support */ + pReg->DacRegs[PM2VDACRDDACControl] = 0x01; + pReg->DacRegs[PM2VDACRDSyncControl] |= 0x40; + pReg->glintRegs[VSConfiguration >> 3] = (GLINT_READ_REG(VSConfiguration) & 0xFFFFFFF8) | 0x06; + pReg->glintRegs[VSBBase >> 3] = 1<<14; +#endif + switch (pScrn->bitsPerPixel) { case 8: @@ -395,16 +395,6 @@ Permedia3Save(ScrnInfoPtr pScrn, GLINTRegPtr glintReg) /* Permedia 3 memory Timings */ glintReg->glintRegs[PM3MemBypassWriteMask >> 3] = GLINT_READ_REG(PM3MemBypassWriteMask); - glintReg->glintRegs[PM3LocalMemCaps >> 3] = - GLINT_READ_REG(PM3LocalMemCaps); - glintReg->glintRegs[PM3LocalMemTimings >> 3] = - GLINT_READ_REG(PM3LocalMemTimings); - glintReg->glintRegs[PM3LocalMemControl >> 3] = - GLINT_READ_REG(PM3LocalMemControl); - glintReg->glintRegs[PM3LocalMemRefresh >> 3] = - GLINT_READ_REG(PM3LocalMemRefresh); - glintReg->glintRegs[PM3LocalMemPowerDown >> 3] = - GLINT_READ_REG(PM3LocalMemPowerDown); glintReg->glintRegs[PM3ByAperture1Mode >> 3] = GLINT_READ_REG(PM3ByAperture1Mode); glintReg->glintRegs[PM3ByAperture2Mode >> 3] = @@ -429,6 +419,10 @@ Permedia3Save(ScrnInfoPtr pScrn, GLINTRegPtr glintReg) glintReg->glintRegs[PMScreenBase >> 3] = GLINT_READ_REG(PMScreenBase); glintReg->glintRegs[PMVideoControl >> 3] = GLINT_READ_REG(PMVideoControl); glintReg->glintRegs[VClkCtl >> 3] = GLINT_READ_REG(VClkCtl); +#if 0 /* Currently commented out while testing Flat Panel support */ + glintReg->glintRegs[VSConfiguration >> 3] = GLINT_READ_REG(VSConfiguration); + glintReg->glintRegs[VSBBase >> 3] = GLINT_READ_REG(VSBBase); +#endif for (i=0;i<768;i++) { Permedia2ReadAddress(pScrn, i); @@ -453,20 +447,6 @@ Permedia3Save(ScrnInfoPtr pScrn, GLINTRegPtr glintReg) glintReg->DacRegs[PM2VDACRDDClk0PreScale] = Permedia2vInIndReg(pScrn, PM2VDACRDDClk0PreScale); glintReg->DacRegs[PM2VDACRDDClk0FeedbackScale] = Permedia2vInIndReg(pScrn, PM2VDACRDDClk0FeedbackScale); glintReg->DacRegs[PM2VDACRDDClk0PostScale] = Permedia2vInIndReg(pScrn, PM2VDACRDDClk0PostScale); - /* save KClk, MClk and SClk settings */ - /* glintReg->DacRegs[PM3RD_KClkControl] = - Permedia2vInIndReg(pScrn,PM3RD_KClkControl); - glintReg->DacRegs[PM3RD_MClkControl] = - Permedia2vInIndReg(pScrn,PM3RD_MClkControl); - glintReg->DacRegs[PM3RD_SClkControl] = - Permedia2vInIndReg(pScrn,PM3RD_SClkControl); - glintReg->DacRegs[PM3RD_KClkPreScale] = - Permedia2vInIndReg(pScrn,PM3RD_KClkPreScale); - glintReg->DacRegs[PM3RD_KClkFeedbackScale] = - Permedia2vInIndReg(pScrn,PM3RD_KClkFeedbackScale); - glintReg->DacRegs[PM3RD_KClkPostScale] = - Permedia2vInIndReg(pScrn,PM3RD_KClkPostScale); -*/ } void @@ -486,16 +466,6 @@ Permedia3Restore(ScrnInfoPtr pScrn, GLINTRegPtr glintReg) /* Permedia 3 memory Timings */ GLINT_SLOW_WRITE_REG(glintReg->glintRegs[PM3MemBypassWriteMask >> 3], PM3MemBypassWriteMask); - GLINT_SLOW_WRITE_REG(glintReg->glintRegs[PM3LocalMemCaps >> 3], - PM3LocalMemCaps); - GLINT_SLOW_WRITE_REG(glintReg->glintRegs[PM3LocalMemTimings >> 3], - PM3LocalMemTimings); - GLINT_SLOW_WRITE_REG(glintReg->glintRegs[PM3LocalMemControl >> 3], - PM3LocalMemControl); - GLINT_SLOW_WRITE_REG(glintReg->glintRegs[PM3LocalMemRefresh >> 3], - PM3LocalMemRefresh); - GLINT_SLOW_WRITE_REG(glintReg->glintRegs[PM3LocalMemPowerDown >> 3], - PM3LocalMemPowerDown); GLINT_SLOW_WRITE_REG(glintReg->glintRegs[PM3ByAperture1Mode >> 3], PM3ByAperture1Mode); GLINT_SLOW_WRITE_REG(glintReg->glintRegs[PM3ByAperture2Mode >> 3], @@ -521,6 +491,10 @@ Permedia3Restore(ScrnInfoPtr pScrn, GLINTRegPtr glintReg) GLINT_SLOW_WRITE_REG(glintReg->glintRegs[PMVbEnd >> 3], PMVbEnd); GLINT_SLOW_WRITE_REG(glintReg->glintRegs[PMVsStart >> 3], PMVsStart); GLINT_SLOW_WRITE_REG(glintReg->glintRegs[PMVsEnd >> 3], PMVsEnd); +#if 0 /* Currently commented out while testing Flat Panel support */ + GLINT_SLOW_WRITE_REG(glintReg->glintRegs[VSConfiguration >> 3], VSConfiguration); + GLINT_SLOW_WRITE_REG(glintReg->glintRegs[VSBBase >> 3], VSBBase); +#endif Permedia2vOutIndReg(pScrn, PM2VDACRDIndexControl, 0x00, glintReg->DacRegs[PM2VDACRDIndexControl]); @@ -550,19 +524,4 @@ Permedia3Restore(ScrnInfoPtr pScrn, GLINTRegPtr glintReg) Permedia2vOutIndReg(pScrn, PM2VDACRDDClk0PostScale, 0x00, glintReg->DacRegs[PM2VDACRDDClk0PostScale]); Permedia2vOutIndReg(pScrn, PM2VDACIndexClockControl, 0x00, temp|0x03); - /* retsore the KClk, MClk and SClk settings */ - /* Permedia2vOutIndReg(pScrn, PM3RD_KClkPreScale, 0x00, - glintReg->DacRegs[PM3RD_KClkPreScale]); - Permedia2vOutIndReg(pScrn, PM3RD_KClkFeedbackScale, 0x00, - glintReg->DacRegs[PM3RD_KClkFeedbackScale]); - Permedia2vOutIndReg(pScrn, PM3RD_KClkPostScale, 0x00, - glintReg->DacRegs[PM3RD_KClkPostScale]); - Permedia2vOutIndReg(pScrn, PM3RD_KClkControl, 0x00, - glintReg->DacRegs[PM3RD_KClkControl]); - */ /* Should we wait for KClk to be locked here ? */ - /* Permedia2vOutIndReg(pScrn, PM3RD_MClkControl, 0x00, - glintReg->DacRegs[PM3RD_MClkControl]); - Permedia2vOutIndReg(pScrn, PM3RD_SClkControl, 0x00, - glintReg->DacRegs[PM3RD_SClkControl]); -*/ } diff --git a/xc/programs/Xserver/hw/xfree86/drivers/glint/pm3_regs.h b/xc/programs/Xserver/hw/xfree86/drivers/glint/pm3_regs.h index 677227a1f..ed455edd9 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/glint/pm3_regs.h +++ b/xc/programs/Xserver/hw/xfree86/drivers/glint/pm3_regs.h @@ -1,4 +1,4 @@ -/* $XFree86: $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/pm3_regs.h,v 1.3 2000/10/17 09:07:05 alanh Exp $ */ /* * glint register file @@ -435,7 +435,8 @@ #define PM3AntialiasMode 0x8808 #define PM3AntialiasModeAnd 0xac00 #define PM3AntialiasModeOr 0xac08 - +/* ... */ +#define PM3BackgroundColor 0xb0c8 /* ... */ #define PM3ColorDDAMode 0x87e0 #define PM3ColorDDAModeAnd 0xabe0 @@ -470,6 +471,17 @@ #define PM3dXSub 0x8018 #define PM3dY 0x8028 /* ... */ +#define PM3FBBlockColor 0x8ac8 +#define PM3FBBlockColor0 0xb060 +#define PM3FBBlockColor1 0xb068 +#define PM3FBBlockColor2 0xb070 +#define PM3FBBlockColor3 0xb078 +#define PM3FBBlockColorBack 0xb0a0 +#define PM3FBBlockColorBack0 0xb080 +#define PM3FBBlockColorBack1 0xb088 +#define PM3FBBlockColorBack2 0xb090 +#define PM3FBBlockColorBack3 0xb098 +#define PM3FBColor 0x8a98 #define PM3FBDestReadBufferAddr0 0xae80 #define PM3FBDestReadBufferAddr1 0xae88 #define PM3FBDestReadBufferAddr2 0xae90 @@ -534,6 +546,7 @@ #define PM3FBHardwareWriteMask 0x8ac0 #define PM3FBSoftwareWriteMask 0x8820 +#define PM3FBData 0x8aa0 #define PM3FBSourceData 0x8aa8 #define PM3FBSourceReadBufferAddr 0xaf08 #define PM3FBSourceReadBufferOffset 0xaf10 @@ -660,6 +673,11 @@ #define PM3LBWriteMode_Packed16 1<<11 #define PM3LBWriteMode_Width(w) (((w)&0xfff)<<12) /* ... */ +#define PM3LineStippleMode 0x81a8 +#define PM3LineStippleModeAnd 0xabc0 +#define PM3LineStippleModeOr 0xabc8 +#define PM3LoadLineStippleCounters 0x81b0 +/* ... */ #define PM3LogicalOpMode 0x8828 #define PM3LogicalOpModeAnd 0xace0 #define PM3LogicalOpModeOr 0xace8 @@ -880,7 +898,7 @@ #define PM3Render2D_Width(w) ((w)&0x0fff) #define PM3Render2D_Operation_Normal 0<<12 #define PM3Render2D_Operation_SyncOnHostData 1<<12 - #define PM3Render2D_Operation_SyncOnbitMask 2<<12 + #define PM3Render2D_Operation_SyncOnBitMask 2<<12 #define PM3Render2D_Operation_PatchOrderRendering 3<<12 #define PM3Render2D_FBSourceReadEnable 1<<14 #define PM3Render2D_SpanOperation 1<<15 diff --git a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810.h b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810.h index a9d77a2a7..528344b8f 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810.h +++ b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810.h @@ -25,7 +25,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810.h,v 1.16 2000/09/17 01:36:27 mvojkovi Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810.h,v 1.18 2000/10/24 22:45:06 dawes Exp $ */ /* * Authors: @@ -166,8 +166,8 @@ typedef struct _I810Rec { int DGAViewportStatus; int Chipset; - int LinearAddr; - int MMIOAddr; + unsigned long LinearAddr; + unsigned long MMIOAddr; EntityInfoPtr pEnt; pciVideoPtr PciInfo; PCITAG PciTag; @@ -311,6 +311,14 @@ extern void I810InitVideo(ScreenPtr pScreen); OUTREG(LP_RING + RING_TAIL, outring); \ } +#ifdef __GNUC__ +#define LP_RING_MESSAGE(n) \ + ErrorF("BEGIN_LP_RING %d in %s\n", n, __FUNCTION__) +#else +#define LP_RING_MESSAGE(n) \ + ErrorF("BEGIN_LP_RING %d in %s:%d\n", n, __FILE__, __LINE__) +#endif + #define BEGIN_LP_RING(n) \ unsigned int outring, ringmask; \ volatile unsigned char *virt; \ @@ -318,7 +326,7 @@ extern void I810InitVideo(ScreenPtr pScreen); if (pI810->LpRing.space < n*4) I810WaitLpRing( pScrn, n*4, 0); \ pI810->LpRing.space -= n*4; \ if (I810_DEBUG & DEBUG_VERBOSE_RING) \ - ErrorF( "BEGIN_LP_RING %d in %s\n", n, __FUNCTION__); \ + LP_RING_MESSAGE(n); \ outring = pI810->LpRing.tail; \ ringmask = pI810->LpRing.tail_mask; \ virt = pI810->LpRing.virtual_start; diff --git a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c index 2e97a3c26..ccc01e0d0 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c,v 1.11 2000/09/17 01:36:27 mvojkovi Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c,v 1.12 2000/09/24 13:51:26 alanh Exp $ */ #include "xf86.h" #include "xf86_OSproc.h" diff --git a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c index 2e55a7849..7997567c5 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c @@ -25,7 +25,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c,v 1.32 2000/09/19 12:46:16 eich Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c,v 1.34 2000/09/26 15:57:11 tsi Exp $ */ /* * Authors: @@ -359,7 +359,7 @@ static Bool I810Probe(DriverPtr drv, int flags) { int i, numUsed, numDevSections, *usedChips; GDevPtr *devSections; - Bool foundScreen = 0; + Bool foundScreen = FALSE; /* Find the config file Device sections that match this @@ -381,9 +381,10 @@ I810Probe(DriverPtr drv, int flags) { devSections, numDevSections, drv, &usedChips); - if (flags & PROBE_DETECT) - foundScreen = TRUE; - else + if (flags & PROBE_DETECT) { + if (numUsed > 0) + foundScreen = TRUE; + } else for (i=0; i<numUsed; i++) { ScrnInfoPtr pScrn = NULL; /* Allocate new ScrnInfoRec and claim the slot */ @@ -1645,7 +1646,7 @@ I810ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) { if (!I810MapMem(pScrn)) return FALSE; - pScrn->memPhysBase = (int)pI810->FbBase; + pScrn->memPhysBase = (unsigned long)pI810->FbBase; pScrn->fbOffset = 0; vgaHWSetMmioFuncs(hwp, pI810->MMIOBase, 0); diff --git a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_memory.c b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_memory.c index 42893411d..e37ade8b5 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_memory.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_memory.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_memory.c,v 1.15 2000/08/28 18:12:55 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_memory.c,v 1.16 2000/09/24 13:51:26 alanh Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. diff --git a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_reg.h b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_reg.h index 450f88570..ae665af09 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_reg.h +++ b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_reg.h @@ -25,6 +25,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_reg.h,v 1.4 2000/09/26 15:57:12 tsi Exp $ */ /* * Authors: diff --git a/xc/programs/Xserver/hw/xfree86/drivers/imstt/Imakefile b/xc/programs/Xserver/hw/xfree86/drivers/imstt/Imakefile index 14eab93ed..a2f771acb 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/imstt/Imakefile +++ b/xc/programs/Xserver/hw/xfree86/drivers/imstt/Imakefile @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/drivers/imstt/Imakefile,v 1.2 2000/06/14 01:56:08 dawes Exp $ +XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/drivers/imstt/Imakefile,v 1.3 2000/10/11 16:21:21 mvojkovi Exp $ /* * * Copyright 2000 Ani Joshi <ajoshi@unixbox.com> @@ -22,7 +22,7 @@ INCLUDES = -I. -I$(XF86COMSRC) -I$(XF86OSSRC) \ -I$(XF86SRC)/xf24_32bpp -I$(SERVERSRC)/Xext \ -I$(XF86SRC)/vgahw -I$(XF86SRC)/ramdac \ -I$(XF86SRC)/rac -I$(XF86SRC)/int10 \ - -I$(XF86SRC)/fbdevhw \ + -I$(XF86SRC)/fbdevhw -I$(SERVERSRC)/render \ -I$(SERVERSRC)/include -I$(XINCLUDESRC) -I$(FONTINCSRC) \ -I$(EXTINCSRC) #endif diff --git a/xc/programs/Xserver/hw/xfree86/drivers/mga/Imakefile b/xc/programs/Xserver/hw/xfree86/drivers/mga/Imakefile index abfc49e87..2af10824a 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/mga/Imakefile +++ b/xc/programs/Xserver/hw/xfree86/drivers/mga/Imakefile @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/Imakefile,v 1.35 2000/09/20 00:09:22 keithp Exp $ +XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/Imakefile,v 1.37 2000/10/09 23:12:45 alanh Exp $ XCOMM XCOMM This is an Imakefile for the MGA driver. XCOMM @@ -15,7 +15,7 @@ SUBDIRS=hallib DRISRCS = mga_dri.c mga_warp.c mga_wrap.c DRIOBJS = mga_dri.o mga_warp.o mga_wrap.o DRIINCLUDES = -I$(SERVERSRC)/GL/dri -I$(LIBSRC)/GL/dri \ - -I$(XF86OSSRC)/linux/drm/kernel -I$(TOP)/include + -I$(TOP)/include DRIDEFINES = $(GLX_DEFINES) #endif diff --git a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga.h b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga.h index 26da1dead..95b44d32c 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga.h +++ b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga.h,v 1.61 2000/08/21 00:36:37 mvojkovi Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga.h,v 1.65 2000/10/24 22:45:06 dawes Exp $ */ /* * MGA Millennium (MGA2064W) functions * @@ -187,11 +187,11 @@ typedef struct { int YDstOrg; int DstOrg; int SrcOrg; - CARD32 IOAddress; - CARD32 FbAddress; - CARD32 ILOADAddress; + unsigned long IOAddress; + unsigned long FbAddress; + unsigned long ILOADAddress; int FbBaseReg; - CARD32 BiosAddress; + unsigned long BiosAddress; MessageType BiosFrom; unsigned char * IOBase; unsigned char * IOBaseDense; @@ -296,7 +296,10 @@ typedef struct { int allowedWidth; void (*VideoTimerCallback)(ScrnInfoPtr, Time); void (*PaletteLoadCallback)(ScrnInfoPtr); + void (*RenderCallback)(ScrnInfoPtr); + Time RenderTime; MGAPaletteInfo palinfo[256]; /* G400 hardware bug workaround */ + FBLinearPtr LinearScratch; } MGARec, *MGAPtr; #ifdef XF86DRI @@ -361,6 +364,7 @@ Bool MGADRIScreenInit(ScreenPtr pScreen); void MGADRICloseScreen(ScreenPtr pScreen); Bool MGADRIFinishScreenInit(ScreenPtr pScreen); void MGASwapContext(ScreenPtr pScreen); +void MGASwapContext_shared(ScreenPtr pScreen); Bool mgaConfigureWarp(ScrnInfoPtr pScrn); unsigned int mgaInstallMicrocode(ScreenPtr pScreen, int agp_offset); unsigned int mgaGetMicrocodeSize(ScreenPtr pScreen); diff --git a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dac3026.c b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dac3026.c index 651acbf50..5ec08696f 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dac3026.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dac3026.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dac3026.c,v 1.52 2000/01/21 01:12:20 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dac3026.c,v 1.54 2000/10/24 22:45:07 dawes Exp $ */ /* * Copyright 1994 by Robin Cutshaw <robin@XFree86.org> * @@ -269,6 +269,7 @@ MGATi3026CalcClock ( return f_pll; } +#ifndef USEMGAHAL /* * MGATi3026SetMCLK - Set the memory clock (MCLK) PLL. * @@ -352,6 +353,7 @@ MGATi3026SetMCLK( ScrnInfoPtr pScrn, long f_out ) ; } } +#endif /* * MGATi3026SetPCLK - Set the pixel (PCLK) and loop (LCLK) clocks. @@ -503,7 +505,9 @@ MGA3026Init(ScrnInfoPtr pScrn, DisplayModePtr mode) int i, BppShift, index_1d = 0; const unsigned char* initDAC; MGAPtr pMga = MGAPTR(pScrn); +#ifndef USEMGAHAL MGARamdacPtr MGAdac = &pMga->Dac; +#endif MGAFBLayout *pLayout = &pMga->CurrentLayout; MGARegPtr pReg = &pMga->ModeReg; vgaRegPtr pVga = &VGAHWPTR(pScrn)->ModeReg; @@ -716,15 +720,8 @@ MGA3026Init(ScrnInfoPtr pScrn, DisplayModePtr mode) but that's no big deal since we will Restore right after this function */ -/*******************/ -/* ADDED BY MATROX */ -/*******************/ #ifndef USEMGAHAL MGATi3026SetMCLK( pScrn, MGAdac->MemoryClock ); -/*******************/ -/* ADDED BY MATROX */ -/*******************/ - #endif #ifdef DEBUG @@ -763,9 +760,6 @@ MGA3026Restore(ScrnInfoPtr pScrn, vgaRegPtr vgaReg, MGARegPtr mgaReg, pciSetBitsLong(pMga->PciTag, PCI_OPTION_REG, OPTION_MASK, mgaReg->Option); -/*******************/ -/* ADDED BY MATROX */ -/*******************/ #ifndef USEMGAHAL /* select pixel clock PLL as clock source */ outTi3026(TVP3026_CLK_SEL, 0, mgaReg->DacRegs[3]); @@ -774,10 +768,7 @@ MGA3026Restore(ScrnInfoPtr pScrn, vgaRegPtr vgaReg, MGARegPtr mgaReg, outTi3026(TVP3026_PLL_ADDR, 0, 0x2A); outTi3026(TVP3026_LOAD_CLK_DATA, 0, 0); outTi3026(TVP3026_PIX_CLK_DATA, 0, 0); -/*******************/ -/* ADDED BY MATROX */ -/*******************/ -#endif +#endif /* * This function handles restoring the generic VGA registers. @@ -791,9 +782,6 @@ MGA3026Restore(ScrnInfoPtr pScrn, vgaRegPtr vgaReg, MGARegPtr mgaReg, * goes here. */ -/*******************/ -/* ADDED BY MATROX */ -/*******************/ #ifndef USEMGAHAL /* program pixel clock PLL */ outTi3026(TVP3026_PLL_ADDR, 0, 0x00); @@ -808,31 +796,20 @@ MGA3026Restore(ScrnInfoPtr pScrn, vgaRegPtr vgaReg, MGARegPtr mgaReg, /* set Q divider for loop clock PLL */ outTi3026(TVP3026_MCLK_CTL, 0, mgaReg->DacRegs[18]); - -/*******************/ -/* ADDED BY MATROX */ -/*******************/ -#endif +#endif /* program loop PLL */ outTi3026(TVP3026_PLL_ADDR, 0, 0x00); for (i = 3; i < 6; i++) outTi3026(TVP3026_LOAD_CLK_DATA, 0, mgaReg->DacClk[i]); -/*******************/ -/* ADDED BY MATROX */ -/*******************/ #ifndef USEMGAHAL if ((vgaReg->MiscOutReg & 0x08) && ((mgaReg->DacClk[3] & 0xC0) == 0xC0) ) { /* poll until loop PLL LOCK bit is set */ outTi3026(TVP3026_PLL_ADDR, 0, 0x3F); while ( ! (inTi3026(TVP3026_LOAD_CLK_DATA) & 0x40) ); } - -/*******************/ -/* ADDED BY MATROX */ -/*******************/ -#endif +#endif /* * restore other DAC registers @@ -885,9 +862,6 @@ MGA3026Save(ScrnInfoPtr pScrn, vgaRegPtr vgaReg, MGARegPtr mgaReg, mgaReg->ExtVga[i] = INREG8(0x1FDF); } -/*******************/ -/* ADDED BY MATROX */ -/*******************/ #ifndef USEMGAHAL outTi3026(TVP3026_PLL_ADDR, 0, 0x00); for (i = 0; i < 3; i++) @@ -898,11 +872,7 @@ MGA3026Save(ScrnInfoPtr pScrn, vgaRegPtr vgaReg, MGARegPtr mgaReg, for (i = 3; i < 6; i++) outTi3026(TVP3026_LOAD_CLK_DATA, 0, mgaReg->DacClk[i] = inTi3026(TVP3026_LOAD_CLK_DATA)); - -/*******************/ -/* ADDED BY MATROX */ -/*******************/ -#endif +#endif for (i = 0; i < DACREGSIZE; i++) mgaReg->DacRegs[i] = inTi3026(MGADACregs[i]); diff --git a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dacG.c b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dacG.c index 091dd3edb..620b2c7d0 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dacG.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dacG.c @@ -2,7 +2,7 @@ * MGA-1064, MGA-G100, MGA-G200, MGA-G400 RAMDAC driver */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dacG.c,v 1.37 2000/08/21 00:36:37 mvojkovi Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dacG.c,v 1.40 2000/10/24 22:45:07 dawes Exp $ */ /* * This is a first cut at a non-accelerated version to work with the @@ -82,11 +82,6 @@ static Bool MGAGInit(ScrnInfoPtr, DisplayModePtr); static void MGAGLoadPalette(ScrnInfoPtr, int, int*, LOCO*, VisualPtr); static Bool MGAG_i2cInit(ScrnInfoPtr pScrn); - -/*******************/ -/* ADDED BY MATROX */ -/*******************/ -/* We don't need anymore: MGAGCalcClock and MGAGSetPCLK function */ #ifndef USEMGAHAL /* * MGAGCalcClock - Calculate the PLL settings (m, n, p, s). @@ -150,6 +145,7 @@ MGAGCalcClock ( ScrnInfoPtr pScrn, long f_out, post_div_max = 7; break; case PCI_CHIP_MGAG100: + case PCI_CHIP_MGAG100_PCI: case PCI_CHIP_MGAG200: case PCI_CHIP_MGAG200_PCI: default: @@ -226,7 +222,6 @@ MGAGCalcClock ( ScrnInfoPtr pScrn, long f_out, return f_pll; } - /* * MGAGSetPCLK - Set the pixel (PCLK) clock. */ @@ -250,9 +245,6 @@ MGAGSetPCLK( ScrnInfoPtr pScrn, long f_out ) pReg->DacRegs[ MGA1064_PIX_PLLC_N ] = n & 0x7F; pReg->DacRegs[ MGA1064_PIX_PLLC_P ] = (p & 0x07) | ((s & 0x03) << 3); } -/*******************/ -/* ADDED BY MATROX */ -/*******************/ #endif /* @@ -261,6 +253,7 @@ MGAGSetPCLK( ScrnInfoPtr pScrn, long f_out ) static Bool MGAGInit(ScrnInfoPtr pScrn, DisplayModePtr mode) { +#ifndef USEMGAHAL /* * initial values of the DAC registers */ @@ -277,13 +270,14 @@ MGAGInit(ScrnInfoPtr pScrn, DisplayModePtr mode) /* 0x48: */ 0, 0, 0, 0, 0, 0, 0, 0 }; + int i, weight555 = FALSE; +#endif int hd, hs, he, ht, vd, vs, ve, vt, wd; - int i, BppShift; + int BppShift; MGAPtr pMga; MGARegPtr pReg; vgaRegPtr pVga; MGAFBLayout *pLayout; - int weight555 = FALSE; pMga = MGAPTR(pScrn); pReg = &pMga->ModeReg; @@ -292,9 +286,6 @@ MGAGInit(ScrnInfoPtr pScrn, DisplayModePtr mode) BppShift = pMga->BppShifts[(pLayout->bitsPerPixel >> 3) - 1]; -/*******************/ -/* ADDED BY MATROX */ -/*******************/ #ifndef USEMGAHAL /* Allocate the DacRegs space if not done already */ if (pReg->DacRegs == NULL) { @@ -436,9 +427,6 @@ MGAGInit(ScrnInfoPtr pScrn, DisplayModePtr mode) default: FatalError("MGA: unsupported depth\n"); } -/*******************/ -/* ADDED BY MATROX */ -/*******************/ #endif /* @@ -520,29 +508,17 @@ MGAGInit(ScrnInfoPtr pScrn, DisplayModePtr mode) pVga->CRTC[21] = vd & 0xFF; pVga->CRTC[22] = (vt + 1) & 0xFF; -/*******************/ -/* ADDED BY MATROX */ -/*******************/ #ifndef USEMGAHAL pReg->DacRegs[ MGA1064_CURSOR_BASE_ADR_LOW ] = pMga->FbCursorOffset >> 10; pReg->DacRegs[ MGA1064_CURSOR_BASE_ADR_HI ] = pMga->FbCursorOffset >> 18; -/*******************/ -/* ADDED BY MATROX */ -/*******************/ #endif if (pMga->SyncOnGreen) { -/*******************/ -/* ADDED BY MATROX */ -/*******************/ #ifndef USEMGAHAL pReg->DacRegs[ MGA1064_GEN_CTL ] &= ~0x20; -/*******************/ -/* ADDED BY MATROX */ -/*******************/ -#endif +#endif pReg->ExtVga[3] |= 0x40; } @@ -552,16 +528,8 @@ MGAGInit(ScrnInfoPtr pScrn, DisplayModePtr mode) #ifndef USEMGAHAL if (mode->Flags & V_DBLSCAN) pVga->CRTC[9] |= 0x80; -#endif -/*******************/ -/* ADDED BY MATROX */ -/*******************/ -#ifndef USEMGAHAL MGAGSetPCLK( pScrn, mode->Clock ); -/*******************/ -/* ADDED BY MATROX */ -/*******************/ #endif /* This disables the VGA memory aperture */ @@ -670,13 +638,10 @@ MGAGRestore(ScrnInfoPtr pScrn, vgaRegPtr vgaReg, MGARegPtr mgaReg, Bool restoreFonts) { int i; - CARD32 optionMask; MGAPtr pMga = MGAPTR(pScrn); - -/*******************/ -/* ADDED BY MATROX */ -/*******************/ #ifndef USEMGAHAL + CARD32 optionMask; + /* * Code is needed to get things back to bank zero. */ @@ -710,10 +675,6 @@ MGAGRestore(ScrnInfoPtr pScrn, vgaRegPtr vgaReg, MGARegPtr mgaReg, if (pMga->Chipset == PCI_CHIP_MGAG400) pciSetBitsLong(pMga->PciTag, PCI_MGA_OPTION3, OPTION3_MASK, mgaReg->Option3); - -/*******************/ -/* ADDED BY MATROX */ -/*******************/ #endif /* restore CRTCEXT regs */ for (i = 0; i < 6; i++) @@ -763,18 +724,11 @@ MGAGSave(ScrnInfoPtr pScrn, vgaRegPtr vgaReg, MGARegPtr mgaReg, MGAPtr pMga = MGAPTR(pScrn); if(pMga->SecondCrtc == TRUE) return; - -/*******************/ -/* ADDED BY MATROX */ -/*******************/ #ifndef USEMGAHAL /* Allocate the DacRegs space if not done already */ if (mgaReg->DacRegs == NULL) { mgaReg->DacRegs = xnfcalloc(DACREGSIZE, 1); } -/*******************/ -/* ADDED BY MATROX */ -/*******************/ #endif /* @@ -789,9 +743,6 @@ MGAGSave(ScrnInfoPtr pScrn, vgaRegPtr vgaReg, MGARegPtr mgaReg, vgaHWSave(pScrn, vgaReg, VGA_SR_MODE | (saveFonts ? VGA_SR_FONTS : 0)); MGAGSavePalette(pScrn, vgaReg->DAC); -/*******************/ -/* ADDED BY MATROX */ -/*******************/ #ifndef USEMGAHAL /* * The port I/O code necessary to read in the extended registers. @@ -804,9 +755,6 @@ MGAGSave(ScrnInfoPtr pScrn, vgaRegPtr vgaReg, MGARegPtr mgaReg, mgaReg->Option2 = pciReadLong(pMga->PciTag, PCI_MGA_OPTION2); if (pMga->Chipset == PCI_CHIP_MGAG400) mgaReg->Option3 = pciReadLong(pMga->PciTag, PCI_MGA_OPTION3); -/*******************/ -/* ADDED BY MATROX */ -/*******************/ #endif for (i = 0; i < 6; i++) diff --git a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c index 41b82801c..79aa84eac 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c,v 1.5 2000/06/23 23:43:44 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c,v 1.9 2000/10/24 22:45:07 dawes Exp $ */ #include "xf86.h" #include "xf86_OSproc.h" @@ -391,7 +391,7 @@ Bool MGADRIScreenInit(ScreenPtr pScreen) if (!xf86LoaderCheckSymbol("drmAvailable")) return FALSE; if (!xf86LoaderCheckSymbol("DRIQueryVersion")) { xf86DrvMsg(pScreen->myNum, X_ERROR, - "TDFXDRIScreenInit failed (libdri.a too old)\n"); + "MGADRIScreenInit failed (libdri.a too old)\n"); return FALSE; } diff --git a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c index 845e3f85a..8f78d5ab8 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c @@ -43,7 +43,7 @@ * Fixed 32bpp hires 8MB horizontal line glitch at middle right */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c,v 1.165 2000/07/11 01:46:36 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c,v 1.173 2000/10/24 22:45:07 dawes Exp $ */ /* * This is a first cut at a non-accelerated version to work with the @@ -173,6 +173,7 @@ static SymTabRec MGAChipsets[] = { { PCI_CHIP_MGA1064, "mga1064sg" }, { PCI_CHIP_MGA2164, "mga2164w" }, { PCI_CHIP_MGA2164_AGP, "mga2164w AGP" }, + { PCI_CHIP_MGAG100_PCI, "mgag100" }, { PCI_CHIP_MGAG100, "mgag100" }, { PCI_CHIP_MGAG200, "mgag200" }, { PCI_CHIP_MGAG200_PCI, "mgag200 PCI" }, @@ -186,6 +187,7 @@ static PciChipsets MGAPciChipsets[] = { { PCI_CHIP_MGA2164, PCI_CHIP_MGA2164, RES_SHARED_VGA }, { PCI_CHIP_MGA2164_AGP, PCI_CHIP_MGA2164_AGP, RES_SHARED_VGA }, { PCI_CHIP_MGAG100, PCI_CHIP_MGAG100, RES_SHARED_VGA }, + { PCI_CHIP_MGAG100_PCI, PCI_CHIP_MGAG100_PCI, RES_SHARED_VGA }, { PCI_CHIP_MGAG200, PCI_CHIP_MGAG200, RES_SHARED_VGA }, { PCI_CHIP_MGAG200_PCI, PCI_CHIP_MGAG200_PCI, RES_SHARED_VGA }, { PCI_CHIP_MGAG400, PCI_CHIP_MGAG400, RES_SHARED_VGA }, @@ -211,8 +213,13 @@ typedef enum { OPTION_TEXTURED_VIDEO, OPTION_XAALINES, OPTION_CRTC2HALF, + OPTION_INT10, OPTION_AGP_MODE_2X, - OPTION_AGP_MODE_4X + OPTION_AGP_MODE_4X, + OPTION_DIGITAL, + OPTION_TV, + OPTION_TVSTANDARD, + OPTION_CABLETYPE } MGAOpts; static OptionInfoRec MGAOptions[] = { @@ -234,8 +241,13 @@ static OptionInfoRec MGAOptions[] = { { OPTION_TEXTURED_VIDEO, "TexturedVideo",OPTV_BOOLEAN, {0}, FALSE }, { OPTION_XAALINES, "XAALines", OPTV_INTEGER, {0}, FALSE }, { OPTION_CRTC2HALF, "Crtc2Half", OPTV_BOOLEAN, {0}, FALSE }, + { OPTION_INT10, "Int10", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_AGP_MODE_2X, "AGPMode2x", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_AGP_MODE_4X, "AGPMode4x", OPTV_BOOLEAN, {0}, FALSE }, + { OPTION_DIGITAL, "DigitalScreen",OPTV_BOOLEAN, {0}, FALSE }, + { OPTION_TV, "TV", OPTV_BOOLEAN, {0}, FALSE }, + { OPTION_TVSTANDARD, "TVStandard", OPTV_ANYSTR, {0}, FALSE }, + { OPTION_CABLETYPE, "CableType", OPTV_ANYSTR, {0}, FALSE }, { -1, NULL, OPTV_NONE, {0}, FALSE } }; @@ -287,6 +299,9 @@ static const char *xaaSymbols[] = { "XAAOverlayFBfuncs", "XAACachePlanarMonoStipple", "XAAScreenIndex", + "XAAFallbackOps", + "XAAFillSolidRects", + "XAAMoveDWORDS", NULL }; @@ -368,6 +383,12 @@ static const char *vbeSymbols[] = { NULL }; +static const char *int10Symbols[] = { + "xf86InitInt10", + "xf86FreeInt10", + NULL +}; + static const char *fbdevHWSymbols[] = { "fbdevHWInit", "fbdevHWUseBuildinMode", @@ -441,7 +462,7 @@ mgaSetup(pointer module, pointer opts, int *errmaj, int *errmin) xf8_32bppSymbols, ramdacSymbols, ddcSymbols, i2cSymbols, shadowSymbols, fbdevHWSymbols, vbeSymbols, - fbSymbols, + fbSymbols, int10Symbols, #ifdef XF86DRI drmSymbols, driSymbols, #endif @@ -913,6 +934,7 @@ MGACountRam(ScrnInfoPtr pScrn) ProbeSize = 16384; break; case PCI_CHIP_MGAG100: + case PCI_CHIP_MGAG100_PCI: if(biosInfo) /* I'm not sure if the docs are correct */ return (biosInfo & (1 << 12)) ? 16384 : 8192; case PCI_CHIP_MGA1064: @@ -1121,8 +1143,12 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags) MGAMODEINFO mgaModeInfo = {0}; ULONG ulBOARDHANDLESize; UCHAR ucMgaBase2; +#if 0 ULONG ulOrgFBuffer; #endif + Bool digital = FALSE; + Bool tv = FALSE; +#endif /* * Note: This function is only called once at server startup, and @@ -1184,20 +1210,6 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags) if (!vgaHWGetHWRec(pScrn)) return FALSE; -#if 0 - /* This is causing problems with restoring the card to it's - original state. If this is to be done, it needs to happen - after we've saved the original state */ - /* Initialize the card through int10 interface if needed */ - if ( xf86LoadSubModule(pScrn, "int10")){ - xf86Int10InfoPtr pInt; - - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Initializing int10\n"); - pInt = xf86InitInt10(pMga->pEnt->index); - xf86FreeInt10(pInt); - } -#endif - /* Find the PCI info for this screen */ pMga->PciInfo = xf86GetPciInfoForEntity(pMga->pEnt->index); pMga->PciTag = pciTag(pMga->PciInfo->bus, pMga->PciInfo->device, @@ -1350,6 +1362,16 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags) /* Process the options */ xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, MGAOptions); + if(xf86ReturnOptValBool(MGAOptions, OPTION_INT10, FALSE) && + xf86LoadSubModule(pScrn, "int10")) + { + xf86Int10InfoPtr pInt; + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Initializing int10\n"); + pInt = xf86InitInt10(pMga->pEnt->index); + xf86FreeInt10(pInt); + } + /* Set the bits per RGB for 8bpp mode */ if (pScrn->depth == 8) pScrn->rgbBits = 8; @@ -1453,13 +1475,17 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags) if (xf86GetOptValBool(MGAOptions, OPTION_HW_CURSOR, &pMga->HWCursor)) { from = X_CONFIG; } - /* For compatibility, accept this too (as an override) */ - if (xf86ReturnOptValBool(MGAOptions, OPTION_SW_CURSOR, FALSE)) { - from = X_CONFIG; - pMga->HWCursor = FALSE; +#ifdef USEMGAHAL + xf86GetOptValBool(MGAOptions, OPTION_TV, &tv); + if (tv == TRUE) { + xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "TV Support\n"); + } + xf86GetOptValBool(MGAOptions, OPTION_DIGITAL, &digital); + if (digital == TRUE) { + xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Digital Screen Support\n"); } - xf86DrvMsg(pScrn->scrnIndex, from, "Using %s cursor\n", - pMga->HWCursor ? "HW" : "SW"); +#endif + /* For compatibility, accept this too (as an override) */ if (xf86ReturnOptValBool(MGAOptions, OPTION_NOACCEL, FALSE)) { pMga->NoAccel = TRUE; xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Acceleration disabled\n"); @@ -1594,6 +1620,7 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags) break; case PCI_CHIP_MGA1064: case PCI_CHIP_MGAG100: + case PCI_CHIP_MGAG100_PCI: case PCI_CHIP_MGAG200: case PCI_CHIP_MGAG200_PCI: case PCI_CHIP_MGAG400: @@ -1964,6 +1991,7 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags) } break; case PCI_CHIP_MGAG100: + case PCI_CHIP_MGAG100_PCI: maxPitch = 2048; break; case PCI_CHIP_MGAG200: @@ -2007,9 +2035,6 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags) MGAFreeRec(pScrn); return FALSE; } - /*******************/ - /* ADDED BY MATROX */ - /*******************/ #ifdef USEMGAHAL if(pMga->SecondCrtc == FALSE) { ulBOARDHANDLESize = MGAGetBOARDHANDLESize(); @@ -2061,8 +2086,16 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags) mgaModeInfo.ulBpp = pScrn->bitsPerPixel; mgaModeInfo.ulZoom = 1; } else { /* Second CRTC && entity is shared */ - mgaModeInfo.flOutput = MGAMODEINFO_ANALOG2 | - MGAMODEINFO_SECOND_CRTC; + if (digital == TRUE) { + mgaModeInfo.flOutput = MGAMODEINFO_DIGITAL2 | + MGAMODEINFO_SECOND_CRTC; + } else if (tv == TRUE) { + mgaModeInfo.flOutput = MGAMODEINFO_TV | + MGAMODEINFO_SECOND_CRTC; + } else { + mgaModeInfo.flOutput = MGAMODEINFO_ANALOG2 | + MGAMODEINFO_SECOND_CRTC; + } #if 1 mgaModeInfo.ulDispWidth = pScrn->virtualX; mgaModeInfo.ulDispHeight = pScrn->virtualY; @@ -2080,13 +2113,12 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags) } if(MGAValidateMode(pMga->pBoard,&mgaModeInfo) != 0) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, - "MGAValidateMode found the mode to be invalid\n"); + "MGAValidateMode from HALlib found the mode to be invalid\n"); return FALSE; } pScrn->displayWidth = mgaModeInfo.ulFBPitch; - -#endif /* USEMGAHAL */ +#endif /* * Set the CRTC parameters for all of the modes based on the type @@ -2461,6 +2493,7 @@ MGASave(ScrnInfoPtr pScrn) /* Convert DisplayModeRec parameters in MGAMODEINFO parameters. */ static void FillModeInfoStruct(ScrnInfoPtr pScrn, DisplayModePtr mode) { + const char *s; MGAPtr pMga = MGAPTR(pScrn); pMga->pMgaModeInfo = (LPMGAMODEINFO) xalloc (sizeof(MGAMODEINFO)); @@ -2472,8 +2505,38 @@ static void FillModeInfoStruct(ScrnInfoPtr pScrn, DisplayModePtr mode) pMga->pMgaModeInfo->ulFBPitch = 0; pMga->pMgaModeInfo->ulBpp = pScrn->bitsPerPixel; pMga->pMgaModeInfo->ulZoom = 1; - pMga->pMgaModeInfo->flSignalMode = 0; - pMga->pMgaModeInfo->ulRefreshRate = 0; + pMga->pMgaModeInfo->flSignalMode = 0x10; + + /* Set TV standard */ + if ((s = xf86GetOptValString(MGAOptions, OPTION_TVSTANDARD))) { + if (!xf86NameCmp(s, "PAL")) { + pMga->pMgaModeInfo->flSignalMode = 0x00; + pMga->pMgaModeInfo->ulRefreshRate = 50; + pMga->pMgaModeInfo->ulTVStandard = TV_PAL; + } else { + pMga->pMgaModeInfo->ulRefreshRate = 60; + pMga->pMgaModeInfo->ulTVStandard = TV_NTSC; + } + } else { + pMga->pMgaModeInfo->ulRefreshRate = 60; + pMga->pMgaModeInfo->ulTVStandard = TV_NTSC; + } + + /* Set Cable Type */ + if ((s = xf86GetOptValString(MGAOptions, OPTION_CABLETYPE))) { + if (!xf86NameCmp(s, "SCART_RGB")) { + pMga->pMgaModeInfo->ulCableType = TV_SCART_RGB; + } else if (!xf86NameCmp(s, "SCART_COMPOSITE")) { + pMga->pMgaModeInfo->ulCableType = TV_SCART_COMPOSITE; + } else if (!xf86NameCmp(s, "SCART_TYPE2")) { + pMga->pMgaModeInfo->ulCableType = TV_SCART_TYPE2; + } else { + pMga->pMgaModeInfo->ulCableType = TV_YC_COMPOSITE; + } + } else { + pMga->pMgaModeInfo->ulCableType = TV_YC_COMPOSITE; + } + pMga->pMgaModeInfo->ulHorizRate = 0; pMga->pMgaModeInfo->ulPixClock = mode->Clock; pMga->pMgaModeInfo->ulHFPorch = mode->HSyncStart - mode->HDisplay; @@ -2489,7 +2552,7 @@ static void FillModeInfoStruct(ScrnInfoPtr pScrn, DisplayModePtr mode) pMga->pMgaModeInfo->ulPanXGran = 0; pMga->pMgaModeInfo->ulPanYGran = 0; } -#endif /* USEMGAHAL */ +#endif /* * Initialise a new mode. This is currently still using the old @@ -2504,6 +2567,16 @@ MGAModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode) vgaRegPtr vgaReg; MGAPtr pMga = MGAPTR(pScrn); MGARegPtr mgaReg; +#ifdef USEMGAHAL + Bool digital = FALSE; + Bool tv = FALSE; + ULONG status; + + /* Verify if user wants digital screen output */ + xf86GetOptValBool(MGAOptions, OPTION_DIGITAL, &digital); + /* Verify if user wants TV output */ + xf86GetOptValBool(MGAOptions, OPTION_TV, &tv); +#endif vgaHWUnlock(hwp); @@ -2524,26 +2597,40 @@ MGAModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode) FillModeInfoStruct(pScrn,mode); if(pMga->SecondCrtc == TRUE) { - pMga->pMgaModeInfo->flOutput = MGAMODEINFO_ANALOG2 | - MGAMODEINFO_SECOND_CRTC | - MGAMODEINFO_FORCE_PITCH | - MGAMODEINFO_FORCE_DISPLAYORG; + if (digital == TRUE) { + pMga->pMgaModeInfo->flOutput = MGAMODEINFO_DIGITAL2 | + MGAMODEINFO_SECOND_CRTC | + MGAMODEINFO_FORCE_PITCH | + MGAMODEINFO_FORCE_DISPLAYORG; + } else if (tv == TRUE) { + pMga->pMgaModeInfo->flOutput = MGAMODEINFO_TV | + MGAMODEINFO_SECOND_CRTC | + MGAMODEINFO_FORCE_PITCH | + MGAMODEINFO_FORCE_DISPLAYORG; + } else { + pMga->pMgaModeInfo->flOutput = MGAMODEINFO_ANALOG2 | + MGAMODEINFO_SECOND_CRTC | + MGAMODEINFO_FORCE_PITCH | + MGAMODEINFO_FORCE_DISPLAYORG; + } } else { pMga->pMgaModeInfo->flOutput = MGAMODEINFO_ANALOG1 | MGAMODEINFO_FORCE_PITCH; } pMga->pMgaModeInfo->ulFBPitch = pScrn->displayWidth; - if(MGAValidateMode(pMga->pBoard,pMga->pMgaModeInfo) != 0) { - xf86DrvMsg(pScrn->scrnIndex, X_ERROR,"Invalid parameters\n"); + /* Validate the parameters */ + if ((status = MGAValidateMode(pMga->pBoard, pMga->pMgaModeInfo)) != 0) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "MGAValidateMode from HALlib found the mode to be invalid. Error: %lx\n", status); return FALSE; } - if(MGAValidateVideoParameters(pMga->pBoard,pMga->pMgaModeInfo) != 0) { - xf86DrvMsg(pScrn->scrnIndex, X_ERROR,"Invalid parameters\n"); + /* Validates the Video parameters */ + if ((status = MGAValidateVideoParameters(pMga->pBoard, pMga->pMgaModeInfo)) != 0) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "MGAValidateVideoParameters from HALlib found the mode to be invalid. Error: %lx\n", status); return FALSE; } -#endif /* USEMGAHAL */ +#endif #ifdef XF86DRI if (pMga->directRenderingEnabled) { @@ -2552,12 +2639,14 @@ MGAModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode) #endif #ifdef USEMGAHAL + /* Initialize the board */ if(MGASetMode(pMga->pBoard,pMga->pMgaModeInfo) != 0) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "MGASetMode returned an error. Make sure to validate the mode before.\n"); return FALSE; } #define outMGAdreg(reg, val) OUTREG8(RAMDAC_OFFSET + (reg), val) - #define outMGAdac(reg, val) \ (outMGAdreg(MGA1064_INDEX, reg), outMGAdreg(MGA1064_DATA, val)) @@ -2565,10 +2654,7 @@ MGAModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode) outMGAdac(MGA1064_CURSOR_BASE_ADR_LOW, pMga->FbCursorOffset >> 10); outMGAdac(MGA1064_CURSOR_BASE_ADR_HI, pMga->FbCursorOffset >> 18); } -#endif /* USEMGAHAL */ - - -#ifndef USEMGAHAL +#else (*pMga->Restore)(pScrn, vgaReg, mgaReg, FALSE); #endif @@ -2698,11 +2784,18 @@ MGAScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) pMga->pClientStruct = (LPCLIENTDATA) xalloc (sizeof(CLIENTDATA)); /* Fill the client part */ pMga->pClientStruct->pMga = (MGAPtr) pMga; - MGAOpenLibrary(pMga->pBoard,pMga->pClientStruct,sizeof(CLIENTDATA)); - pMga->pMgaHwInfo = (LPMGAHWINFO) xalloc (sizeof(MGAHWINFO)); MGAGetHardwareInfo(pMga->pBoard,pMga->pMgaHwInfo); + + /* Detecting for type of display */ + if (pMga->pMgaHwInfo->ulCapsSecondOutput & MGAHWINFOCAPS_OUTPUT_TV) { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "TV detected\n"); + } + if (pMga->pMgaHwInfo->ulCapsSecondOutput & MGAHWINFOCAPS_OUTPUT_DIGITAL) { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Digital Screen detected\n"); + } + /* Now copy these to the entitystructure */ pMgaEnt->pClientStruct = pMga->pClientStruct; pMgaEnt->pBoard = pMga->pBoard; @@ -2712,7 +2805,7 @@ MGAScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) pMga->pBoard = pMgaEnt->pBoard; pMga->pMgaHwInfo = pMgaEnt->pMgaHwInfo; } -#endif /* USEMGAHAL */ +#endif } else { #ifdef USEMGAHAL pMga->pBoard = @@ -2721,15 +2814,12 @@ MGAScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) pMga->pClientStruct = (LPCLIENTDATA) xalloc (sizeof(CLIENTDATA)); /* Fill the client part */ pMga->pClientStruct->pMga = (MGAPtr) pMga; - MGAOpenLibrary(pMga->pBoard,pMga->pClientStruct,sizeof(CLIENTDATA)); - pMga->pMgaHwInfo = (LPMGAHWINFO) xalloc (sizeof(MGAHWINFO)); MGAGetHardwareInfo(pMga->pBoard,pMga->pMgaHwInfo); -#endif /* USEMGAHAL */ +#endif } - /* Initialise the MMIO vgahw functions */ vgaHWSetMmioFuncs(hwp, pMga->IOBase, PORT_OFFSET); vgaHWGetIOBase(hwp); @@ -3245,7 +3335,7 @@ MGACloseScreen(int scrnIndex, ScreenPtr pScreen) if (pMga->pMgaHwInfo) xfree(pMga->pMgaHwInfo); } -#endif /* USEMGAHAL */ +#endif if (pMga->AccelInfoRec) XAADestroyInfoRec(pMga->AccelInfoRec); @@ -3440,6 +3530,9 @@ MGABlockHandler ( UpdateCurrentTime(); (*pMga->VideoTimerCallback)(pScrn, currentTime.milliseconds); } + + if(pMga->RenderCallback) + (*pMga->RenderCallback)(pScrn); } #if defined (DEBUG) diff --git a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_macros.h b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_macros.h index 70dbcf4bb..c2a47eaf1 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_macros.h +++ b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_macros.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_macros.h,v 1.14 2000/06/17 00:03:20 martin Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_macros.h,v 1.16 2000/10/24 22:45:07 dawes Exp $ */ #ifndef _MGA_MACROS_H_ #define _MGA_MACROS_H_ @@ -84,8 +84,6 @@ while(INREG(MGAREG_DWGSYNC) != MGA_SYNC_XTAG) ; \ OUTREG(MGAREG_CXBNDRY, 0xFFFF0000); } #ifdef XF86DRI -extern void mgaGetQuiescence( ScrnInfoPtr pScrn ); - #define CHECK_DMA_QUIESCENT(pMGA, pScrn) { \ if (!pMGA->have_quiescense) { \ pMGA->GetQuiescence( pScrn ); \ diff --git a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_storm.c b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_storm.c index ab978513d..d8dbe698e 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_storm.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_storm.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_storm.c,v 1.70 2000/07/08 22:09:11 mvojkovi Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_storm.c,v 1.78 2000/10/27 18:31:04 dawes Exp $ */ /* All drivers should typically include these */ @@ -134,6 +134,315 @@ extern void MGAValidatePolyPoint(GCPtr, unsigned long, DrawablePtr); extern void MGAFillCacheBltRects(ScrnInfoPtr, int, unsigned int, int, BoxPtr, int, int, XAACacheInfoPtr); +#ifdef RENDER + +extern Bool +MGASetupForCPUToScreenAlphaTexture ( + ScrnInfoPtr pScrn, + int op, + CARD16 red, + CARD16 green, + CARD16 blue, + CARD16 alpha, + int alphaType, + CARD8 *alphaPtr, + int alphaPitch, + int width, + int height, + int flags +); + +extern Bool +MGASetupForCPUToScreenTexture ( + ScrnInfoPtr pScrn, + int op, + int texType, + CARD8 *texPtr, + int texPitch, + int width, + int height, + int flags +); + +extern void +MGASubsequentCPUToScreenTexture ( + ScrnInfoPtr pScrn, + int dstx, + int dsty, + int srcx, + int srcy, + int width, + int height +); + +extern CARD32 MGAAlphaTextureFormats[2]; +extern CARD32 MGATextureFormats[2]; + +#if PSZ == 8 +#include "mipict.h" +#include "dixstruct.h" + +CARD32 MGAAlphaTextureFormats[2] = {PICT_a8, 0}; +CARD32 MGATextureFormats[2] = {PICT_a8r8g8b8, 0}; + +static void +RemoveLinear (FBLinearPtr linear) +{ + MGAPtr pMga = (MGAPtr)(linear->devPrivate.ptr); + + pMga->LinearScratch = NULL; /* just lost our scratch */ +} + +static void +RenderCallback (ScrnInfoPtr pScrn) +{ + MGAPtr pMga = MGAPTR(pScrn); + + if((currentTime.milliseconds > pMga->RenderTime) && pMga->LinearScratch) { + xf86FreeOffscreenLinear(pMga->LinearScratch); + pMga->LinearScratch = NULL; + } + + if(!pMga->LinearScratch) + pMga->RenderCallback = NULL; +} + +#define RENDER_DELAY 15000 + +static Bool +AllocateLinear ( + ScrnInfoPtr pScrn, + int sizeNeeded +){ + MGAPtr pMga = MGAPTR(pScrn); + + pMga->RenderTime = currentTime.milliseconds + RENDER_DELAY; + pMga->RenderCallback = RenderCallback; + + if(pMga->LinearScratch) { + if(pMga->LinearScratch->size >= sizeNeeded) + return TRUE; + else { + if(xf86ResizeOffscreenLinear(pMga->LinearScratch, sizeNeeded)) + return TRUE; + + xf86FreeOffscreenLinear(pMga->LinearScratch); + pMga->LinearScratch = NULL; + } + } + + pMga->LinearScratch = xf86AllocateOffscreenLinear( + pScrn->pScreen, sizeNeeded, 32, + NULL, RemoveLinear, pMga); + + return (pMga->LinearScratch != NULL); +} + +static int +GetPowerOfTwo(int w) +{ + int Pof2; + int i = 12; + + while(--i) { + if(w & (1 << i)) { + Pof2 = i; + if(w & ((1 << i) - 1)) + Pof2++; + break; + } + } + return Pof2; +} + + +static int tex_padw, tex_padh; + +Bool +MGASetupForCPUToScreenAlphaTexture ( + ScrnInfoPtr pScrn, + int op, + CARD16 red, + CARD16 green, + CARD16 blue, + CARD16 alpha, + int alphaType, + CARD8 *alphaPtr, + int alphaPitch, + int width, + int height, + int flags +){ + int log2w, log2h, i, pitch, sizeNeeded, offset; + MGAPtr pMga = MGAPTR(pScrn); + + if(op != PictOpOver) /* only one tested */ + return FALSE; + + if((width > 2048) || (height > 2048)) + return FALSE; + + log2w = GetPowerOfTwo(width); + log2h = GetPowerOfTwo(height); + + CHECK_DMA_QUIESCENT(pMga, pScrn); + + if(pMga->Overlay8Plus24) { + i = 0x00ffffff; + WAITFIFO(1); + SET_PLANEMASK(i); + } + + pitch = (width + 15) & ~15; + sizeNeeded = pitch * height; + if(pScrn->bitsPerPixel == 16) + sizeNeeded <<= 1; + + if(!AllocateLinear(pScrn, sizeNeeded)) + return FALSE; + + offset = pMga->LinearScratch->offset << 1; + if(pScrn->bitsPerPixel == 32) + offset <<= 1; + + if(pMga->AccelInfoRec->NeedToSync) + MGAStormSync(pScrn); + + XAA_888_plus_PICT_a8_to_8888( + (blue >> 8) | (green & 0xff00) | ((red & 0xff00) << 8), + alphaPtr, alphaPitch, (CARD32*)(pMga->FbStart + offset), + pitch, width, height); + + tex_padw = 1 << log2w; + tex_padh = 1 << log2h; + + WAITFIFO(15); + OUTREG(MGAREG_TMR0, (1 << 20) / tex_padw); /* sx inc */ + OUTREG(MGAREG_TMR1, 0); /* sy inc */ + OUTREG(MGAREG_TMR2, 0); /* tx inc */ + OUTREG(MGAREG_TMR3, (1 << 20) / tex_padh); /* ty inc */ + OUTREG(MGAREG_TMR4, 0x00000000); + OUTREG(MGAREG_TMR5, 0x00000000); + OUTREG(MGAREG_TMR8, 0x00010000); + OUTREG(MGAREG_TEXORG, offset); + OUTREG(MGAREG_TEXWIDTH, log2w | (((8 - log2w) & 63) << 9) | + ((width - 1) << 18)); + OUTREG(MGAREG_TEXHEIGHT, log2h | (((8 - log2h) & 63) << 9) | + ((height - 1) << 18)); + OUTREG(MGAREG_TEXCTL, 0x1A000106 | ((pitch & 0x07FF) << 9)); + OUTREG(MGAREG_TEXCTL2, 0x00000014); + OUTREG(MGAREG_DWGCTL, 0x000c7076); + OUTREG(MGAREG_TEXFILTER, 0x01e00020); + OUTREG(MGAREG_ALPHACTRL, 0x00000154); + + return TRUE; +} + +Bool +MGASetupForCPUToScreenTexture ( + ScrnInfoPtr pScrn, + int op, + int texType, + CARD8 *texPtr, + int texPitch, + int width, + int height, + int flags +){ + int log2w, log2h, i, pitch, sizeNeeded, offset; + MGAPtr pMga = MGAPTR(pScrn); + + if(op != PictOpOver) /* only one tested */ + return FALSE; + + if((width > 2048) || (height > 2048)) + return FALSE; + + log2w = GetPowerOfTwo(width); + log2h = GetPowerOfTwo(height); + + CHECK_DMA_QUIESCENT(pMga, pScrn); + + if(pMga->Overlay8Plus24) { + i = 0x00ffffff; + WAITFIFO(1); + SET_PLANEMASK(i); + } + + pitch = (width + 15) & ~15; + sizeNeeded = pitch * height; + if(pScrn->bitsPerPixel == 16) + sizeNeeded <<= 1; + + if(!AllocateLinear(pScrn, sizeNeeded)) + return FALSE; + + offset = pMga->LinearScratch->offset << 1; + if(pScrn->bitsPerPixel == 32) + offset <<= 1; + + if(pMga->AccelInfoRec->NeedToSync) + MGAStormSync(pScrn); + + { + CARD8 *dst = (CARD8*)(pMga->FbStart + offset); + i = height; + while(i--) { + memcpy(dst, texPtr, width << 2); + texPtr += texPitch; + dst += pitch << 2; + } + } + + tex_padw = 1 << log2w; + tex_padh = 1 << log2h; + + WAITFIFO(15); + OUTREG(MGAREG_TMR0, (1 << 20) / tex_padw); /* sx inc */ + OUTREG(MGAREG_TMR1, 0); /* sy inc */ + OUTREG(MGAREG_TMR2, 0); /* tx inc */ + OUTREG(MGAREG_TMR3, (1 << 20) / tex_padh); /* ty inc */ + OUTREG(MGAREG_TMR4, 0x00000000); + OUTREG(MGAREG_TMR5, 0x00000000); + OUTREG(MGAREG_TMR8, 0x00010000); + OUTREG(MGAREG_TEXORG, offset); + OUTREG(MGAREG_TEXWIDTH, log2w | (((8 - log2w) & 63) << 9) | + ((width - 1) << 18)); + OUTREG(MGAREG_TEXHEIGHT, log2h | (((8 - log2h) & 63) << 9) | + ((height - 1) << 18)); + OUTREG(MGAREG_TEXCTL, 0x1A000106 | ((pitch & 0x07FF) << 9)); + OUTREG(MGAREG_TEXCTL2, 0x00000014); + OUTREG(MGAREG_DWGCTL, 0x000c7076); + OUTREG(MGAREG_TEXFILTER, 0x01e00020); + OUTREG(MGAREG_ALPHACTRL, 0x00000151); + + return TRUE; +} +void +MGASubsequentCPUToScreenTexture ( + ScrnInfoPtr pScrn, + int dstx, + int dsty, + int srcx, + int srcy, + int width, + int height +){ + MGAPtr pMga = MGAPTR(pScrn); + + WAITFIFO(4); + OUTREG(MGAREG_TMR6, (srcx << 20) / tex_padw); + OUTREG(MGAREG_TMR7, (srcy << 20) / tex_padh); + OUTREG(MGAREG_FXBNDRY, ((dstx + width) << 16) | (dstx & 0xffff)); + OUTREG(MGAREG_YDSTLEN + MGAREG_EXEC, (dsty << 16) | height); + + pMga->AccelInfoRec->NeedToSync = TRUE; +} + + +#endif +#endif + Bool MGANAME(AccelInit)(ScreenPtr pScreen) { @@ -141,6 +450,7 @@ MGANAME(AccelInit)(ScreenPtr pScreen) ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; MGAPtr pMga = MGAPTR(pScrn); int maxFastBlitMem, maxlines; + Bool doRender = FALSE; BoxRec AvailFBArea; pMga->ScratchBuffer = xalloc(((pScrn->displayWidth * PSZ) + 127) >> 3); @@ -167,8 +477,10 @@ MGANAME(AccelInit)(ScreenPtr pScreen) pMga->HasFBitBlt = FALSE; } pMga->MaxBlitDWORDS = 0x400000 >> 5; + /* fallthrough */ case PCI_CHIP_MGAG200: case PCI_CHIP_MGAG200_PCI: + doRender = TRUE; pMga->AccelFlags = TRANSC_SOLID_FILL | TWO_PASS_COLOR_EXPAND; @@ -181,6 +493,7 @@ MGANAME(AccelInit)(ScreenPtr pScreen) pMga->AccelFlags = 0; break; case PCI_CHIP_MGAG100: + case PCI_CHIP_MGAG100_PCI: default: pMga->AccelFlags = MGA_NO_PLANEMASK; break; @@ -314,6 +627,7 @@ MGANAME(AccelInit)(ScreenPtr pScreen) SCANLINE_PAD_DWORD | LEFT_EDGE_CLIPPING | LEFT_EDGE_CLIPPING_NEGATIVE_X | + NO_TRANSPARENCY | NO_GXCOPY; infoPtr->SetupForScanlineImageWrite = @@ -347,9 +661,9 @@ MGANAME(AccelInit)(ScreenPtr pScreen) infoPtr->PolyPointMask = GCFunction | GCPlaneMask; } if(pMga->AccelFlags & MGA_NO_PLANEMASK) { - infoPtr->ImageWriteFlags |= NO_PLANEMASK; + infoPtr->ScanlineImageWriteFlags |= NO_PLANEMASK; infoPtr->ScreenToScreenCopyFlags |= NO_PLANEMASK; - infoPtr->CPUToScreenColorExpandFillFlags |= NO_PLANEMASK; + infoPtr->ScanlineCPUToScreenColorExpandFillFlags |= NO_PLANEMASK; infoPtr->SolidFillFlags |= NO_PLANEMASK; infoPtr->SolidLineFlags |= NO_PLANEMASK; infoPtr->DashedLineFlags |= NO_PLANEMASK; @@ -414,6 +728,24 @@ MGANAME(AccelInit)(ScreenPtr pScreen) infoPtr->RestoreAccelState = MGANAME(RestoreAccelState); } +#ifdef RENDER + if(doRender && ((pScrn->bitsPerPixel == 32) || (pScrn->bitsPerPixel == 16))) + { + infoPtr->SetupForCPUToScreenAlphaTexture = + MGASetupForCPUToScreenAlphaTexture; + infoPtr->SubsequentCPUToScreenAlphaTexture = + MGASubsequentCPUToScreenTexture; + infoPtr->CPUToScreenAlphaTextureFlags = XAA_RENDER_NO_TILE | + XAA_RENDER_NO_SRC_ALPHA; + infoPtr->CPUToScreenAlphaTextureFormats = MGAAlphaTextureFormats; + + infoPtr->SetupForCPUToScreenTexture = MGASetupForCPUToScreenTexture; + infoPtr->SubsequentCPUToScreenTexture = MGASubsequentCPUToScreenTexture; + infoPtr->CPUToScreenTextureFlags = XAA_RENDER_NO_TILE; + infoPtr->CPUToScreenTextureFormats = MGATextureFormats; + } +#endif + return(XAAInit(pScreen, infoPtr)); } @@ -528,7 +860,8 @@ MGAStormEngineInit(ScrnInfoPtr pScrn) CHECK_DMA_QUIESCENT(pMga, pScrn); - if (pMga->Chipset == PCI_CHIP_MGAG100) + if ((pMga->Chipset == PCI_CHIP_MGAG100) + || (pMga->Chipset == PCI_CHIP_MGAG100_PCI)) maccess = 1 << 14; switch( pLayout->bitsPerPixel ) @@ -570,7 +903,8 @@ MGAStormEngineInit(ScrnInfoPtr pScrn) OUTREG(MGAREG_MACCESS, maccess); pMga->MAccess = maccess; pMga->PlaneMask = ~0; - if(pMga->Chipset != PCI_CHIP_MGAG100) + if((pMga->Chipset != PCI_CHIP_MGAG100) + && (pMga->Chipset != PCI_CHIP_MGAG100_PCI)) OUTREG(MGAREG_PLNWT, pMga->PlaneMask); pMga->FgColor = 0; OUTREG(MGAREG_FCOL, pMga->FgColor); diff --git a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_video.c b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_video.c index 1bb193516..59a4da867 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_video.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_video.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_video.c,v 1.17 2000/09/08 02:22:00 mvojkovi Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_video.c,v 1.18 2000/10/24 22:45:07 dawes Exp $ */ #include "xf86.h" #include "xf86_OSproc.h" @@ -79,7 +79,7 @@ void MGAInitVideo(ScreenPtr pScreen) (pMga->Chipset == PCI_CHIP_MGAG400))) { - if((pMga->Overlay8Plus24 /* || dualhead */ || pMga->TexturedVideo) && + if((pMga->Overlay8Plus24 || pMga->TexturedVideo) && (pScrn->bitsPerPixel != 24)) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Using texture video\n"); @@ -91,9 +91,8 @@ void MGAInitVideo(ScreenPtr pScreen) pMga->TexturedVideo = FALSE; } - if(!pMga->Overlay8Plus24 /* && !dualhead */) + if(!pMga->Overlay8Plus24) MGAInitOffscreenImages(pScreen); - } diff --git a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_warp.c b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_warp.c index 50b9871b3..066d20991 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_warp.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_warp.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_warp.c,v 1.3 2000/06/17 18:23:23 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_warp.c,v 1.4 2000/09/26 15:57:12 tsi Exp $ */ #include "xf86.h" #include "xf86_OSproc.h" @@ -108,7 +108,7 @@ static unsigned int mgaG400InstallMicrocode(MGAPtr pMGA, int agp_offset) MGADRIServerPrivatePtr pMGADRIServer = pMGA->DRIServerInfo; CARD8 *vcbase = pMGADRIServer->agp_map + agp_offset; - CARD32 pcbase = (CARD32)pMGADRIServer->agpBase + agp_offset; + unsigned long pcbase = (unsigned long)pMGADRIServer->agpBase + agp_offset; unsigned int microcode_size = 0; memset(pMGADRIServer->WarpIndex, 0, @@ -150,7 +150,7 @@ static unsigned int mgaG200InstallMicrocode(MGAPtr pMGA, int agp_offset) MGADRIServerPrivatePtr pMGADRIServer = pMGA->DRIServerInfo; CARD8 *vcbase = pMGADRIServer->agp_map + agp_offset; - CARD32 pcbase = (CARD32)pMGADRIServer->agpBase + agp_offset; + unsigned long pcbase = (unsigned long)pMGADRIServer->agpBase + agp_offset; unsigned int microcode_size = 0; memset(pMGADRIServer->WarpIndex, 0, diff --git a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_wrap.c b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_wrap.c index 553d14489..4a5b7ef5f 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_wrap.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_wrap.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_wrap.c,v 1.1 2000/06/17 00:03:20 martin Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_wrap.c,v 1.2 2000/09/24 13:51:28 alanh Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. diff --git a/xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_dga.c b/xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_dga.c index da4f97e89..6124f86c2 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_dga.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_dga.c @@ -21,7 +21,7 @@ * * Authors: Alan Hourihane, <alanh@fairlite.demon.co.uk> */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_dga.c,v 1.1 2000/06/22 18:09:37 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_dga.c,v 1.3 2000/10/17 21:36:15 mvojkovi Exp $ */ #include "xf86.h" #include "xf86_OSproc.h" @@ -33,6 +33,7 @@ #include "neo.h" #include "neo_reg.h" #include "dgaproc.h" +#include "vgaHW.h" static Bool NEO_OpenFramebuffer(ScrnInfoPtr, char **, unsigned char **, int *, int *, int *); @@ -70,20 +71,18 @@ NEODGAInit(ScreenPtr pScreen) DGAModePtr modes = NULL, newmodes = NULL, currentMode; DisplayModePtr pMode, firstMode; int Bpp = pScrn->bitsPerPixel >> 3; - int num = 0; - Bool oneMore; + int num = 0, imlines, pixlines; + + imlines = (pScrn->videoRam * 1024) / + (pScrn->displayWidth * (pScrn->bitsPerPixel >> 3)); + + pixlines = (imlines > 1024) ? 1024 : imlines; pMode = firstMode = pScrn->modes; while(pMode) { - if(0 /*pScrn->displayWidth != pMode->HDisplay*/) { - newmodes = xrealloc(modes, (num + 2) * sizeof(DGAModeRec)); - oneMore = TRUE; - } else { - newmodes = xrealloc(modes, (num + 1) * sizeof(DGAModeRec)); - oneMore = FALSE; - } + newmodes = xrealloc(modes, (num + 1) * sizeof(DGAModeRec)); if(!newmodes) { xfree(modes); @@ -91,8 +90,6 @@ NEODGAInit(ScreenPtr pScreen) } modes = newmodes; -SECOND_PASS: - currentMode = modes + num; num++; @@ -118,32 +115,16 @@ SECOND_PASS: currentMode->offset = 0; currentMode->address = pNEO->NeoFbBase; - if(oneMore) { /* first one is narrow width */ - currentMode->bytesPerScanline = ((pMode->HDisplay * Bpp) + 3) & ~3L; - currentMode->imageWidth = pMode->HDisplay; - currentMode->imageHeight = pMode->VDisplay; - currentMode->pixmapWidth = currentMode->imageWidth; - currentMode->pixmapHeight = currentMode->imageHeight; - currentMode->maxViewportX = currentMode->imageWidth - - currentMode->viewportWidth; - /* this might need to get clamped to some maximum */ - currentMode->maxViewportY = currentMode->imageHeight - - currentMode->viewportHeight; - oneMore = FALSE; - goto SECOND_PASS; - } else { - currentMode->bytesPerScanline = + currentMode->bytesPerScanline = ((pScrn->displayWidth * Bpp) + 3) & ~3L; - currentMode->imageWidth = pScrn->displayWidth; - currentMode->imageHeight = pMode->VDisplay; - currentMode->pixmapWidth = currentMode->imageWidth; - currentMode->pixmapHeight = currentMode->imageHeight; - currentMode->maxViewportX = currentMode->imageWidth - + currentMode->imageWidth = pScrn->displayWidth; + currentMode->imageHeight = imlines; + currentMode->pixmapWidth = currentMode->imageWidth; + currentMode->pixmapHeight = pixlines; + currentMode->maxViewportX = currentMode->imageWidth - currentMode->viewportWidth; - /* this might need to get clamped to some maximum */ - currentMode->maxViewportY = currentMode->imageHeight - + currentMode->maxViewportY = currentMode->imageHeight - currentMode->viewportHeight; - } pMode = pMode->next; if(pMode == firstMode) @@ -156,33 +137,29 @@ SECOND_PASS: return DGAInit(pScreen, &NEODGAFuncs, modes, num); } +static DisplayModePtr NEOSavedDGAModes[MAXSCREENS]; static Bool NEO_SetMode( ScrnInfoPtr pScrn, DGAModePtr pMode ){ - static int OldDisplayWidth[MAXSCREENS]; int index = pScrn->pScreen->myNum; NEOPtr pNEO = NEOPTR(pScrn); if(!pMode) { /* restore the original mode */ - /* put the ScreenParameters back */ - - pScrn->displayWidth = OldDisplayWidth[index]; - - NEOSwitchMode(index, pScrn->currentMode, 0); - pNEO->DGAactive = FALSE; + if(pNEO->DGAactive) { + pScrn->currentMode = NEOSavedDGAModes[index]; + NEOSwitchMode(index, pScrn->currentMode, 0); + NEOAdjustFrame(index, 0, 0, 0); + pNEO->DGAactive = FALSE; + } } else { if(!pNEO->DGAactive) { /* save the old parameters */ - OldDisplayWidth[index] = pScrn->displayWidth; - + NEOSavedDGAModes[index] = pScrn->currentMode; pNEO->DGAactive = TRUE; } - pScrn->displayWidth = pMode->bytesPerScanline / - (pMode->bitsPerPixel >> 3); - NEOSwitchMode(index, pMode->mode, 0); } @@ -205,9 +182,14 @@ NEO_SetViewport( int flags ){ NEOPtr pNEO = NEOPTR(pScrn); + vgaHWPtr hwp = VGAHWPTR(pScrn); NEOAdjustFrame(pScrn->pScreen->myNum, x, y, flags); - pNEO->DGAViewportStatus = 0; /* NEOAdjustFrame loops until finished */ + /* wait for retrace */ + while((hwp->readST01(hwp) & 0x08)); + while(!(hwp->readST01(hwp) & 0x08)); + + pNEO->DGAViewportStatus = 0; } static void diff --git a/xc/programs/Xserver/hw/xfree86/drivers/neomagic/neomagic.cpp b/xc/programs/Xserver/hw/xfree86/drivers/neomagic/neomagic.cpp index fb78c1238..0b8914545 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/neomagic/neomagic.cpp +++ b/xc/programs/Xserver/hw/xfree86/drivers/neomagic/neomagic.cpp @@ -1,9 +1,9 @@ -.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/neomagic/neomagic.cpp,v 1.4 2000/06/14 02:13:12 dawes Exp $ +.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/neomagic/neomagic.cpp,v 1.5 2000/09/25 23:57:11 mvojkovi Exp $ .\" shorthand for double quote that works everywhere. .ds q \N'34' .TH NEOMAGIC __drivermansuffix__ "Version 4.0.1" "XFree86" .SH NAME -neomagic \- NeoMagic video driver +neomagic \- Neomagic video driver .SH SYNOPSIS .nf .B "Section \*qDevice\*q" @@ -14,17 +14,69 @@ neomagic \- NeoMagic video driver .fi .SH DESCRIPTION .B neomagic -is an XFree86 driver for NeoMagic video chips. -THIS MAN PAGE NEEDS TO BE FILLED IN. +is an XFree86 driver for the Neomagic graphics chipsets found in many +laptop computers. .SH SUPPORTED HARDWARE -The .B neomagic -driver supports... +supports the following chipsets: +.PP +.TP +MagicGraph 128 (NM2070) +.TP +MagicGraph 128V (NM2090) +.TP +MagicGraph 128ZV (NM2093) +.TP +MagicGraph 128ZV+ (NM2097) +.TP +MagicGraph 128XD (NM2160) +.TP +MagicGraph 256AV (NM2200) +.TP +MagicGraph 256AV+ (NM2230) +.TP +MagicGraph 256ZX (NM2360) +.TP +MagicGraph 256XL+ (NM2380) +.PP +The driver supports depths 8, 15, 16 and 24 for all chipsets except the +NM2070 which does not support depth 24. All depths are accelerated except for +depth 24 which is only accelerated on NM2200 +and newer models. All visuals are supported in depth 8. TrueColor and +DirectColor visuals are supported in the other depths. + .SH CONFIGURATION DETAILS Please refer to XF86Config(__filemansuffix__) for general configuration details. This section only covers configuration details specific to this driver. +.PP +The following driver +.B Options +are supported +.TP +.BI "Option \*qNoAccel\*q \*q" boolean \*q +Disable or enable acceleration. Default: acceleration is enabled. +.TP +.BI "Option \*qSWCursor\*q \*q" boolean \*q +Disable or enable software cursor. Default: software cursor is disable +and a hardware cursor is used. +.TP +.BI "Option \*qPCIBurst\*q \*q" boolean \*q +Disable or enable PCI burst modes. Default: enabled. +.TP +.BI "Option \*qRotate\*q \*qCW\*q" +.TP +.BI "Option \*qRotate\*q \*qCCW\*q" +Rotate the display clockwise or counterclockwise. This mode is unaccelerated. +Default: no rotation. +.TP +.BI "Option \*qShadowFB\*q \*q" boolean \*q +Enable or disable use of the shadow framebuffer layer. See +shadowfb(__drivermansuffix__) for further information. Default: off. +.TP + .SH "SEE ALSO" XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(__miscmansuffix__) .SH AUTHORS -Authors include: ... +Authors include: Jens Owen, Kevin E. Martin, and also Egbert Eich, +Mark Vojkovich, Alan Hourihane. diff --git a/xc/programs/Xserver/hw/xfree86/drivers/r128/Imakefile b/xc/programs/Xserver/hw/xfree86/drivers/r128/Imakefile index 23fa7504d..c13d95034 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/r128/Imakefile +++ b/xc/programs/Xserver/hw/xfree86/drivers/r128/Imakefile @@ -1,21 +1,35 @@ -XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/Imakefile,v 1.9 2000/09/20 00:09:26 keithp Exp $ +XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/Imakefile,v 1.11 2000/10/18 17:19:58 alanh Exp $ +XCOMM +XCOMM This is the Imakefile for the ATI Rage 128 (r128) and +XCOMM the ATI Radeon (radeon) driver. XCOMM -XCOMM This is the Imakefile for the ATI Rage 128 (r128) driver. -XCOMM #define IHaveModules #include <Server.tmpl> #if BuildXF86DRI -DRISRCS = r128_dri.c -DRIOBJS = r128_dri.o -DRIINCLUDES = -I$(SERVERSRC)/GL/dri -I$(LIBSRC)/GL/dri -I$(TOP)/include -DRIDEFINES = $(GLX_DEFINES) +R128DRISRCS = r128_dri.c +R128DRIOBJS = r128_dri.o + +DRISRCS = $(R128DRISRCS) +DRIOBJS = $(R128DRIOBJS) +DRIINCLUDES = -I$(SERVERSRC)/GL/dri -I$(LIBSRC)/GL/dri -I$(TOP)/include +DRIDEFINES = $(GLX_DEFINES) #endif -SRCS = r128_driver.c r128_cursor.c r128_accel.c r128_dga.c $(DRISRCS) # r128_i2c.c +PROBESRCS = ati2_probe.c +PROBEOBJS = ati2_probe.o + +R128SRCS = r128_driver.c r128_cursor.c r128_accel.c r128_dga.c r128_video.c +R128OBJS = r128_driver.o r128_cursor.o r128_accel.o r128_dga.o r128_video.o + +RADEONSRCS = radeon_driver.c radeon_cursor.c radeon_accel.c radeon_dga.c \ + radeon_video.c +RADEONOBJS = radeon_driver.o radeon_cursor.o radeon_accel.o radeon_dga.o \ + radeon_video.o -OBJS = r128_driver.o r128_cursor.o r128_accel.o r128_dga.o $(DRIOBJS) # r128_i2c.o +SRCS = $(PROBESRCS) $(R128SRCS) $(RADEONSRCS) $(DRISRCS) +OBJS = $(PROBEOBJS) $(R128OBJS) $(RADEONOBJS) $(DRIOBJS) #if defined(XF86DriverSDK) INCLUDES = -I. -I../../include @@ -39,12 +53,37 @@ DEFINES = $(DRIDEFINES) SubdirLibraryRule($(OBJS)) #endif +#ifndef InstallLinkedDynamicModule +#define InstallLinkedDynamicModule(module,linkname,dest,subdir) @@\ +linkname: module @@\ + @@\ +AllTarget(linkname) @@\ + LinkBuildNamedModule(module,linkname,subdir) @@\ + @@\ +install:: linkname @@\ + MakeDir($(DESTDIR)dest/subdir) @@\ + RemoveFile($(DESTDIR)dest/subdir/linkname) @@\ + $(LN) module $(DESTDIR)dest/subdir/linkname +#endif + +#ifndef InstallLinkedObjectModule +#if !DoLoadableServer +#define InstallLinkedObjectModule(module,linkname,dest,subdir) /**/ +#else +#define InstallLinkedObjectModule(module,linkname,dest,subdir) @@\ +InstallLinkedDynamicModule(Concat(module,_drv.o),Concat(linkname,_drv.o),dest,subdir) +#endif +#endif + ModuleObjectRule() ObjectModuleTarget(r128,$(OBJS)) InstallObjectModule(r128,$(MODULEDIR),drivers) +InstallLinkedObjectModule(r128,ati2,$(MODULEDIR),drivers) +InstallLinkedObjectModule(r128,radeon,$(MODULEDIR),drivers) + #if !defined(XF86DriverSDK) CppManTarget(r128,) InstallModuleManPage(r128) @@ -53,6 +92,9 @@ InstallModuleManPage(r128) DependTarget() InstallDriverSDKNonExecFile(Imakefile,$(DRIVERSDKDIR)/drivers/r128) + +InstallDriverSDKNonExecFile(ati_probe.c,$(DRIVERSDKDIR)/drivers/r128) + InstallDriverSDKNonExecFile(r128.h,$(DRIVERSDKDIR)/drivers/r128) InstallDriverSDKNonExecFile(r128_accel.c,$(DRIVERSDKDIR)/drivers/r128) InstallDriverSDKNonExecFile(r128_cursor.c,$(DRIVERSDKDIR)/drivers/r128) @@ -65,5 +107,11 @@ InstallDriverSDKNonExecFile(r128_dri.h,$(DRIVERSDKDIR)/drivers/r128) InstallDriverSDKNonExecFile(r128_dripriv.h,$(DRIVERSDKDIR)/drivers/r128) InstallDriverSDKNonExecFile(r128_sarea.h,$(DRIVERSDKDIR)/drivers/r128) -InstallDriverSDKObjectModule(r128,$(DRIVERSDKMODULEDIR),drivers) +InstallDriverSDKNonExecFile(radeon.h,$(DRIVERSDKDIR)/drivers/r128) +InstallDriverSDKNonExecFile(radeon_accel.c,$(DRIVERSDKDIR)/drivers/r128) +InstallDriverSDKNonExecFile(radeon_cursor.c,$(DRIVERSDKDIR)/drivers/r128) +InstallDriverSDKNonExecFile(radeon_driver.c,$(DRIVERSDKDIR)/drivers/r128) +InstallDriverSDKNonExecFile(radeon_dga.c,$(DRIVERSDKDIR)/drivers/r128) +InstallDriverSDKNonExecFile(radeon_reg.h,$(DRIVERSDKDIR)/drivers/r128) +InstallDriverSDKObjectModule(r128,$(DRIVERSDKMODULEDIR),drivers) diff --git a/xc/programs/Xserver/hw/xfree86/drivers/r128/ati2.h b/xc/programs/Xserver/hw/xfree86/drivers/r128/ati2.h new file mode 100644 index 000000000..e3eefb89d --- /dev/null +++ b/xc/programs/Xserver/hw/xfree86/drivers/r128/ati2.h @@ -0,0 +1,49 @@ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/ati2.h,v 1.2 2000/10/23 21:16:48 tsi Exp $ */ +/************************************************************************** + +Copyright 2000 ATI Technologies Inc. and VA Linux Systems, Inc., + Sunnyvale, California. +All Rights Reserved. + +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 +on the rights to use, copy, modify, merge, publish, distribute, sub +license, 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 (including the next +paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS 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. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin <martin@valinux.com> + * + */ + +#ifndef _ATI2_H_ +#define _ATI2_H_ + + /* ATI2_NAME is used for the server-side + ddx driver, the client-side DRI driver, + and the kernel-level DRM driver. */ +#define ATI2_NAME "ati2" +#define ATI2_VERSION_MAJOR 4 +#define ATI2_VERSION_MINOR 0 +#define ATI2_VERSION_PATCH 0 +#define ATI2_VERSION ((ATI2_VERSION_MAJOR << 16) \ + | (ATI2_VERSION_MINOR << 8) \ + | ATI2_VERSION_PATCH) + +#endif diff --git a/xc/programs/Xserver/hw/xfree86/drivers/r128/ati2_probe.c b/xc/programs/Xserver/hw/xfree86/drivers/r128/ati2_probe.c new file mode 100644 index 000000000..e52c1bdae --- /dev/null +++ b/xc/programs/Xserver/hw/xfree86/drivers/r128/ati2_probe.c @@ -0,0 +1,313 @@ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/ati2_probe.c,v 1.2 2000/10/23 12:10:14 alanh Exp $ */ +/************************************************************************** + +Copyright 2000 ATI Technologies Inc. and VA Linux Systems, Inc., + Sunnyvale, California. +All Rights Reserved. + +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 +on the rights to use, copy, modify, merge, publish, distribute, sub +license, 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 (including the next +paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS 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. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin <martin@valinux.com> + * + */ + + +/* + * To add a new driver (e.g., zzzzz) to the r128 directory: + * + * 1. Add a new XF86ModuleData line for the new driver: + * XF86ModuleData zzzzzModuleData = { &ATI2VersRec, ATI2Setup, 0 }; + * + * 2. Add a new driver AvailableOptions function call to + * ATI2AvailableOptions: + * if (!opts) opts = ZZZZZAvailableOptions(chipid, busid); + * + * 3. Add a new driver Identify function call to ATI2Identify: + * ZZZZZIdentify(flags); + * + * 4. Add a new driver Probe function call ATI2Probe: + * foundScreen |= ZZZZZProbe(drv, flags); + * + * 5. Add any symbols that are needed in your driver as an argument to + * the call to LoaderRefSymbLists() in ATI2Setup. + * + * Note: see r128_driver.c for examples of how to write the following + * functions: + * OptionInfoPtr ZZZZZAvailableOptions(int chipid, int busid); + * void ZZZZZIdentify(int flags); + * Bool ZZZZZProbe(DriverPtr drv, int flags); */ + + + /* X and server generic header files */ +#include "xf86.h" + + /* Driver data structures */ +#include "ati2.h" +#include "r128_probe.h" +#include "radeon_probe.h" + + /* Forward definitions for driver functions */ +static OptionInfoPtr ATI2AvailableOptions(int chipid, int busid); +static Bool ATI2Probe(DriverPtr drv, int flags); +static void ATI2Identify(int flags); + + /* Define driver */ +/* NOTE: This structure must be named R128 since the directory's name is + r128 so that the static X server can find the driver. */ +DriverRec R128 = { + ATI2_VERSION, + "ATI Rage 128 and Radeon", + ATI2Identify, + ATI2Probe, + ATI2AvailableOptions, + NULL +}; + +const char *vgahwSymbols[] = { + "vgaHWGetHWRec", + "vgaHWFreeHWRec", + "vgaHWLock", + "vgaHWUnlock", + "vgaHWSave", + "vgaHWRestore", + NULL +}; + +const char *fbdevHWSymbols[] = { + "fbdevHWInit", + "fbdevHWUseBuildinMode", + + "fbdevHWGetDepth", + "fbdevHWGetVidmem", + + /* colormap */ + "fbdevHWLoadPalette", + + /* ScrnInfo hooks */ + "fbdevHWSwitchMode", + "fbdevHWAdjustFrame", + "fbdevHWEnterVT", + "fbdevHWLeaveVT", + "fbdevHWValidMode", + "fbdevHWRestore", + "fbdevHWModeInit", + "fbdevHWSave", + + "fbdevHWUnmapMMIO", + "fbdevHWUnmapVidmem", + "fbdevHWMapMMIO", + "fbdevHWMapVidmem", + + NULL +}; + +const char *ddcSymbols[] = { + "xf86PrintEDID", + "xf86DoEDID_DDC1", + "xf86DoEDID_DDC2", + NULL +}; + +#ifdef XFree86LOADER +#ifdef USE_FB +static const char *fbSymbols[] = { + "fbScreenInit", + NULL +}; +#else +static const char *cfbSymbols[] = { + "cfbScreenInit", + "cfb16ScreenInit", + "cfb24ScreenInit", + "cfb32ScreenInit", + "cfb24_32ScreenInit", + NULL +}; +#endif + +static const char *xaaSymbols[] = { + "XAADestroyInfoRec", + "XAACreateInfoRec", + "XAAInit", + "XAAStippleScanlineFuncLSBFirst", + "XAAOverlayFBfuncs", + "XAACachePlanarMonoStipple", + "XAAScreenIndex", + NULL +}; + +static const char *xf8_32bppSymbols[] = { + "xf86Overlay8Plus32Init", + NULL +}; + +static const char *ramdacSymbols[] = { + "xf86InitCursor", + "xf86CreateCursorInfoRec", + "xf86DestroyCursorInfoRec", + NULL +}; + +#ifdef XF86DRI +static const char *drmSymbols[] = { + "drmAddBufs", + "drmAddMap", + "drmAvailable", + "drmCtlAddCommand", + "drmCtlInstHandler", + "drmGetInterruptFromBusID", + "drmMapBufs", + "drmMarkBufs", + "drmUnmapBufs", + "drmFreeVersion", + "drmGetVersion", + NULL +}; + +static const char *driSymbols[] = { + "DRIGetDrawableIndex", + "DRIFinishScreenInit", + "DRIDestroyInfoRec", + "DRICloseScreen", + "DRIDestroyInfoRec", + "DRIScreenInit", + "DRIDestroyInfoRec", + "DRICreateInfoRec", + "DRILock", + "DRIUnlock", + "DRIGetSAREAPrivate", + "DRIGetContext", + "DRIQueryVersion", + "GlxSetVisualConfigs", + NULL +}; +#endif + +static const char *vbeSymbols[] = { + "VBEInit", + "vbeDoEDID", + NULL +}; + +static MODULESETUPPROTO(ATI2Setup); + +static XF86ModuleVersionInfo ATI2VersRec = +{ + ATI2_NAME, + MODULEVENDORSTRING, + MODINFOSTRING1, + MODINFOSTRING2, + XF86_VERSION_CURRENT, + ATI2_VERSION_MAJOR, ATI2_VERSION_MINOR, ATI2_VERSION_PATCH, + ABI_CLASS_VIDEODRV, + ABI_VIDEODRV_VERSION, + MOD_CLASS_VIDEODRV, + { 0, 0, 0, 0 } +}; + +XF86ModuleData ati2ModuleData = { &ATI2VersRec, ATI2Setup, 0 }; +XF86ModuleData r128ModuleData = { &ATI2VersRec, ATI2Setup, 0 }; +XF86ModuleData radeonModuleData = { &ATI2VersRec, ATI2Setup, 0 }; + +static pointer ATI2Setup(pointer module, pointer opts, int *errmaj, + int *errmin) +{ + static Bool setupDone = FALSE; + + /* This module should be loaded only once, but check to be sure. */ + + if (!setupDone) { + setupDone = TRUE; + xf86AddDriver(&R128, module, 0); + + /* + * Modules that this driver always requires may be loaded here + * by calling LoadSubModule(). + */ + /* FIXME: add DRI support here */ + + /* + * Tell the loader about symbols from other modules that this + * module might refer to. + */ + LoaderRefSymLists(vgahwSymbols, +#ifdef USE_FB + fbSymbols, +#else + cfbSymbols, +#endif + xaaSymbols, + xf8_32bppSymbols, + ramdacSymbols, +#ifdef XF86DRI + drmSymbols, + driSymbols, +#endif + fbdevHWSymbols, + vbeSymbols, + /* ddcsymbols, */ + /* i2csymbols, */ + /* shadowSymbols, */ + NULL); + + /* + * The return value must be non-NULL on success even though there + * is no TearDownProc. + */ + return (pointer)1; + } else { + if (errmaj) *errmaj = LDR_ONCEONLY; + return NULL; + } +} +#endif + +/* Return the options for supported chipset 'n'; NULL otherwise. */ +static OptionInfoPtr ATI2AvailableOptions(int chipid, int busid) +{ + OptionInfoPtr opts = NULL; + + opts = R128AvailableOptions(chipid, busid); + if (!opts) opts = RADEONAvailableOptions(chipid, busid); + + return opts; +} + +/* Return the string name for supported chipset 'n'; NULL otherwise. */ +static void ATI2Identify(int flags) +{ + R128Identify(flags); + RADEONIdentify(flags); +} + +/* Return TRUE if chipset is present; FALSE otherwise. */ +static Bool ATI2Probe(DriverPtr drv, int flags) +{ + Bool foundScreen = FALSE; + + foundScreen |= R128Probe(drv, flags); + foundScreen |= RADEONProbe(drv, flags); + + return foundScreen; +} diff --git a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128.h b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128.h index 29895d14d..8e60e2ae4 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128.h +++ b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/r128.h,v 1.12 2000/09/13 15:47:32 martin Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/r128.h,v 1.15 2000/10/18 17:19:59 alanh Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -36,6 +36,50 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef _R128_H_ #define _R128_H_ + /* Xv support */ +#include "xf86xv.h" +#include "Xv.h" + + /* vgahw module (for VC save/restore only) */ +#include "vgaHW.h" + +#include "fbdevhw.h" + + /* XAA and Cursor Support */ +#include "xaa.h" +#include "xaalocal.h" +#include "xf86Cursor.h" + + + /* PCI support */ +#include "xf86PciInfo.h" +#include "xf86Pci.h" + + /* DDC support */ +#include "xf86DDC.h" + + /* VESA support */ +#include "vbe.h" + + /* DRI support */ +#ifdef XF86DRI +#include "GL/glxint.h" +#include "GL/glxtokens.h" +#include "xf86drm.h" +#include "xf86drmR128.h" +#include "sarea.h" +#define _XF86DRI_SERVER_ +#include "xf86dri.h" +#include "dri.h" +#include "r128_dri.h" +#include "r128_dripriv.h" +#include "r128_sarea.h" +#endif + +#ifdef RENDER +#include "picturestr.h" +#endif + #define R128_DEBUG 0 /* Turn off debugging output */ #define R128_TIMEOUT 2000000 /* Fall out of wait loops after this count */ #define R128_MMIOSIZE 0x80000 @@ -46,12 +90,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. ddx driver, the client-side DRI driver, and the kernel-level DRM driver. */ #define R128_NAME "r128" -#define R128_VERSION_MAJOR 3 -#define R128_VERSION_MINOR 1 -#define R128_VERSION_PATCH 1 -#define R128_VERSION ((R128_VERSION_MAJOR << 16) \ - | (R128_VERSION_MINOR << 8) \ - | R128_VERSION_PATCH) #if R128_DEBUG #define R128TRACE(x) \ @@ -210,7 +248,6 @@ typedef struct { Bool PaletteSavedOnVT; /* Palette saved on last VT switch */ - I2CBusPtr i2c; XAAInfoRecPtr accel; Bool accelOn; xf86CursorInfoPtr cursor; @@ -325,6 +362,7 @@ typedef struct { int textureSize; int log2TexGran; #endif + XF86VideoAdaptorPtr adaptor; } R128InfoRec, *R128InfoPtr; #define R128WaitForFifo(pScrn, entries) \ @@ -338,7 +376,7 @@ extern void R128WaitForIdle(ScrnInfoPtr pScrn); extern void R128EngineReset(ScrnInfoPtr pScrn); extern void R128EngineFlush(ScrnInfoPtr pScrn); -extern int INPLL(ScrnInfoPtr pScrn, int addr); +extern int R128INPLL(ScrnInfoPtr pScrn, int addr); extern void R128WaitForVerticalSync(ScrnInfoPtr pScrn); extern void R128AdjustFrame(int scrnIndex, int x, int y, int flags); extern Bool R128SwitchMode(int ScrnIndex, DisplayModePtr mode, int flags); diff --git a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_accel.c b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_accel.c index 0729e13a5..26ce9f163 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_accel.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_accel.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/r128_accel.c,v 1.14 2000/08/24 22:20:17 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/r128_accel.c,v 1.16 2000/10/18 17:19:59 alanh Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -30,6 +30,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. * Authors: * Rickard E. Faith <faith@precisioninsight.com> * Kevin E. Martin <kevin@precisioninsight.com> + * Alan Hourihane <ahourihane@valinux.com> * * Credits: * @@ -48,6 +49,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. * * Notes on unimplemented XAA optimizations: * + * SetClipping: The Rage128 doesn't support the full 16bit registers needed + * for XAA clip rect support. * SolidFillTrap: This will probably work if we can compute the correct * Bresenham error values. * TwoPointLine: The Rage 128 supports Bresenham lines instead. @@ -61,17 +64,18 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. * direct/indirect method. If we had more data registers, * then we could do better. If XAA supported a trigger write * address, the code would be simpler. + * (Alan Hourihane) Update. We now use purely indirect and clip the full + * rectangle. Seems as the direct method has some problems + * with this, although this indirect method is much faster + * than the old method of setting up the engine per scanline. + * This code was the basis of the Radeon work we did. * Color8x8PatternFill: Apparently, an 8x8 color brush cannot take an 8x8 * pattern from frame buffer memory. - * ImageWrites: The direct method isn't supported because XAA does not - * support a final trigger register write. The indirect - * method slows down common operations. Perhaps additional - * XAA flags to use this only for some operations would help. + * ImageWrites: See CPUToScreenColorExpandFill. * */ -#define R128_CLIPPING 1 -#define R128_IMAGEWRITE 0 /* Indirect image write is slow */ +#define R128_IMAGEWRITE 0 /* Disable ImageWrites - faster in software */ #define R128_TRAPEZOIDS 0 /* Trapezoids don't work */ /* X and server generic header files */ @@ -88,26 +92,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "xaa.h" #include "xf86Cursor.h" - /* PCI support */ -#include "xf86PciInfo.h" -#include "xf86Pci.h" - - /* DDC support */ -#include "xf86DDC.h" - - /* DRI support */ -#ifdef XF86DRI -#include "GL/glxint.h" -#include "xf86drm.h" -#include "sarea.h" -#define _XF86DRI_SERVER_ -#include "xf86dri.h" -#include "dri.h" -#include "r128_dri.h" -#include "r128_dripriv.h" -#include "r128_sarea.h" -#endif - /* Driver data structures */ #include "r128.h" #include "r128_reg.h" @@ -137,25 +121,24 @@ static struct { /* Flush all dirty data in the Pixel Cache to memory. */ void R128EngineFlush(ScrnInfoPtr pScrn) { - int i; - unsigned int j; - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; + int i; OUTREGP(R128_PC_NGUI_CTLSTAT, R128_PC_FLUSH_ALL, ~R128_PC_FLUSH_ALL); for (i = 0; i < R128_TIMEOUT; i++) { - if (!((j=INREG(R128_PC_NGUI_CTLSTAT)) & R128_PC_BUSY)) break; + if (!(INREG(R128_PC_NGUI_CTLSTAT) & R128_PC_BUSY)) break; } } /* Reset graphics card to known state. */ void R128EngineReset(ScrnInfoPtr pScrn) { - R128InfoPtr info = R128PTR(pScrn); - CARD32 clock_cntl_index; - CARD32 mclk_cntl; - CARD32 gen_reset_cntl; - unsigned int j; - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; + CARD32 clock_cntl_index; + CARD32 mclk_cntl; + CARD32 gen_reset_cntl; R128EngineFlush(pScrn); @@ -167,9 +150,9 @@ void R128EngineReset(ScrnInfoPtr pScrn) gen_reset_cntl = INREG(R128_GEN_RESET_CNTL); OUTREG(R128_GEN_RESET_CNTL, gen_reset_cntl | R128_SOFT_RESET_GUI); - j = INREG(R128_GEN_RESET_CNTL); + INREG(R128_GEN_RESET_CNTL); OUTREG(R128_GEN_RESET_CNTL, gen_reset_cntl & ~R128_SOFT_RESET_GUI); - j = INREG(R128_GEN_RESET_CNTL); + INREG(R128_GEN_RESET_CNTL); OUTPLL(R128_MCLK_CNTL, mclk_cntl); OUTREG(R128_CLOCK_CNTL_INDEX, clock_cntl_index); @@ -184,20 +167,18 @@ void R128EngineReset(ScrnInfoPtr pScrn) these slots are empty. */ void R128WaitForFifoFunction(ScrnInfoPtr pScrn, int entries) { - R128InfoPtr info = R128PTR(pScrn); - int i; - unsigned int j; - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; + int i; for (;;) { for (i = 0; i < R128_TIMEOUT; i++) { - j = INREG(R128_GUI_STAT); - info->fifo_slots = j & R128_GUI_FIFOCNT_MASK; + info->fifo_slots = INREG(R128_GUI_STAT) & R128_GUI_FIFOCNT_MASK; if (info->fifo_slots >= entries) return; } R128TRACE(("FIFO timed out: %d entries, stat=0x%08x, probe=0x%08x\n", - j & R128_GUI_FIFOCNT_MASK, - j, + INREG(R128_GUI_STAT) & R128_GUI_FIFOCNT_MASK, + INREG(R128_GUI_STAT), INREG(R128_GUI_PROBE))); xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "FIFO timed out, resetting engine...\n"); @@ -213,24 +194,22 @@ void R128WaitForFifoFunction(ScrnInfoPtr pScrn, int entries) standard "sync" function that will make the hardware "quiescent". */ void R128WaitForIdle(ScrnInfoPtr pScrn) { - R128InfoPtr info = R128PTR(pScrn); - int i; - unsigned int j; - R128MMIO_VARS(); - + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; + int i; R128WaitForFifoFunction(pScrn, 64); for (;;) { for (i = 0; i < R128_TIMEOUT; i++) { - if (!((j=INREG(R128_GUI_STAT)) & R128_GUI_ACTIVE)) { + if (!(INREG(R128_GUI_STAT) & R128_GUI_ACTIVE)) { R128EngineFlush(pScrn); return; } } R128TRACE(("Idle timed out: %d entries, stat=0x%08x, probe=0x%08x\n", - j & R128_GUI_FIFOCNT_MASK, - j, + INREG(R128_GUI_STAT) & R128_GUI_FIFOCNT_MASK, + INREG(R128_GUI_STAT), INREG(R128_GUI_PROBE))); xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Idle timed out, resetting engine...\n"); @@ -245,8 +224,8 @@ void R128WaitForIdle(ScrnInfoPtr pScrn) static void R128SetupForSolidFill(ScrnInfoPtr pScrn, int color, int rop, unsigned int planemask) { - R128InfoPtr info = R128PTR(pScrn); - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; R128WaitForFifo(pScrn, 4); OUTREG(R128_DP_GUI_MASTER_CNTL, (info->dp_gui_master_cntl @@ -266,8 +245,8 @@ static void R128SetupForSolidFill(ScrnInfoPtr pScrn, static void R128SubsequentSolidFillRect(ScrnInfoPtr pScrn, int x, int y, int w, int h) { - R128InfoPtr info = R128PTR(pScrn); - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; R128WaitForFifo(pScrn, 2); OUTREG(R128_DST_Y_X, (y << 16) | x); @@ -278,8 +257,8 @@ static void R128SubsequentSolidFillRect(ScrnInfoPtr pScrn, static void R128SetupForSolidLine(ScrnInfoPtr pScrn, int color, int rop, unsigned int planemask) { - R128InfoPtr info = R128PTR(pScrn); - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; R128WaitForFifo(pScrn, 3); OUTREG(R128_DP_GUI_MASTER_CNTL, (info->dp_gui_master_cntl @@ -309,9 +288,9 @@ static void R128SubsequentSolidBresenhamLine(ScrnInfoPtr pScrn, int major, int minor, int err, int len, int octant) { - R128InfoPtr info = R128PTR(pScrn); - int flags = 0; - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; + int flags = 0; if (octant & YMAJOR) flags |= R128_DST_Y_MAJOR; if (!(octant & XDECREASING)) flags |= R128_DST_X_DIR_LEFT_TO_RIGHT; @@ -336,8 +315,8 @@ static void R128SubsequentSolidBresenhamLine(ScrnInfoPtr pScrn, static void R128SubsequentSolidHorVertLine(ScrnInfoPtr pScrn, int x, int y, int len, int dir ) { - R128InfoPtr info = R128PTR(pScrn); - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; R128WaitForFifo(pScrn, 1); OUTREG(R128_DP_CNTL, (R128_DST_X_LEFT_TO_RIGHT @@ -369,9 +348,9 @@ static void R128SetupForDashedLine(ScrnInfoPtr pScrn, int rop, unsigned int planemask, int length, unsigned char *pattern) { - R128InfoPtr info = R128PTR(pScrn); - CARD32 pat = *(CARD32 *)pattern; - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; + CARD32 pat = *(CARD32 *)pattern; switch (length) { case 2: pat |= pat << 2; /* fall through */ @@ -400,9 +379,9 @@ static void R128SubsequentDashedBresenhamLine(ScrnInfoPtr pScrn, int err, int len, int octant, int phase) { - R128InfoPtr info = R128PTR(pScrn); - int flags = 0; - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; + int flags = 0; if (octant & YMAJOR) flags |= R128_DST_Y_MAJOR; if (!(octant & XDECREASING)) flags |= R128_DST_X_DIR_LEFT_TO_RIGHT; @@ -433,12 +412,13 @@ static void R128SubsequentSolidFillTrap(ScrnInfoPtr pScrn, int y, int h, int left, int dxL, int dyL, int eL, int right, int dxR, int dyR, int eR) { - int flags = 0; - int Lymajor = 0; - int Rymajor = 0; - int origdxL = dxL; - int origdxR = dxR; - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; + int flags = 0; + int Lymajor = 0; + int Rymajor = 0; + int origdxL = dxL; + int origdxR = dxR; R128TRACE(("Trap %d %d; L %d %d %d %d; R %d %d %d %d\n", y, h, @@ -478,52 +458,6 @@ static void R128SubsequentSolidFillTrap(ScrnInfoPtr pScrn, int y, int h, } #endif -#if R128_CLIPPING -/* Setup for XAA clipping rectangle. - - Tests: xtest CH06/drwrctngl - - These x11perf data show why we don't use clipping for lines. Clipping - can improve performance for other functions. - - 1024x768@76 8bpp - Without With - x11perf -seg100c1 241000.0/sec 185000.0/sec - x11perf -seg100c2 238000.0/sec 154000.0/sec - x11perf -seg100c3 194000.0/sec 132000.0/sec - -*/ -static void R128SetClippingRectangle(ScrnInfoPtr pScrn, - int left, int top, int right, int bottom) -{ - R128InfoPtr info = R128PTR(pScrn); - R128MMIO_VARS(); - - if (left > 8191 || top > 8191 || right > 8191 || bottom > 8191 - || left < 0 || top < 0 || right < 0 || bottom < 0 - || left > 4000 || right > 4000 || top > 4000 || bottom > 4000 - || left >= right || top >= bottom) - R128TRACE(("Clip %d %d %d %d *************************************\n", - left, top, right, bottom)); - - R128WaitForFifo(pScrn, 2); - OUTREG(R128_SC_TOP_LEFT, (top << 16) | left); - OUTREG(R128_SC_BOTTOM_RIGHT, (bottom << 16) | right); -} - -static void R128DisableClipping (ScrnInfoPtr pScrn) -{ - R128InfoPtr info = R128PTR(pScrn); - R128MMIO_VARS(); - - R128WaitForFifo(pScrn, 2); - OUTREG(R128_SC_TOP_LEFT, 0); - OUTREG(R128_SC_BOTTOM_RIGHT, (R128_DEFAULT_SC_RIGHT_MAX - | R128_DEFAULT_SC_BOTTOM_MAX)); -} -#endif - - /* Setup for XAA screen-to-screen copy. Tests: xtest CH06/fllrctngl (also tests transparency). @@ -533,8 +467,8 @@ static void R128SetupForScreenToScreenCopy(ScrnInfoPtr pScrn, unsigned int planemask, int trans_color) { - R128InfoPtr info = R128PTR(pScrn); - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; info->xdir = xdir; info->ydir = ydir; @@ -566,8 +500,8 @@ static void R128SubsequentScreenToScreenCopy(ScrnInfoPtr pScrn, int x2, int y2, int w, int h) { - R128InfoPtr info = R128PTR(pScrn); - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; if (info->xdir < 0) x1 += w - 1, x2 += w - 1; if (info->ydir < 0) y1 += h - 1, y2 += h - 1; @@ -595,8 +529,8 @@ static void R128SetupForMono8x8PatternFill(ScrnInfoPtr pScrn, int fg, int bg, int rop, unsigned int planemask) { - R128InfoPtr info = R128PTR(pScrn); - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; R128WaitForFifo(pScrn, 6); OUTREG(R128_DP_GUI_MASTER_CNTL, (info->dp_gui_master_cntl @@ -618,8 +552,8 @@ static void R128SubsequentMono8x8PatternFillRect(ScrnInfoPtr pScrn, int patternx, int patterny, int x, int y, int w, int h) { - R128InfoPtr info = R128PTR(pScrn); - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; R128WaitForFifo(pScrn, 3); OUTREG(R128_BRUSH_Y_X, (patterny << 8) | patternx); @@ -637,8 +571,8 @@ static void R128SetupForColor8x8PatternFill(ScrnInfoPtr pScrn, int rop, unsigned int planemask, int trans_color) { - R128InfoPtr info = R128PTR(pScrn); - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; R128TRACE(("Color8x8 %d %d %d\n", trans_color, patx, paty)); @@ -665,7 +599,8 @@ static void R128SubsequentColor8x8PatternFillRect( ScrnInfoPtr pScrn, int patx, int paty, int x, int y, int w, int h) { - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; R128TRACE(("Color8x8 %d,%d %d,%d %d %d\n", patx, paty, x, y, w, h)); R128WaitForFifo(pScrn, 3); @@ -724,12 +659,13 @@ static void R128SetupForScanlineCPUToScreenColorExpandFill(ScrnInfoPtr pScrn, unsigned int planemask) { - R128InfoPtr info = R128PTR(pScrn); - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; R128WaitForFifo(pScrn, 4); OUTREG(R128_DP_GUI_MASTER_CNTL, (info->dp_gui_master_cntl - | R128_GMC_BRUSH_1X8_COLOR + | R128_GMC_DST_CLIPPING + | R128_GMC_BRUSH_NONE | (bg == -1 ? R128_GMC_SRC_DATATYPE_MONO_FG_LA : R128_GMC_SRC_DATATYPE_MONO_FG_BG) @@ -748,65 +684,74 @@ static void R128SubsequentScanlineCPUToScreenColorExpandFill(ScrnInfoPtr pScrn, int w, int h, int skipleft) { - R128InfoPtr info = R128PTR(pScrn); - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; + int x1clip = x+skipleft; + int x2clip = x+w; - info->scanline_y = y; - info->scanline_x = x; info->scanline_h = h; - info->scanline_h_w = (1 << 16) | w; - info->scanline_words = (w + 31) / 32; - info->scanline_direct = 0; + info->scanline_words = (w + 31) >> 5; - if (info->scanline_words <= 9 && info->scanline_h > 1) { - /* Turn on direct for next set of scan lines */ +#if 0 + /* Seems as though the Rage128's doesn't like blitting directly + * as we must be overwriting something too quickly, therefore we + * render to the buffer first and then blit */ + if ((info->scanline_words * h) <= 9) { + /* Turn on direct for less than 9 dword colour expansion */ info->scratch_buffer[0] = (unsigned char *)(ADDRREG(R128_HOST_DATA_LAST) - (info->scanline_words - 1)); - info->scanline_direct = 1; + info->scanline_direct = 1; + } else +#endif + { + /* Use indirect for anything else */ + info->scratch_buffer[0] = info->scratch_save; + info->scanline_direct = 0; + } - /* Make engine ready for next line */ - R128WaitForFifo(pScrn, 2); - OUTREG(R128_DST_Y_X, ((info->scanline_y++ << 16) - | info->scanline_x)); - OUTREG(R128_DST_HEIGHT_WIDTH, info->scanline_h_w); + if (pScrn->bitsPerPixel == 24) { + x1clip *= 3; + x2clip *= 3; } + + R128WaitForFifo(pScrn, 4 + (info->scanline_direct ? + (info->scanline_words * h) : 0) ); + OUTREG(R128_SC_TOP_LEFT, (y << 16) | (x1clip & 0xffff)); + OUTREG(R128_SC_BOTTOM_RIGHT, ((y+h-1) << 16) | ((x2clip-1) & 0xffff)); + OUTREG(R128_DST_Y_X, (y << 16) | (x & 0xffff)); + /* Have to pad the width here and use clipping engine */ + OUTREG(R128_DST_HEIGHT_WIDTH, (h << 16) | ((w + 31) & ~31)); } /* Subsequent XAA indirect CPU-to-screen color expandion. This is called once for each scanline. */ static void R128SubsequentColorExpandScanline(ScrnInfoPtr pScrn, int bufno) { - R128InfoPtr info = R128PTR(pScrn); - CARD32 *p = (CARD32 *)info->scratch_buffer[bufno]; + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; + CARD32 *p = (CARD32 *)info->scratch_buffer[bufno]; int i; - int left = info->scanline_words; + int left = info->scanline_words; volatile CARD32 *d; - R128MMIO_VARS(); - - --info->scanline_h; - if (info->scanline_direct) { - if (info->scanline_h <= 1) { - /* Turn off direct for last scan line */ - info->scratch_buffer[0] = info->scratch_save; - info->scanline_direct = 0; - return; - } - } - R128WaitForFifo(pScrn, 2); - OUTREG(R128_DST_Y_X, ((info->scanline_y++ << 16) - | info->scanline_x)); - OUTREG(R128_DST_HEIGHT_WIDTH, info->scanline_h_w); - if (info->scanline_direct) return; - + --info->scanline_h; while (left) { - if (left <= 9) { + if (left <= 8) { + /* Last scanline - finish write to DATA_LAST */ + if (info->scanline_h == 0) { R128WaitForFifo(pScrn, left); /* Unrolling doesn't improve performance */ for (d = ADDRREG(R128_HOST_DATA_LAST) - (left - 1); left; --left) *d++ = *p++; + return; + } else { + R128WaitForFifo(pScrn, left); + /* Unrolling doesn't improve performance */ + for (d = ADDRREG(R128_HOST_DATA7) - (left - 1); left; --left) + *d++ = *p++; + } } else { R128WaitForFifo(pScrn, 8); /* Unrolling doesn't improve performance */ @@ -817,7 +762,6 @@ static void R128SubsequentColorExpandScanline(ScrnInfoPtr pScrn, int bufno) } } -#if R128_IMAGEWRITE /* Setup for XAA indirect image write. @@ -827,6 +771,7 @@ static void R128SubsequentColorExpandScanline(ScrnInfoPtr pScrn, int bufno) x11perf -putimage100 2150.0/sec 1170.0/sec x11perf -putimage500 108.0/sec 49.8/sec */ +#if R128_IMAGEWRITE static void R128SetupForScanlineImageWrite(ScrnInfoPtr pScrn, int rop, unsigned int planemask, @@ -834,14 +779,15 @@ static void R128SetupForScanlineImageWrite(ScrnInfoPtr pScrn, int bpp, int depth) { - R128InfoPtr info = R128PTR(pScrn); - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; info->scanline_bpp = bpp; R128WaitForFifo(pScrn, 2); OUTREG(R128_DP_GUI_MASTER_CNTL, (info->dp_gui_master_cntl - | R128_GMC_BRUSH_SOLID_COLOR + | R128_GMC_DST_CLIPPING + | R128_GMC_BRUSH_1X8_COLOR | R128_GMC_SRC_DATATYPE_COLOR | R128_ROP[rop].rop | R128_GMC_BYTE_LSB_TO_MSB @@ -865,65 +811,78 @@ static void R128SubsequentScanlineImageWriteRect(ScrnInfoPtr pScrn, int w, int h, int skipleft) { - R128InfoPtr info = R128PTR(pScrn); - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; + int x1clip = x+skipleft; + int x2clip = x+w; + + int shift = 0; /* 32bpp */ + + if (pScrn->bitsPerPixel == 8) shift = 3; + else if (pScrn->bitsPerPixel == 16) shift = 1; - info->scanline_y = y; - info->scanline_x = x; info->scanline_h = h; - info->scanline_h_w = (1 << 16) | w; - info->scanline_words = (w * info->scanline_bpp + 31) / 32; - info->scanline_direct = 0; + info->scanline_words = (w * info->scanline_bpp + 31) >> 5; - if (info->scanline_words <= 9 && info->scanline_h > 1) { - /* Turn on direct for next set of scan lines */ +#if 0 + /* Seeing as the CPUToScreen doesn't like this, I've done this + * here too, as it uses pretty much the same path. */ + if ((info->scanline_words * h) <= 9) { + /* Turn on direct for less than 9 dword colour expansion */ info->scratch_buffer[0] = (unsigned char *)(ADDRREG(R128_HOST_DATA_LAST) - (info->scanline_words - 1)); - info->scanline_direct = 1; + info->scanline_direct = 1; + } else +#endif + { + /* Use indirect for anything else */ + info->scratch_buffer[0] = info->scratch_save; + info->scanline_direct = 0; + } - /* Make engine ready for next line */ - R128WaitForFifo(pScrn, 2); - OUTREG(R128_DST_Y_X, ((info->scanline_y++ << 16) - | info->scanline_x)); - OUTREG(R128_DST_HEIGHT_WIDTH, info->scanline_h_w); + if (pScrn->bitsPerPixel == 24) { + x1clip *= 3; + x2clip *= 3; } + + R128WaitForFifo(pScrn, 4 + (info->scanline_direct ? + (info->scanline_words * h) : 0) ); + OUTREG(R128_SC_TOP_LEFT, (y << 16) | (x1clip & 0xffff)); + OUTREG(R128_SC_BOTTOM_RIGHT, ((y+h-1) << 16) | ((x2clip-1) & 0xffff)); + OUTREG(R128_DST_Y_X, (y << 16) | (x & 0xffff)); + /* Have to pad the width here and use clipping engine */ + OUTREG(R128_DST_HEIGHT_WIDTH, (h << 16) | ((w + shift) & ~shift)); } /* Subsequent XAA indirect iamge write. This is called once for each scanline. */ static void R128SubsequentImageWriteScanline(ScrnInfoPtr pScrn, int bufno) { - R128InfoPtr info = R128PTR(pScrn); - CARD32 *p = (CARD32 *)info->scratch_buffer[bufno]; + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; + CARD32 *p = (CARD32 *)info->scratch_buffer[bufno]; int i; - int left = info->scanline_words; + int left = info->scanline_words; volatile CARD32 *d; - R128MMIO_VARS(); - - --info->scanline_h; - if (info->scanline_direct) { - if (info->scanline_h <= 1) { - /* Turn off direct for last scan line */ - info->scratch_buffer[0] = info->scratch_save; - info->scanline_direct = 0; - return; - } - } - - R128WaitForFifo(pScrn, 2); - OUTREG(R128_DST_Y_X, ((info->scanline_y++ << 16) - | info->scanline_x)); - OUTREG(R128_DST_HEIGHT_WIDTH, info->scanline_h_w); if (info->scanline_direct) return; - + --info->scanline_h; while (left) { - if (left <= 9) { + if (left <= 8) { + /* Last scanline - finish write to DATA_LAST */ + if (info->scanline_h == 0) { R128WaitForFifo(pScrn, left); /* Unrolling doesn't improve performance */ for (d = ADDRREG(R128_HOST_DATA_LAST) - (left - 1); left; --left) *d++ = *p++; + return; + } else { + R128WaitForFifo(pScrn, left); + /* Unrolling doesn't improve performance */ + for (d = ADDRREG(R128_HOST_DATA7) - (left - 1); left; --left) + *d++ = *p++; + } } else { R128WaitForFifo(pScrn, 8); /* Unrolling doesn't improve performance */ @@ -938,8 +897,8 @@ static void R128SubsequentImageWriteScanline(ScrnInfoPtr pScrn, int bufno) /* Initialize the acceleration hardware. */ void R128EngineInit(ScrnInfoPtr pScrn) { - R128InfoPtr info = R128PTR(pScrn); - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; R128TRACE(("EngineInit (%d/%d)\n", info->CurrentLayout.pixel_code, info->CurrentLayout.bitsPerPixel)); @@ -975,8 +934,7 @@ void R128EngineInit(ScrnInfoPtr pScrn) info->dp_gui_master_cntl = ((info->datatype << R128_GMC_DST_DATATYPE_SHIFT) | R128_GMC_CLR_CMP_CNTL_DIS - | R128_GMC_AUX_CLIP_DIS - | R128_GMC_DST_CLIPPING); + | R128_GMC_AUX_CLIP_DIS); R128WaitForFifo(pScrn, 1); OUTREG(R128_DP_GUI_MASTER_CNTL, (info->dp_gui_master_cntl | R128_GMC_BRUSH_SOLID_COLOR @@ -992,6 +950,7 @@ void R128EngineInit(ScrnInfoPtr pScrn) OUTREG(R128_DP_SRC_BKGD_CLR, 0x00000000); OUTREG(R128_DP_WRITE_MASK, 0xffffffff); + R128WaitForFifo(pScrn, 1); #if X_BYTE_ORDER == X_BIG_ENDIAN OUTREGP(R128_DP_DATATYPE, R128_HOST_BIG_ENDIAN_EN, ~R128_HOST_BIG_ENDIAN_EN); @@ -1054,19 +1013,18 @@ static void R128MMIOAccelInit(ScrnInfoPtr pScrn, XAAInfoRecPtr a) /* Indirect CPU-To-Screen Color Expand */ #if X_BYTE_ORDER == X_LITTLE_ENDIAN - a->ScanlineCPUToScreenColorExpandFillFlags = 0; + a->ScanlineCPUToScreenColorExpandFillFlags = LEFT_EDGE_CLIPPING + | LEFT_EDGE_CLIPPING_NEGATIVE_X; #else - a->ScanlineCPUToScreenColorExpandFillFlags = BIT_ORDER_IN_BYTE_MSBFIRST; + a->ScanlineCPUToScreenColorExpandFillFlags = BIT_ORDER_IN_BYTE_MSBFIRST + | LEFT_EDGE_CLIPPING + | LEFT_EDGE_CLIPPING_NEGATIVE_X; #endif a->NumScanlineColorExpandBuffers = 1; a->ScanlineColorExpandBuffers = info->scratch_buffer; -#if R128_IMAGEWRITE info->scratch_save = xalloc(((pScrn->virtualX+31)/32*4) - + (pScrn->virtualX - * info->pixel_bytes)); -#else - info->scratch_save = xalloc(((pScrn->virtualX+31)/32*4)); -#endif + + (pScrn->virtualX + * info->CurrentLayout.pixel_bytes)); info->scratch_buffer[0] = info->scratch_save; a->SetupForScanlineCPUToScreenColorExpandFill = R128SetupForScanlineCPUToScreenColorExpandFill; @@ -1085,33 +1043,22 @@ static void R128MMIOAccelInit(ScrnInfoPtr pScrn, XAAInfoRecPtr a) a->DashPatternMaxLength = 32; a->DashedLineFlags = (LINE_PATTERN_LSBFIRST_LSBJUSTIFIED | LINE_PATTERN_POWER_OF_2_ONLY); -#if R128_CLIPPING - /* Clipping. */ - if (info->CurrentLayout.depth != 8 && info->CurrentLayout.pixel_code != 24) { - /* There is one xtest error in 8bpp and - many xtest errors in 24/24 that do not - appear at other depths. */ - a->SetClippingRectangle = R128SetClippingRectangle; - a->DisableClipping = R128DisableClipping; - a->ClippingFlags - = (HARDWARE_CLIP_SCREEN_TO_SCREEN_COPY - | HARDWARE_CLIP_MONO_8x8_FILL - | HARDWARE_CLIP_COLOR_8x8_FILL - | HARDWARE_CLIP_SOLID_FILL); - } -#endif -#if R128_IMAGEWRITE /* ImageWrite */ +#if R128_IMAGEWRITE a->NumScanlineImageWriteBuffers = 1; a->ScanlineImageWriteBuffers = info->scratch_buffer; info->scratch_buffer[0] = info->scratch_save; a->SetupForScanlineImageWrite = R128SetupForScanlineImageWrite; a->SubsequentScanlineImageWriteRect= R128SubsequentScanlineImageWriteRect; a->SubsequentImageWriteScanline = R128SubsequentImageWriteScanline; - a->ImageWriteFlags = (CPU_TRANSFER_PAD_DWORD - | SCANLINE_PAD_DWORD - | SYNC_AFTER_IMAGE_WRITE); + a->ScanlineImageWriteFlags = CPU_TRANSFER_PAD_DWORD + /* Performance tests show that we shouldn't use GXcopy for + * uploads as a memcpy is faster */ + | NO_GXCOPY + | LEFT_EDGE_CLIPPING + | LEFT_EDGE_CLIPPING_NEGATIVE_X + | SCANLINE_PAD_DWORD; #endif } diff --git a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_cursor.c b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_cursor.c index 586a5c36a..02f9d80c9 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_cursor.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_cursor.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/r128_cursor.c,v 1.9 2000/06/17 00:27:32 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/r128_cursor.c,v 1.11 2000/10/18 17:19:59 alanh Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -53,6 +53,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "xaa.h" #include "xf86Cursor.h" +#include "xf86xv.h" + /* PCI support */ #include "xf86PciInfo.h" #include "xf86Pci.h" @@ -95,7 +97,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. /* Set cursor foreground and background colors. */ static void R128SetCursorColors(ScrnInfoPtr pScrn, int bg, int fg) { - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; OUTREG(R128_CUR_CLR0, bg); OUTREG(R128_CUR_CLR1, fg); @@ -105,12 +108,12 @@ static void R128SetCursorColors(ScrnInfoPtr pScrn, int bg, int fg) (xorigin,yorigin). */ static void R128SetCursorPosition(ScrnInfoPtr pScrn, int x, int y) { - R128InfoPtr info = R128PTR(pScrn); - xf86CursorInfoPtr cursor = info->cursor; - int xorigin = 0; - int yorigin = 0; - int total_y = pScrn->frameY1 - pScrn->frameY0; - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; + xf86CursorInfoPtr cursor = info->cursor; + int xorigin = 0; + int yorigin = 0; + int total_y = pScrn->frameY1 - pScrn->frameY0; if (x < 0) xorigin = -x; if (y < 0) yorigin = -y; @@ -130,12 +133,12 @@ static void R128SetCursorPosition(ScrnInfoPtr pScrn, int x, int y) will be called after this, so we can ignore xorigin and yorigin. */ static void R128LoadCursorImage(ScrnInfoPtr pScrn, unsigned char *image) { - R128InfoPtr info = R128PTR(pScrn); - CARD32 *s = (CARD32 *)image; - CARD32 *d = (CARD32 *)(info->FB + info->cursor_start); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; + CARD32 *s = (CARD32 *)image; + CARD32 *d = (CARD32 *)(info->FB + info->cursor_start); int y; CARD32 save; - R128MMIO_VARS(); save = INREG(R128_CRTC_GEN_CNTL); OUTREG(R128_CRTC_GEN_CNTL, save & ~R128_CRTC_CUR_EN); @@ -200,7 +203,8 @@ static void R128LoadCursorImage(ScrnInfoPtr pScrn, unsigned char *image) /* Hide hardware cursor. */ static void R128HideCursor(ScrnInfoPtr pScrn) { - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; OUTREGP(R128_CRTC_GEN_CNTL, 0, ~R128_CRTC_CUR_EN); } @@ -208,7 +212,8 @@ static void R128HideCursor(ScrnInfoPtr pScrn) /* Show hardware cursor. */ static void R128ShowCursor(ScrnInfoPtr pScrn) { - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; OUTREGP(R128_CRTC_GEN_CNTL, R128_CRTC_CUR_EN, ~R128_CRTC_CUR_EN); } diff --git a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_dga.c b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_dga.c index 918928861..9206f4728 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_dga.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_dga.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/r128_dga.c,v 1.2 2000/06/17 00:03:22 martin Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/r128_dga.c,v 1.4 2000/10/18 17:20:00 alanh Exp $ */ /* * Authors: * Ove Kĺven <ovek@transgaming.com>, @@ -10,31 +10,6 @@ #include "xf86_OSproc.h" #include "xf86_ansic.h" - /* PCI support */ -#include "xf86Pci.h" -#include "xf86PciInfo.h" - - /* DDC support */ -#include "xf86DDC.h" - - /* XAA and Cursor Support */ -#include "xaa.h" -#include "xaalocal.h" -#include "xf86Cursor.h" - - /* DRI support */ -#ifdef XF86DRI -#include "GL/glxint.h" -#include "xf86drm.h" -#include "sarea.h" -#define _XF86DRI_SERVER_ -#include "xf86dri.h" -#include "dri.h" -#include "r128_dri.h" -#include "r128_dripriv.h" -#include "r128_sarea.h" -#endif - /* Driver data structures */ #include "r128.h" @@ -49,8 +24,10 @@ static int R128_GetViewport(ScrnInfoPtr); static void R128_SetViewport(ScrnInfoPtr, int, int, int); static void R128_FillRect(ScrnInfoPtr, int, int, int, int, unsigned long); static void R128_BlitRect(ScrnInfoPtr, int, int, int, int, int, int); +#if 0 static void R128_BlitTransRect(ScrnInfoPtr, int, int, int, int, int, int, unsigned long); +#endif static DGAFunctionRec R128_DGAFuncs = { @@ -344,6 +321,7 @@ R128_BlitRect( } +#if 0 static void R128_BlitTransRect( ScrnInfoPtr pScrn, @@ -355,6 +333,7 @@ R128_BlitTransRect( /* this one should be separate since the XAA function would prohibit usage of ~0 as the key */ } +#endif static Bool diff --git a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_dri.c index 4e8005602..e069bf08a 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_dri.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_dri.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/r128_dri.c,v 1.5 2000/08/25 13:42:37 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/r128_dri.c,v 1.6 2000/10/18 17:20:00 alanh Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -59,31 +59,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "cfb32.h" #include "cfb24_32.h" - /* XAA and Cursor Support */ -#include "xaa.h" -#include "xf86Cursor.h" - - /* PCI support */ -#include "xf86PciInfo.h" -#include "xf86Pci.h" - - /* DDC support */ -#include "xf86DDC.h" - - /* DRI support */ -#include "GL/glxint.h" -#include "GL/glxtokens.h" -#include "xf86drm.h" -#include "xf86drmR128.h" -#include "sarea.h" -#define _XF86DRI_SERVER_ -#include "xf86dri.h" -#include "dri.h" -#include "r128_dri.h" -#include "r128_sarea.h" -#include "r128_dripriv.h" - /* Driver data structures */ +#include "ati2.h" #include "r128.h" #include "r128_reg.h" @@ -104,9 +81,9 @@ do { \ slots available is stored in info->CCEFifoSize. */ static void R128CCEWaitForFifoFunction(ScrnInfoPtr pScrn, int entries) { - R128InfoPtr info = R128PTR(pScrn); + R128InfoPtr info = R128PTR(pScrn); unsigned char *R128MMIO = info->MMIO; - int i; + int i; for (;;) { for (i = 0; i < R128_TIMEOUT; i++) { @@ -122,9 +99,9 @@ static void R128CCEWaitForFifoFunction(ScrnInfoPtr pScrn, int entries) CCE is idle. */ void R128CCEWaitForIdle(ScrnInfoPtr pScrn) { - R128InfoPtr info = R128PTR(pScrn); + R128InfoPtr info = R128PTR(pScrn); unsigned char *R128MMIO = info->MMIO; - int i; + int i; if (!info->CCEInUse || info->CCEMode == R128_PM4_NONPM4) return; @@ -172,9 +149,9 @@ void R128CCEWaitForIdle(ScrnInfoPtr pScrn) /* Reset the ring buffer status, if the engine was reset */ void R128CCEResetRing(ScrnInfoPtr pScrn) { - R128InfoPtr info = R128PTR(pScrn); - unsigned char *R128MMIO = info->MMIO; - R128SAREAPrivPtr pSAREAPriv; + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; + R128SAREAPrivPtr pSAREAPriv; volatile CARD32 *r128RingReadPtr; if (!info->CCEInUse || info->CCEMode == R128_PM4_NONPM4) return; @@ -195,7 +172,7 @@ void R128CCEResetRing(ScrnInfoPtr pScrn) mode is a CCE mode. The mode is stored in info->CCEMode. */ void R128CCEStart(ScrnInfoPtr pScrn) { - R128InfoPtr info = R128PTR(pScrn); + R128InfoPtr info = R128PTR(pScrn); unsigned char *R128MMIO = info->MMIO; if (info->CCEInUse || info->CCEMode == R128_PM4_NONPM4) return; @@ -212,7 +189,7 @@ void R128CCEStart(ScrnInfoPtr pScrn) requests before switching modes.*/ void R128CCEStop(ScrnInfoPtr pScrn) { - R128InfoPtr info = R128PTR(pScrn); + R128InfoPtr info = R128PTR(pScrn); unsigned char *R128MMIO = info->MMIO; if (!info->CCEInUse || info->CCEMode == R128_PM4_NONPM4) return; @@ -231,14 +208,14 @@ void R128CCEStop(ScrnInfoPtr pScrn) static Bool R128InitVisualConfigs(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; - R128InfoPtr pR128 = R128PTR(pScrn); + R128InfoPtr info = R128PTR(pScrn); int numConfigs = 0; __GLXvisualConfig *pConfigs = 0; R128ConfigPrivPtr pR128Configs = 0; R128ConfigPrivPtr *pR128ConfigPtrs = 0; int i, accum, stencil; - switch (pR128->CurrentLayout.pixel_code) { + switch (info->CurrentLayout.pixel_code) { case 8: /* 8bpp mode is not support */ case 15: /* FIXME */ case 24: /* FIXME */ @@ -395,9 +372,9 @@ static Bool R128InitVisualConfigs(ScreenPtr pScreen) break; } - pR128->numVisualConfigs = numConfigs; - pR128->pVisualConfigs = pConfigs; - pR128->pVisualConfigsPriv = pR128Configs; + info->numVisualConfigs = numConfigs; + info->pVisualConfigs = pConfigs; + info->pVisualConfigsPriv = pR128Configs; GlxSetVisualConfigs(numConfigs, pConfigs, (void**)pR128ConfigPtrs); return TRUE; } @@ -427,15 +404,15 @@ static void R128DestroyContext(ScreenPtr pScreen, drmContext hwContext, static void R128EnterServer(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; - R128InfoPtr pR128 = R128PTR(pScrn); + R128InfoPtr info = R128PTR(pScrn); - if (pR128->accel) pR128->accel->NeedToSync = TRUE; + if (info->accel) info->accel->NeedToSync = TRUE; #if 1 - if (!pR128->CCE2D) R128CCEStop(pScrn); + if (!info->CCE2D) R128CCEStop(pScrn); #else - if (pR128->CCE2D) R128CCEWaitForIdle(pScrn); - else R128CCEStop(pScrn); + if (info->CCE2D) R128CCEWaitForIdle(pScrn); + else R128CCEStop(pScrn); #endif } @@ -448,13 +425,13 @@ static void R128EnterServer(ScreenPtr pScreen) static void R128LeaveServer(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; - R128InfoPtr pR128 = R128PTR(pScrn); + R128InfoPtr info = R128PTR(pScrn); #if 1 - if (!pR128->CCE2D) R128CCEStart(pScrn); + if (!info->CCE2D) R128CCEStart(pScrn); #else - if (pR128->CCE2D) R128CCEWaitForIdle(pScrn); - else R128CCEStart(pScrn); + if (info->CCE2D) R128CCEWaitForIdle(pScrn); + else R128CCEStart(pScrn); #endif } @@ -482,13 +459,13 @@ static void R128DRIInitBuffers(WindowPtr pWin, RegionPtr prgn, CARD32 index) /* FIXME: This routine needs to have acceleration turned on */ ScreenPtr pScreen = pWin->drawable.pScreen; ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; - R128InfoPtr pR128 = R128PTR(pScrn); + R128InfoPtr info = R128PTR(pScrn); BoxPtr pbox; int nbox; int depth; /* FIXME: Use accel when CCE 2D code is written */ - if (pR128->CCE2D) return; + if (info->CCE2D) return; /* FIXME: This should be based on the __GLXvisualConfig info */ switch (pScrn->bitsPerPixel) { @@ -506,29 +483,29 @@ static void R128DRIInitBuffers(WindowPtr pWin, RegionPtr prgn, CARD32 index) pbox = REGION_RECTS(prgn); nbox = REGION_NUM_RECTS(prgn); - (*pR128->accel->SetupForSolidFill)(pScrn, 0, GXcopy, -1); + (*info->accel->SetupForSolidFill)(pScrn, 0, GXcopy, -1); for (; nbox; nbox--, pbox++) { - (*pR128->accel->SubsequentSolidFillRect)(pScrn, - pbox->x1 + pR128->fbX, - pbox->y1 + pR128->fbY, - pbox->x2 - pbox->x1, - pbox->y2 - pbox->y1); - (*pR128->accel->SubsequentSolidFillRect)(pScrn, - pbox->x1 + pR128->backX, - pbox->y1 + pR128->backY, - pbox->x2 - pbox->x1, - pbox->y2 - pbox->y1); + (*info->accel->SubsequentSolidFillRect)(pScrn, + pbox->x1 + info->fbX, + pbox->y1 + info->fbY, + pbox->x2 - pbox->x1, + pbox->y2 - pbox->y1); + (*info->accel->SubsequentSolidFillRect)(pScrn, + pbox->x1 + info->backX, + pbox->y1 + info->backY, + pbox->x2 - pbox->x1, + pbox->y2 - pbox->y1); } - (*pR128->accel->SetupForSolidFill)(pScrn, depth, GXcopy, -1); + (*info->accel->SetupForSolidFill)(pScrn, depth, GXcopy, -1); for (; nbox; nbox--, pbox++) - (*pR128->accel->SubsequentSolidFillRect)(pScrn, - pbox->x1 + pR128->depthX, - pbox->y1 + pR128->depthY, - pbox->x2 - pbox->x1, - pbox->y2 - pbox->y1); + (*info->accel->SubsequentSolidFillRect)(pScrn, + pbox->x1 + info->depthX, + pbox->y1 + info->depthY, + pbox->x2 - pbox->x1, + pbox->y2 - pbox->y1); - pR128->accel->NeedToSync = TRUE; + info->accel->NeedToSync = TRUE; } /* Copy the back and depth buffers when the X server moves a window. */ @@ -537,7 +514,7 @@ static void R128DRIMoveBuffers(WindowPtr pWin, DDXPointRec ptOldOrg, { ScreenPtr pScreen = pWin->drawable.pScreen; ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; - R128InfoPtr pR128 = R128PTR(pScrn); + R128InfoPtr info = R128PTR(pScrn); /* FIXME: This routine needs to have acceleration turned on */ /* FIXME: Copy XAACopyWindow() and use REGION_TRANSLATE() */ @@ -545,14 +522,14 @@ static void R128DRIMoveBuffers(WindowPtr pWin, DDXPointRec ptOldOrg, that request them */ /* FIXME: Use accel when CCE 2D code is written */ - if (pR128->CCE2D) return; + if (info->CCE2D) return; } /* Initialize the AGP state. Request memory for use in AGP space, and initialize the Rage 128 registers to point to that memory. */ -static Bool R128DRIAgpInit(R128InfoPtr pR128, ScreenPtr pScreen) +static Bool R128DRIAgpInit(R128InfoPtr info, ScreenPtr pScreen) { - unsigned char *R128MMIO = pR128->MMIO; + unsigned char *R128MMIO = info->MMIO; unsigned long mode; unsigned int vendor, device; int ret; @@ -560,7 +537,7 @@ static Bool R128DRIAgpInit(R128InfoPtr pR128, ScreenPtr pScreen) int s, l; int flags; - if (drmAgpAcquire(pR128->drmFD) < 0) { + if (drmAgpAcquire(info->drmFD) < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[agp] AGP not available\n"); return FALSE; } @@ -570,12 +547,12 @@ static Bool R128DRIAgpInit(R128InfoPtr pR128, ScreenPtr pScreen) combination of graphics card and AGP chipset. */ - mode = drmAgpGetMode(pR128->drmFD); /* Default mode */ - vendor = drmAgpVendorId(pR128->drmFD); - device = drmAgpDeviceId(pR128->drmFD); + mode = drmAgpGetMode(info->drmFD); /* Default mode */ + vendor = drmAgpVendorId(info->drmFD); + device = drmAgpDeviceId(info->drmFD); mode &= ~R128_AGP_MODE_MASK; - switch (pR128->agpMode) { + switch (info->agpMode) { case 2: mode |= R128_AGP_2X_MODE; case 1: default: mode |= R128_AGP_1X_MODE; } @@ -583,161 +560,161 @@ static Bool R128DRIAgpInit(R128InfoPtr pR128, ScreenPtr pScreen) xf86DrvMsg(pScreen->myNum, X_INFO, "[agp] Mode 0x%08lx [AGP 0x%04x/0x%04x; Card 0x%04x/0x%04x]\n", mode, vendor, device, - pR128->PciInfo->vendor, - pR128->PciInfo->chipType); + info->PciInfo->vendor, + info->PciInfo->chipType); - if (drmAgpEnable(pR128->drmFD, mode) < 0) { + if (drmAgpEnable(info->drmFD, mode) < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[agp] AGP not enabled\n"); - drmAgpRelease(pR128->drmFD); + drmAgpRelease(info->drmFD); return FALSE; } - pR128->agpOffset = 0; + info->agpOffset = 0; - if ((ret = drmAgpAlloc(pR128->drmFD, pR128->agpSize*1024*1024, 0, NULL, - &pR128->agpMemHandle)) < 0) { + if ((ret = drmAgpAlloc(info->drmFD, info->agpSize*1024*1024, 0, NULL, + &info->agpMemHandle)) < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[agp] Out of memory (%d)\n", ret); - drmAgpRelease(pR128->drmFD); + drmAgpRelease(info->drmFD); return FALSE; } xf86DrvMsg(pScreen->myNum, X_INFO, "[agp] %d kB allocated with handle 0x%08x\n", - pR128->agpSize*1024, pR128->agpMemHandle); + info->agpSize*1024, info->agpMemHandle); - if (drmAgpBind(pR128->drmFD, pR128->agpMemHandle, pR128->agpOffset) < 0) { + if (drmAgpBind(info->drmFD, info->agpMemHandle, info->agpOffset) < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[agp] Could not bind\n"); - drmAgpFree(pR128->drmFD, pR128->agpMemHandle); - drmAgpRelease(pR128->drmFD); + drmAgpFree(info->drmFD, info->agpMemHandle); + drmAgpRelease(info->drmFD); return FALSE; } /* Initialize the CCE ring buffer data */ - pR128->ringStart = pR128->agpOffset; - pR128->ringMapSize = pR128->ringSize*1024*1024 + 4096; - pR128->ringSizeLog2QW = R128MinBits(pR128->ringSize*1024*1024/8) - 1; + info->ringStart = info->agpOffset; + info->ringMapSize = info->ringSize*1024*1024 + 4096; + info->ringSizeLog2QW = R128MinBits(info->ringSize*1024*1024/8) - 1; - pR128->ringReadOffset = pR128->ringStart + pR128->ringMapSize; - pR128->ringReadMapSize = 4096; + info->ringReadOffset = info->ringStart + info->ringMapSize; + info->ringReadMapSize = 4096; /* Reserve space for the vertex buffer */ - pR128->vbStart = pR128->ringReadOffset + pR128->ringReadMapSize; - pR128->vbMapSize = pR128->vbSize*1024*1024; + info->vbStart = info->ringReadOffset + info->ringReadMapSize; + info->vbMapSize = info->vbSize*1024*1024; /* Reserve space for the indirect buffer */ - pR128->indStart = pR128->vbStart + pR128->vbMapSize; - pR128->indMapSize = pR128->indSize*1024*1024; + info->indStart = info->vbStart + info->vbMapSize; + info->indMapSize = info->indSize*1024*1024; /* Reserve the rest for AGP textures */ - pR128->agpTexStart = pR128->indStart + pR128->indMapSize; - s = (pR128->agpSize*1024*1024 - pR128->agpTexStart); + info->agpTexStart = info->indStart + info->indMapSize; + s = (info->agpSize*1024*1024 - info->agpTexStart); l = R128MinBits((s-1) / R128_NR_TEX_REGIONS); if (l < R128_LOG_TEX_GRANULARITY) l = R128_LOG_TEX_GRANULARITY; - pR128->agpTexMapSize = (s >> l) << l; - pR128->log2AGPTexGran = l; + info->agpTexMapSize = (s >> l) << l; + info->log2AGPTexGran = l; - if (pR128->CCESecure) flags = DRM_READ_ONLY; + if (info->CCESecure) flags = DRM_READ_ONLY; else flags = 0; - if (drmAddMap(pR128->drmFD, pR128->ringStart, pR128->ringMapSize, - DRM_AGP, flags, &pR128->ringHandle) < 0) { + if (drmAddMap(info->drmFD, info->ringStart, info->ringMapSize, + DRM_AGP, flags, &info->ringHandle) < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[agp] Could not add ring mapping\n"); return FALSE; } xf86DrvMsg(pScreen->myNum, X_INFO, - "[agp] ring handle = 0x%08lx\n", pR128->ringHandle); + "[agp] ring handle = 0x%08lx\n", info->ringHandle); - if (drmMap(pR128->drmFD, pR128->ringHandle, pR128->ringMapSize, - (drmAddressPtr)&pR128->ring) < 0) { + if (drmMap(info->drmFD, info->ringHandle, info->ringMapSize, + (drmAddressPtr)&info->ring) < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[agp] Could not map ring\n"); return FALSE; } xf86DrvMsg(pScreen->myNum, X_INFO, "[agp] Ring mapped at 0x%08lx\n", - (unsigned long)pR128->ring); + (unsigned long)info->ring); - if (drmAddMap(pR128->drmFD, pR128->ringReadOffset, pR128->ringReadMapSize, - DRM_AGP, flags, &pR128->ringReadPtrHandle) < 0) { + if (drmAddMap(info->drmFD, info->ringReadOffset, info->ringReadMapSize, + DRM_AGP, flags, &info->ringReadPtrHandle) < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[agp] Could not add ring read ptr mapping\n"); return FALSE; } xf86DrvMsg(pScreen->myNum, X_INFO, "[agp] ring read ptr handle = 0x%08lx\n", - pR128->ringReadPtrHandle); + info->ringReadPtrHandle); - if (drmMap(pR128->drmFD, pR128->ringReadPtrHandle, pR128->ringReadMapSize, - (drmAddressPtr)&pR128->ringReadPtr) < 0) { + if (drmMap(info->drmFD, info->ringReadPtrHandle, info->ringReadMapSize, + (drmAddressPtr)&info->ringReadPtr) < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[agp] Could not map ring read ptr\n"); return FALSE; } xf86DrvMsg(pScreen->myNum, X_INFO, "[agp] Ring read ptr mapped at 0x%08lx\n", - (unsigned long)pR128->ringReadPtr); + (unsigned long)info->ringReadPtr); - if (drmAddMap(pR128->drmFD, pR128->vbStart, pR128->vbMapSize, - DRM_AGP, 0, &pR128->vbHandle) < 0) { + if (drmAddMap(info->drmFD, info->vbStart, info->vbMapSize, + DRM_AGP, 0, &info->vbHandle) < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[agp] Could not add vertex buffers mapping\n"); return FALSE; } xf86DrvMsg(pScreen->myNum, X_INFO, - "[agp] vertex buffers handle = 0x%08lx\n", pR128->vbHandle); + "[agp] vertex buffers handle = 0x%08lx\n", info->vbHandle); - if (drmMap(pR128->drmFD, pR128->vbHandle, pR128->vbMapSize, - (drmAddressPtr)&pR128->vb) < 0) { + if (drmMap(info->drmFD, info->vbHandle, info->vbMapSize, + (drmAddressPtr)&info->vb) < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[agp] Could not map vertex buffers\n"); return FALSE; } xf86DrvMsg(pScreen->myNum, X_INFO, "[agp] Vertex buffers mapped at 0x%08lx\n", - (unsigned long)pR128->vb); + (unsigned long)info->vb); - if (drmAddMap(pR128->drmFD, pR128->indStart, pR128->indMapSize, - DRM_AGP, flags, &pR128->indHandle) < 0) { + if (drmAddMap(info->drmFD, info->indStart, info->indMapSize, + DRM_AGP, flags, &info->indHandle) < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[agp] Could not add indirect buffers mapping\n"); return FALSE; } xf86DrvMsg(pScreen->myNum, X_INFO, - "[agp] indirect buffers handle = 0x%08lx\n", pR128->indHandle); + "[agp] indirect buffers handle = 0x%08lx\n", info->indHandle); - if (drmMap(pR128->drmFD, pR128->indHandle, pR128->indMapSize, - (drmAddressPtr)&pR128->ind) < 0) { + if (drmMap(info->drmFD, info->indHandle, info->indMapSize, + (drmAddressPtr)&info->ind) < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[agp] Could not map indirect buffers\n"); return FALSE; } xf86DrvMsg(pScreen->myNum, X_INFO, "[agp] Indirect buffers mapped at 0x%08lx\n", - (unsigned long)pR128->ind); + (unsigned long)info->ind); - if (drmAddMap(pR128->drmFD, pR128->agpTexStart, pR128->agpTexMapSize, - DRM_AGP, 0, &pR128->agpTexHandle) < 0) { + if (drmAddMap(info->drmFD, info->agpTexStart, info->agpTexMapSize, + DRM_AGP, 0, &info->agpTexHandle) < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[agp] Could not add AGP texture map mapping\n"); return FALSE; } xf86DrvMsg(pScreen->myNum, X_INFO, "[agp] AGP texture map handle = 0x%08lx\n", - pR128->agpTexHandle); + info->agpTexHandle); - if (drmMap(pR128->drmFD, pR128->agpTexHandle, pR128->agpTexMapSize, - (drmAddressPtr)&pR128->agpTex) < 0) { + if (drmMap(info->drmFD, info->agpTexHandle, info->agpTexMapSize, + (drmAddressPtr)&info->agpTex) < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[agp] Could not map AGP texture map\n"); return FALSE; } xf86DrvMsg(pScreen->myNum, X_INFO, "[agp] AGP Texture map mapped at 0x%08lx\n", - (unsigned long)pR128->agpTex); + (unsigned long)info->agpTex); /* Initialize Rage 128's AGP registers */ cntl = INREG(R128_AGP_CNTL); cntl &= ~R128_AGP_APER_SIZE_MASK; - switch (pR128->agpSize) { + switch (info->agpSize) { case 256: cntl |= R128_AGP_APER_SIZE_256MB; break; case 128: cntl |= R128_AGP_APER_SIZE_128MB; break; case 64: cntl |= R128_AGP_APER_SIZE_64MB; break; @@ -748,41 +725,41 @@ static Bool R128DRIAgpInit(R128InfoPtr pR128, ScreenPtr pScreen) default: xf86DrvMsg(pScreen->myNum, X_ERROR, "[agp] Illegal aperture size %d kB\n", - pR128->agpSize*1024); + info->agpSize*1024); return FALSE; } - OUTREG(R128_AGP_BASE, pR128->ringHandle); /* Ring buf is at AGP offset 0 */ + OUTREG(R128_AGP_BASE, info->ringHandle); /* Ring buf is at AGP offset 0 */ OUTREG(R128_AGP_CNTL, cntl); return TRUE; } /* Fake the vertex buffers for PCI cards. */ -static Bool R128DRIPciInit(R128InfoPtr pR128, ScreenPtr pScreen) +static Bool R128DRIPciInit(R128InfoPtr info, ScreenPtr pScreen) { - pR128->vbStart = 0; - pR128->vbMapSize = pR128->vbSize*1024*1024; + info->vbStart = 0; + info->vbMapSize = info->vbSize*1024*1024; return TRUE; } /* Add a map for the MMIO registers that will be accessed by any DRI-based clients. */ -static Bool R128DRIMapInit(R128InfoPtr pR128, ScreenPtr pScreen) +static Bool R128DRIMapInit(R128InfoPtr info, ScreenPtr pScreen) { int flags; - if (pR128->CCESecure) flags = DRM_READ_ONLY; - else flags = 0; + if (info->CCESecure) flags = DRM_READ_ONLY; + else flags = 0; /* Map registers */ - pR128->registerSize = R128_MMIOSIZE; - if (drmAddMap(pR128->drmFD, pR128->MMIOAddr, pR128->registerSize, - DRM_REGISTERS, flags, &pR128->registerHandle) < 0) { + info->registerSize = R128_MMIOSIZE; + if (drmAddMap(info->drmFD, info->MMIOAddr, info->registerSize, + DRM_REGISTERS, flags, &info->registerHandle) < 0) { return FALSE; } xf86DrvMsg(pScreen->myNum, X_INFO, - "[drm] register handle = 0x%08lx\n", pR128->registerHandle); + "[drm] register handle = 0x%08lx\n", info->registerHandle); return TRUE; } @@ -791,9 +768,9 @@ static Bool R128DRIMapInit(R128InfoPtr pR128, ScreenPtr pScreen) DRI-based clients. */ static void R128DRICCEInitRingBuffer(ScrnInfoPtr pScrn) { - R128InfoPtr info = R128PTR(pScrn); + R128InfoPtr info = R128PTR(pScrn); unsigned char *R128MMIO = info->MMIO; - unsigned long addr; + unsigned long addr; /* FIXME: When we use the CCE for the X server, we should move this function (and the support functions above) to r128_accel.c */ @@ -831,63 +808,63 @@ static void R128DRICCEInitRingBuffer(ScrnInfoPtr pScrn) } /* Initialize the kernel data structures. */ -static int R128DRIKernelInit(R128InfoPtr pR128, ScreenPtr pScreen) +static int R128DRIKernelInit(R128InfoPtr info, ScreenPtr pScreen) { drmR128Init drmInfo; drmInfo.sarea_priv_offset = sizeof(XF86DRISAREARec); - drmInfo.is_pci = pR128->IsPCI; - drmInfo.cce_mode = pR128->CCEMode; - drmInfo.cce_fifo_size = pR128->CCEFifoSize; - drmInfo.cce_secure = pR128->CCESecure; - drmInfo.ring_size = pR128->ringSize*1024*1024; - drmInfo.usec_timeout = pR128->CCEusecTimeout; - - drmInfo.fb_offset = pR128->LinearAddr; - drmInfo.agp_ring_offset = pR128->ringHandle; - drmInfo.agp_read_ptr_offset = pR128->ringReadPtrHandle; - drmInfo.agp_vertbufs_offset = pR128->vbHandle; - drmInfo.agp_indbufs_offset = pR128->indHandle; - drmInfo.agp_textures_offset = pR128->agpTexHandle; - drmInfo.mmio_offset = pR128->registerHandle; - - if (drmR128InitCCE(pR128->drmFD, &drmInfo) < 0) return FALSE; + drmInfo.is_pci = info->IsPCI; + drmInfo.cce_mode = info->CCEMode; + drmInfo.cce_fifo_size = info->CCEFifoSize; + drmInfo.cce_secure = info->CCESecure; + drmInfo.ring_size = info->ringSize*1024*1024; + drmInfo.usec_timeout = info->CCEusecTimeout; + + drmInfo.fb_offset = info->LinearAddr; + drmInfo.agp_ring_offset = info->ringHandle; + drmInfo.agp_read_ptr_offset = info->ringReadPtrHandle; + drmInfo.agp_vertbufs_offset = info->vbHandle; + drmInfo.agp_indbufs_offset = info->indHandle; + drmInfo.agp_textures_offset = info->agpTexHandle; + drmInfo.mmio_offset = info->registerHandle; + + if (drmR128InitCCE(info->drmFD, &drmInfo) < 0) return FALSE; return TRUE; } /* Add a map for the vertex buffers that will be accessed by any DRI-based clients. */ -static Bool R128DRIBufInit(R128InfoPtr pR128, ScreenPtr pScreen) +static Bool R128DRIBufInit(R128InfoPtr info, ScreenPtr pScreen) { /* Initialize vertex buffers */ - if ((pR128->vbNumBufs = drmAddBufs(pR128->drmFD, - pR128->vbMapSize / pR128->vbBufSize, - pR128->vbBufSize, - DRM_AGP_BUFFER, - pR128->vbStart)) <= 0) { + if ((info->vbNumBufs = drmAddBufs(info->drmFD, + info->vbMapSize / info->vbBufSize, + info->vbBufSize, + DRM_AGP_BUFFER, + info->vbStart)) <= 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[drm] Could not create vertex buffers list\n"); return FALSE; } xf86DrvMsg(pScreen->myNum, X_INFO, "[drm] Added %d %d byte vertex buffers\n", - pR128->vbNumBufs, pR128->vbBufSize); + info->vbNumBufs, info->vbBufSize); - if (drmMarkBufs(pR128->drmFD, 0.133333, 0.266666)) { + if (drmMarkBufs(info->drmFD, 0.133333, 0.266666)) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[drm] Failed to mark vertex buffers list\n"); return FALSE; } - if (!(pR128->vbBufs = drmMapBufs(pR128->drmFD))) { + if (!(info->vbBufs = drmMapBufs(info->drmFD))) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[drm] Failed to map vertex buffers list\n"); return FALSE; } xf86DrvMsg(pScreen->myNum, X_INFO, "[drm] Mapped %d vertex buffers\n", - pR128->vbBufs->count); + info->vbBufs->count); return TRUE; } @@ -895,9 +872,10 @@ static Bool R128DRIBufInit(R128InfoPtr pR128, ScreenPtr pScreen) /* Load the microcode for the CCE */ static void R128DRILoadMicrocode(ScrnInfoPtr pScrn) { - unsigned char *R128MMIO = R128PTR(pScrn)->MMIO; - int i; - unsigned long R128Microcode[] = { + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; + int i; + unsigned long R128Microcode[] = { /* CCE microcode (from ATI) */ 0, 276838400, 0, 268449792, 2, 142, 2, 145, 0, 1076765731, 0, 1617039951, 0, 774592877, 0, 1987540286, 0, 2307490946U, 0, 599558925, 0, 589505315, 0, @@ -948,7 +926,7 @@ static void R128DRILoadMicrocode(ScrnInfoPtr pScrn) /* Initialize the CCE state, and start the CCE (if used by the X server) */ static void R128DRICCEInit(ScrnInfoPtr pScrn) { - R128InfoPtr info = R128PTR(pScrn); + R128InfoPtr info = R128PTR(pScrn); unsigned char *R128MMIO = info->MMIO; /* CCEMode is initialized in r128_driver.c */ @@ -982,7 +960,7 @@ static void R128DRICCEInit(ScrnInfoPtr pScrn) Bool R128DRIScreenInit(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; - R128InfoPtr pR128 = R128PTR(pScrn); + R128InfoPtr info = R128PTR(pScrn); DRIInfoPtr pDRIInfo; R128DRIPtr pR128DRI; int major, minor, patch; @@ -1010,7 +988,7 @@ Bool R128DRIScreenInit(ScreenPtr pScreen) return FALSE; } - switch (pR128->CurrentLayout.pixel_code) { + switch (info->CurrentLayout.pixel_code) { case 8: /* These modes are not supported (yet). */ case 15: @@ -1027,22 +1005,22 @@ Bool R128DRIScreenInit(ScreenPtr pScreen) DRIScreenInit(). */ if (!(pDRIInfo = DRICreateInfoRec())) return FALSE; - pR128->pDRIInfo = pDRIInfo; + info->pDRIInfo = pDRIInfo; pDRIInfo->drmDriverName = R128_NAME; pDRIInfo->clientDriverName = R128_NAME; pDRIInfo->busIdString = xalloc(64); sprintf(pDRIInfo->busIdString, "PCI:%d:%d:%d", - pR128->PciInfo->bus, - pR128->PciInfo->device, - pR128->PciInfo->func); - pDRIInfo->ddxDriverMajorVersion = R128_VERSION_MAJOR; - pDRIInfo->ddxDriverMinorVersion = R128_VERSION_MINOR; - pDRIInfo->ddxDriverPatchVersion = R128_VERSION_PATCH; - pDRIInfo->frameBufferPhysicalAddress = pR128->LinearAddr; - pDRIInfo->frameBufferSize = pR128->FbMapSize; + info->PciInfo->bus, + info->PciInfo->device, + info->PciInfo->func); + pDRIInfo->ddxDriverMajorVersion = ATI2_VERSION_MAJOR; + pDRIInfo->ddxDriverMinorVersion = ATI2_VERSION_MINOR; + pDRIInfo->ddxDriverPatchVersion = ATI2_VERSION_PATCH; + pDRIInfo->frameBufferPhysicalAddress = info->LinearAddr; + pDRIInfo->frameBufferSize = info->FbMapSize; pDRIInfo->frameBufferStride = (pScrn->displayWidth * - pR128->CurrentLayout.pixel_bytes); + info->CurrentLayout.pixel_bytes); pDRIInfo->ddxDrawableTableEntry = R128_MAX_DRAWABLES; pDRIInfo->maxDrawableTableEntry = (SAREA_MAX_DRAWABLES < R128_MAX_DRAWABLES @@ -1068,8 +1046,8 @@ Bool R128DRIScreenInit(ScreenPtr pScreen) #endif if (!(pR128DRI = (R128DRIPtr)xnfcalloc(sizeof(R128DRIRec),1))) { - DRIDestroyInfoRec(pR128->pDRIInfo); - pR128->pDRIInfo = NULL; + DRIDestroyInfoRec(info->pDRIInfo); + info->pDRIInfo = NULL; return FALSE; } pDRIInfo->devPrivate = pR128DRI; @@ -1083,7 +1061,7 @@ Bool R128DRIScreenInit(ScreenPtr pScreen) pDRIInfo->MoveBuffers = R128DRIMoveBuffers; pDRIInfo->bufferRequests = DRI_ALL_WINDOWS; - if (!DRIScreenInit(pScreen, pDRIInfo, &pR128->drmFD)) { + if (!DRIScreenInit(pScreen, pDRIInfo, &info->drmFD)) { xfree(pDRIInfo->devPrivate); pDRIInfo->devPrivate = NULL; DRIDestroyInfoRec(pDRIInfo); @@ -1092,7 +1070,7 @@ Bool R128DRIScreenInit(ScreenPtr pScreen) } /* Check the r128 DRM version */ - version = drmGetVersion(pR128->drmFD); + version = drmGetVersion(info->drmFD); if (version) { if (version->version_major != 1 || version->version_minor != 0 || @@ -1113,12 +1091,12 @@ Bool R128DRIScreenInit(ScreenPtr pScreen) } /* Initialize AGP */ - if (!pR128->IsPCI && !R128DRIAgpInit(pR128, pScreen)) { + if (!info->IsPCI && !R128DRIAgpInit(info, pScreen)) { R128DRICloseScreen(pScreen); return FALSE; } /* Initialize PCI */ - if (pR128->IsPCI && !R128DRIPciInit(pR128, pScreen)) { + if (info->IsPCI && !R128DRIPciInit(info, pScreen)) { R128DRICloseScreen(pScreen); return FALSE; } @@ -1126,22 +1104,22 @@ Bool R128DRIScreenInit(ScreenPtr pScreen) /* DRIScreenInit doesn't add all the common mappings. Add additional mappings here. */ - if (!R128DRIMapInit(pR128, pScreen)) { + if (!R128DRIMapInit(info, pScreen)) { R128DRICloseScreen(pScreen); return FALSE; } /* Initialize the ring buffer */ - if (!pR128->IsPCI) R128DRICCEInitRingBuffer(pScrn); + if (!info->IsPCI) R128DRICCEInitRingBuffer(pScrn); /* Initialize the kernel data structures */ - if (!R128DRIKernelInit(pR128, pScreen)) { + if (!R128DRIKernelInit(info, pScreen)) { R128DRICloseScreen(pScreen); return FALSE; } /* Initialize vertex buffers list */ - if (!pR128->IsPCI && !R128DRIBufInit(pR128, pScreen)) { + if (!info->IsPCI && !R128DRIBufInit(info, pScreen)) { R128DRICloseScreen(pScreen); return FALSE; } @@ -1169,7 +1147,7 @@ Bool R128DRIScreenInit(ScreenPtr pScreen) Bool R128DRIFinishScreenInit(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; - R128InfoPtr pR128 = R128PTR(pScrn); + R128InfoPtr info = R128PTR(pScrn); R128SAREAPrivPtr pSAREAPriv; R128DRIPtr pR128DRI; @@ -1179,54 +1157,54 @@ Bool R128DRIFinishScreenInit(ScreenPtr pScreen) pSAREAPriv = (R128SAREAPrivPtr)DRIGetSAREAPrivate(pScreen); memset(pSAREAPriv, 0, sizeof(*pSAREAPriv)); - pR128->pDRIInfo->driverSwapMethod = DRI_HIDE_X_CONTEXT; - /* pR128->pDRIInfo->driverSwapMethod = DRI_SERVER_SWAP; */ + info->pDRIInfo->driverSwapMethod = DRI_HIDE_X_CONTEXT; + /* info->pDRIInfo->driverSwapMethod = DRI_SERVER_SWAP; */ - pR128DRI = (R128DRIPtr)pR128->pDRIInfo->devPrivate; - pR128DRI->registerHandle = pR128->registerHandle; - pR128DRI->registerSize = pR128->registerSize; + pR128DRI = (R128DRIPtr)info->pDRIInfo->devPrivate; + pR128DRI->registerHandle = info->registerHandle; + pR128DRI->registerSize = info->registerSize; - pR128DRI->ringHandle = pR128->ringHandle; - pR128DRI->ringMapSize = pR128->ringMapSize; - pR128DRI->ringSize = pR128->ringSize*1024*1024; + pR128DRI->ringHandle = info->ringHandle; + pR128DRI->ringMapSize = info->ringMapSize; + pR128DRI->ringSize = info->ringSize*1024*1024; - pR128DRI->ringReadPtrHandle = pR128->ringReadPtrHandle; - pR128DRI->ringReadMapSize = pR128->ringReadMapSize; + pR128DRI->ringReadPtrHandle = info->ringReadPtrHandle; + pR128DRI->ringReadMapSize = info->ringReadMapSize; - pR128DRI->vbHandle = pR128->vbHandle; - pR128DRI->vbMapSize = pR128->vbMapSize; - pR128DRI->vbOffset = pR128->vbStart; - pR128DRI->vbBufSize = pR128->vbBufSize; + pR128DRI->vbHandle = info->vbHandle; + pR128DRI->vbMapSize = info->vbMapSize; + pR128DRI->vbOffset = info->vbStart; + pR128DRI->vbBufSize = info->vbBufSize; - pR128DRI->indHandle = pR128->indHandle; - pR128DRI->indMapSize = pR128->indMapSize; + pR128DRI->indHandle = info->indHandle; + pR128DRI->indMapSize = info->indMapSize; - pR128DRI->agpTexHandle = pR128->agpTexHandle; - pR128DRI->agpTexMapSize = pR128->agpTexMapSize; - pR128DRI->log2AGPTexGran = pR128->log2AGPTexGran; - pR128DRI->agpTexOffset = pR128->agpTexStart; + pR128DRI->agpTexHandle = info->agpTexHandle; + pR128DRI->agpTexMapSize = info->agpTexMapSize; + pR128DRI->log2AGPTexGran = info->log2AGPTexGran; + pR128DRI->agpTexOffset = info->agpTexStart; - pR128DRI->deviceID = pR128->Chipset; + pR128DRI->deviceID = info->Chipset; pR128DRI->width = pScrn->virtualX; pR128DRI->height = pScrn->virtualY; pR128DRI->depth = pScrn->depth; pR128DRI->bpp = pScrn->bitsPerPixel; - pR128DRI->fbX = pR128->fbX; - pR128DRI->fbY = pR128->fbY; - pR128DRI->backX = pR128->backX; - pR128DRI->backY = pR128->backY; - pR128DRI->depthX = pR128->depthX; - pR128DRI->depthY = pR128->depthY; - pR128DRI->textureX = pR128->textureX; - pR128DRI->textureY = pR128->textureY; - pR128DRI->textureSize = pR128->textureSize; - pR128DRI->log2TexGran = pR128->log2TexGran; + pR128DRI->fbX = info->fbX; + pR128DRI->fbY = info->fbY; + pR128DRI->backX = info->backX; + pR128DRI->backY = info->backY; + pR128DRI->depthX = info->depthX; + pR128DRI->depthY = info->depthY; + pR128DRI->textureX = info->textureX; + pR128DRI->textureY = info->textureY; + pR128DRI->textureSize = info->textureSize; + pR128DRI->log2TexGran = info->log2TexGran; - pR128DRI->IsPCI = pR128->IsPCI; + pR128DRI->IsPCI = info->IsPCI; - pR128DRI->CCEMode = pR128->CCEMode; - pR128DRI->CCEFifoSize = pR128->CCEFifoSize; + pR128DRI->CCEMode = info->CCEMode; + pR128DRI->CCEFifoSize = info->CCEFifoSize; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "0x%08lx %d\n", pR128DRI->registerHandle, pR128DRI->registerSize); @@ -1238,66 +1216,66 @@ Bool R128DRIFinishScreenInit(ScreenPtr pScreen) void R128DRICloseScreen(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; - R128InfoPtr pR128 = R128PTR(pScrn); + R128InfoPtr info = R128PTR(pScrn); /* Stop the CCE if it is still in use */ - if (pR128->CCE2D) R128CCEStop(pScrn); + if (info->CCE2D) R128CCEStop(pScrn); /* De-allocate vertex buffers */ - if (pR128->vbBufs) { - drmUnmapBufs(pR128->vbBufs); - pR128->vbBufs = NULL; + if (info->vbBufs) { + drmUnmapBufs(info->vbBufs); + info->vbBufs = NULL; } /* De-allocate all kernel resources */ - drmR128CleanupCCE(pR128->drmFD); + drmR128CleanupCCE(info->drmFD); /* De-allocate all AGP resources */ - if (pR128->agpTex) { - drmUnmap(pR128->agpTex, pR128->agpTexMapSize); - pR128->agpTex = NULL; + if (info->agpTex) { + drmUnmap(info->agpTex, info->agpTexMapSize); + info->agpTex = NULL; } - if (pR128->ind) { - drmUnmap(pR128->ind, pR128->indMapSize); - pR128->ind = NULL; + if (info->ind) { + drmUnmap(info->ind, info->indMapSize); + info->ind = NULL; } - if (pR128->vb) { - drmUnmap(pR128->vb, pR128->vbMapSize); - pR128->vb = NULL; + if (info->vb) { + drmUnmap(info->vb, info->vbMapSize); + info->vb = NULL; } - if (pR128->ringReadPtr) { - drmUnmap(pR128->ringReadPtr, pR128->ringReadMapSize); - pR128->ringReadPtr = NULL; + if (info->ringReadPtr) { + drmUnmap(info->ringReadPtr, info->ringReadMapSize); + info->ringReadPtr = NULL; } - if (pR128->ring) { - drmUnmap(pR128->ring, pR128->ringMapSize); - pR128->ring = NULL; + if (info->ring) { + drmUnmap(info->ring, info->ringMapSize); + info->ring = NULL; } - if (pR128->agpMemHandle) { - drmAgpUnbind(pR128->drmFD, pR128->agpMemHandle); - drmAgpFree(pR128->drmFD, pR128->agpMemHandle); - pR128->agpMemHandle = 0; - drmAgpRelease(pR128->drmFD); + if (info->agpMemHandle) { + drmAgpUnbind(info->drmFD, info->agpMemHandle); + drmAgpFree(info->drmFD, info->agpMemHandle); + info->agpMemHandle = 0; + drmAgpRelease(info->drmFD); } /* De-allocate all DRI resources */ DRICloseScreen(pScreen); /* De-allocate all DRI data structures */ - if (pR128->pDRIInfo) { - if (pR128->pDRIInfo->devPrivate) { - xfree(pR128->pDRIInfo->devPrivate); - pR128->pDRIInfo->devPrivate = NULL; + if (info->pDRIInfo) { + if (info->pDRIInfo->devPrivate) { + xfree(info->pDRIInfo->devPrivate); + info->pDRIInfo->devPrivate = NULL; } - DRIDestroyInfoRec(pR128->pDRIInfo); - pR128->pDRIInfo = NULL; + DRIDestroyInfoRec(info->pDRIInfo); + info->pDRIInfo = NULL; } - if (pR128->pVisualConfigs) { - xfree(pR128->pVisualConfigs); - pR128->pVisualConfigs = NULL; + if (info->pVisualConfigs) { + xfree(info->pVisualConfigs); + info->pVisualConfigs = NULL; } - if (pR128->pVisualConfigsPriv) { - xfree(pR128->pVisualConfigsPriv); - pR128->pVisualConfigsPriv = NULL; + if (info->pVisualConfigsPriv) { + xfree(info->pVisualConfigsPriv); + info->pVisualConfigsPriv = NULL; } } diff --git a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_driver.c b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_driver.c index 618abb408..a15f4f1b4 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_driver.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_driver.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/r128_driver.c,v 1.46 2000/09/20 00:09:26 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/r128_driver.c,v 1.53 2000/10/18 17:20:00 alanh Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -70,7 +70,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "mipointer.h" #include "micmap.h" -#define USE_FB /* not until overlays and 24->32 code added */ +#define USE_FB /* not until overlays */ #ifdef USE_FB #include "fb.h" #else @@ -83,48 +83,10 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "cfb32.h" #include "cfb24_32.h" #endif - /* Xv support */ -#include "xf86xv.h" -#include "Xv.h" - - /* vgahw module (for VC save/restore only) */ -#include "vgaHW.h" - -#include "fbdevhw.h" - - /* XAA and Cursor Support */ -#include "xaa.h" -#include "xf86Cursor.h" - - - /* PCI support */ -#include "xf86PciInfo.h" -#include "xf86Pci.h" - - /* DDC support */ -#include "xf86DDC.h" - - /* VESA support */ -#include "vbe.h" - - /* DRI support */ -#ifdef XF86DRI -#include "GL/glxint.h" -#include "xf86drm.h" -#include "sarea.h" -#define _XF86DRI_SERVER_ -#include "xf86dri.h" -#include "dri.h" -#include "r128_dri.h" -#include "r128_dripriv.h" -#include "r128_sarea.h" -#endif - -#ifdef RENDER -#include "picturestr.h" -#endif /* Driver data structures */ +#include "ati2.h" #include "r128.h" +#include "r128_probe.h" #include "r128_reg.h" #ifndef MAX @@ -133,9 +95,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. /* Forward definitions for driver functions */ -static OptionInfoPtr R128AvailableOptions(int chipid, int busid); -static Bool R128Probe(DriverPtr drv, int flags); -static void R128Identify(int flags); static Bool R128PreInit(ScrnInfoPtr pScrn, int flags); static Bool R128ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv); @@ -155,16 +114,6 @@ static void R128DisplayPowerManagementSet(ScrnInfoPtr pScrn, static Bool R128EnterVTFBDev(int scrnIndex, int flags); static void R128LeaveVTFBDev(int scrnIndex, int flags); - /* Define driver */ -DriverRec R128 = { - R128_VERSION, - "ATI Rage 128", - R128Identify, - R128Probe, - R128AvailableOptions, - NULL -}; - /* Chipsets */ static SymTabRec R128Chipsets[] = { { PCI_CHIP_RAGE128RE, "ATI Rage 128 RE (PCI)" }, @@ -195,7 +144,6 @@ static PciChipsets R128PciChipsets[] = { typedef enum { OPTION_NOACCEL, OPTION_SW_CURSOR, - OPTION_HW_CURSOR, OPTION_DAC_6BIT, OPTION_DAC_8BIT, #ifdef XF86DRI @@ -216,13 +164,13 @@ typedef enum { #endif OPTION_PANEL_WIDTH, OPTION_PANEL_HEIGHT, + OPTION_PROG_FP_REGS, OPTION_FBDEV } R128Opts; static OptionInfoRec R128Options[] = { { OPTION_NOACCEL, "NoAccel", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_SW_CURSOR, "SWcursor", OPTV_BOOLEAN, {0}, FALSE }, - { OPTION_HW_CURSOR, "HWcursor", OPTV_BOOLEAN, {0}, TRUE }, { OPTION_DAC_6BIT, "Dac6Bit", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_DAC_8BIT, "Dac8Bit", OPTV_BOOLEAN, {0}, TRUE }, #ifdef XF86DRI @@ -243,6 +191,7 @@ static OptionInfoRec R128Options[] = { #endif { OPTION_PANEL_WIDTH, "PanelWidth", OPTV_INTEGER, {0}, FALSE }, { OPTION_PANEL_HEIGHT, "PanelHeight", OPTV_INTEGER, {0}, FALSE }, + { OPTION_PROG_FP_REGS, "ProgramFPRegs", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_FBDEV, "UseFBDev", OPTV_BOOLEAN, {0}, FALSE }, { -1, NULL, OPTV_NONE, {0}, FALSE } }; @@ -257,216 +206,9 @@ R128RAMRec R128RAM[] = { /* Memory Specifications { 4, 4, 3, 3, 2, 3, 1, 16, 12, "64-bit DDR SGRAM" }, }; -static const char *vgahwSymbols[] = { - "vgaHWGetHWRec", - "vgaHWFreeHWRec", - "vgaHWLock", - "vgaHWUnlock", - "vgaHWSave", - "vgaHWRestore", - NULL -}; - -static const char *fbdevHWSymbols[] = { - "fbdevHWInit", - "fbdevHWUseBuildinMode", - - "fbdevHWGetDepth", - "fbdevHWGetVidmem", - - /* colormap */ - "fbdevHWLoadPalette", - - /* ScrnInfo hooks */ - "fbdevHWSwitchMode", - "fbdevHWAdjustFrame", - "fbdevHWEnterVT", - "fbdevHWLeaveVT", - "fbdevHWValidMode", - "fbdevHWRestore", - "fbdevHWModeInit", - "fbdevHWSave", - - "fbdevHWUnmapMMIO", - "fbdevHWUnmapVidmem", - "fbdevHWMapMMIO", - "fbdevHWMapVidmem", - - NULL -}; - -static const char *ddcSymbols[] = { - "xf86PrintEDID", - "xf86DoEDID_DDC1", - "xf86DoEDID_DDC2", - NULL -}; - -#if 0 -static const char *i2cSymbols[] = { - "xf86CreateI2CBusRec", - "xf86I2CBusInit", - NULL -}; -#endif - -#ifdef XFree86LOADER -static const char *vbeSymbols[] = { - "VBEInit", - "vbeDoEDID", - NULL -}; - -#ifdef USE_FB -static const char *fbSymbols[] = { - "fbScreenInit", -#ifdef RENDER - "fbPictureInit", -#endif - NULL -}; -#else -static const char *cfbSymbols[] = { - "cfbScreenInit", - "cfb16ScreenInit", - "cfb24ScreenInit", - "cfb32ScreenInit", - "cfb24_32ScreenInit", - NULL -}; -#endif - -static const char *xf8_32bppSymbols[] = { - "xf86Overlay8Plus32Init", - NULL -}; - -static const char *xaaSymbols[] = { - "XAADestroyInfoRec", - "XAACreateInfoRec", - "XAAInit", - "XAAStippleScanlineFuncLSBFirst", - "XAAOverlayFBfuncs", - "XAACachePlanarMonoStipple", - "XAAScreenIndex", - NULL -}; - -static const char *ramdacSymbols[] = { - "xf86InitCursor", - "xf86CreateCursorInfoRec", - "xf86DestroyCursorInfoRec", - NULL -}; - -#ifdef XF86DRI -static const char *drmSymbols[] = { - "drmAddBufs", - "drmAddMap", - "drmAvailable", - "drmCtlAddCommand", - "drmCtlInstHandler", - "drmGetInterruptFromBusID", - "drmMapBufs", - "drmMarkBufs", - "drmUnmapBufs", - "drmFreeVersion", - "drmGetVersion", - NULL -}; - -static const char *driSymbols[] = { - "DRIGetDrawableIndex", - "DRIFinishScreenInit", - "DRIDestroyInfoRec", - "DRICloseScreen", - "DRIDestroyInfoRec", - "DRIScreenInit", - "DRIDestroyInfoRec", - "DRICreateInfoRec", - "DRILock", - "DRIUnlock", - "DRIGetSAREAPrivate", - "DRIGetContext", - "DRIQueryVersion", - "GlxSetVisualConfigs", - NULL -}; -#endif - -static MODULESETUPPROTO(R128Setup); - -static XF86ModuleVersionInfo R128VersRec = -{ - R128_NAME, - MODULEVENDORSTRING, - MODINFOSTRING1, - MODINFOSTRING2, - XF86_VERSION_CURRENT, - R128_VERSION_MAJOR, R128_VERSION_MINOR, R128_VERSION_PATCH, - ABI_CLASS_VIDEODRV, - ABI_VIDEODRV_VERSION, - MOD_CLASS_VIDEODRV, - { 0, 0, 0, 0 } -}; - -XF86ModuleData r128ModuleData = { &R128VersRec, R128Setup, 0 }; - -static pointer R128Setup(pointer module, pointer opts, int *errmaj, - int *errmin) -{ - static Bool setupDone = FALSE; - - /* This module should be loaded only once, but check to be sure. */ - - if (!setupDone) { - setupDone = TRUE; - xf86AddDriver(&R128, module, 0); - - /* - * Modules that this driver always requires may be loaded here - * by calling LoadSubModule(). - */ - /* FIXME: add DRI support here */ - - /* - * Tell the loader about symbols from other modules that this module - * might refer to. - */ - LoaderRefSymLists(vgahwSymbols, -#ifdef USE_FB - fbSymbols, -#else - cfbSymbols, -#endif - xaaSymbols, - xf8_32bppSymbols, - ramdacSymbols, -#ifdef XF86DRI - drmSymbols, - driSymbols, -#endif - fbdevHWSymbols, - vbeSymbols, -#if 0 - NULL /* ddcsymbols */, - NULL /* i2csymbols */, - NULL /* shadowSymbols */, -#endif - NULL); - - /* - * The return value must be non-NULL on success even though there - * is no TearDownProc. - */ - return (pointer)1; - } else { - if (errmaj) *errmaj = LDR_ONCEONLY; - return NULL; - } -} - -#endif +extern const char *vgahwSymbols[]; +extern const char *fbdevHWSymbols[]; +extern const char *ddcSymbols[]; /* Allocate our private R128InfoRec. */ static Bool R128GetRec(ScrnInfoPtr pScrn) @@ -571,9 +313,10 @@ static Bool R128UnmapMem(ScrnInfoPtr pScrn) } /* Read PLL information */ -int INPLL(ScrnInfoPtr pScrn, int addr) +int R128INPLL(ScrnInfoPtr pScrn, int addr) { - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; OUTREG8(R128_CLOCK_CNTL_INDEX, addr & 0x1f); return INREG(R128_CLOCK_CNTL_DATA); @@ -581,9 +324,10 @@ int INPLL(ScrnInfoPtr pScrn, int addr) #if 0 /* Read PAL information (only used for debugging). */ -static int INPAL(int idx) +static int R128INPAL(int idx) { - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; OUTREG(R128_PALETTE_INDEX, idx << 16); return INREG(R128_PALETTE_DATA); @@ -593,21 +337,21 @@ static int INPAL(int idx) /* Wait for vertical sync. */ void R128WaitForVerticalSync(ScrnInfoPtr pScrn) { - int i; - R128MMIO_VARS(); - unsigned int j; + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; + int i; OUTREG(R128_GEN_INT_STATUS, R128_VSYNC_INT_AK); for (i = 0; i < R128_TIMEOUT; i++) { - j = INREG(R128_GEN_INT_STATUS); - if (j & R128_VSYNC_INT) break; + if (INREG(R128_GEN_INT_STATUS) & R128_VSYNC_INT) break; } } /* Blank screen. */ static void R128Blank(ScrnInfoPtr pScrn) { - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; OUTREGP(R128_CRTC_EXT_CNTL, R128_CRTC_DISPLAY_DIS, ~R128_CRTC_DISPLAY_DIS); } @@ -615,7 +359,8 @@ static void R128Blank(ScrnInfoPtr pScrn) /* Unblank screen. */ static void R128Unblank(ScrnInfoPtr pScrn) { - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; OUTREGP(R128_CRTC_EXT_CNTL, 0, ~R128_CRTC_DISPLAY_DIS); } @@ -643,9 +388,9 @@ static Bool R128GetBIOSParameters(ScrnInfoPtr pScrn) int i; int FPHeader = 0; -#define R128ReadBIOS(offset, buffer, length) \ - (info->BIOSFromPCI ? \ - xf86ReadPciBIOS(offset, info->PciTag, 0, buffer, length) : \ +#define R128ReadBIOS(offset, buffer, length) \ + (info->BIOSFromPCI ? \ + xf86ReadPciBIOS(offset, info->PciTag, 0, buffer, length) : \ xf86ReadBIOS(info->BIOSAddr, offset, buffer, length)) #define R128_BIOS8(v) (*((CARD8 *)(info->VBIOS + (v)))) @@ -757,6 +502,7 @@ static Bool R128GetPLLParameters(ScrnInfoPtr pScrn) CARD16 bios_header; CARD16 pll_info_block; + if (!info->VBIOS) { xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Video BIOS not detected, using default PLL parameters!\n"); @@ -793,15 +539,22 @@ static Bool R128GetPLLParameters(ScrnInfoPtr pScrn) return TRUE; } -static -OptionInfoPtr -R128AvailableOptions(int chipid, int busid) +/* Return the options for supported chipset 'n'; NULL otherwise. */ +OptionInfoPtr R128AvailableOptions(int chipid, int busid) { - return R128Options; + int i; + + /* Check to make sure that chip 'chipid' is supported by the Rage + 128 driver */ + for (i = 0; R128PciChipsets[i].PCIid > 0; i++) { + if (chipid == R128PciChipsets[i].PCIid) + return R128Options; + } + return NULL; } /* Return the string name for supported chipset 'n'; NULL otherwise. */ -static void R128Identify(int flags) +void R128Identify(int flags) { xf86PrintChipsets(R128_NAME, "Driver for ATI Rage 128 chipset", @@ -809,7 +562,7 @@ static void R128Identify(int flags) } /* Return TRUE if chipset is present; FALSE otherwise. */ -static Bool R128Probe(DriverPtr drv, int flags) +Bool R128Probe(DriverPtr drv, int flags) { int numUsed; int numDevSections; @@ -819,8 +572,11 @@ static Bool R128Probe(DriverPtr drv, int flags) Bool foundScreen = FALSE; int i; + /* Check to make sure that the R128_NAME or the ATI2_NAME is listed + as the Driver in the "Device" section of the XF86Config file */ if ((numDevSections = xf86MatchDevice(R128_NAME, &devSections)) <= 0) - return FALSE; + if ((numDevSections = xf86MatchDevice(ATI2_NAME, &devSections)) <= 0) + return FALSE; if (!xf86GetPciVideoInfo()) return FALSE; @@ -843,7 +599,7 @@ static Bool R128Probe(DriverPtr drv, int flags) if (pEnt->active) { ScrnInfoPtr pScrn = xf86AllocateScreen(drv, 0); - pScrn->driverVersion = R128_VERSION; + pScrn->driverVersion = ATI2_VERSION; pScrn->driverName = R128_NAME; pScrn->name = R128_NAME; pScrn->Probe = R128Probe; @@ -877,9 +633,7 @@ static Bool R128PreInitVisual(ScrnInfoPtr pScrn) if (!xf86SetDepthBpp(pScrn, 8, 8, 8, (Support24bppFb | Support32bppFb -#ifndef USE_FB | SupportConvert32to24 -#endif ))) return FALSE; @@ -961,12 +715,12 @@ static Bool R128PreInitWeight(ScrnInfoPtr pScrn) If memory type ever needs an override, put it in this routine. */ static Bool R128PreInitConfig(ScrnInfoPtr pScrn) { - R128InfoPtr info = R128PTR(pScrn); - EntityInfoPtr pEnt = info->pEnt; - GDevPtr dev = pEnt->device; - int offset = 0; /* RAM Type */ + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; + EntityInfoPtr pEnt = info->pEnt; + GDevPtr dev = pEnt->device; + int offset = 0; /* RAM Type */ MessageType from; - unsigned char *R128MMIO; /* Chipset */ from = X_PROBED; @@ -1051,18 +805,26 @@ static Bool R128PreInitConfig(ScrnInfoPtr pScrn) } /* Flat panel (part 1) */ - /* FIXME: Make this an option */ - switch (info->Chipset) { - case PCI_CHIP_RAGE128LE: - case PCI_CHIP_RAGE128LF: - case PCI_CHIP_RAGE128MF: - case PCI_CHIP_RAGE128ML: info->HasPanelRegs = TRUE; break; - case PCI_CHIP_RAGE128RE: - case PCI_CHIP_RAGE128RF: - case PCI_CHIP_RAGE128RK: - case PCI_CHIP_RAGE128RL: - case PCI_CHIP_RAGE128PF: - default: info->HasPanelRegs = FALSE; break; + if (xf86GetOptValBool(R128Options, OPTION_PROG_FP_REGS, + &info->HasPanelRegs)) { + xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, + "Turned flat panel register programming %s\n", + info->HasPanelRegs ? "on" : "off"); + xf86DrvMsg(pScrn->scrnIndex, X_WARNING, + "\n\nWARNING: Forcing the driver to use/not use the flat panel registers\nmight damage your flat panel. Use at your *OWN* *RISK*.\n\n"); + } else { + switch (info->Chipset) { + case PCI_CHIP_RAGE128LE: + case PCI_CHIP_RAGE128LF: + case PCI_CHIP_RAGE128MF: + case PCI_CHIP_RAGE128ML: info->HasPanelRegs = TRUE; break; + case PCI_CHIP_RAGE128RE: + case PCI_CHIP_RAGE128RF: + case PCI_CHIP_RAGE128RK: + case PCI_CHIP_RAGE128RL: + case PCI_CHIP_RAGE128PF: + default: info->HasPanelRegs = FALSE; break; + } } /* Read registers used to determine options */ @@ -1074,6 +836,7 @@ static Bool R128PreInitConfig(ScrnInfoPtr pScrn) else pScrn->videoRam = INREG(R128_CONFIG_MEMSIZE) / 1024; info->MemCntl = INREG(R128_MEM_CNTL); + info->BusCntl = INREG(R128_BUS_CNTL); R128MMIO = NULL; R128UnmapMMIO(pScrn); @@ -1119,6 +882,7 @@ static Bool R128PreInitConfig(ScrnInfoPtr pScrn) xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Using flat panel for display\n"); #else + /* Panel CRT mode override */ if ((info->CRTOnly = xf86ReturnOptValBool(R128Options, OPTION_CRT, FALSE))) { xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, @@ -1129,11 +893,8 @@ static Bool R128PreInitConfig(ScrnInfoPtr pScrn) "Using flat panel for display\n"); } #endif - } else { - info->CRTOnly = FALSE; - } - if (info->HasPanelRegs) { + /* Panel width/height overrides */ info->PanelXRes = 0; info->PanelYRes = 0; if (xf86GetOptValInteger(R128Options, @@ -1146,6 +907,8 @@ static Bool R128PreInitConfig(ScrnInfoPtr pScrn) xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Flat panel height: %d\n", info->PanelYRes); } + } else { + info->CRTOnly = FALSE; } #ifdef XF86DRI @@ -1181,7 +944,7 @@ static Bool R128PreInitDDC(ScrnInfoPtr pScrn) xf86LoaderReqSymLists(ddcSymbols, NULL); if (xf86LoadSubModule(pScrn, "vbe")) { pVbe = VBEInit(NULL,info->pEnt->index); - if (!pVbe) return NULL; + if (!pVbe) return FALSE; xf86SetDDCproperties(pScrn,xf86PrintEDID(vbeDoEDID(pVbe,NULL))); return TRUE; @@ -1572,11 +1335,11 @@ static Bool R128PreInit(ScrnInfoPtr pScrn, int flags) static void R128LoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO *colors, VisualPtr pVisual) { - R128InfoPtr info = R128PTR(pScrn); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; int i; int idx; unsigned char r, g, b; - R128MMIO_VARS(); /* Select palette 0 (main CRTC) if using FP-enabled chip */ if (info->HasPanelRegs) PAL_SELECT(0); @@ -1677,7 +1440,7 @@ static Bool R128ScreenInit(int scrnIndex, ScreenPtr pScreen, if (!xf86ReturnOptValBool(R128Options, OPTION_NOACCEL, FALSE) && (maxy > pScrn->virtualY * 3) -#if 1 +#if 0 /* FIXME: Disable 3D support for FPs until it is tested */ && !info->HasPanelRegs #endif @@ -1769,7 +1532,8 @@ static Bool R128ScreenInit(int scrnIndex, ScreenPtr pScreen, MemBox.x1 = 0; MemBox.y1 = 0; MemBox.x2 = pScrn->displayWidth; - y2 = info->FbMapSize / (pScrn->displayWidth * info->CurrentLayout.pixel_bytes); + y2 = (info->FbMapSize + / (pScrn->displayWidth * info->CurrentLayout.pixel_bytes)); if (y2 >= 32768) y2 = 32767; /* because MemBox.y2 is signed short */ MemBox.y2 = y2; @@ -1932,6 +1696,9 @@ static Bool R128ScreenInit(int scrnIndex, ScreenPtr pScreen, miInitializeBackingStore(pScreen); xf86SetBackingStore(pScreen); + /* Set Silken Mouse */ + xf86SetSilkenMouse(pScreen); + /* Acceleration setup */ if (!xf86ReturnOptValBool(R128Options, OPTION_NOACCEL, FALSE)) { if (R128AccelInit(pScreen)) { @@ -1992,16 +1759,7 @@ static Bool R128ScreenInit(int scrnIndex, ScreenPtr pScreen, xf86DPMSInit(pScreen, R128DisplayPowerManagementSet, 0); #endif - /* Xv setup */ -#ifdef XvExtension - { - XF86VideoAdaptorPtr *ptr; - int n; - - if ((n = xf86XVListGenericAdaptors(pScrn, &ptr))) - xf86XVScreenInit(pScreen, ptr, n); - } -#endif + R128InitVideo(pScreen); /* Provide SaveScreen */ pScreen->SaveScreen = R128SaveScreen; @@ -2035,7 +1793,8 @@ static Bool R128ScreenInit(int scrnIndex, ScreenPtr pScreen, /* Write common registers (initialized to 0). */ static void R128RestoreCommonRegisters(ScrnInfoPtr pScrn, R128SavePtr restore) { - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; OUTREG(R128_OVR_CLR, restore->ovr_clr); OUTREG(R128_OVR_WID_LEFT_RIGHT, restore->ovr_wid_left_right); @@ -2055,7 +1814,8 @@ static void R128RestoreCommonRegisters(ScrnInfoPtr pScrn, R128SavePtr restore) /* Write CRTC registers. */ static void R128RestoreCrtcRegisters(ScrnInfoPtr pScrn, R128SavePtr restore) { - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; OUTREG(R128_CRTC_GEN_CNTL, restore->crtc_gen_cntl); @@ -2077,8 +1837,9 @@ static void R128RestoreCrtcRegisters(ScrnInfoPtr pScrn, R128SavePtr restore) /* Write flat panel registers */ static void R128RestoreFPRegisters(ScrnInfoPtr pScrn, R128SavePtr restore) { - CARD32 tmp; - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; + CARD32 tmp; OUTREG(R128_CRTC2_GEN_CNTL, restore->crtc2_gen_cntl); OUTREG(R128_FP_CRTC_H_TOTAL_DISP, restore->fp_crtc_h_total_disp); @@ -2115,7 +1876,8 @@ static void R128PLLWaitForReadUpdateComplete(ScrnInfoPtr pScrn) static void R128PLLWriteUpdate(ScrnInfoPtr pScrn) { - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; OUTPLLP(pScrn, R128_PPLL_REF_DIV, R128_PPLL_ATOMIC_UPDATE_W, 0xffff); } @@ -2123,7 +1885,8 @@ static void R128PLLWriteUpdate(ScrnInfoPtr pScrn) /* Write PLL registers. */ static void R128RestorePLLRegisters(ScrnInfoPtr pScrn, R128SavePtr restore) { - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; OUTREGP(R128_CLOCK_CNTL_INDEX, R128_PLL_DIV_SEL, 0xffff); @@ -2167,7 +1930,8 @@ static void R128RestorePLLRegisters(ScrnInfoPtr pScrn, R128SavePtr restore) /* Write DDA registers. */ static void R128RestoreDDARegisters(ScrnInfoPtr pScrn, R128SavePtr restore) { - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; OUTREG(R128_DDA_CONFIG, restore->dda_config); OUTREG(R128_DDA_ON_OFF, restore->dda_on_off); @@ -2176,9 +1940,9 @@ static void R128RestoreDDARegisters(ScrnInfoPtr pScrn, R128SavePtr restore) /* Write palette data. */ static void R128RestorePalette(ScrnInfoPtr pScrn, R128SavePtr restore) { - R128InfoPtr info = R128PTR(pScrn); - int i; - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; + int i; if (!restore->palette_valid) return; @@ -2208,7 +1972,8 @@ static void R128RestoreMode(ScrnInfoPtr pScrn, R128SavePtr restore) /* Read common registers. */ static void R128SaveCommonRegisters(ScrnInfoPtr pScrn, R128SavePtr save) { - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; save->ovr_clr = INREG(R128_OVR_CLR); save->ovr_wid_left_right = INREG(R128_OVR_WID_LEFT_RIGHT); @@ -2228,7 +1993,8 @@ static void R128SaveCommonRegisters(ScrnInfoPtr pScrn, R128SavePtr save) /* Read CRTC registers. */ static void R128SaveCrtcRegisters(ScrnInfoPtr pScrn, R128SavePtr save) { - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; save->crtc_gen_cntl = INREG(R128_CRTC_GEN_CNTL); save->crtc_ext_cntl = INREG(R128_CRTC_EXT_CNTL); @@ -2245,7 +2011,8 @@ static void R128SaveCrtcRegisters(ScrnInfoPtr pScrn, R128SavePtr save) /* Read flat panel registers */ static void R128SaveFPRegisters(ScrnInfoPtr pScrn, R128SavePtr save) { - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; save->crtc2_gen_cntl = INREG(R128_CRTC2_GEN_CNTL); save->fp_crtc_h_total_disp = INREG(R128_FP_CRTC_H_TOTAL_DISP); @@ -2280,7 +2047,8 @@ static void R128SavePLLRegisters(ScrnInfoPtr pScrn, R128SavePtr save) /* Read DDA registers. */ static void R128SaveDDARegisters(ScrnInfoPtr pScrn, R128SavePtr save) { - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; save->dda_config = INREG(R128_DDA_CONFIG); save->dda_on_off = INREG(R128_DDA_ON_OFF); @@ -2289,9 +2057,9 @@ static void R128SaveDDARegisters(ScrnInfoPtr pScrn, R128SavePtr save) /* Read palette data. */ static void R128SavePalette(ScrnInfoPtr pScrn, R128SavePtr save) { - R128InfoPtr info = R128PTR(pScrn); - int i; - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; + int i; /* Select palette 0 (main CRTC) if using FP-enabled chip */ if (info->HasPanelRegs) PAL_SELECT(0); @@ -2320,10 +2088,10 @@ static void R128SaveMode(ScrnInfoPtr pScrn, R128SavePtr save) /* Save everything needed to restore the original VC state. */ static void R128Save(ScrnInfoPtr pScrn) { - R128InfoPtr info = R128PTR(pScrn); - R128SavePtr save = &info->SavedReg; - vgaHWPtr hwp = VGAHWPTR(pScrn); - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; + R128SavePtr save = &info->SavedReg; + vgaHWPtr hwp = VGAHWPTR(pScrn); R128TRACE(("R128Save\n")); if (info->FBDev) { @@ -2346,10 +2114,10 @@ static void R128Save(ScrnInfoPtr pScrn) /* Restore the original (text) mode. */ static void R128Restore(ScrnInfoPtr pScrn) { - R128InfoPtr info = R128PTR(pScrn); - R128SavePtr restore = &info->SavedReg; - vgaHWPtr hwp = VGAHWPTR(pScrn); - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; + R128SavePtr restore = &info->SavedReg; + vgaHWPtr hwp = VGAHWPTR(pScrn); R128TRACE(("R128Restore\n")); if (info->FBDev) { @@ -2872,10 +2640,10 @@ static int R128ValidMode(int scrnIndex, DisplayModePtr mode, is (x,y) in virtual space. */ void R128AdjustFrame(int scrnIndex, int x, int y, int flags) { - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; - R128InfoPtr info = R128PTR(pScrn); + ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; int Base; - R128MMIO_VARS(); Base = y * info->CurrentLayout.displayWidth + x; @@ -2898,7 +2666,7 @@ void R128AdjustFrame(int scrnIndex, int x, int y, int flags) mode. */ static Bool R128EnterVT(int scrnIndex, int flags) { - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; R128InfoPtr info = R128PTR(pScrn); R128TRACE(("R128EnterVT\n")); @@ -3015,10 +2783,11 @@ static void R128FreeScreen(int scrnIndex, int flags) static void R128DisplayPowerManagementSet(ScrnInfoPtr pScrn, int PowerManagementMode, int flags) { - int mask = (R128_CRTC_DISPLAY_DIS - | R128_CRTC_HSYNC_DIS - | R128_CRTC_VSYNC_DIS); - R128MMIO_VARS(); + R128InfoPtr info = R128PTR(pScrn); + unsigned char *R128MMIO = info->MMIO; + int mask = (R128_CRTC_DISPLAY_DIS + | R128_CRTC_HSYNC_DIS + | R128_CRTC_VSYNC_DIS); switch (PowerManagementMode) { case DPMSModeOn: diff --git a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_probe.h b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_probe.h new file mode 100644 index 000000000..35460505d --- /dev/null +++ b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_probe.h @@ -0,0 +1,42 @@ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/r128_probe.h,v 1.2 2000/10/23 21:16:49 tsi Exp $ */ +/************************************************************************** + +Copyright 2000 ATI Technologies Inc. and VA Linux Systems, Inc., + Sunnyvale, California. +All Rights Reserved. + +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 +on the rights to use, copy, modify, merge, publish, distribute, sub +license, 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 (including the next +paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS 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. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin <martin@valinux.com> + * + */ + +#ifndef _R128_PROBE_H_ +#define _R128_PROBE_H_ + +extern OptionInfoPtr R128AvailableOptions(int chipid, int busid); +extern void R128Identify(int flags); +extern Bool R128Probe(DriverPtr drv, int flags); + +#endif diff --git a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_reg.h b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_reg.h index e8ff8b915..8bf906a92 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_reg.h +++ b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_reg.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/r128_reg.h,v 1.13 2000/09/13 15:47:32 martin Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/r128_reg.h,v 1.15 2000/10/18 17:20:01 alanh Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -56,9 +56,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #define ADDRREG(addr) ((volatile CARD32 *)(R128MMIO + (addr))) -#define R128MMIO_VARS() \ - unsigned char *R128MMIO = R128PTR(pScrn)->MMIO - #define OUTREGP(addr, val, mask) \ do { \ @@ -68,6 +65,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. OUTREG(addr, tmp); \ } while (0) +#define INPLL(pScrn, addr) R128INPLL(pScrn, addr) + #define OUTPLL(addr, val) \ do { \ OUTREG8(R128_CLOCK_CNTL_INDEX, ((addr) & 0x1f) | R128_PLL_WR_EN); \ @@ -271,6 +270,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #define R128_CLR_CMP_CLR_DST 0x15c8 #define R128_CLR_CMP_CLR_SRC 0x15c4 #define R128_CLR_CMP_CNTL 0x15c0 +# define R128_SRC_CMP_EQ_COLOR (4 << 0) # define R128_SRC_CMP_NEQ_COLOR (5 << 0) # define R128_CLR_CMP_SRC_SOURCE (1 << 24) #define R128_CLR_CMP_MASK 0x15cc @@ -688,11 +688,123 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #define R128_N_VIF_COUNT 0x0248 -#define R128_OV0_SCALE_CNTL 0x0420 /* ? */ #define R128_OVR_CLR 0x0230 #define R128_OVR_WID_LEFT_RIGHT 0x0234 #define R128_OVR_WID_TOP_BOTTOM 0x0238 +/* first overlay unit (there is only one) */ + +#define R128_OV0_Y_X_START 0x0400 +#define R128_OV0_Y_X_END 0x0404 +#define R128_OV0_EXCLUSIVE_HORZ 0x0408 +# define R128_EXCL_HORZ_START_MASK 0x000000ff +# define R128_EXCL_HORZ_END_MASK 0x0000ff00 +# define R128_EXCL_HORZ_BACK_PORCH_MASK 0x00ff0000 +# define R128_EXCL_HORZ_EXCLUSIVE_EN 0x80000000 +#define R128_OV0_EXCLUSIVE_VERT 0x040C +# define R128_EXCL_VERT_START_MASK 0x000003ff +# define R128_EXCL_VERT_END_MASK 0x03ff0000 +#define R128_OV0_REG_LOAD_CNTL 0x0410 +# define R128_REG_LD_CTL_LOCK 0x00000001L +# define R128_REG_LD_CTL_VBLANK_DURING_LOCK 0x00000002L +# define R128_REG_LD_CTL_STALL_GUI_UNTIL_FLIP 0x00000004L +# define R128_REG_LD_CTL_LOCK_READBACK 0x00000008L +#define R128_OV0_SCALE_CNTL 0x0420 +# define R128_SCALER_PIX_EXPAND 0x00000001L +# define R128_SCALER_Y2R_TEMP 0x00000002L +# define R128_SCALER_HORZ_PICK_NEAREST 0x00000003L +# define R128_SCALER_VERT_PICK_NEAREST 0x00000004L +# define R128_SCALER_SIGNED_UV 0x00000010L +# define R128_SCALER_GAMMA_SEL_MASK 0x00000060L +# define R128_SCALER_GAMMA_SEL_BRIGHT 0x00000000L +# define R128_SCALER_GAMMA_SEL_G22 0x00000020L +# define R128_SCALER_GAMMA_SEL_G18 0x00000040L +# define R128_SCALER_GAMMA_SEL_G14 0x00000060L +# define R128_SCALER_COMCORE_SHIFT_UP_ONE 0x00000080L +# define R128_SCALER_SURFAC_FORMAT 0x00000f00L +# define R128_SCALER_SOURCE_15BPP 0x00000300L +# define R128_SCALER_SOURCE_16BPP 0x00000400L +# define R128_SCALER_SOURCE_32BPP 0x00000600L +# define R128_SCALER_SOURCE_YUV9 0x00000900L +# define R128_SCALER_SOURCE_YUV12 0x00000A00L +# define R128_SCALER_SOURCE_VYUY422 0x00000B00L +# define R128_SCALER_SOURCE_YVYU422 0x00000C00L +# define R128_SCALER_SMART_SWITCH 0x00008000L +# define R128_SCALER_BURST_PER_PLANE 0x00ff0000L +# define R128_SCALER_DOUBLE_BUFFER 0x01000000L +# define R128_SCALER_DIS_LIMIT 0x08000000L +# define R128_SCALER_PRG_LOAD_START 0x10000000L +# define R128_SCALER_INT_EMU 0x20000000L +# define R128_SCALER_ENABLE 0x40000000L +# define R128_SCALER_SOFT_RESET 0x80000000L +#define R128_OV0_V_INC 0x0424 +#define R128_OV0_P1_V_ACCUM_INIT 0x0428 +# define R128_OV0_P1_MAX_LN_IN_PER_LN_OUT 0x00000003L +# define R128_OV0_P1_V_ACCUM_INIT_MASK 0x01ff8000L +#define R128_OV0_P23_V_ACCUM_INIT 0x042C +#define R128_OV0_P1_BLANK_LINES_AT_TOP 0x0430 +# define R128_P1_BLNK_LN_AT_TOP_M1_MASK 0x00000fffL +# define R128_P1_ACTIVE_LINES_M1 0x0fff0000L +#define R128_OV0_P23_BLANK_LINES_AT_TOP 0x0434 +# define R128_P23_BLNK_LN_AT_TOP_M1_MASK 0x000007ffL +# define R128_P23_ACTIVE_LINES_M1 0x07ff0000L +#define R128_OV0_VID_BUF0_BASE_ADRS 0x0440 +# define R128_VIF_BUF0_PITCH_SEL 0x00000001L +# define R128_VIF_BUF0_TILE_ADRS 0x00000002L +# define R128_VIF_BUF0_BASE_ADRS_MASK 0x03fffff0L +# define R128_VIF_BUF0_1ST_LINE_LSBS_MASK 0x48000000L +#define R128_OV0_VID_BUF1_BASE_ADRS 0x0444 +# define R128_VIF_BUF1_PITCH_SEL 0x00000001L +# define R128_VIF_BUF1_TILE_ADRS 0x00000002L +# define R128_VIF_BUF1_BASE_ADRS_MASK 0x03fffff0L +# define R128_VIF_BUF1_1ST_LINE_LSBS_MASK 0x48000000L +#define R128_OV0_VID_BUF2_BASE_ADRS 0x0448 +# define R128_VIF_BUF2_PITCH_SEL 0x00000001L +# define R128_VIF_BUF2_TILE_ADRS 0x00000002L +# define R128_VIF_BUF2_BASE_ADRS_MASK 0x03fffff0L +# define R128_VIF_BUF2_1ST_LINE_LSBS_MASK 0x48000000L +#define R128_OV0_VID_BUF3_BASE_ADRS 0x044C +#define R128_OV0_VID_BUF4_BASE_ADRS 0x0450 +#define R128_OV0_VID_BUF5_BASE_ADRS 0x0454 +#define R128_OV0_VID_BUF_PITCH0_VALUE 0x0460 +#define R128_OV0_VID_BUF_PITCH1_VALUE 0x0464 +#define R128_OV0_AUTO_FLIP_CNTL 0x0470 +#define R128_OV0_DEINTERLACE_PATTERN 0x0474 +#define R128_OV0_H_INC 0x0480 +#define R128_OV0_STEP_BY 0x0484 +#define R128_OV0_P1_H_ACCUM_INIT 0x0488 +#define R128_OV0_P23_H_ACCUM_INIT 0x048C +#define R128_OV0_P1_X_START_END 0x0494 +#define R128_OV0_P2_X_START_END 0x0498 +#define R128_OV0_P3_X_START_END 0x049C +#define R128_OV0_FILTER_CNTL 0x04A0 +#define R128_OV0_FOUR_TAP_COEF_0 0x04B0 +#define R128_OV0_FOUR_TAP_COEF_1 0x04B4 +#define R128_OV0_FOUR_TAP_COEF_2 0x04B8 +#define R128_OV0_FOUR_TAP_COEF_3 0x04BC +#define R128_OV0_FOUR_TAP_COEF_4 0x04C0 +#define R128_OV0_COLOUR_CNTL 0x04E0 +#define R128_OV0_VIDEO_KEY_CLR 0x04E4 +#define R128_OV0_VIDEO_KEY_MSK 0x04E8 +#define R128_OV0_GRAPHICS_KEY_CLR 0x04EC +#define R128_OV0_GRAPHICS_KEY_MSK 0x04F0 +#define R128_OV0_KEY_CNTL 0x04F4 +# define R128_VIDEO_KEY_FN_MASK 0x00000007L +# define R128_VIDEO_KEY_FN_FALSE 0x00000000L +# define R128_VIDEO_KEY_FN_TRUE 0x00000001L +# define R128_VIDEO_KEY_FN_EQ 0x00000004L +# define R128_VIDEO_KEY_FN_NE 0x00000005L +# define R128_GRAPHIC_KEY_FN_MASK 0x00000070L +# define R128_GRAPHIC_KEY_FN_FALSE 0x00000000L +# define R128_GRAPHIC_KEY_FN_TRUE 0x00000010L +# define R128_GRAPHIC_KEY_FN_EQ 0x00000040L +# define R128_GRAPHIC_KEY_FN_NE 0x00000050L +# define R128_CMP_MIX_MASK 0x00000100L +# define R128_CMP_MIX_OR 0x00000000L +# define R128_CMP_MIX_AND 0x00000100L +#define R128_OV0_TEST 0x04F8 + + #define R128_PALETTE_DATA 0x00b4 #define R128_PALETTE_INDEX 0x00b0 #define R128_PC_DEBUG_MODE 0x1760 diff --git a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_sarea.h b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_sarea.h index 2af80d140..dcfba4084 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_sarea.h +++ b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_sarea.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/r128_sarea.h,v 1.1 2000/06/17 00:03:23 martin Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/r128_sarea.h,v 1.2 2000/10/18 17:20:01 alanh Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., diff --git a/xc/programs/Xserver/hw/xfree86/drivers/r128/radeon.h b/xc/programs/Xserver/hw/xfree86/drivers/r128/radeon.h new file mode 100644 index 000000000..530d2b039 --- /dev/null +++ b/xc/programs/Xserver/hw/xfree86/drivers/r128/radeon.h @@ -0,0 +1,411 @@ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/radeon.h,v 1.2 2000/10/23 21:16:49 tsi Exp $ */ +/************************************************************************** + +Copyright 2000 ATI Technologies Inc. and VA Linux Systems, Inc., + Sunnyvale, California. +All Rights Reserved. + +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 +on the rights to use, copy, modify, merge, publish, distribute, sub +license, 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 (including the next +paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS 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. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin <martin@valinux.com> + * Rickard E. Faith <faith@valinux.com> + * + */ + +#ifndef _RADEON_H_ +#define _RADEON_H_ + + /* Xv support */ +#include "xf86xv.h" +#include "Xv.h" + + /* vgahw module (for VC save/restore only) */ +#include "vgaHW.h" + +#include "fbdevhw.h" + + /* XAA and Cursor Support */ +#include "xaa.h" +#include "xaalocal.h" +#include "xf86Cursor.h" + + + /* PCI support */ +#include "xf86PciInfo.h" +#include "xf86Pci.h" + + /* DDC support */ +#include "xf86DDC.h" + + /* VESA support */ +#include "vbe.h" + + /* DRI support */ +#ifdef XF86DRI +#include "GL/glxint.h" +#include "xf86drm.h" +#include "sarea.h" +#define _XF86DRI_SERVER_ +#include "xf86dri.h" +#include "dri.h" +#include "r128_dri.h" +#include "r128_dripriv.h" +#include "r128_sarea.h" +#endif + +#ifdef RENDER +#include "picturestr.h" +#endif + +/* NOTE: Turn off DRI until it is working */ +#ifdef XF86DRI +#undef XF86DRI +#endif + +#define RADEON_DEBUG 0 /* Turn off debugging output */ +#define RADEON_TIMEOUT 2000000 /* Fall out of wait loops after this count */ +#define RADEON_MMIOSIZE 0x80000 +/* Atomic updates of PLL clock don't seem to always work and stick, thus + * the bit never resets. Here - we use our own check by reading back the + * register we've just wrote to make sure it's got the Right! value */ +#define RADEON_ATOMIC_UPDATE 0 /* Use PLL Atomic updates (seems broken) */ + +#define RADEON_VBIOS_SIZE 0x00010000 + + /* RADEON_NAME is used for the server-side + ddx driver, the client-side DRI driver, + and the kernel-level DRM driver. */ +#define RADEON_NAME "radeon" + +#if RADEON_DEBUG +#define RADEONTRACE(x) \ + do { \ + ErrorF("(**) %s(%d): ", RADEON_NAME, pScrn->scrnIndex); \ + ErrorF x; \ + } while (0); +#else +#define RADEONTRACE(x) +#endif + + +/* Other macros */ +#define RADEON_ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) +#define RADEON_ALIGN(x,bytes) (((x) + ((bytes) - 1)) & ~((bytes) - 1)) +#define RADEONPTR(pScrn) ((RADEONInfoPtr)(pScrn)->driverPrivate) + +typedef struct { /* All values in XCLKS */ + int ML; /* Memory Read Latency */ + int MB; /* Memory Burst Length */ + int Trcd; /* RAS to CAS delay */ + int Trp; /* RAS percentage */ + int Twr; /* Write Recovery */ + int CL; /* CAS Latency */ + int Tr2w; /* Read to Write Delay */ + int Rloop; /* Loop Latency */ + int Rloop_fudge; /* Add to ML to get Rloop */ + char *name; +} RADEONRAMRec, *RADEONRAMPtr; + +typedef struct { + /* Common registers */ + CARD32 ovr_clr; + CARD32 ovr_wid_left_right; + CARD32 ovr_wid_top_bottom; + CARD32 ov0_scale_cntl; + CARD32 mpp_tb_config; + CARD32 mpp_gp_config; + CARD32 subpic_cntl; + CARD32 viph_control; + CARD32 i2c_cntl_1; + CARD32 gen_int_cntl; + CARD32 cap0_trig_cntl; + CARD32 cap1_trig_cntl; + CARD32 bus_cntl; + + /* Other registers to save for VT switches */ + CARD32 dp_datatype; + CARD32 rbbm_soft_reset; + CARD32 clock_cntl_index; + CARD32 amcgpio_en_reg; + CARD32 amcgpio_mask; + + /* CRTC registers */ + CARD32 crtc_gen_cntl; + CARD32 crtc_ext_cntl; + CARD32 dac_cntl; + CARD32 crtc_h_total_disp; + CARD32 crtc_h_sync_strt_wid; + CARD32 crtc_v_total_disp; + CARD32 crtc_v_sync_strt_wid; + CARD32 crtc_offset; + CARD32 crtc_offset_cntl; + CARD32 crtc_pitch; + + /* CRTC2 registers */ + CARD32 crtc2_gen_cntl; + + /* Flat panel registers */ + CARD32 fp_crtc_h_total_disp; + CARD32 fp_crtc_v_total_disp; + CARD32 fp_gen_cntl; + CARD32 fp_h_sync_strt_wid; + CARD32 fp_horz_stretch; + CARD32 fp_panel_cntl; + CARD32 fp_v_sync_strt_wid; + CARD32 fp_vert_stretch; + CARD32 lvds_gen_cntl; + CARD32 tmds_crc; + + /* Computed values for PLL */ + int dot_clock_freq; + int pll_output_freq; + int feedback_div; + int post_div; + + /* PLL registers */ + CARD32 ppll_ref_div; + CARD32 ppll_div_3; + CARD32 htotal_cntl; + + /* DDA register */ + CARD32 dda_config; + CARD32 dda_on_off; + + /* Pallet */ + Bool palette_valid; + CARD32 palette[256]; +} RADEONSaveRec, *RADEONSavePtr; + +typedef struct { + CARD16 reference_freq; + CARD16 reference_div; + CARD32 min_pll_freq; + CARD32 max_pll_freq; + CARD16 xclk; +} RADEONPLLRec, *RADEONPLLPtr; + +typedef struct { + int bitsPerPixel; + int depth; + int displayWidth; + int pixel_code; + int pixel_bytes; + DisplayModePtr mode; +} RADEONFBLayout; + +typedef struct { + EntityInfoPtr pEnt; + pciVideoPtr PciInfo; + PCITAG PciTag; + int Chipset; + Bool Primary; + + Bool FBDev; + + unsigned long LinearAddr; /* Frame buffer physical address */ + unsigned long MMIOAddr; /* MMIO region physical address */ + unsigned long BIOSAddr; /* BIOS physical address */ + Bool BIOSFromPCI; /* BIOS is read from PCI space */ + + unsigned char *MMIO; /* Map of MMIO region */ + unsigned char *FB; /* Map of frame buffer */ + CARD8 *VBIOS; /* Video BIOS pointer */ + + CARD32 MemCntl; + CARD32 BusCntl; + unsigned long FbMapSize; /* Size of frame buffer, in bytes */ + int Flags; /* Saved copy of mode flags */ + +#ifdef ENABLE_FLAT_PANEL + Bool HasPanelRegs; /* Current chip can connect to a FP */ + Bool CRTOnly; /* Only use External CRT instead of FP */ + int FPBIOSstart; /* Start of the flat panel info */ + + /* Computed values for FPs */ + int PanelXRes; + int PanelYRes; + int PanelPwrDly; +#endif + + RADEONPLLRec pll; + RADEONRAMPtr ram; + + RADEONSaveRec SavedReg; /* Original (text) mode */ + RADEONSaveRec ModeReg; /* Current mode */ + Bool (*CloseScreen)(int, ScreenPtr); + + Bool PaletteSavedOnVT; /* Palette saved on last VT switch */ + + XAAInfoRecPtr accel; + Bool accelOn; + xf86CursorInfoPtr cursor; + unsigned long cursor_start; + unsigned long cursor_end; + + int fifo_slots; /* Free slots in the FIFO (64 max) */ + int pix24bpp; /* Depth of pixmap for 24bpp framebuffer */ + Bool dac6bits; /* Use 6 bit DAC? */ + + /* Computed values for Radeon */ + int pitch; + int datatype; + CARD32 dp_gui_master_cntl; + + /* Saved values for ScreenToScreenCopy */ + int xdir; + int ydir; + + /* ScanlineScreenToScreenColorExpand support */ + unsigned char *scratch_buffer[1]; + unsigned char *scratch_save; + int scanline_x; + int scanline_y; + int scanline_h; + int scanline_h_w; + int scanline_words; + int scanline_direct; + int scanline_bpp; /* Only used for ImageWrite */ + + DGAModePtr DGAModes; + int numDGAModes; + Bool DGAactive; + int DGAViewportStatus; + + RADEONFBLayout CurrentLayout; +#ifdef XF86DRI + Bool directRenderingEnabled; + DRIInfoPtr pDRIInfo; + int drmFD; + int numVisualConfigs; + __GLXvisualConfig *pVisualConfigs; + RADEONConfigPrivPtr pVisualConfigsPriv; + + drmHandle fbHandle; + + drmSize registerSize; + drmHandle registerHandle; + + Bool IsPCI; /* Current card is a PCI card */ + + drmSize agpSize; + drmHandle agpMemHandle; /* Handle from drmAgpAlloc */ + unsigned long agpOffset; + unsigned char *AGP; /* Map */ + int agpMode; + + Bool CPInUse; /* CP is currently active */ + int CPMode; /* CP mode that server/clients use */ + int CPFifoSize; /* Size of the CP command FIFO */ + Bool CPSecure; /* CP security enabled */ + int CPusecTimeout; /* CP timeout in usecs */ + Bool CP2D; /* CP is used for X server 2D prims */ + + /* CP ring buffer data */ + unsigned long ringStart; /* Offset into AGP space */ + drmHandle ringHandle; /* Handle from drmAddMap */ + drmSize ringMapSize; /* Size of map */ + int ringSize; /* Size of ring (in MB) */ + unsigned char *ring; /* Map */ + int ringSizeLog2QW; + + unsigned long ringReadOffset; /* Offset into AGP space */ + drmHandle ringReadPtrHandle; /* Handle from drmAddMap */ + drmSize ringReadMapSize; /* Size of map */ + unsigned char *ringReadPtr; /* Map */ + + /* CP vertex buffer data */ + unsigned long vbStart; /* Offset into AGP space */ + drmHandle vbHandle; /* Handle from drmAddMap */ + drmSize vbMapSize; /* Size of map */ + int vbSize; /* Size of vert bufs (in MB) */ + unsigned char *vb; /* Map */ + int vbBufSize; /* Size of individual vert buf */ + int vbNumBufs; /* Number of vert bufs */ + drmBufMapPtr vbBufs; /* Buffer map */ + + /* CP indirect buffer data */ + unsigned long indStart; /* Offset into AGP space */ + drmHandle indHandle; /* Handle from drmAddMap */ + drmSize indMapSize; /* Size of map */ + int indSize; /* Size of indirect bufs (in MB) */ + unsigned char *ind; /* Map */ + + /* CP AGP Texture data */ + unsigned long agpTexStart; /* Offset into AGP space */ + drmHandle agpTexHandle; /* Handle from drmAddMap */ + drmSize agpTexMapSize; /* Size of map */ + int agpTexSize; /* Size of AGP tex space (in MB) */ + unsigned char *agpTex; /* Map */ + int log2AGPTexGran; + + /* DRI screen private data */ + int fbX; + int fbY; + int backX; + int backY; + int depthX; + int depthY; + int textureX; + int textureY; + int textureSize; + int log2TexGran; +#endif + XF86VideoAdaptorPtr adaptor; +} RADEONInfoRec, *RADEONInfoPtr; + +#define RADEONWaitForFifo(pScrn, entries) \ +do { \ + if (info->fifo_slots < entries) \ + RADEONWaitForFifoFunction(pScrn, entries); \ + info->fifo_slots -= entries; \ +} while (0) + +extern void RADEONWaitForFifoFunction(ScrnInfoPtr pScrn, int entries); +extern void RADEONWaitForIdle(ScrnInfoPtr pScrn); +extern void RADEONEngineReset(ScrnInfoPtr pScrn); +extern void RADEONEngineFlush(ScrnInfoPtr pScrn); + +extern int RADEONINPLL(ScrnInfoPtr pScrn, int addr); +extern void RADEONWaitForVerticalSync(ScrnInfoPtr pScrn); +extern void RADEONAdjustFrame(int scrnIndex, int x, int y, int flags); +extern Bool RADEONSwitchMode(int ScrnIndex, DisplayModePtr mode, int flags); + +extern Bool RADEONAccelInit(ScreenPtr pScreen); +extern void RADEONEngineInit(ScrnInfoPtr pScrn); +extern Bool RADEONCursorInit(ScreenPtr pScreen); +extern Bool RADEONDGAInit(ScreenPtr pScreen); + +extern int RADEONMinBits(int val); + +#ifdef XF86DRI +extern Bool RADEONDRIScreenInit(ScreenPtr pScreen); +extern void RADEONDRICloseScreen(ScreenPtr pScreen); +extern Bool RADEONDRIFinishScreenInit(ScreenPtr pScreen); +extern void RADEONCPStart(ScrnInfoPtr pScrn); +extern void RADEONCPStop(ScrnInfoPtr pScrn); +extern void RADEONCPResetRing(ScrnInfoPtr pScrn); +extern void RADEONCPWaitForIdle(ScrnInfoPtr pScrn); +#endif + +#endif diff --git a/xc/programs/Xserver/hw/xfree86/drivers/r128/radeon_accel.c b/xc/programs/Xserver/hw/xfree86/drivers/r128/radeon_accel.c new file mode 100644 index 000000000..88e4f7a0a --- /dev/null +++ b/xc/programs/Xserver/hw/xfree86/drivers/r128/radeon_accel.c @@ -0,0 +1,981 @@ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/radeon_accel.c,v 1.1 2000/10/18 17:20:02 alanh Exp $ */ +/************************************************************************** + +Copyright 2000 ATI Technologies Inc. and VA Linux Systems, Inc., + Sunnyvale, California. +All Rights Reserved. + +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 +on the rights to use, copy, modify, merge, publish, distribute, sub +license, 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 (including the next +paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS 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. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin <martin@valinux.com> + * Rickard E. Faith <faith@valinux.com> + * Alan Hourihane <ahourihane@valinux.com> + * + * Credits: + * + * Thanks to Ani Joshi <ajoshi@shell.unixbox.com> for providing source + * code to his Radeon driver. Portions of this file are based on the + * initialization code for that driver. + * + * References: + * + * !!!! FIXME !!!! + * RAGE 128 VR/ RAGE 128 GL Register Reference Manual (Technical + * Reference Manual P/N RRG-G04100-C Rev. 0.04), ATI Technologies: April + * 1999. + * + * RAGE 128 Software Development Manual (Technical Reference Manual P/N + * SDK-G04000 Rev. 0.01), ATI Technologies: June 1999. + * + * Notes on unimplemented XAA optimizations: + * + * SetClipping: This has been removed as XAA expects 16bit registers + * for full clipping. + * TwoPointLine: The Radeon supports this. Not Bresenham. + * DashedLine with non-power-of-two pattern length: Apparently, there is + * no way to set the length of the pattern -- it is always + * assumed to be 8 or 32 (or 1024?). + * ScreenToScreenColorExpandFill: See p. 4-17 of the Technical Reference + * Manual where it states that monochrome expansion of frame + * buffer data is not supported. + * CPUToScreenColorExpandFill, direct: The implementation here uses a hybrid + * direct/indirect method. If we had more data registers, + * then we could do better. If XAA supported a trigger write + * address, the code would be simpler. + * Color8x8PatternFill: Apparently, an 8x8 color brush cannot take an 8x8 + * pattern from frame buffer memory. + * ImageWrites: Same as CPUToScreenColorExpandFill + * + */ + +#define RADEON_IMAGEWRITE 0 /* Turned off by default - slower in accel */ + + /* X and server generic header files */ +#include "Xarch.h" +#include "xf86.h" +#include "xf86_ansic.h" +#include "xf86_OSproc.h" +#include "xf86fbman.h" + + /* Line support */ +#include "miline.h" + + /* Driver data structures */ +#include "radeon.h" +#include "radeon_reg.h" + +static struct { + int rop; + int pattern; +} RADEON_ROP[] = { + { RADEON_ROP3_ZERO, RADEON_ROP3_ZERO }, /* GXclear */ + { RADEON_ROP3_DSa, RADEON_ROP3_DPa }, /* Gxand */ + { RADEON_ROP3_SDna, RADEON_ROP3_PDna }, /* GXandReverse */ + { RADEON_ROP3_S, RADEON_ROP3_P }, /* GXcopy */ + { RADEON_ROP3_DSna, RADEON_ROP3_DPna }, /* GXandInverted */ + { RADEON_ROP3_D, RADEON_ROP3_D }, /* GXnoop */ + { RADEON_ROP3_DSx, RADEON_ROP3_DPx }, /* GXxor */ + { RADEON_ROP3_DSo, RADEON_ROP3_DPo }, /* GXor */ + { RADEON_ROP3_DSon, RADEON_ROP3_DPon }, /* GXnor */ + { RADEON_ROP3_DSxn, RADEON_ROP3_PDxn }, /* GXequiv */ + { RADEON_ROP3_Dn, RADEON_ROP3_Dn }, /* GXinvert */ + { RADEON_ROP3_SDno, RADEON_ROP3_PDno }, /* GXorReverse */ + { RADEON_ROP3_Sn, RADEON_ROP3_Pn }, /* GXcopyInverted */ + { RADEON_ROP3_DSno, RADEON_ROP3_DPno }, /* GXorInverted */ + { RADEON_ROP3_DSan, RADEON_ROP3_DPan }, /* GXnand */ + { RADEON_ROP3_ONE, RADEON_ROP3_ONE } /* GXset */ +}; + +/* Flush all dirty data in the Pixel Cache to memory. */ +void RADEONEngineFlush(ScrnInfoPtr pScrn) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + int i; + + OUTREGP(RADEON_RB2D_DSTCACHE_CTLSTAT, RADEON_RB2D_DC_FLUSH_ALL, + ~RADEON_RB2D_DC_FLUSH_ALL); + for (i = 0; i < RADEON_TIMEOUT; i++) { + if (!(INREG(RADEON_RB2D_DSTCACHE_CTLSTAT) & RADEON_RB2D_DC_BUSY)) break; + } +} + +/* Reset graphics card to known state. */ +void RADEONEngineReset(ScrnInfoPtr pScrn) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + CARD32 clock_cntl_index; + CARD32 mclk_cntl; + CARD32 rbbm_soft_reset; + + RADEONEngineFlush(pScrn); + + clock_cntl_index = INREG(RADEON_CLOCK_CNTL_INDEX); + mclk_cntl = INPLL(pScrn, RADEON_MCLK_CNTL); + + OUTPLL(RADEON_MCLK_CNTL, (mclk_cntl | 0x003f0000)); + + rbbm_soft_reset = INREG(RADEON_RBBM_SOFT_RESET); + + OUTREG(RADEON_RBBM_SOFT_RESET, rbbm_soft_reset | + RADEON_SOFT_RESET_CP | + RADEON_SOFT_RESET_HI | + RADEON_SOFT_RESET_SE | + RADEON_SOFT_RESET_RE | + RADEON_SOFT_RESET_PP | + RADEON_SOFT_RESET_E2 | + RADEON_SOFT_RESET_RB | + RADEON_SOFT_RESET_HDP); + INREG(RADEON_RBBM_SOFT_RESET); + OUTREG(RADEON_RBBM_SOFT_RESET, rbbm_soft_reset & + ~(RADEON_SOFT_RESET_CP | + RADEON_SOFT_RESET_HI | + RADEON_SOFT_RESET_SE | + RADEON_SOFT_RESET_RE | + RADEON_SOFT_RESET_PP | + RADEON_SOFT_RESET_E2 | + RADEON_SOFT_RESET_RB | + RADEON_SOFT_RESET_HDP)); + INREG(RADEON_RBBM_SOFT_RESET); + + OUTPLL(RADEON_MCLK_CNTL, mclk_cntl); + OUTREG(RADEON_CLOCK_CNTL_INDEX, clock_cntl_index); + OUTREG(RADEON_RBBM_SOFT_RESET, rbbm_soft_reset); + +#ifdef XF86DRI + if (RADEONCP_USE_RING_BUFFER(info->CPMode)) RADEONCPResetRing(pScrn); +#endif +} + +/* The FIFO has 64 slots. This routines waits until at least `entries' of + these slots are empty. */ +void RADEONWaitForFifoFunction(ScrnInfoPtr pScrn, int entries) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + int i; + + for (;;) { + for (i = 0; i < RADEON_TIMEOUT; i++) { + info->fifo_slots = + INREG(RADEON_RBBM_STATUS) & RADEON_RBBM_FIFOCNT_MASK; + if (info->fifo_slots >= entries) return; + } + RADEONTRACE(("FIFO timed out: %d entries, stat=0x%08x\n", + INREG(RADEON_RBBM_STATUS) & RADEON_RBBM_FIFOCNT_MASK, + INREG(RADEON_RBBM_STATUS))); + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "FIFO timed out, resetting engine...\n"); + RADEONEngineReset(pScrn); +#ifdef XF86DRI + if (info->CP2D) RADEONCPStart(pScrn); +#endif + } +} + +/* Wait for the graphics engine to be completely idle: the FIFO has + drained, the Pixel Cache is flushed, and the engine is idle. This is a + standard "sync" function that will make the hardware "quiescent". */ +void RADEONWaitForIdle(ScrnInfoPtr pScrn) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + int i; + + RADEONTRACE(("WaitForIdle (entering): %d entries, stat=0x%08x\n", + INREG(RADEON_RBBM_STATUS) & RADEON_RBBM_FIFOCNT_MASK, + INREG(RADEON_RBBM_STATUS))); + + RADEONWaitForFifoFunction(pScrn, 64); + + for (;;) { + for (i = 0; i < RADEON_TIMEOUT; i++) { + if (!(INREG(RADEON_RBBM_STATUS) & RADEON_RBBM_ACTIVE)) { + RADEONEngineFlush(pScrn); + return; + } + } + RADEONTRACE(("Idle timed out: %d entries, stat=0x%08x\n", + INREG(RADEON_RBBM_STATUS) & RADEON_RBBM_FIFOCNT_MASK, + INREG(RADEON_RBBM_STATUS))); + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Idle timed out, resetting engine...\n"); + RADEONEngineReset(pScrn); +#ifdef XF86DRI + if (info->CP2D) RADEONCPStart(pScrn); +#endif + } +} + +/* Setup for XAA SolidFill. */ +static void RADEONSetupForSolidFill(ScrnInfoPtr pScrn, + int color, int rop, unsigned int planemask) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + + RADEONWaitForFifo(pScrn, 4); + OUTREG(RADEON_DP_GUI_MASTER_CNTL, (info->dp_gui_master_cntl + | RADEON_GMC_BRUSH_SOLID_COLOR + | RADEON_GMC_SRC_DATATYPE_COLOR + | RADEON_ROP[rop].pattern)); + OUTREG(RADEON_DP_BRUSH_FRGD_CLR, color); + OUTREG(RADEON_DP_WRITE_MASK, planemask); + OUTREG(RADEON_DP_CNTL, (RADEON_DST_X_LEFT_TO_RIGHT + | RADEON_DST_Y_TOP_TO_BOTTOM)); +} + +/* Subsequent XAA SolidFillRect. + + Tests: xtest CH06/fllrctngl, xterm +*/ +static void RADEONSubsequentSolidFillRect(ScrnInfoPtr pScrn, + int x, int y, int w, int h) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + + RADEONWaitForFifo(pScrn, 2); + OUTREG(RADEON_DST_Y_X, (y << 16) | x); + OUTREG(RADEON_DST_WIDTH_HEIGHT, (w << 16) | h); +} + +/* Setup for XAA solid lines. */ +static void RADEONSetupForSolidLine(ScrnInfoPtr pScrn, + int color, int rop, unsigned int planemask) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + + RADEONWaitForFifo(pScrn, 3); + OUTREG(RADEON_DP_GUI_MASTER_CNTL, (info->dp_gui_master_cntl + | RADEON_GMC_BRUSH_SOLID_COLOR + | RADEON_GMC_SRC_DATATYPE_COLOR + | RADEON_ROP[rop].pattern)); + OUTREG(RADEON_DP_BRUSH_FRGD_CLR, color); + OUTREG(RADEON_DP_WRITE_MASK, planemask); +} + + +/* Subsequent XAA solid TwoPointLine line. + + Tests: xtest CH06/drwln, ico, Mark Vojkovich's linetest program + + [See http://www.xfree86.org/devel/archives/devel/1999-Jun/0102.shtml for + Mark Vojkovich's linetest program, posted 2Jun99 to devel@xfree86.org.] +*/ +static void RADEONSubsequentSolidTwoPointLine(ScrnInfoPtr pScrn, + int x1, int y1, int x2, int y2, + int flags) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + int direction = 0; + + if (x1 < x2) direction |= RADEON_DST_X_DIR_LEFT_TO_RIGHT; + if (y1 < y2) direction |= RADEON_DST_Y_DIR_TOP_TO_BOTTOM; + + RADEONWaitForFifo(pScrn, 4); + OUTREG(RADEON_DST_Y_X, (y1 << 16) | x1); + if (!(flags & OMIT_LAST)) + OUTREG(RADEON_DP_CNTL_XDIR_YDIR_YMAJOR, direction); + OUTREG(RADEON_DST_LINE_START, (y1 << 16) | x1); + OUTREG(RADEON_DST_LINE_END, (y2 << 16) | x2); +} + +/* Subsequent XAA solid horizontal and vertical lines */ +static void RADEONSubsequentSolidHorVertLine(ScrnInfoPtr pScrn, + int x, int y, int len, int dir ) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + + RADEONWaitForFifo(pScrn, 1); + OUTREG(RADEON_DP_CNTL, (RADEON_DST_X_LEFT_TO_RIGHT + | RADEON_DST_Y_TOP_TO_BOTTOM)); + + if (dir == DEGREES_0) { + RADEONSubsequentSolidFillRect(pScrn, x, y, len, 1); + } else { + RADEONSubsequentSolidFillRect(pScrn, x, y, 1, len); + } +} + +/* Setup for XAA dashed lines. + + Tests: xtest CH05/stdshs, XFree86/drwln + + NOTE: Since we can only accelerate lines with power-of-2 patterns of + length <= 32. +*/ +static void RADEONSetupForDashedLine(ScrnInfoPtr pScrn, + int fg, int bg, + int rop, unsigned int planemask, + int length, unsigned char *pattern) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + CARD32 pat = *(CARD32 *)pattern; + + switch (length) { + case 2: pat |= pat << 2; /* fall through */ + case 4: pat |= pat << 4; /* fall through */ + case 8: pat |= pat << 8; /* fall through */ + case 16: pat |= pat << 16; + } + + RADEONWaitForFifo(pScrn, 5); + OUTREG(RADEON_DP_GUI_MASTER_CNTL, (info->dp_gui_master_cntl + | (bg == -1 + ? RADEON_GMC_BRUSH_32x1_MONO_FG_LA + : RADEON_GMC_BRUSH_32x1_MONO_FG_BG) + | RADEON_ROP[rop].pattern + | RADEON_GMC_BYTE_LSB_TO_MSB)); + OUTREG(RADEON_DP_WRITE_MASK, planemask); + OUTREG(RADEON_DP_BRUSH_FRGD_CLR, fg); + OUTREG(RADEON_DP_BRUSH_BKGD_CLR, bg); + OUTREG(RADEON_BRUSH_DATA0, pat); +} + +/* Subsequent XAA dashed line. */ +static void RADEONSubsequentDashedTwoPointLine(ScrnInfoPtr pScrn, + int x1, int y1, + int x2, int y2, + int flags, + int phase) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + int direction = 0; + + if (x1 < x2) direction |= RADEON_DST_X_DIR_LEFT_TO_RIGHT; + if (y1 < y2) direction |= RADEON_DST_Y_DIR_TOP_TO_BOTTOM; + + RADEONWaitForFifo(pScrn, 5); + if (!(flags & OMIT_LAST)) + OUTREG(RADEON_DP_CNTL_XDIR_YDIR_YMAJOR, direction); + OUTREG(RADEON_DST_Y_X, (y1 << 16) | x1); + OUTREG(RADEON_BRUSH_Y_X, (phase << 16) | phase); + OUTREG(RADEON_DST_LINE_START, (y1 << 16) | x1); + OUTREG(RADEON_DST_LINE_END, (y2 << 16) | x2); +} + +/* Setup for XAA screen-to-screen copy. + + Tests: xtest CH06/fllrctngl (also tests transparency). +*/ +static void RADEONSetupForScreenToScreenCopy(ScrnInfoPtr pScrn, + int xdir, int ydir, int rop, + unsigned int planemask, + int trans_color) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + + info->xdir = xdir; + info->ydir = ydir; + RADEONWaitForFifo(pScrn, 3); + OUTREG(RADEON_DP_GUI_MASTER_CNTL, (info->dp_gui_master_cntl + | RADEON_GMC_BRUSH_NONE + | RADEON_GMC_SRC_DATATYPE_COLOR + | RADEON_ROP[rop].rop + | RADEON_DP_SRC_SOURCE_MEMORY)); + OUTREG(RADEON_DP_WRITE_MASK, planemask); + OUTREG(RADEON_DP_CNTL, ((xdir >= 0 + ? RADEON_DST_X_LEFT_TO_RIGHT + : 0) + | (ydir >= 0 + ? RADEON_DST_Y_TOP_TO_BOTTOM + : 0))); + + if (trans_color != -1) { + /* Set up for transparency */ + RADEONWaitForFifo(pScrn, 3); + OUTREG(RADEON_CLR_CMP_CLR_SRC, trans_color); + OUTREG(RADEON_CLR_CMP_MASK, RADEON_CLR_CMP_MSK); + /* Mmmm, Seems as though the transparency compare is opposite to r128 + * It should only draw when source != trans_color, + * this is the opposite of that. */ + OUTREG(RADEON_CLR_CMP_CNTL, (RADEON_SRC_CMP_EQ_COLOR + | RADEON_CLR_CMP_SRC_SOURCE)); + } +} + +/* Subsequent XAA screen-to-screen copy. */ +static void RADEONSubsequentScreenToScreenCopy(ScrnInfoPtr pScrn, + int x1, int y1, + int x2, int y2, + int w, int h) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + + if (info->xdir < 0) x1 += w - 1, x2 += w - 1; + if (info->ydir < 0) y1 += h - 1, y2 += h - 1; + + RADEONWaitForFifo(pScrn, 3); + OUTREG(RADEON_SRC_Y_X, (y1 << 16) | x1); + OUTREG(RADEON_DST_Y_X, (y2 << 16) | x2); + OUTREG(RADEON_DST_HEIGHT_WIDTH, (h << 16) | w); +} + +/* Setup for XAA mono 8x8 pattern color expansion. Patterns with + transparency use `bg == -1'. This routine is only used if the XAA + pixmap cache is turned on. + + Tests: xtest XFree86/fllrctngl (no other test will test this routine with + both transparency and non-transparency) +*/ +static void RADEONSetupForMono8x8PatternFill(ScrnInfoPtr pScrn, + int patternx, int patterny, + int fg, int bg, int rop, + unsigned int planemask) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + + RADEONWaitForFifo(pScrn, 6); + OUTREG(RADEON_DP_GUI_MASTER_CNTL, (info->dp_gui_master_cntl + | (bg == -1 + ? RADEON_GMC_BRUSH_8X8_MONO_FG_LA + : RADEON_GMC_BRUSH_8X8_MONO_FG_BG) + | RADEON_ROP[rop].pattern + | RADEON_GMC_BYTE_LSB_TO_MSB)); + OUTREG(RADEON_DP_WRITE_MASK, planemask); + OUTREG(RADEON_DP_BRUSH_FRGD_CLR, fg); + OUTREG(RADEON_DP_BRUSH_BKGD_CLR, bg); + OUTREG(RADEON_BRUSH_DATA0, patternx); + OUTREG(RADEON_BRUSH_DATA1, patterny); +} + +/* Subsequent XAA 8x8 pattern color expansion. Because they are used in + the setup function, `patternx' and `patterny' are not used here. */ +static void RADEONSubsequentMono8x8PatternFillRect(ScrnInfoPtr pScrn, + int patternx, int patterny, + int x, int y, int w, int h) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + + RADEONWaitForFifo(pScrn, 3); + OUTREG(RADEON_BRUSH_Y_X, (patterny << 8) | patternx); + OUTREG(RADEON_DST_Y_X, (y << 16) | x); + OUTREG(RADEON_DST_HEIGHT_WIDTH, (h << 16) | w); +} + +#if 0 +/* Setup for XAA color 8x8 pattern fill. + + Tests: xtest XFree86/fllrctngl (with Mono8x8PatternFill off) +*/ +static void RADEONSetupForColor8x8PatternFill(ScrnInfoPtr pScrn, + int patx, int paty, + int rop, unsigned int planemask, + int trans_color) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + + ErrorF("Color8x8 %d %d %d\n", trans_color, patx, paty); + + RADEONWaitForFifo(pScrn, 3); + OUTREG(RADEON_DP_GUI_MASTER_CNTL, (info->dp_gui_master_cntl + | RADEON_GMC_BRUSH_8x8_COLOR + | RADEON_GMC_SRC_DATATYPE_COLOR + | RADEON_ROP[rop].pattern + | RADEON_DP_SRC_SOURCE_MEMORY)); + OUTREG(RADEON_DP_WRITE_MASK, planemask); + OUTREG(RADEON_SRC_Y_X, (paty << 16) | patx); + + if (trans_color != -1) { + /* Set up for transparency */ + RADEONWaitForFifo(pScrn, 3); + OUTREG(RADEON_CLR_CMP_CLR_SRC, trans_color); + OUTREG(RADEON_CLR_CMP_MASK, RADEON_CLR_CMP_MSK); + /* Mmmm, Seems as though the transparency compare is opposite to r128 + * It should only draw when source != trans_color, + * this is the opposite of that. */ + OUTREG(RADEON_CLR_CMP_CNTL, (RADEON_SRC_CMP_EQ_COLOR + | RADEON_CLR_CMP_SRC_SOURCE)); + } +} + +/* Subsequent XAA 8x8 pattern color expansion. */ +static void RADEONSubsequentColor8x8PatternFillRect(ScrnInfoPtr pScrn, + int patx, int paty, + int x, int y, int w, int h) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + + ErrorF("Color8x8 %d,%d %d,%d %d %d\n", patx, paty, x, y, w, h); + + RADEONWaitForFifo(pScrn, 4); + OUTREG(RADEON_BRUSH_Y_X, (paty << 16) | patx); + OUTREG(RADEON_DST_Y_X, (y << 16) | x); + OUTREG(RADEON_DST_HEIGHT_WIDTH, (h << 16) | w); +} +#endif + +/* Setup for XAA indirect CPU-to-screen color expansion (indirect). + Because of how the scratch buffer is initialized, this is really a + mainstore-to-screen color expansion. Transparency is supported when `bg + == -1'. + Implementing the hybrid indirect/direct scheme improved performance in a + few areas: +*/ +static void RADEONSetupForScanlineCPUToScreenColorExpandFill(ScrnInfoPtr pScrn, + int fg, int bg, + int rop, + unsigned int + planemask) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + + RADEONWaitForFifo(pScrn, 4); + OUTREG(RADEON_DP_GUI_MASTER_CNTL, (info->dp_gui_master_cntl + | RADEON_GMC_DST_CLIPPING + | RADEON_GMC_BRUSH_NONE + | (bg == -1 + ? RADEON_GMC_SRC_DATATYPE_MONO_FG_LA + : RADEON_GMC_SRC_DATATYPE_MONO_FG_BG) + | RADEON_ROP[rop].rop + | RADEON_GMC_BYTE_LSB_TO_MSB + | RADEON_DP_SRC_SOURCE_HOST_DATA)); + OUTREG(RADEON_DP_WRITE_MASK, planemask); + OUTREG(RADEON_DP_SRC_FRGD_CLR, fg); + OUTREG(RADEON_DP_SRC_BKGD_CLR, bg); +} + +/* Subsequent XAA indirect CPU-to-screen color expansion. This is only + called once for each rectangle. */ +static void RADEONSubsequentScanlineCPUToScreenColorExpandFill(ScrnInfoPtr + pScrn, + int x, int y, + int w, int h, + int skipleft) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + + info->scanline_h = h; + info->scanline_words = (w + 31) >> 5; + + if ((info->scanline_words * h) <= 9) { + /* Turn on direct for less than 9 dword colour expansion */ + info->scratch_buffer[0] + = (unsigned char *)(ADDRREG(RADEON_HOST_DATA_LAST) + - (info->scanline_words - 1)); + info->scanline_direct = 1; + } else { + /* Use indirect for anything else */ + info->scratch_buffer[0] = info->scratch_save; + info->scanline_direct = 0; + } + + RADEONWaitForFifo(pScrn, 4 + (info->scanline_direct ? + (info->scanline_words * h) : 0) ); + OUTREG(RADEON_SC_TOP_LEFT, (y << 16) | ((x+skipleft) & 0xffff)); + /* MMmm, we don't need the -1 on both y+h or x+w, why ? */ + OUTREG(RADEON_SC_BOTTOM_RIGHT, ((y+h) << 16) | ((x+w) & 0xffff)); + OUTREG(RADEON_DST_Y_X, (y << 16) | (x & 0xffff)); + /* Have to pad the width here and use clipping engine */ + OUTREG(RADEON_DST_HEIGHT_WIDTH, (h << 16) | ((w + 31) & ~31)); +} + +/* Subsequent XAA indirect CPU-to-screen color expandion. This is called + once for each scanline. */ +static void RADEONSubsequentColorExpandScanline(ScrnInfoPtr pScrn, int bufno) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + CARD32 *p = (CARD32 *)info->scratch_buffer[bufno]; + int i; + int left = info->scanline_words; + volatile CARD32 *d; + + if (info->scanline_direct) return; + --info->scanline_h; + while (left) { + if (left <= 8) { + /* Last scanline - finish write to DATA_LAST */ + if (info->scanline_h == 0) { + RADEONWaitForFifo(pScrn, left); + /* Unrolling doesn't improve performance */ + for (d = ADDRREG(RADEON_HOST_DATA_LAST) - (left - 1); left; --left) + *d++ = *p++; + return; + } else { + RADEONWaitForFifo(pScrn, left); + /* Unrolling doesn't improve performance */ + for (d = ADDRREG(RADEON_HOST_DATA7) - (left - 1); left; --left) + *d++ = *p++; + } + } else { + RADEONWaitForFifo(pScrn, 8); + /* Unrolling doesn't improve performance */ + for (d = ADDRREG(RADEON_HOST_DATA0), i = 0; i < 8; i++) + *d++ = *p++; + left -= 8; + } + } +} + +#if RADEON_IMAGEWRITE +/* Setup for XAA indirect image write. */ +static void RADEONSetupForScanlineImageWrite(ScrnInfoPtr pScrn, + int rop, + unsigned int planemask, + int trans_color, + int bpp, + int depth) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + + info->scanline_bpp = bpp; + + RADEONWaitForFifo(pScrn, 2); + OUTREG(RADEON_DP_GUI_MASTER_CNTL, (info->dp_gui_master_cntl + | RADEON_GMC_DST_CLIPPING + | RADEON_GMC_BRUSH_NONE + | RADEON_GMC_SRC_DATATYPE_COLOR + | RADEON_ROP[rop].rop + | RADEON_GMC_BYTE_LSB_TO_MSB + | RADEON_DP_SRC_SOURCE_HOST_DATA)); + OUTREG(RADEON_DP_WRITE_MASK, planemask); + + if (trans_color != -1) { + /* Set up for transparency */ + RADEONWaitForFifo(pScrn, 3); + OUTREG(RADEON_CLR_CMP_CLR_SRC, trans_color); + OUTREG(RADEON_CLR_CMP_MASK, RADEON_CLR_CMP_MSK); + /* Mmmm, Seems as though the transparency compare is opposite to r128 + * It should only draw when source != trans_color, + * this is the opposite of that. */ + OUTREG(RADEON_CLR_CMP_CNTL, (RADEON_SRC_CMP_EQ_COLOR + | RADEON_CLR_CMP_SRC_SOURCE)); + } +} + +/* Subsequent XAA indirect image write. This is only called once for each + rectangle. */ +static void RADEONSubsequentScanlineImageWriteRect(ScrnInfoPtr pScrn, + int x, int y, + int w, int h, + int skipleft) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + int shift = 0; /* 32bpp */ + + if (pScrn->bitsPerPixel == 8) shift = 3; + else if (pScrn->bitsPerPixel == 16) shift = 1; + + info->scanline_h = h; + info->scanline_words = (w * info->scanline_bpp + 31) >> 5; + + if ((info->scanline_words * h) <= 9) { + /* Turn on direct for less than 9 dword colour expansion */ + info->scratch_buffer[0] + = (unsigned char *)(ADDRREG(RADEON_HOST_DATA_LAST) + - (info->scanline_words - 1)); + info->scanline_direct = 1; + } else { + /* Use indirect for anything else */ + info->scratch_buffer[0] = info->scratch_save; + info->scanline_direct = 0; + } + + RADEONWaitForFifo(pScrn, 4 + (info->scanline_direct ? + (info->scanline_words * h) : 0) ); + OUTREG(RADEON_SC_TOP_LEFT, (y << 16) | ((x+skipleft) & 0xffff)); + /* MMmm, we don't need the -1 on both y+h or x+w, why ? */ + OUTREG(RADEON_SC_BOTTOM_RIGHT, ((y+h) << 16) | ((x+w) & 0xffff)); + OUTREG(RADEON_DST_Y_X, (y << 16) | (x & 0xffff)); + /* Have to pad the width here and use clipping engine */ + OUTREG(RADEON_DST_HEIGHT_WIDTH, (h << 16) | ((w + shift) & ~shift)); +} + +/* Subsequent XAA indirect image write. This is called once for each + scanline. */ +static void RADEONSubsequentImageWriteScanline(ScrnInfoPtr pScrn, int bufno) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + CARD32 *p = (CARD32 *)info->scratch_buffer[bufno]; + int i; + int left = info->scanline_words; + volatile CARD32 *d; + + if (info->scanline_direct) return; + --info->scanline_h; + while (left) { + if (left <= 8) { + /* Last scanline - finish write to DATA_LAST */ + if (info->scanline_h == 0) { + RADEONWaitForFifo(pScrn, left); + /* Unrolling doesn't improve performance */ + for (d = ADDRREG(RADEON_HOST_DATA_LAST) - (left - 1); left; --left) + *d++ = *p++; + return; + } else { + RADEONWaitForFifo(pScrn, left); + /* Unrolling doesn't improve performance */ + for (d = ADDRREG(RADEON_HOST_DATA7) - (left - 1); left; --left) + *d++ = *p++; + } + } else { + RADEONWaitForFifo(pScrn, 8); + /* Unrolling doesn't improve performance */ + for (d = ADDRREG(RADEON_HOST_DATA0), i = 0; i < 8; i++) + *d++ = *p++; + left -= 8; + } + } +} +#endif + +/* Initialize the acceleration hardware. */ +void RADEONEngineInit(ScrnInfoPtr pScrn) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + int pitch64; + + RADEONTRACE(("EngineInit (%d/%d)\n", + info->CurrentLayout.pixel_code, + info->CurrentLayout.bitsPerPixel)); + + OUTREG(RADEON_SCALE_3D_CNTL, 0); + RADEONEngineReset(pScrn); + + RADEONWaitForFifo(pScrn, 1); + /* turn of all automatic flushing - we'll do it all */ + OUTREG(RADEON_RB2D_DSTCACHE_MODE, 0); + + switch (info->CurrentLayout.pixel_code) { + case 8: info->datatype = 2; break; + case 15: info->datatype = 3; break; + case 16: info->datatype = 4; break; + case 24: info->datatype = 5; break; + case 32: info->datatype = 6; break; + default: + RADEONTRACE(("Unknown depth/bpp = %d/%d (code = %d)\n", + info->CurrentLayout.depth, + info->CurrentLayout.bitsPerPixel, + info->CurrentLayout.pixel_code)); + } + info->pitch = ((info->CurrentLayout.displayWidth / 8) * + (info->CurrentLayout.pixel_bytes == 3 ? 3 : 1)); + + RADEONTRACE(("Pitch for acceleration = %d\n", info->pitch)); + + pitch64 = ((pScrn->displayWidth * (pScrn->bitsPerPixel / 8) + 0x3f)) >> 6; + + RADEONWaitForFifo(pScrn, 1); + OUTREG(RADEON_DEFAULT_OFFSET, (INREG(RADEON_DEFAULT_OFFSET) & 0xC0000000) | + (pitch64 << 22)); + + RADEONWaitForFifo(pScrn, 1); +#if X_BYTE_ORDER == X_BIG_ENDIAN + OUTREGP(RADEON_DP_DATATYPE, + RADEON_HOST_BIG_ENDIAN_EN, ~RADEON_HOST_BIG_ENDIAN_EN); +#else + OUTREGP(RADEON_DP_DATATYPE, 0, ~RADEON_HOST_BIG_ENDIAN_EN); +#endif + + RADEONWaitForFifo(pScrn, 1); + OUTREG(RADEON_DEFAULT_SC_BOTTOM_RIGHT, (RADEON_DEFAULT_SC_RIGHT_MAX + | RADEON_DEFAULT_SC_BOTTOM_MAX)); + info->dp_gui_master_cntl = + ((info->datatype << RADEON_GMC_DST_DATATYPE_SHIFT) + | RADEON_GMC_CLR_CMP_CNTL_DIS); + RADEONWaitForFifo(pScrn, 1); + OUTREG(RADEON_DP_GUI_MASTER_CNTL, (info->dp_gui_master_cntl + | RADEON_GMC_BRUSH_SOLID_COLOR + | RADEON_GMC_SRC_DATATYPE_COLOR)); + + RADEONWaitForFifo(pScrn, 7); + OUTREG(RADEON_DST_LINE_START, 0); + OUTREG(RADEON_DST_LINE_END, 0); + OUTREG(RADEON_DP_BRUSH_FRGD_CLR, 0xffffffff); + OUTREG(RADEON_DP_BRUSH_BKGD_CLR, 0x00000000); + OUTREG(RADEON_DP_SRC_FRGD_CLR, 0xffffffff); + OUTREG(RADEON_DP_SRC_BKGD_CLR, 0x00000000); + OUTREG(RADEON_DP_WRITE_MASK, 0xffffffff); + + RADEONWaitForIdle(pScrn); +} + +#ifdef XF86DRI +/* FIXME: When direct rendering is enabled, we should use the CP to + draw 2D commands */ +static void RADEONCPAccelInit(ScrnInfoPtr pScrn, XAAInfoRecPtr a) +{ + a->Flags = 0; + + /* Sync */ +#if 1 + a->Sync = RADEONWaitForIdle; +#else + a->Sync = RADEONCCEWaitForIdle; +#endif + +} +#endif + +static void RADEONMMIOAccelInit(ScrnInfoPtr pScrn, XAAInfoRecPtr a) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + + a->Flags = (PIXMAP_CACHE + | OFFSCREEN_PIXMAPS + | LINEAR_FRAMEBUFFER); + + /* Sync */ + a->Sync = RADEONWaitForIdle; + + /* Solid Filled Rectangle */ + a->PolyFillRectSolidFlags = 0; + a->SetupForSolidFill = RADEONSetupForSolidFill; + a->SubsequentSolidFillRect = RADEONSubsequentSolidFillRect; + + /* Screen-to-screen Copy */ + /* Transparency uses the wrong colors for + 24 bpp mode -- the transparent part is + correct, but the opaque color is wrong. + This can be seen with netscape's I-bar + cursor when editing in the URL location + box. */ + a->ScreenToScreenCopyFlags = ((pScrn->bitsPerPixel == 24) + ? NO_TRANSPARENCY + : 0); + a->SetupForScreenToScreenCopy = RADEONSetupForScreenToScreenCopy; + a->SubsequentScreenToScreenCopy = RADEONSubsequentScreenToScreenCopy; + + /* Mono 8x8 Pattern Fill (Color Expand) */ + a->SetupForMono8x8PatternFill + = RADEONSetupForMono8x8PatternFill; + a->SubsequentMono8x8PatternFillRect + = RADEONSubsequentMono8x8PatternFillRect; + a->Mono8x8PatternFillFlags = (HARDWARE_PATTERN_PROGRAMMED_BITS + | HARDWARE_PATTERN_PROGRAMMED_ORIGIN + | HARDWARE_PATTERN_SCREEN_ORIGIN + | BIT_ORDER_IN_BYTE_LSBFIRST); + + /* Indirect CPU-To-Screen Color Expand */ +#if X_BYTE_ORDER == X_LITTLE_ENDIAN + a->ScanlineCPUToScreenColorExpandFillFlags = LEFT_EDGE_CLIPPING + /* RADEON gets upset, when using HOST provided data + * without a source rop. To show run 'xtest's drwarc */ + | ROP_NEEDS_SOURCE + | LEFT_EDGE_CLIPPING_NEGATIVE_X; +#else + a->ScanlineCPUToScreenColorExpandFillFlags = BIT_ORDER_IN_BYTE_MSBFIRST + /* RADEON gets upset, when using HOST provided data + * without a source rop. To show run 'xtest's drwarc */ + | ROP_NEEDS_SOURCE + | LEFT_EDGE_CLIPPING + | LEFT_EDGE_CLIPPING_NEGATIVE_X; +#endif + a->NumScanlineColorExpandBuffers = 1; + a->ScanlineColorExpandBuffers = info->scratch_buffer; + info->scratch_save = xalloc(((pScrn->virtualX+31)/32*4) + + (pScrn->virtualX + * info->CurrentLayout.pixel_bytes)); + info->scratch_buffer[0] = info->scratch_save; + a->SetupForScanlineCPUToScreenColorExpandFill + = RADEONSetupForScanlineCPUToScreenColorExpandFill; + a->SubsequentScanlineCPUToScreenColorExpandFill + = RADEONSubsequentScanlineCPUToScreenColorExpandFill; + a->SubsequentColorExpandScanline = RADEONSubsequentColorExpandScanline; + + a->SetupForSolidLine = RADEONSetupForSolidLine; + a->SubsequentSolidTwoPointLine = RADEONSubsequentSolidTwoPointLine; + a->SubsequentSolidHorVertLine = RADEONSubsequentSolidHorVertLine; + + a->SetupForDashedLine = RADEONSetupForDashedLine; + a->SubsequentDashedTwoPointLine = RADEONSubsequentDashedTwoPointLine; + a->DashPatternMaxLength = 32; + a->DashedLineFlags = (LINE_PATTERN_LSBFIRST_LSBJUSTIFIED + | LINE_PATTERN_POWER_OF_2_ONLY); + +#if RADEON_IMAGEWRITE + /* ImageWrite */ + a->NumScanlineImageWriteBuffers = 1; + a->ScanlineImageWriteBuffers = info->scratch_buffer; + info->scratch_buffer[0] = info->scratch_save; + a->SetupForScanlineImageWrite = RADEONSetupForScanlineImageWrite; + a->SubsequentScanlineImageWriteRect + = RADEONSubsequentScanlineImageWriteRect; + a->SubsequentImageWriteScanline = RADEONSubsequentImageWriteScanline; + a->ScanlineImageWriteFlags = CPU_TRANSFER_PAD_DWORD + /* Performance tests show that we shouldn't use GXcopy for + * uploads as a memcpy is faster */ + | NO_GXCOPY + /* RADEON gets upset, when using HOST provided data + * without a source rop. To show run 'xtest's ptimg */ + | ROP_NEEDS_SOURCE + | SCANLINE_PAD_DWORD + | LEFT_EDGE_CLIPPING + | LEFT_EDGE_CLIPPING_NEGATIVE_X; +#endif + +#if 0 + /* Color 8x8 Pattern Fill */ + a->SetupForColor8x8PatternFill + = RADEONSetupForColor8x8PatternFill; + a->SubsequentColor8x8PatternFillRect + = RADEONSubsequentColor8x8PatternFillRect; + a->Color8x8PatternFillFlags = + HARDWARE_PATTERN_PROGRAMMED_ORIGIN + | HARDWARE_PATTERN_SCREEN_ORIGIN + | BIT_ORDER_IN_BYTE_LSBFIRST; +#endif +} + +/* Initialize XAA for supported acceleration and also initialize the + graphics hardware for acceleration. */ +Bool RADEONAccelInit(ScreenPtr pScreen) +{ + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + RADEONInfoPtr info = RADEONPTR(pScrn); + XAAInfoRecPtr a; + + if (!(a = info->accel = XAACreateInfoRec())) return FALSE; + +#ifdef XF86DRI + /* FIXME: When direct rendering is enabled, we should use the CP to + draw 2D commands */ + if (info->CP2D) RADEONCPAccelInit(pScrn, a); + else +#endif + RADEONMMIOAccelInit(pScrn, a); + + RADEONEngineInit(pScrn); + return XAAInit(pScreen, a); +} diff --git a/xc/programs/Xserver/hw/xfree86/drivers/r128/radeon_cursor.c b/xc/programs/Xserver/hw/xfree86/drivers/r128/radeon_cursor.c new file mode 100644 index 000000000..d0f55fea2 --- /dev/null +++ b/xc/programs/Xserver/hw/xfree86/drivers/r128/radeon_cursor.c @@ -0,0 +1,267 @@ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/radeon_cursor.c,v 1.1 2000/10/18 17:20:02 alanh Exp $ */ +/************************************************************************** + +Copyright 2000 ATI Technologies Inc. and VA Linux Systems, Inc., + Sunnyvale, California. +All Rights Reserved. + +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 +on the rights to use, copy, modify, merge, publish, distribute, sub +license, 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 (including the next +paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS 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. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin <martin@valinux.com> + * Rickard E. Faith <faith@valinux.com> + * + * References: + * + * !!!! FIXME !!!! + * RAGE 128 VR/ RAGE 128 GL Register Reference Manual (Technical + * Reference Manual P/N RRG-G04100-C Rev. 0.04), ATI Technologies: April + * 1999. + * + * RAGE 128 Software Development Manual (Technical Reference Manual P/N + * SDK-G04000 Rev. 0.01), ATI Technologies: June 1999. + * + */ + + /* X and server generic header files */ +#include "Xarch.h" +#include "xf86.h" +#include "xf86_ansic.h" +#include "xf86_OSproc.h" +#include "xf86fbman.h" + + /* Driver data structures */ +#include "radeon.h" +#include "radeon_reg.h" + +#if X_BYTE_ORDER == X_BIG_ENDIAN +#define P_SWAP32( a , b ) \ + ((char *)a)[0] = ((char *)b)[3]; \ + ((char *)a)[1] = ((char *)b)[2]; \ + ((char *)a)[2] = ((char *)b)[1]; \ + ((char *)a)[3] = ((char *)b)[0] + +#define P_SWAP16( a , b ) \ + ((char *)a)[0] = ((char *)b)[1]; \ + ((char *)a)[1] = ((char *)b)[0]; \ + ((char *)a)[2] = ((char *)b)[3]; \ + ((char *)a)[3] = ((char *)b)[2] +#endif + + +/* Set cursor foreground and background colors. */ +static void RADEONSetCursorColors(ScrnInfoPtr pScrn, int bg, int fg) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + + OUTREG(RADEON_CUR_CLR0, bg); + OUTREG(RADEON_CUR_CLR1, fg); +} + +/* Set cursor position to (x,y) with offset into cursor bitmap at + (xorigin,yorigin). */ +static void RADEONSetCursorPosition(ScrnInfoPtr pScrn, int x, int y) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + xf86CursorInfoPtr cursor = info->cursor; + int xorigin = 0; + int yorigin = 0; + int total_y = pScrn->frameY1 - pScrn->frameY0; + + if (x < 0) xorigin = -x; + if (y < 0) yorigin = -y; + if (y > total_y) y = total_y; + if (info->Flags & V_DBLSCAN) y *= 2; + if (xorigin >= cursor->MaxWidth) xorigin = cursor->MaxWidth - 1; + if (yorigin >= cursor->MaxHeight) yorigin = cursor->MaxHeight - 1; + + OUTREG(RADEON_CUR_HORZ_VERT_OFF, (RADEON_CUR_LOCK + | (xorigin << 16) + | yorigin)); + OUTREG(RADEON_CUR_HORZ_VERT_POSN, (RADEON_CUR_LOCK + | ((xorigin ? 0 : x) << 16) + | (yorigin ? 0 : y))); + OUTREG(RADEON_CUR_OFFSET, info->cursor_start + yorigin * 16); +} + +/* Copy cursor image from `image' to video memory. RADEONSetCursorPosition + will be called after this, so we can ignore xorigin and yorigin. */ +static void RADEONLoadCursorImage(ScrnInfoPtr pScrn, unsigned char *image) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + CARD32 *s = (CARD32 *)image; + CARD32 *d = (CARD32 *)(info->FB + info->cursor_start); + int y; + CARD32 save; + + save = INREG(RADEON_CRTC_GEN_CNTL); + OUTREG(RADEON_CRTC_GEN_CNTL, save & ~RADEON_CRTC_CUR_EN); + +#if X_BYTE_ORDER == X_BIG_ENDIAN + switch(info->CurrentLayout.pixel_bytes) { + case 4: + case 3: + for (y = 0; y < 64; y++) { + P_SWAP32(d,s); + d++; s++; + P_SWAP32(d,s); + d++; s++; + P_SWAP32(d,s); + d++; s++; + P_SWAP32(d,s); + d++; s++; + } + break; + case 2: + for (y = 0; y < 64; y++) { + P_SWAP16(d,s); + d++; s++; + P_SWAP16(d,s); + d++; s++; + P_SWAP16(d,s); + d++; s++; + P_SWAP16(d,s); + d++; s++; + } + break; + default: + for (y = 0; y < 64; y++) { + *d++ = *s++; + *d++ = *s++; + *d++ = *s++; + *d++ = *s++; + } + } +#else + for (y = 0; y < 64; y++) { + *d++ = *s++; + *d++ = *s++; + *d++ = *s++; + *d++ = *s++; + } +#endif + + /* Set the area after the cursor to be all transparent so that we + won't display corrupted cursors on the screen */ + for (y = 0; y < 64; y++) { + *d++ = 0xffffffff; /* The AND bits */ + *d++ = 0xffffffff; + *d++ = 0x00000000; /* The XOR bits */ + *d++ = 0x00000000; + } + + OUTREG(RADEON_CRTC_GEN_CNTL, save); +} + +/* Hide hardware cursor. */ +static void RADEONHideCursor(ScrnInfoPtr pScrn) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + + OUTREGP(RADEON_CRTC_GEN_CNTL, 0, ~RADEON_CRTC_CUR_EN); +} + +/* Show hardware cursor. */ +static void RADEONShowCursor(ScrnInfoPtr pScrn) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + + OUTREGP(RADEON_CRTC_GEN_CNTL, RADEON_CRTC_CUR_EN, ~RADEON_CRTC_CUR_EN); +} + +/* Determine if hardware cursor is in use. */ +static Bool RADEONUseHWCursor(ScreenPtr pScreen, CursorPtr pCurs) +{ + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + RADEONInfoPtr info = RADEONPTR(pScrn); + + return info->cursor_start ? TRUE : FALSE; +} + +/* Initialize hardware cursor support. */ +Bool RADEONCursorInit(ScreenPtr pScreen) +{ + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + RADEONInfoPtr info = RADEONPTR(pScrn); + xf86CursorInfoPtr cursor; + FBAreaPtr fbarea; + int width; + int height; + int size; + + + if (!(cursor = info->cursor = xf86CreateCursorInfoRec())) return FALSE; + + cursor->MaxWidth = 64; + cursor->MaxHeight = 64; + cursor->Flags = (HARDWARE_CURSOR_TRUECOLOR_AT_8BPP + +#if X_BYTE_ORDER == X_LITTLE_ENDIAN + | HARDWARE_CURSOR_BIT_ORDER_MSBFIRST +#endif + | HARDWARE_CURSOR_INVERT_MASK + | HARDWARE_CURSOR_AND_SOURCE_WITH_MASK + | HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_64 + | HARDWARE_CURSOR_SWAP_SOURCE_AND_MASK); + + cursor->SetCursorColors = RADEONSetCursorColors; + cursor->SetCursorPosition = RADEONSetCursorPosition; + cursor->LoadCursorImage = RADEONLoadCursorImage; + cursor->HideCursor = RADEONHideCursor; + cursor->ShowCursor = RADEONShowCursor; + cursor->UseHWCursor = RADEONUseHWCursor; + + size = (cursor->MaxWidth/4) * cursor->MaxHeight; + width = pScrn->displayWidth; + height = (size*2 + 1023) / pScrn->displayWidth; + fbarea = xf86AllocateOffscreenArea(pScreen, + width, + height, + 16, + NULL, + NULL, + NULL); + + if (!fbarea) { + info->cursor_start = 0; + xf86DrvMsg(pScrn->scrnIndex, X_WARNING, + "Hardware cursor disabled" + " due to insufficient offscreen memory\n"); + } else { + info->cursor_start = RADEON_ALIGN((fbarea->box.x1 + + width * fbarea->box.y1) + * info->CurrentLayout.pixel_bytes, + 16); + info->cursor_end = info->cursor_start + size; + } + + RADEONTRACE(("RADEONCursorInit (0x%08x-0x%08x)\n", + info->cursor_start, info->cursor_end)); + + return xf86InitCursor(pScreen, cursor); +} diff --git a/xc/programs/Xserver/hw/xfree86/drivers/r128/radeon_dga.c b/xc/programs/Xserver/hw/xfree86/drivers/r128/radeon_dga.c new file mode 100644 index 000000000..73c9ab786 --- /dev/null +++ b/xc/programs/Xserver/hw/xfree86/drivers/r128/radeon_dga.c @@ -0,0 +1,368 @@ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/radeon_dga.c,v 1.1 2000/10/18 17:20:03 alanh Exp $ */ +/************************************************************************** + +Copyright 2000 ATI Technologies Inc. and VA Linux Systems, Inc., + Sunnyvale, California. +All Rights Reserved. + +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 +on the rights to use, copy, modify, merge, publish, distribute, sub +license, 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 (including the next +paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS 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. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin <martin@valinux.com> + * + * Credits: + * + * Thanks to Ove Kĺven <ovek@transgaming.com> for writing the Rage 128 + * DGA support. Portions of this file are based on the initialization + * code for that driver. + * + */ + + /* X and server generic header files */ +#include "xf86.h" +#include "xf86_OSproc.h" +#include "xf86_ansic.h" + + /* Driver data structures */ +#include "radeon.h" + + /* DGA support */ +#include "dgaproc.h" + + +static Bool RADEON_OpenFramebuffer(ScrnInfoPtr, char **, unsigned char **, + int *, int *, int *); +static Bool RADEON_SetMode(ScrnInfoPtr, DGAModePtr); +static int RADEON_GetViewport(ScrnInfoPtr); +static void RADEON_SetViewport(ScrnInfoPtr, int, int, int); +static void RADEON_FillRect(ScrnInfoPtr, int, int, int, int, unsigned long); +static void RADEON_BlitRect(ScrnInfoPtr, int, int, int, int, int, int); +#if 0 +static void RADEON_BlitTransRect(ScrnInfoPtr, int, int, int, int, int, int, + unsigned long); +#endif + +static +DGAFunctionRec RADEON_DGAFuncs = { + RADEON_OpenFramebuffer, + NULL, + RADEON_SetMode, + RADEON_SetViewport, + RADEON_GetViewport, + RADEONWaitForIdle, + RADEON_FillRect, + RADEON_BlitRect, +#if 0 + RADEON_BlitTransRect +#else + NULL +#endif +}; + + +static DGAModePtr RADEONSetupDGAMode(ScrnInfoPtr pScrn, + DGAModePtr modes, + int *num, + int bitsPerPixel, + int depth, + Bool pixmap, + int secondPitch, + unsigned long red, + unsigned long green, + unsigned long blue, + short visualClass) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + DGAModePtr newmodes = NULL, currentMode; + DisplayModePtr pMode, firstMode; + int otherPitch, Bpp = bitsPerPixel >> 3; + Bool oneMore; + + pMode = firstMode = pScrn->modes; + + while (pMode) { + otherPitch = secondPitch ? secondPitch : pMode->HDisplay; + + if (pMode->HDisplay != otherPitch) { + newmodes = xrealloc(modes, (*num + 2) * sizeof(DGAModeRec)); + oneMore = TRUE; + } else { + newmodes = xrealloc(modes, (*num + 1) * sizeof(DGAModeRec)); + oneMore = FALSE; + } + + if (!newmodes) { + xfree(modes); + return NULL; + } + modes = newmodes; + +SECOND_PASS: + + currentMode = modes + *num; + (*num)++; + + currentMode->mode = pMode; + /* FIXME: is concurrent access really possible? */ + currentMode->flags = DGA_CONCURRENT_ACCESS; + if (pixmap) + currentMode->flags |= DGA_PIXMAP_AVAILABLE; + if (info->accel) + currentMode->flags |= DGA_FILL_RECT | DGA_BLIT_RECT; + if (pMode->Flags & V_DBLSCAN) + currentMode->flags |= DGA_DOUBLESCAN; + if (pMode->Flags & V_INTERLACE) + currentMode->flags |= DGA_INTERLACED; + currentMode->byteOrder = pScrn->imageByteOrder; + currentMode->depth = depth; + currentMode->bitsPerPixel = bitsPerPixel; + currentMode->red_mask = red; + currentMode->green_mask = green; + currentMode->blue_mask = blue; + currentMode->visualClass = visualClass; + currentMode->viewportWidth = pMode->HDisplay; + currentMode->viewportHeight = pMode->VDisplay; + currentMode->xViewportStep = 8; + currentMode->yViewportStep = 1; + currentMode->viewportFlags = DGA_FLIP_RETRACE; + currentMode->offset = 0; + currentMode->address = (unsigned char*)info->LinearAddr; + + if (oneMore) { /* first one is narrow width */ + currentMode->bytesPerScanline = (((pMode->HDisplay * Bpp) + 3) + & ~3L); + currentMode->imageWidth = pMode->HDisplay; + currentMode->imageHeight = pMode->VDisplay; + currentMode->pixmapWidth = currentMode->imageWidth; + currentMode->pixmapHeight = currentMode->imageHeight; + currentMode->maxViewportX = currentMode->imageWidth - + currentMode->viewportWidth; + /* this might need to get clamped to some maximum */ + currentMode->maxViewportY = (currentMode->imageHeight - + currentMode->viewportHeight); + oneMore = FALSE; + goto SECOND_PASS; + } else { + currentMode->bytesPerScanline = ((otherPitch * Bpp) + 3) & ~3L; + currentMode->imageWidth = otherPitch; + currentMode->imageHeight = pMode->VDisplay; + currentMode->pixmapWidth = currentMode->imageWidth; + currentMode->pixmapHeight = currentMode->imageHeight; + currentMode->maxViewportX = (currentMode->imageWidth - + currentMode->viewportWidth); + /* this might need to get clamped to some maximum */ + currentMode->maxViewportY = (currentMode->imageHeight - + currentMode->viewportHeight); + } + + pMode = pMode->next; + if (pMode == firstMode) + break; + } + + return modes; +} + +Bool RADEONDGAInit(ScreenPtr pScreen) +{ + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + RADEONInfoPtr info = RADEONPTR(pScrn); + DGAModePtr modes = NULL; + int num = 0; + + /* 8 */ + modes = RADEONSetupDGAMode(pScrn, modes, &num, 8, 8, + (pScrn->bitsPerPixel == 8), + ((pScrn->bitsPerPixel != 8) + ? 0 : pScrn->displayWidth), + 0, 0, 0, PseudoColor); + + /* 15 */ + modes = RADEONSetupDGAMode(pScrn, modes, &num, 16, 15, + (pScrn->bitsPerPixel == 16), + ((pScrn->depth != 15) + ? 0 : pScrn->displayWidth), + 0x7c00, 0x03e0, 0x001f, TrueColor); + + modes = RADEONSetupDGAMode(pScrn, modes, &num, 16, 15, + (pScrn->bitsPerPixel == 16), + ((pScrn->depth != 15) + ? 0 : pScrn->displayWidth), + 0x7c00, 0x03e0, 0x001f, DirectColor); + + /* 16 */ + modes = RADEONSetupDGAMode(pScrn, modes, &num, 16, 16, + (pScrn->bitsPerPixel == 16), + ((pScrn->depth != 16) + ? 0 : pScrn->displayWidth), + 0xf800, 0x07e0, 0x001f, TrueColor); + + modes = RADEONSetupDGAMode(pScrn, modes, &num, 16, 16, + (pScrn->bitsPerPixel == 16), + ((pScrn->depth != 16) + ? 0 : pScrn->displayWidth), + 0xf800, 0x07e0, 0x001f, DirectColor); + + /* 24 */ + modes = RADEONSetupDGAMode(pScrn, modes, &num, 24, 24, + (pScrn->bitsPerPixel == 24), + ((pScrn->bitsPerPixel != 24) + ? 0 : pScrn->displayWidth), + 0xff0000, 0x00ff00, 0x0000ff, TrueColor); + + modes = RADEONSetupDGAMode(pScrn, modes, &num, 24, 24, + (pScrn->bitsPerPixel == 24), + ((pScrn->bitsPerPixel != 24) + ? 0 : pScrn->displayWidth), + 0xff0000, 0x00ff00, 0x0000ff, DirectColor); + + /* 32 */ + modes = RADEONSetupDGAMode(pScrn, modes, &num, 32, 24, + (pScrn->bitsPerPixel == 32), + ((pScrn->bitsPerPixel != 32) + ? 0 : pScrn->displayWidth), + 0xff0000, 0x00ff00, 0x0000ff, TrueColor); + + modes = RADEONSetupDGAMode(pScrn, modes, &num, 32, 24, + (pScrn->bitsPerPixel == 32), + ((pScrn->bitsPerPixel != 32) + ? 0 : pScrn->displayWidth), + 0xff0000, 0x00ff00, 0x0000ff, DirectColor); + + info->numDGAModes = num; + info->DGAModes = modes; + + return DGAInit(pScreen, &RADEON_DGAFuncs, modes, num); +} + +static Bool RADEON_SetMode(ScrnInfoPtr pScrn, DGAModePtr pMode) +{ + static RADEONFBLayout SavedLayouts[MAXSCREENS]; + int index = pScrn->pScreen->myNum; + RADEONInfoPtr info = RADEONPTR(pScrn); + + if (!pMode) { /* restore the original mode */ + /* put the ScreenParameters back */ + if (info->DGAactive) + memcpy(&info->CurrentLayout, &SavedLayouts[index], + sizeof(RADEONFBLayout)); + + pScrn->currentMode = info->CurrentLayout.mode; + + RADEONSwitchMode(index, pScrn->currentMode, 0); + RADEONAdjustFrame(index, 0, 0, 0); + info->DGAactive = FALSE; + } else { + if (!info->DGAactive) { /* save the old parameters */ + memcpy(&SavedLayouts[index], &info->CurrentLayout, + sizeof(RADEONFBLayout)); + info->DGAactive = TRUE; + } + + info->CurrentLayout.bitsPerPixel = pMode->bitsPerPixel; + info->CurrentLayout.depth = pMode->depth; + info->CurrentLayout.displayWidth = (pMode->bytesPerScanline / + (pMode->bitsPerPixel >> 3)); + info->CurrentLayout.pixel_bytes = pMode->bitsPerPixel / 8; + info->CurrentLayout.pixel_code = (pMode->bitsPerPixel != 16 + ? pMode->bitsPerPixel + : pMode->depth); + /* RADEONModeInit() will set the mode field */ + + RADEONSwitchMode(index, pMode->mode, 0); + } + + return TRUE; +} + +static int RADEON_GetViewport(ScrnInfoPtr pScrn) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + + return info->DGAViewportStatus; +} + +static void RADEON_SetViewport(ScrnInfoPtr pScrn, int x, int y, int flags) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + + RADEONAdjustFrame(pScrn->pScreen->myNum, x, y, flags); + info->DGAViewportStatus = 0; /* FIXME */ +} + +static void RADEON_FillRect(ScrnInfoPtr pScrn, + int x, int y, int w, int h, + unsigned long color) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + + if (info->accel) { + (*info->accel->SetupForSolidFill)(pScrn, color, GXcopy, ~0); + (*info->accel->SubsequentSolidFillRect)(pScrn, x, y, w, h); + SET_SYNC_FLAG(info->accel); + } +} + +static void RADEON_BlitRect(ScrnInfoPtr pScrn, + int srcx, int srcy, int w, int h, + int dstx, int dsty) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + + if (info->accel) { + int xdir = ((srcx < dstx) && (srcy == dsty)) ? -1 : 1; + int ydir = (srcy < dsty) ? -1 : 1; + + (*info->accel->SetupForScreenToScreenCopy)(pScrn, xdir, ydir, + GXcopy, ~0, -1); + (*info->accel->SubsequentScreenToScreenCopy)(pScrn, srcx, srcy, + dstx, dsty, w, h); + SET_SYNC_FLAG(info->accel); + } +} + +#if 0 +static void RADEON_BlitTransRect(ScrnInfoPtr pScrn, + int srcx, int srcy, int w, int h, + int dstx, int dsty, unsigned long color) +{ + /* this one should be separate since the XAA function would prohibit + usage of ~0 as the key */ +} +#endif + +static Bool RADEON_OpenFramebuffer(ScrnInfoPtr pScrn, + char **name, + unsigned char **mem, + int *size, int *offset, int *flags) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + + *name = NULL; /* no special device */ + *mem = (unsigned char*)info->LinearAddr; + *size = info->FbMapSize; + *offset = 0; + *flags = 0; /* DGA_NEED_ROOT; -- don't need root, just /dev/mem access */ + + return TRUE; +} diff --git a/xc/programs/Xserver/hw/xfree86/drivers/r128/radeon_driver.c b/xc/programs/Xserver/hw/xfree86/drivers/r128/radeon_driver.c new file mode 100644 index 000000000..9b510272d --- /dev/null +++ b/xc/programs/Xserver/hw/xfree86/drivers/r128/radeon_driver.c @@ -0,0 +1,2921 @@ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/radeon_driver.c,v 1.2 2000/10/19 10:06:25 alanh Exp $ */ +/************************************************************************** + +Copyright 2000 ATI Technologies Inc. and VA Linux Systems, Inc., + Sunnyvale, California. +All Rights Reserved. + +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 +on the rights to use, copy, modify, merge, publish, distribute, sub +license, 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 (including the next +paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS 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. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin <martin@valinux.com> + * Rickard E. Faith <faith@valinux.com> + * + * Credits: + * + * Thanks to Ani Joshi <ajoshi@shell.unixbox.com> for providing source + * code to his Radeon driver. Portions of this file are based on the + * initialization code for that driver. + * + * References: + * + * !!!! FIXME !!!! + * RAGE 128 VR/ RAGE 128 GL Register Reference Manual (Technical + * Reference Manual P/N RRG-G04100-C Rev. 0.04), ATI Technologies: April + * 1999. + * + * RAGE 128 Software Development Manual (Technical Reference Manual P/N + * SDK-G04000 Rev. 0.01), ATI Technologies: June 1999. + * + * This server does not yet support these XFree86 4.0 features: + * !!!! FIXME !!!! + * DDC1 & DDC2 + * shadowfb + * overlay planes + * + */ + + + /* X and server generic header files */ +#include "xf86.h" +#include "xf86_ansic.h" +#include "xf86_OSproc.h" +#include "xf86Resources.h" +#include "xf86RAC.h" +#include "xf86cmap.h" +#include "xf86fbman.h" +#include "xf86int10.h" + /* Backing store, software cursor, and + colormap initialization */ +#include "mibstore.h" +#include "mipointer.h" +#include "micmap.h" + +#define USE_FB /* not until overlays */ +#ifdef USE_FB +#include "fb.h" +#else + /* CFB support */ +#define PSZ 8 +#include "cfb.h" +#undef PSZ +#include "cfb16.h" +#include "cfb24.h" +#include "cfb32.h" +#include "cfb24_32.h" +#endif + + /* Driver data structures */ +#include "ati2.h" +#include "radeon.h" +#include "radeon_probe.h" +#include "radeon_reg.h" + +#ifndef MAX +#define MAX(a,b) ((a)>(b)?(a):(b)) +#endif + + + /* Forward definitions for driver functions */ +static Bool RADEONPreInit(ScrnInfoPtr pScrn, int flags); +static Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen, + int argc, char **argv); + +static int RADEONValidMode(int scrnIndex, DisplayModePtr mode, + Bool verbose, int flag); +static Bool RADEONEnterVT(int scrnIndex, int flags); +static void RADEONLeaveVT(int scrnIndex, int flags); +static Bool RADEONCloseScreen(int scrnIndex, ScreenPtr pScreen); +static void RADEONFreeScreen(int scrnIndex, int flags); +static Bool RADEONSaveScreen(ScreenPtr pScreen, int mode); +static void RADEONSave(ScrnInfoPtr pScrn); +static void RADEONRestore(ScrnInfoPtr pScrn); +static Bool RADEONModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode); +static void RADEONDisplayPowerManagementSet(ScrnInfoPtr pScrn, + int PowerManagementMode, + int flags); +static Bool RADEONEnterVTFBDev(int scrnIndex, int flags); +static void RADEONLeaveVTFBDev(int scrnIndex, int flags); + + /* Chipsets */ +static SymTabRec RADEONChipsets[] = { + { PCI_CHIP_RADEON_QD, "ATI Radeon QD (AGP)" }, + { PCI_CHIP_RADEON_QE, "ATI Radeon QE (AGP)" }, + { PCI_CHIP_RADEON_QF, "ATI Radeon QF (AGP)" }, + { PCI_CHIP_RADEON_QG, "ATI Radeon QG (AGP)" }, + { -1, NULL } +}; + +static PciChipsets RADEONPciChipsets[] = { + { PCI_CHIP_RADEON_QD, PCI_CHIP_RADEON_QD, RES_SHARED_VGA }, + { PCI_CHIP_RADEON_QE, PCI_CHIP_RADEON_QE, RES_SHARED_VGA }, + { PCI_CHIP_RADEON_QF, PCI_CHIP_RADEON_QF, RES_SHARED_VGA }, + { PCI_CHIP_RADEON_QG, PCI_CHIP_RADEON_QG, RES_SHARED_VGA }, + { -1, -1, RES_UNDEFINED } +}; + +typedef enum { + OPTION_NOACCEL, + OPTION_SW_CURSOR, + OPTION_DAC_6BIT, + OPTION_DAC_8BIT, +#ifdef XF86DRI + OPTION_IS_PCI, + OPTION_CP_PIO, + OPTION_NO_SECURITY, + OPTION_USEC_TIMEOUT, + OPTION_AGP_MODE, + OPTION_AGP_SIZE, + OPTION_RING_SIZE, + OPTION_VERT_SIZE, + OPTION_VBUF_SIZE, + OPTION_USE_CP_2D, +#endif +#ifdef ENABLE_FLAT_PANEL + /* Note: Radeon flat panel support has been disabled for now */ +#if 0 + /* FIXME: Disable CRTOnly until it is tested */ + OPTION_CRT, +#endif + OPTION_PANEL_WIDTH, + OPTION_PANEL_HEIGHT, +#endif + OPTION_FBDEV +} RADEONOpts; + +static OptionInfoRec RADEONOptions[] = { + { OPTION_NOACCEL, "NoAccel", OPTV_BOOLEAN, {0}, FALSE }, + { OPTION_SW_CURSOR, "SWcursor", OPTV_BOOLEAN, {0}, FALSE }, + { OPTION_DAC_6BIT, "Dac6Bit", OPTV_BOOLEAN, {0}, FALSE }, + { OPTION_DAC_8BIT, "Dac8Bit", OPTV_BOOLEAN, {0}, TRUE }, +#ifdef XF86DRI + { OPTION_IS_PCI, "ForcePCIMode", OPTV_BOOLEAN, {0}, FALSE }, + { OPTION_CP_PIO, "CPPIOMode", OPTV_BOOLEAN, {0}, FALSE }, + { OPTION_NO_SECURITY, "CPNoSecurity", OPTV_BOOLEAN, {0}, FALSE }, + { OPTION_USEC_TIMEOUT, "CPusecTimeout", OPTV_INTEGER, {0}, FALSE }, + { OPTION_AGP_MODE, "AGPMode", OPTV_INTEGER, {0}, FALSE }, + { OPTION_AGP_SIZE, "AGPSize", OPTV_INTEGER, {0}, FALSE }, + { OPTION_RING_SIZE, "RingSize", OPTV_INTEGER, {0}, FALSE }, + { OPTION_VERT_SIZE, "VBListSize", OPTV_INTEGER, {0}, FALSE }, + { OPTION_VBUF_SIZE, "VBSize", OPTV_INTEGER, {0}, FALSE }, + { OPTION_USE_CP_2D, "UseCPfor2D", OPTV_BOOLEAN, {0}, FALSE }, +#endif +#ifdef ENABLE_FLAT_PANEL + /* Note: Radeon flat panel support has been disabled for now */ +#if 0 + /* FIXME: Disable CRTOnly until it is tested */ + { OPTION_CRT, "CRTOnly", OPTV_BOOLEAN, {0}, FALSE }, +#endif + { OPTION_PANEL_WIDTH, "PanelWidth", OPTV_INTEGER, {0}, FALSE }, + { OPTION_PANEL_HEIGHT, "PanelHeight", OPTV_INTEGER, {0}, FALSE }, +#endif + { OPTION_FBDEV, "UseFBDev", OPTV_BOOLEAN, {0}, FALSE }, + { -1, NULL, OPTV_NONE, {0}, FALSE } +}; + +RADEONRAMRec RADEONRAM[] = { /* Memory Specifications + From Radeon Manual */ + { 4, 4, 1, 2, 1, 2, 1, 16, 12, "64-bit SDR SDRAM" }, + { 4, 4, 3, 3, 2, 3, 1, 16, 12, "64-bit DDR SDRAM" }, +}; + +extern const char *vgahwSymbols[]; +extern const char *fbdevHWSymbols[]; +extern const char *ddcSymbols[]; + +/* Allocate our private RADEONInfoRec. */ +static Bool RADEONGetRec(ScrnInfoPtr pScrn) +{ + if (pScrn->driverPrivate) return TRUE; + + pScrn->driverPrivate = xnfcalloc(sizeof(RADEONInfoRec), 1); + return TRUE; +} + +/* Free our private RADEONInfoRec. */ +static void RADEONFreeRec(ScrnInfoPtr pScrn) +{ + if (!pScrn || !pScrn->driverPrivate) return; + xfree(pScrn->driverPrivate); + pScrn->driverPrivate = NULL; +} + +/* Memory map the MMIO region. Used during pre-init and by RADEONMapMem, + below. */ +static Bool RADEONMapMMIO(ScrnInfoPtr pScrn) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + + if (info->FBDev) { + info->MMIO = fbdevHWMapMMIO(pScrn); + } else { + info->MMIO = xf86MapPciMem(pScrn->scrnIndex, + VIDMEM_MMIO | VIDMEM_READSIDEEFFECT, + info->PciTag, + info->MMIOAddr, + RADEON_MMIOSIZE); + } + + if (!info->MMIO) return FALSE; + return TRUE; +} + +/* Unmap the MMIO region. Used during pre-init and by RADEONUnmapMem, + below. */ +static Bool RADEONUnmapMMIO(ScrnInfoPtr pScrn) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + + if (info->FBDev) + fbdevHWUnmapMMIO(pScrn); + else { + xf86UnMapVidMem(pScrn->scrnIndex, info->MMIO, RADEON_MMIOSIZE); + } + info->MMIO = NULL; + return TRUE; +} + +/* Memory map the frame buffer. Used by RADEONMapMem, below. */ +static Bool RADEONMapFB(ScrnInfoPtr pScrn) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + + if (info->FBDev) { + info->FB = fbdevHWMapVidmem(pScrn); + } else { + info->FB = xf86MapPciMem(pScrn->scrnIndex, + VIDMEM_FRAMEBUFFER, + info->PciTag, + info->LinearAddr, + info->FbMapSize); + } + + if (!info->FB) return FALSE; + return TRUE; +} + +/* Unmap the frame buffer. Used by RADEONUnmapMem, below. */ +static Bool RADEONUnmapFB(ScrnInfoPtr pScrn) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + + if (info->FBDev) + fbdevHWUnmapVidmem(pScrn); + else + xf86UnMapVidMem(pScrn->scrnIndex, info->FB, info->FbMapSize); + info->FB = NULL; + return TRUE; +} + +/* Memory map the MMIO region and the frame buffer. */ +static Bool RADEONMapMem(ScrnInfoPtr pScrn) +{ + if (!RADEONMapMMIO(pScrn)) return FALSE; + if (!RADEONMapFB(pScrn)) { + RADEONUnmapMMIO(pScrn); + return FALSE; + } + return TRUE; +} + +/* Unmap the MMIO region and the frame buffer. */ +static Bool RADEONUnmapMem(ScrnInfoPtr pScrn) +{ + if (!RADEONUnmapMMIO(pScrn) || !RADEONUnmapFB(pScrn)) return FALSE; + return TRUE; +} + +/* Read PLL information */ +int RADEONINPLL(ScrnInfoPtr pScrn, int addr) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + +#if !RADEON_ATOMIC_UPDATE + while ( (INREG8(RADEON_CLOCK_CNTL_INDEX) & 0x9f) != addr) { +#endif + OUTREG8(RADEON_CLOCK_CNTL_INDEX, addr & 0x1f); +#if !RADEON_ATOMIC_UPDATE + } +#endif + return INREG(RADEON_CLOCK_CNTL_DATA); +} + +#if 0 +/* Read PAL information (only used for debugging). */ +static int RADEONINPAL(int idx) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + + OUTREG(RADEON_PALETTE_INDEX, idx << 16); + return INREG(RADEON_PALETTE_DATA); +} +#endif + +/* Wait for vertical sync. */ +void RADEONWaitForVerticalSync(ScrnInfoPtr pScrn) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + int i; + + OUTREG(RADEON_GEN_INT_STATUS, RADEON_VSYNC_INT_AK); + for (i = 0; i < RADEON_TIMEOUT; i++) { + if (INREG(RADEON_GEN_INT_STATUS) & RADEON_VSYNC_INT) break; + } +} + +/* Blank screen. */ +static void RADEONBlank(ScrnInfoPtr pScrn) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + + OUTREGP(RADEON_CRTC_EXT_CNTL, + RADEON_CRTC_DISPLAY_DIS | + RADEON_CRTC_VSYNC_DIS | + RADEON_CRTC_HSYNC_DIS, + ~(RADEON_CRTC_DISPLAY_DIS | + RADEON_CRTC_VSYNC_DIS | + RADEON_CRTC_HSYNC_DIS)); +} + +/* Unblank screen. */ +static void RADEONUnblank(ScrnInfoPtr pScrn) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + + OUTREGP(RADEON_CRTC_EXT_CNTL, 0, + ~(RADEON_CRTC_DISPLAY_DIS | + RADEON_CRTC_VSYNC_DIS | + RADEON_CRTC_HSYNC_DIS)); +} + +/* Compute log base 2 of val. */ +int RADEONMinBits(int val) +{ + int bits; + + if (!val) return 1; + for (bits = 0; val; val >>= 1, ++bits); + return bits; +} + +/* Compute n/d with rounding. */ +static int RADEONDiv(int n, int d) +{ + return (n + (d / 2)) / d; +} + +/* Read the Video BIOS block and the FP registers (if applicable). */ +static Bool RADEONGetBIOSParameters(ScrnInfoPtr pScrn) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); +#ifdef ENABLE_FLAT_PANEL + int i; + int FPHeader = 0; +#endif + +#define RADEONReadBIOS(offset, buffer, length) \ + (info->BIOSFromPCI ? \ + xf86ReadPciBIOS(offset, info->PciTag, 0, buffer, length) : \ + xf86ReadBIOS(info->BIOSAddr, offset, buffer, length)) + +#define RADEON_BIOS8(v) (*((CARD8 *)(info->VBIOS + (v)))) +#define RADEON_BIOS16(v) (*((CARD16 *)(info->VBIOS + (v)))) +#define RADEON_BIOS32(v) (*((CARD32 *)(info->VBIOS + (v)))) + + if (!(info->VBIOS = xalloc(RADEON_VBIOS_SIZE))) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Cannot allocate space for hold Video BIOS!\n"); + return FALSE; + } + + info->BIOSFromPCI = TRUE; + RADEONReadBIOS(0x0000, info->VBIOS, RADEON_VBIOS_SIZE); + if (info->VBIOS[0] != 0x55 || info->VBIOS[1] != 0xaa) { + xf86DrvMsg(pScrn->scrnIndex, X_WARNING, + "Video BIOS not detected in PCI space!\n"); + xf86DrvMsg(pScrn->scrnIndex, X_WARNING, + "Attempting to read Video BIOS from legacy ISA space!\n"); + info->BIOSFromPCI = FALSE; + info->BIOSAddr = 0x000c0000; + RADEONReadBIOS(0x0000, info->VBIOS, RADEON_VBIOS_SIZE); + } + if (info->VBIOS[0] != 0x55 || info->VBIOS[1] != 0xaa) { + info->BIOSAddr = 0x00000000; + xf86DrvMsg(pScrn->scrnIndex, X_WARNING, + "Video BIOS not found!\n"); + } + +#ifdef ENABLE_FLAT_PANEL + /* Note: Radeon flat panel support has been disabled for now */ + if (info->HasPanelRegs) { + info->FPBIOSstart = 0; + + /* FIXME: There should be direct access to the start of the FP info + tables, but until we find out where that offset is stored, we + must search for the ATI signature string: "M3 ". */ + for (i = 4; i < RADEON_VBIOS_SIZE-8; i++) { + if (RADEON_BIOS8(i) == 'M' && + RADEON_BIOS8(i+1) == '3' && + RADEON_BIOS8(i+2) == ' ' && + RADEON_BIOS8(i+3) == ' ' && + RADEON_BIOS8(i+4) == ' ' && + RADEON_BIOS8(i+5) == ' ' && + RADEON_BIOS8(i+6) == ' ' && + RADEON_BIOS8(i+7) == ' ') { + FPHeader = i-2; + break; + } + } + + if (!FPHeader) return TRUE; + + /* Assume that only one panel is attached and supported */ + for (i = FPHeader+20; i < FPHeader+84; i += 2) { + if (RADEON_BIOS16(i) != 0) { + info->FPBIOSstart = RADEON_BIOS16(i); + break; + } + } + if (!info->FPBIOSstart) return TRUE; + + if (!info->PanelXRes) + info->PanelXRes = RADEON_BIOS16(info->FPBIOSstart+25); + if (!info->PanelYRes) + info->PanelYRes = RADEON_BIOS16(info->FPBIOSstart+27); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Panel size: %dx%d\n", + info->PanelXRes, info->PanelYRes); + + info->PanelPwrDly = RADEON_BIOS8(info->FPBIOSstart+56); + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Panel ID: "); + for (i = 1; i <= 24; i++) + ErrorF("%c", RADEON_BIOS8(info->FPBIOSstart+i)); + ErrorF("\n"); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Panel Type: "); + i = RADEON_BIOS16(info->FPBIOSstart+29); + if (i & 1) ErrorF("Color, "); + else ErrorF("Monochrome, "); + if (i & 2) ErrorF("Dual(split), "); + else ErrorF("Single, "); + switch ((i >> 2) & 0x3f) { + case 0: ErrorF("STN"); break; + case 1: ErrorF("TFT"); break; + case 2: ErrorF("Active STN"); break; + case 3: ErrorF("EL"); break; + case 4: ErrorF("Plasma"); break; + default: ErrorF("UNKNOWN"); break; + } + ErrorF("\n"); + if (RADEON_BIOS8(info->FPBIOSstart+61) & 1) { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Panel Interface: LVDS\n"); + } else { + /* FIXME: Add Non-LVDS flat pael support */ + xf86DrvMsg(pScrn->scrnIndex, X_WARNING, + "Non-LVDS panel interface detected! " + "This support is untested and may not " + "function properly\n"); + } + } +#endif + + return TRUE; +} + +/* Read PLL parameters from BIOS block. Default to typical values if there + is no BIOS. */ +static Bool RADEONGetPLLParameters(ScrnInfoPtr pScrn) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + RADEONPLLPtr pll = &info->pll; + CARD16 bios_header; + CARD16 pll_info_block; + + if (!info->VBIOS) { + xf86DrvMsg(pScrn->scrnIndex, X_WARNING, + "Video BIOS not detected, using default PLL parameters!\n"); + /* These probably aren't going to work for + the card you are using. Specifically, + reference freq can be 29.50MHz, + 28.63MHz, or 14.32MHz. YMMV. */ + pll->reference_freq = 2950; + pll->reference_div = 65; + pll->min_pll_freq = 12500; + pll->max_pll_freq = 35000; + pll->xclk = 10300; + } else { + bios_header = RADEON_BIOS16(0x48); + pll_info_block = RADEON_BIOS16(bios_header + 0x30); + RADEONTRACE(("Header at 0x%04x; PLL Information at 0x%04x\n", + bios_header, pll_info_block)); + + pll->reference_freq = RADEON_BIOS16(pll_info_block + 0x0e); + pll->reference_div = RADEON_BIOS16(pll_info_block + 0x10); + pll->min_pll_freq = RADEON_BIOS32(pll_info_block + 0x12); + pll->max_pll_freq = RADEON_BIOS32(pll_info_block + 0x16); + pll->xclk = RADEON_BIOS16(pll_info_block + 0x08); + } + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "PLL parameters: rf=%d rd=%d min=%d max=%d; xclk=%d\n", + pll->reference_freq, + pll->reference_div, + pll->min_pll_freq, + pll->max_pll_freq, + pll->xclk); + + return TRUE; +} + +/* Return the options for supported chipset 'n'; NULL otherwise. */ +OptionInfoPtr RADEONAvailableOptions(int chipid, int busid) +{ + int i; + + /* Check to make sure that chip 'chipid' is supported by the Radeon + driver */ + for (i = 0; RADEONPciChipsets[i].PCIid > 0; i++) { + if (chipid == RADEONPciChipsets[i].PCIid) + return RADEONOptions; + } + return NULL; +} + +/* Return the string name for supported chipset 'n'; NULL otherwise. */ +void RADEONIdentify(int flags) +{ + xf86PrintChipsets(RADEON_NAME, + "Driver for ATI Radeon chipset", + RADEONChipsets); +} + +/* Return TRUE if chipset is present; FALSE otherwise. */ +Bool RADEONProbe(DriverPtr drv, int flags) +{ + int numUsed; + int numDevSections; + int *usedChips; + GDevPtr *devSections; + EntityInfoPtr pEnt; + Bool foundScreen = FALSE; + int i; + + /* Check to make sure that the RADEON_NAME or the ATI2_NAME is listed + as the Driver in the "Device" section of the XF86Config file */ + if ((numDevSections = xf86MatchDevice(RADEON_NAME, &devSections)) <= 0) + if ((numDevSections = xf86MatchDevice(ATI2_NAME, &devSections)) <= 0) + return FALSE; + + if (!xf86GetPciVideoInfo()) return FALSE; + + numUsed = xf86MatchPciInstances(RADEON_NAME, + PCI_VENDOR_ATI, + RADEONChipsets, + RADEONPciChipsets, + devSections, + numDevSections, + drv, + &usedChips); + + if (numUsed<=0) return FALSE; + + if (flags & PROBE_DETECT) + foundScreen = TRUE; + else for (i = 0; i < numUsed; i++) { + pEnt = xf86GetEntityInfo(usedChips[i]); + + if (pEnt->active) { + ScrnInfoPtr pScrn = xf86AllocateScreen(drv, 0); + + pScrn->driverVersion = ATI2_VERSION; + pScrn->driverName = RADEON_NAME; + pScrn->name = RADEON_NAME; + pScrn->Probe = RADEONProbe; + pScrn->PreInit = RADEONPreInit; + pScrn->ScreenInit = RADEONScreenInit; + pScrn->SwitchMode = RADEONSwitchMode; + pScrn->AdjustFrame = RADEONAdjustFrame; + pScrn->EnterVT = RADEONEnterVT; + pScrn->LeaveVT = RADEONLeaveVT; + pScrn->FreeScreen = RADEONFreeScreen; + pScrn->ValidMode = RADEONValidMode; + + foundScreen = TRUE; + + xf86ConfigActivePciEntity(pScrn, usedChips[i], RADEONPciChipsets, + 0, 0, 0, 0, 0); + } + xfree(pEnt); + } + + if (numUsed) xfree(usedChips); + xfree(devSections); + + return foundScreen; +} + +/* This is called by RADEONPreInit to set up the default visual. */ +static Bool RADEONPreInitVisual(ScrnInfoPtr pScrn) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + + if (!xf86SetDepthBpp(pScrn, 8, 8, 8, Support32bppFb)) + return FALSE; + + switch (pScrn->depth) { + case 8: + case 15: + case 16: + case 24: + break; + default: + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Given depth (%d) is not supported by %s driver\n", + pScrn->depth, RADEON_NAME); + return FALSE; + } + + xf86PrintDepthBpp(pScrn); + + info->fifo_slots = 0; + info->pix24bpp = xf86GetBppFromDepth(pScrn, pScrn->depth); + info->CurrentLayout.bitsPerPixel = pScrn->bitsPerPixel; + info->CurrentLayout.depth = pScrn->depth; + info->CurrentLayout.pixel_bytes = pScrn->bitsPerPixel / 8; + info->CurrentLayout.pixel_code = (pScrn->bitsPerPixel != 16 + ? pScrn->bitsPerPixel + : pScrn->depth); + + if (info->pix24bpp == 24) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Radeon does NOT support 24bpp\n"); + return FALSE; + } + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Pixel depth = %d bits stored in %d byte%s (%d bpp pixmaps)\n", + pScrn->depth, + info->CurrentLayout.pixel_bytes, + info->CurrentLayout.pixel_bytes > 1 ? "s" : "", + info->pix24bpp); + + + if (!xf86SetDefaultVisual(pScrn, -1)) return FALSE; + + if (pScrn->depth > 8 && pScrn->defaultVisual != TrueColor) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Default visual (%s) is not supported at depth %d\n", + xf86GetVisualName(pScrn->defaultVisual), pScrn->depth); + return FALSE; + } + return TRUE; + +} + +/* This is called by RADEONPreInit to handle all color weight issues. */ +static Bool RADEONPreInitWeight(ScrnInfoPtr pScrn) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + + /* Save flag for 6 bit DAC to use for + setting CRTC registers. Otherwise use + an 8 bit DAC, even if xf86SetWeight sets + pScrn->rgbBits to some value other than + 8. */ + info->dac6bits = FALSE; + if (pScrn->depth > 8) { + rgb defaultWeight = { 0, 0, 0 }; + if (!xf86SetWeight(pScrn, defaultWeight, defaultWeight)) return FALSE; + } else { + pScrn->rgbBits = 8; + if (xf86ReturnOptValBool(RADEONOptions, OPTION_DAC_6BIT, FALSE)) { + pScrn->rgbBits = 6; + info->dac6bits = TRUE; + } + } + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Using %d bits per RGB (%d bit DAC)\n", + pScrn->rgbBits, info->dac6bits ? 6 : 8); + + return TRUE; + +} + +/* This is called by RADEONPreInit to handle config file overrides for things + like chipset and memory regions. Also determine memory size and type. + If memory type ever needs an override, put it in this routine. */ +static Bool RADEONPreInitConfig(ScrnInfoPtr pScrn) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + EntityInfoPtr pEnt = info->pEnt; + GDevPtr dev = pEnt->device; + int offset = 0; /* RAM Type */ + MessageType from; + unsigned char *RADEONMMIO; + + /* Chipset */ + from = X_PROBED; + if (dev->chipset && *dev->chipset) { + info->Chipset = xf86StringToToken(RADEONChipsets, dev->chipset); + from = X_CONFIG; + } else if (dev->chipID >= 0) { + info->Chipset = dev->chipID; + from = X_CONFIG; + } else { + info->Chipset = info->PciInfo->chipType; + } + pScrn->chipset = (char *)xf86TokenToString(RADEONChipsets, info->Chipset); + + if (!pScrn->chipset) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "ChipID 0x%04x is not recognized\n", info->Chipset); + return FALSE; + } + + if (info->Chipset < 0) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Chipset \"%s\" is not recognized\n", pScrn->chipset); + return FALSE; + } + + xf86DrvMsg(pScrn->scrnIndex, from, + "Chipset: \"%s\" (ChipID = 0x%04x)\n", + pScrn->chipset, + info->Chipset); + + /* Framebuffer */ + + from = X_PROBED; + info->LinearAddr = info->PciInfo->memBase[0] & 0xfc000000; + if (dev->MemBase) { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Linear address override, using 0x%08x instead of 0x%08x\n", + dev->MemBase, + info->LinearAddr); + info->LinearAddr = dev->MemBase; + from = X_CONFIG; + } else if (!info->LinearAddr) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "No valid linear framebuffer address\n"); + return FALSE; + } + xf86DrvMsg(pScrn->scrnIndex, from, + "Linear framebuffer at 0x%08lx\n", info->LinearAddr); + + /* MMIO registers */ + from = X_PROBED; + info->MMIOAddr = info->PciInfo->memBase[2] & 0xffffff00; + if (dev->IOBase) { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "MMIO address override, using 0x%08x instead of 0x%08x\n", + dev->IOBase, + info->MMIOAddr); + info->MMIOAddr = dev->IOBase; + from = X_CONFIG; + } else if (!info->MMIOAddr) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No valid MMIO address\n"); + return FALSE; + } + xf86DrvMsg(pScrn->scrnIndex, from, + "MMIO registers at 0x%08lx\n", info->MMIOAddr); + + /* BIOS */ + from = X_PROBED; + info->BIOSAddr = info->PciInfo->biosBase & 0xfffe0000; + if (dev->BiosBase) { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "BIOS address override, using 0x%08x instead of 0x%08x\n", + dev->BiosBase, + info->BIOSAddr); + info->BIOSAddr = dev->BiosBase; + from = X_CONFIG; + } + if (info->BIOSAddr) { + xf86DrvMsg(pScrn->scrnIndex, from, + "BIOS at 0x%08lx\n", info->BIOSAddr); + } + +#ifdef ENABLE_FLAT_PANEL + /* Note: Radeon flat panel support has been disabled for now */ + /* Flat panel (part 1) */ + /* FIXME: Make this an option */ + switch (info->Chipset) { +#if 0 + case PCI_CHIP_RADEON_XX: info->HasPanelRegs = TRUE; break; +#endif + case PCI_CHIP_RADEON_QD: + case PCI_CHIP_RADEON_QE: + case PCI_CHIP_RADEON_QF: + case PCI_CHIP_RADEON_QG: + default: info->HasPanelRegs = FALSE; break; + } +#endif + + /* Read registers used to determine options */ + from = X_PROBED; + RADEONMapMMIO(pScrn); + RADEONMMIO = info->MMIO; + if (info->FBDev) + pScrn->videoRam = fbdevHWGetVidmem(pScrn) / 1024; + else + pScrn->videoRam = INREG(RADEON_CONFIG_MEMSIZE) / 1024; + info->MemCntl = INREG(RADEON_SDRAM_MODE_REG); + info->BusCntl = INREG(RADEON_BUS_CNTL); + RADEONMMIO = NULL; + RADEONUnmapMMIO(pScrn); + + /* RAM */ + switch (info->MemCntl >> 30) { + case 0: offset = 0; break; /* 64-bit SDR SDRAM */ + case 1: offset = 1; break; /* 64-bit DDR SDRAM */ + default: offset = 0; + } + info->ram = &RADEONRAM[offset]; + + if (dev->videoRam) { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Video RAM override, using %d kB instead of %d kB\n", + dev->videoRam, + pScrn->videoRam); + from = X_CONFIG; + pScrn->videoRam = dev->videoRam; + } + pScrn->videoRam &= ~1023; + info->FbMapSize = pScrn->videoRam * 1024; + xf86DrvMsg(pScrn->scrnIndex, from, + "VideoRAM: %d kByte (%s)\n", pScrn->videoRam, info->ram->name); + +#ifdef ENABLE_FLAT_PANEL + /* Note: Radeon flat panel support has been disabled for now */ + /* Flat panel (part 2) */ + if (info->HasPanelRegs) { +#if 1 + info->CRTOnly = FALSE; + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Using flat panel for display\n"); +#else + /* Panel CRT mode override */ + if ((info->CRTOnly = xf86ReturnOptValBool(RADEONOptions, + OPTION_CRT, FALSE))) { + xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, + "Using external CRT instead of " + "flat panel for display\n"); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Using flat panel for display\n"); + } +#endif + + /* Panel width/height overrides */ + info->PanelXRes = 0; + info->PanelYRes = 0; + if (xf86GetOptValInteger(RADEONOptions, + OPTION_PANEL_WIDTH, &(info->PanelXRes))) { + xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, + "Flat panel width: %d\n", info->PanelXRes); + } + if (xf86GetOptValInteger(RADEONOptions, + OPTION_PANEL_HEIGHT, &(info->PanelYRes))) { + xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, + "Flat panel height: %d\n", info->PanelYRes); + } + } else { + info->CRTOnly = FALSE; + } +#endif + +#ifdef XF86DRI + /* AGP/PCI */ + if (xf86ReturnOptValBool(RADEONOptions, OPTION_IS_PCI, FALSE)) { + info->IsPCI = TRUE; + xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Forced into PCI-only mode\n"); + } else { + switch (info->Chipset) { +#if 0 + case PCI_CHIP_RADEON_XX: info->IsPCI = TRUE; break; +#endif + case PCI_CHIP_RADEON_QD: + case PCI_CHIP_RADEON_QE: + case PCI_CHIP_RADEON_QF: + case PCI_CHIP_RADEON_QG: + default: info->IsPCI = FALSE; break; + } + } +#endif + + return TRUE; +} + +static Bool RADEONPreInitDDC(ScrnInfoPtr pScrn) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + vbeInfoPtr pVbe; + + if (!xf86LoadSubModule(pScrn, "ddc")) return FALSE; + xf86LoaderReqSymLists(ddcSymbols, NULL); + if (xf86LoadSubModule(pScrn, "vbe")) { + pVbe = VBEInit(NULL,info->pEnt->index); + if (!pVbe) return FALSE; + + xf86SetDDCproperties(pScrn,xf86PrintEDID(vbeDoEDID(pVbe,NULL))); + return TRUE; + } else + return FALSE; +} + +/* This is called by RADEONPreInit to initialize gamma correction. */ +static Bool RADEONPreInitGamma(ScrnInfoPtr pScrn) +{ + Gamma zeros = { 0.0, 0.0, 0.0 }; + + if (!xf86SetGamma(pScrn, zeros)) return FALSE; + return TRUE; +} + +/* This is called by RADEONPreInit to validate modes and compute parameters + for all of the valid modes. */ +static Bool RADEONPreInitModes(ScrnInfoPtr pScrn) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + ClockRangePtr clockRanges; + int modesFound; + char *mod = NULL; + const char *Sym = NULL; + + /* Get mode information */ + pScrn->progClock = TRUE; + clockRanges = xnfcalloc(sizeof(*clockRanges), 1); + clockRanges->next = NULL; + clockRanges->minClock = info->pll.min_pll_freq; + clockRanges->maxClock = info->pll.max_pll_freq * 10; + clockRanges->clockIndex = -1; +#ifdef ENABLE_FLAT_PANEL + /* Note: Radeon flat panel support has been disabled for now */ + if (info->HasPanelRegs) { + clockRanges->interlaceAllowed = FALSE; + clockRanges->doubleScanAllowed = FALSE; + } else { + clockRanges->interlaceAllowed = TRUE; + clockRanges->doubleScanAllowed = TRUE; + } +#else + clockRanges->interlaceAllowed = TRUE; + clockRanges->doubleScanAllowed = TRUE; +#endif + + modesFound = xf86ValidateModes(pScrn, + pScrn->monitor->Modes, + pScrn->display->modes, + clockRanges, + NULL, /* linePitches */ + 8 * 64, /* minPitch */ + 8 * 1024, /* maxPitch */ + 64 * pScrn->bitsPerPixel, /* pitchInc */ + 128, /* minHeight */ + 2048, /* maxHeight */ + pScrn->virtualX, + pScrn->virtualY, + info->FbMapSize, + LOOKUP_BEST_REFRESH); + + if (modesFound < 1 && info->FBDev) { + fbdevHWUseBuildinMode(pScrn); + pScrn->displayWidth = pScrn->virtualX; /* FIXME: might be wrong */ + modesFound = 1; + } + + if (modesFound == -1) return FALSE; + xf86PruneDriverModes(pScrn); + if (!modesFound || !pScrn->modes) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No valid modes found\n"); + return FALSE; + } + xf86SetCrtcForModes(pScrn, 0); + pScrn->currentMode = pScrn->modes; + xf86PrintModes(pScrn); + + /* Set DPI */ + xf86SetDpi(pScrn, 0, 0); + + /* Get ScreenInit function */ +#ifdef USE_FB + mod = "fb"; + Sym = "fbScreenInit"; +#else + switch (pScrn->bitsPerPixel) { + case 8: mod = "cfb"; Sym = "cfbScreenInit"; break; + case 16: mod = "cfb16"; Sym = "cfb16ScreenInit"; break; + case 32: mod = "cfb32"; Sym = "cfb32ScreenInit"; break; + } +#endif + if (mod && !xf86LoadSubModule(pScrn, mod)) return FALSE; + xf86LoaderReqSymbols(Sym, NULL); + +#ifdef USE_FB +#ifdef RENDER + xf86LoaderReqSymbols("fbPictureInit", NULL); +#endif +#endif + + info->CurrentLayout.displayWidth = pScrn->displayWidth; + info->CurrentLayout.mode = pScrn->currentMode; + + return TRUE; +} + +/* This is called by RADEONPreInit to initialize the hardware cursor. */ +static Bool RADEONPreInitCursor(ScrnInfoPtr pScrn) +{ + if (!xf86ReturnOptValBool(RADEONOptions, OPTION_SW_CURSOR, FALSE)) { + if (!xf86LoadSubModule(pScrn, "ramdac")) return FALSE; + } + return TRUE; +} + +/* This is called by RADEONPreInit to initialize hardware acceleration. */ +static Bool RADEONPreInitAccel(ScrnInfoPtr pScrn) +{ + if (!xf86ReturnOptValBool(RADEONOptions, OPTION_NOACCEL, FALSE)) { + if (!xf86LoadSubModule(pScrn, "xaa")) return FALSE; + } + return TRUE; +} + +static Bool RADEONPreInitInt10(ScrnInfoPtr pScrn) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); +#if 1 + if (xf86LoadSubModule(pScrn, "int10")) { + xf86Int10InfoPtr pInt; + xf86DrvMsg(pScrn->scrnIndex,X_INFO,"initializing int10\n"); + pInt = xf86InitInt10(info->pEnt->index); + xf86FreeInt10(pInt); + } +#endif + return TRUE; +} + +#ifdef XF86DRI +static Bool RADEONPreInitDRI(ScrnInfoPtr pScrn) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + + if (info->IsPCI) { + info->CPMode = RADEON_DEFAULT_CP_PIO_MODE; + } else if (xf86ReturnOptValBool(RADEONOptions, OPTION_CP_PIO, FALSE)) { + xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Forcing CP into PIO mode\n"); + info->CPMode = RADEON_DEFAULT_CP_PIO_MODE; + } else { + info->CPMode = RADEON_DEFAULT_CP_BM_MODE; + } + + if (xf86ReturnOptValBool(RADEONOptions, OPTION_USE_CP_2D, FALSE)) { + xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Using CP for 2D\n"); + info->CP2D = TRUE; + } else { + info->CP2D = FALSE; + } + + if (xf86ReturnOptValBool(RADEONOptions, OPTION_NO_SECURITY, FALSE)) { + xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, + "WARNING!!! CP Security checks disabled!!! **********\n"); + info->CPSecure = FALSE; + } else { + info->CPSecure = TRUE; + } + + info->agpMode = RADEON_DEFAULT_AGP_MODE; + info->agpSize = RADEON_DEFAULT_AGP_SIZE; + info->ringSize = RADEON_DEFAULT_RING_SIZE; + info->vbSize = RADEON_DEFAULT_VB_SIZE; + info->indSize = RADEON_DEFAULT_IND_SIZE; + info->agpTexSize = RADEON_DEFAULT_AGP_TEX_SIZE; + + info->vbBufSize = RADEON_DEFAULT_VB_BUF_SIZE; + + info->CPusecTimeout = RADEON_DEFAULT_CP_TIMEOUT; + + if (!info->IsPCI) { + if (xf86GetOptValInteger(RADEONOptions, + OPTION_AGP_MODE, &(info->agpMode))) { + if (info->agpMode < 1 || info->agpMode > RADEON_AGP_MAX_MODE) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Illegal AGP Mode: %d\n", info->agpMode); + return FALSE; + } + xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, + "Using AGP %dx mode\n", info->agpMode); + } + + if (xf86GetOptValInteger(RADEONOptions, + OPTION_AGP_SIZE, (int *)&(info->agpSize))) { + switch (info->agpSize) { + case 4: + case 8: + case 16: + case 32: + case 64: + case 128: + case 256: + break; + default: + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Illegal AGP size: %d MB\n", info->agpSize); + return FALSE; + } + } + + if (xf86GetOptValInteger(RADEONOptions, + OPTION_RING_SIZE, &(info->ringSize))) { + if (info->ringSize < 1 || info->ringSize >= info->agpSize) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Illegal ring buffer size: %d MB\n", + info->ringSize); + return FALSE; + } + } + + if (xf86GetOptValInteger(RADEONOptions, + OPTION_VERT_SIZE, &(info->vbSize))) { + if (info->vbSize < 1 || info->vbSize >= info->agpSize) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Illegal vertex buffers list size: %d MB\n", + info->vbSize); + return FALSE; + } + } + + if (xf86GetOptValInteger(RADEONOptions, + OPTION_VBUF_SIZE, &(info->vbBufSize))) { + int numBufs = info->vbSize*1024*1024/info->vbBufSize; + if (numBufs < 2 || numBufs > 512) { /* FIXME: 512 is arbitrary */ + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Illegal individual vertex buffer size: %d bytes\n", + info->vbBufSize); + return FALSE; + } + } + + if (info->ringSize + info->vbSize + info->indSize + info->agpTexSize > + info->agpSize) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Buffers are too big for requested AGP space\n"); + return FALSE; + } + + info->agpTexSize = info->agpSize - (info->ringSize + + info->vbSize + + info->indSize); + } + + if (xf86GetOptValInteger(RADEONOptions, OPTION_USEC_TIMEOUT, + &(info->CPusecTimeout))) { + /* This option checked by the RADEON DRM kernel module */ + } + + return TRUE; +} +#endif + +static void +RADEONProbeDDC(ScrnInfoPtr pScrn, int index) +{ + vbeInfoPtr pVbe; + if (xf86LoadSubModule(pScrn, "vbe")) { + pVbe = VBEInit(NULL,index); + ConfiguredMonitor = vbeDoEDID(pVbe, NULL); + } +} + +/* RADEONPreInit is called once at server startup. */ +static Bool RADEONPreInit(ScrnInfoPtr pScrn, int flags) +{ + RADEONInfoPtr info; + + RADEONTRACE(("RADEONPreInit\n")); + if (pScrn->numEntities != 1) return FALSE; + + if (!RADEONGetRec(pScrn)) return FALSE; + + info = RADEONPTR(pScrn); + + info->pEnt = xf86GetEntityInfo(pScrn->entityList[0]); + if (info->pEnt->location.type != BUS_PCI) goto fail; + + if (flags & PROBE_DETECT) { + RADEONProbeDDC(pScrn, info->pEnt->index); + return TRUE; + } + + if (!xf86LoadSubModule(pScrn, "vgahw")) return FALSE; + xf86LoaderReqSymLists(vgahwSymbols, NULL); + if (!vgaHWGetHWRec(pScrn)) { + RADEONFreeRec(pScrn); + return FALSE; + } + + info->PciInfo = xf86GetPciInfoForEntity(info->pEnt->index); + info->PciTag = pciTag(info->PciInfo->bus, + info->PciInfo->device, + info->PciInfo->func); + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "PCI bus %d card %d func %d\n", + info->PciInfo->bus, + info->PciInfo->device, + info->PciInfo->func); + + if (xf86RegisterResources(info->pEnt->index, 0, ResNone)) goto fail; + + pScrn->racMemFlags = RAC_FB | RAC_COLORMAP; + pScrn->monitor = pScrn->confScreen->monitor; + + if (!RADEONPreInitVisual(pScrn)) goto fail; + + /* We can't do this until we have a + pScrn->display. */ + xf86CollectOptions(pScrn, NULL); + xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, RADEONOptions); + + if (!RADEONPreInitWeight(pScrn)) goto fail; + + if (xf86ReturnOptValBool(RADEONOptions, OPTION_FBDEV, FALSE)) { + info->FBDev = TRUE; + xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, + "Using framebuffer device\n"); + } + + if (info->FBDev) { + /* check for linux framebuffer device */ + if (!xf86LoadSubModule(pScrn, "fbdevhw")) return FALSE; + xf86LoaderReqSymLists(fbdevHWSymbols, NULL); + if (!fbdevHWInit(pScrn, info->PciInfo, NULL)) return FALSE; + pScrn->SwitchMode = fbdevHWSwitchMode; + pScrn->AdjustFrame = fbdevHWAdjustFrame; + pScrn->EnterVT = RADEONEnterVTFBDev; + pScrn->LeaveVT = RADEONLeaveVTFBDev; + pScrn->ValidMode = fbdevHWValidMode; + } + + if (!info->FBDev) + if (!RADEONPreInitInt10(pScrn)) goto fail; + + if (!RADEONPreInitConfig(pScrn)) goto fail; + + if (!RADEONGetBIOSParameters(pScrn)) goto fail; + + if (!RADEONGetPLLParameters(pScrn)) goto fail; + + if (!RADEONPreInitDDC(pScrn)) goto fail; + + if (!RADEONPreInitGamma(pScrn)) goto fail; + + if (!RADEONPreInitModes(pScrn)) goto fail; + + if (!RADEONPreInitCursor(pScrn)) goto fail; + + if (!RADEONPreInitAccel(pScrn)) goto fail; + +#ifdef XF86DRI + if (!RADEONPreInitDRI(pScrn)) goto fail; +#endif + + /* Free the video bios (if applicable) */ + if (info->VBIOS) { + xfree(info->VBIOS); + info->VBIOS = NULL; + } + + return TRUE; + + fail: + /* Pre-init failed. */ + + /* Free the video bios (if applicable) */ + if (info->VBIOS) { + xfree(info->VBIOS); + info->VBIOS = NULL; + } + + vgaHWFreeHWRec(pScrn); + RADEONFreeRec(pScrn); + return FALSE; +} + +/* Load a palette. */ +static void RADEONLoadPalette(ScrnInfoPtr pScrn, int numColors, + int *indices, LOCO *colors, VisualPtr pVisual) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + int i; + int idx; + unsigned char r, g, b; + +#ifdef ENABLE_FLAT_PANEL + /* Note: Radeon flat panel support has been disabled for now */ + /* Select palette 0 (main CRTC) if using FP-enabled chip */ + if (info->HasPanelRegs) PAL_SELECT(0); +#endif + + if (info->CurrentLayout.depth == 15) { + /* 15bpp mode. This sends 32 values. */ + for (i = 0; i < numColors; i++) { + idx = indices[i]; + r = colors[idx].red; + g = colors[idx].green; + b = colors[idx].blue; + RADEONWaitForFifo(pScrn, 32); /* delay */ + OUTPAL(idx * 8, r, g, b); + } + } + else if (info->CurrentLayout.depth == 16) { + /* 16bpp mode. This sends 64 values. */ + /* There are twice as many green values as + there are values for red and blue. So, + we take each red and blue pair, and + combine it with each of the two green + values. */ + for (i = 0; i < numColors; i++) { + idx = indices[i]; + r = colors[idx / 2].red; + g = colors[idx].green; + b = colors[idx / 2].blue; + RADEONWaitForFifo(pScrn, 32); /* delay */ + OUTPAL(idx * 4, r, g, b); + + /* AH - Added to write extra green data - How come this isn't + * needed on R128 ? We didn't load the extra green data in the + * other routine */ + if (idx <= 31) { + r = colors[idx].red; + g = colors[(idx * 2) + 1].green; + b = colors[idx].blue; + RADEONWaitForFifo(pScrn, 32); /* delay */ + OUTPAL(idx * 8, r, g, b); + } + } + } + else { + /* 8bpp mode. This sends 256 values. */ + for (i = 0; i < numColors; i++) { + idx = indices[i]; + r = colors[idx].red; + b = colors[idx].blue; + g = colors[idx].green; + RADEONWaitForFifo(pScrn, 32); /* delay */ + OUTPAL(idx, r, g, b); + } + } +} + +/* Called at the start of each server generation. */ +static Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen, + int argc, char **argv) +{ + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + RADEONInfoPtr info = RADEONPTR(pScrn); + BoxRec MemBox; + int y2; + + RADEONTRACE(("RADEONScreenInit %x %d\n", + pScrn->memPhysBase, pScrn->fbOffset)); + +#ifdef XF86DRI + /* Turn off the CP for now. */ + info->CPInUse = FALSE; +#endif + + if (!RADEONMapMem(pScrn)) return FALSE; + pScrn->fbOffset = 0; +#ifdef XF86DRI + info->fbX = 0; + info->fbY = 0; +#endif + + info->PaletteSavedOnVT = FALSE; + + RADEONSave(pScrn); + if (info->FBDev) { + if (!fbdevHWModeInit(pScrn, pScrn->currentMode)) return FALSE; + } else { + if (!RADEONModeInit(pScrn, pScrn->currentMode)) return FALSE; + } + + RADEONSaveScreen(pScreen, SCREEN_SAVER_ON); + pScrn->AdjustFrame(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0); + + /* Visual setup */ + miClearVisualTypes(); + if (!miSetVisualTypes(pScrn->depth, + miGetDefaultVisualMask(pScrn->depth), + pScrn->rgbBits, + pScrn->defaultVisual)) return FALSE; + miSetPixmapDepths (); + +#ifdef XF86DRI + /* Setup DRI after visuals have been + established, but before cfbScreenInit is + called. cfbScreenInit will eventually + call the driver's InitGLXVisuals call + back. */ + { + /* FIXME: When we move to dynamic allocation of back and depth + buffers, we will want to revisit the following check for 3 + times the virtual size of the screen below. */ + int width_bytes = (pScrn->displayWidth * + info->CurrentLayout.pixel_bytes); + int maxy = info->FbMapSize / width_bytes; + + if (!xf86ReturnOptValBool(RADEONOptions, OPTION_NOACCEL, FALSE) && + (maxy > pScrn->virtualY * 3) +#ifdef ENABLE_FLAT_PANEL + /* FIXME: Disable 3D support for FPs until it is tested */ + && !info->HasPanelRegs +#endif + ) { + info->directRenderingEnabled = RADEONDRIScreenInit(pScreen); + } else { + xf86DrvMsg(scrnIndex, X_WARNING, + "Static buffer allocation failed -- " + "need at least %d kB video memory\n", + (pScrn->displayWidth * pScrn->virtualY * + info->CurrentLayout.pixel_bytes * 3 + 1023) / 1024); + info->directRenderingEnabled = FALSE; + } + } +#endif + +#ifdef USE_FB + if (!fbScreenInit (pScreen, info->FB, + pScrn->virtualX, pScrn->virtualY, + pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth, + pScrn->bitsPerPixel)) + return FALSE; +#ifdef RENDER + fbPictureInit (pScreen, 0, 0); +#endif +#else + switch (pScrn->bitsPerPixel) { + case 8: + if (!cfbScreenInit(pScreen, info->FB, + pScrn->virtualX, pScrn->virtualY, + pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth)) + return FALSE; + break; + case 16: + if (!cfb16ScreenInit(pScreen, info->FB, + pScrn->virtualX, pScrn->virtualY, + pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth)) + return FALSE; + break; + case 32: + if (!cfb32ScreenInit(pScreen, info->FB, + pScrn->virtualX, pScrn->virtualY, + pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth)) + return FALSE; + break; + default: + xf86DrvMsg(scrnIndex, X_ERROR, + "Invalid bpp (%d)\n", pScrn->bitsPerPixel); + return FALSE; + } +#endif + xf86SetBlackWhitePixels(pScreen); + + if (pScrn->bitsPerPixel > 8) { + VisualPtr visual; + + for (visual = pScreen->visuals + pScreen->numVisuals; + visual >= pScreen->visuals; + visual--) { + if ((visual->class | DynamicClass) == DirectColor) { + visual->offsetRed = pScrn->offset.red; + visual->offsetGreen = pScrn->offset.green; + visual->offsetBlue = pScrn->offset.blue; + visual->redMask = pScrn->mask.red; + visual->greenMask = pScrn->mask.green; + visual->blueMask = pScrn->mask.blue; + } + } + } + + RADEONDGAInit(pScreen); + + /* Memory manager setup */ + MemBox.x1 = 0; + MemBox.y1 = 0; + MemBox.x2 = pScrn->displayWidth; + y2 = (info->FbMapSize + / (pScrn->displayWidth * info->CurrentLayout.pixel_bytes)); + if (y2 >= 32768) y2 = 32767; /* because MemBox.y2 is signed short */ + MemBox.y2 = y2; + + /* The acceleration engine uses 14 bit + signed coordinates, so we can't have any + drawable caches beyond this region. */ + if (MemBox.y2 > 8191) MemBox.y2 = 8191; + + if (!xf86InitFBManager(pScreen, &MemBox)) { + xf86DrvMsg(scrnIndex, X_ERROR, + "Memory manager initialization to (%d,%d) (%d,%d) failed\n", + MemBox.x1, MemBox.y1, MemBox.x2, MemBox.y2); + return FALSE; + } else { + int width, height; + FBAreaPtr fbarea; + + xf86DrvMsg(scrnIndex, X_INFO, + "Memory manager initialized to (%d,%d) (%d,%d)\n", + MemBox.x1, MemBox.y1, MemBox.x2, MemBox.y2); + if ((fbarea = xf86AllocateOffscreenArea(pScreen, pScrn->displayWidth, + 2, 0, NULL, NULL, NULL))) { + xf86DrvMsg(scrnIndex, X_INFO, + "Reserved area from (%d,%d) to (%d,%d)\n", + fbarea->box.x1, fbarea->box.y1, + fbarea->box.x2, fbarea->box.y2); + } else { + xf86DrvMsg(scrnIndex, X_ERROR, "Unable to reserve area\n"); + } + if (xf86QueryLargestOffscreenArea(pScreen, &width, &height, 0, 0, 0)) { + xf86DrvMsg(scrnIndex, X_INFO, + "Largest offscreen area available: %d x %d\n", + width, height); + } + } + +#ifdef XF86DRI + /* Allocate frame buffer space for the + shared back and depth buffers as well + as for local textures. */ + if (info->directRenderingEnabled) { + FBAreaPtr fbarea; + int width_bytes = (pScrn->displayWidth * + info->CurrentLayout.pixel_bytes); + int maxy = info->FbMapSize / width_bytes; + int l; + + switch (info->CPMode) { + case RADEON_DEFAULT_CP_PIO_MODE: + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "CP in PIO mode\n"); + break; + case RADEON_DEFAULT_CP_BM_MODE: + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "CP in BM mode\n"); + break; + default: + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "CP in UNKNOWN mode\n"); + break; + } + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Using %d MB AGP aperture\n", info->agpSize); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Using %d MB for the ring buffer\n", info->ringSize); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Using %d MB for vertex buffers\n", info->vbSize); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Using %d MB for indirect buffers\n", info->indSize); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Using %d MB for AGP textures\n", info->agpTexSize); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Using %d byte vertex buffers\n", info->vbBufSize); + + /* Allocate the shared back buffer */ + if ((fbarea = xf86AllocateOffscreenArea(pScreen, + pScrn->virtualX, + pScrn->virtualY, + 32, NULL, NULL, NULL))) { + xf86DrvMsg(scrnIndex, X_INFO, + "Reserved back buffer from (%d,%d) to (%d,%d)\n", + fbarea->box.x1, fbarea->box.y1, + fbarea->box.x2, fbarea->box.y2); + + info->backX = fbarea->box.x1; + info->backY = fbarea->box.y1; + } else { + xf86DrvMsg(scrnIndex, X_ERROR, "Unable to reserve back buffer\n"); + info->backX = -1; + info->backY = -1; + } + + /* Allocate the shared depth buffer */ + if ((fbarea = xf86AllocateOffscreenArea(pScreen, + pScrn->virtualX, + pScrn->virtualY, + 32, NULL, NULL, NULL))) { + xf86DrvMsg(scrnIndex, X_INFO, + "Reserved depth buffer from (%d,%d) to (%d,%d)\n", + fbarea->box.x1, fbarea->box.y1, + fbarea->box.x2, fbarea->box.y2); + + info->depthX = fbarea->box.x1; + info->depthY = fbarea->box.y1; + } else { + xf86DrvMsg(scrnIndex, X_ERROR, "Unable to reserve depth buffer\n"); + info->depthX = -1; + info->depthY = -1; + } + + /* Allocate local texture space */ + if (((maxy - MemBox.y2 - 1) * width_bytes) > + (pScrn->virtualX * pScrn->virtualY * 2 * + info->CurrentLayout.pixel_bytes)) { + info->textureX = 0; + info->textureY = MemBox.y2 + 1; + info->textureSize = (maxy - MemBox.y2 - 1) * width_bytes; + + l = RADEONMinBits((info->textureSize-1) / RADEON_NR_TEX_REGIONS); + if (l < RADEON_LOG_TEX_GRANULARITY) l = RADEON_LOG_TEX_GRANULARITY; + + info->log2TexGran = l; + info->textureSize = (info->textureSize >> l) << l; + + xf86DrvMsg(scrnIndex, X_INFO, + "Reserved %d kb for textures: (%d,%d)-(%d,%d)\n", + info->textureSize/1024, + info->textureX, info->textureY, + pScrn->displayWidth, maxy); + } else if ((fbarea = xf86AllocateOffscreenArea(pScreen, + pScrn->virtualX, + pScrn->virtualY * 2, + 32, + NULL, NULL, NULL))) { + info->textureX = fbarea->box.x1; + info->textureY = fbarea->box.y1; + info->textureSize = ((fbarea->box.y2 - fbarea->box.y1) * + (fbarea->box.x2 - fbarea->box.x1) * + info->CurrentLayout.pixel_bytes); + + l = RADEONMinBits((info->textureSize-1) / RADEON_NR_TEX_REGIONS); + if (l < RADEON_LOG_TEX_GRANULARITY) l = RADEON_LOG_TEX_GRANULARITY; + + info->log2TexGran = l; + info->textureSize = (info->textureSize >> l) << l; + + xf86DrvMsg(scrnIndex, X_INFO, + "Reserved %d kb for textures: (%d,%d)-(%d,%d)\n", + info->textureSize/1024, + fbarea->box.x1, fbarea->box.y1, + fbarea->box.x2, fbarea->box.y2); + } else { + xf86DrvMsg(scrnIndex, X_ERROR, + "Unable to reserve texture space in frame buffer\n"); + info->textureX = -1; + info->textureY = -1; + } + } +#endif + + /* Backing store setup */ + miInitializeBackingStore(pScreen); + xf86SetBackingStore(pScreen); + + /* Set Silken Mouse */ + xf86SetSilkenMouse(pScreen); + + /* Acceleration setup */ + if (!xf86ReturnOptValBool(RADEONOptions, OPTION_NOACCEL, FALSE)) { + if (RADEONAccelInit(pScreen)) { + xf86DrvMsg(scrnIndex, X_INFO, "Acceleration enabled\n"); + info->accelOn = TRUE; + } else { + xf86DrvMsg(scrnIndex, X_ERROR, + "Acceleration initialization failed\n"); + xf86DrvMsg(scrnIndex, X_INFO, "Acceleration disabled\n"); + info->accelOn = FALSE; + } + } else { + xf86DrvMsg(scrnIndex, X_INFO, "Acceleration disabled\n"); + info->accelOn = FALSE; + } + + /* Cursor setup */ + miDCInitialize(pScreen, xf86GetPointerScreenFuncs()); + + /* Hardware cursor setup */ + if (!xf86ReturnOptValBool(RADEONOptions, OPTION_SW_CURSOR, FALSE)) { + if (RADEONCursorInit(pScreen)) { + int width, height; + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Using hardware cursor (scanline %d)\n", + info->cursor_start / pScrn->displayWidth); + if (xf86QueryLargestOffscreenArea(pScreen, &width, &height, + 0, 0, 0)) { + xf86DrvMsg(scrnIndex, X_INFO, + "Largest offscreen area available: %d x %d\n", + width, height); + } + } else { + xf86DrvMsg(scrnIndex, X_ERROR, + "Hardware cursor initialization failed\n"); + xf86DrvMsg(scrnIndex, X_INFO, "Using software cursor\n"); + } + } else { + xf86DrvMsg(scrnIndex, X_INFO, "Using software cursor\n"); + } + + /* Colormap setup */ + if (!miCreateDefColormap(pScreen)) return FALSE; + if (!xf86HandleColormaps(pScreen, 256, info->dac6bits ? 6 : 8, + (info->FBDev ? fbdevHWLoadPalette : + RADEONLoadPalette), NULL, + CMAP_PALETTED_TRUECOLOR + | CMAP_RELOAD_ON_MODE_SWITCH +#if 0 /* This option messes up text mode! (eich@suse.de) */ + | CMAP_LOAD_EVEN_IF_OFFSCREEN +#endif + )) return FALSE; + + /* DPMS setup */ +#ifdef DPMSExtension +#ifdef ENABLE_FLAT_PANEL + if (!info->HasPanelRegs || info->CRTOnly) + xf86DPMSInit(pScreen, RADEONDisplayPowerManagementSet, 0); +#else + xf86DPMSInit(pScreen, RADEONDisplayPowerManagementSet, 0); +#endif +#endif + + RADEONInitVideo(pScreen); + + /* Provide SaveScreen */ + pScreen->SaveScreen = RADEONSaveScreen; + + /* Wrap CloseScreen */ + info->CloseScreen = pScreen->CloseScreen; + pScreen->CloseScreen = RADEONCloseScreen; + + /* Note unused options */ + if (serverGeneration == 1) + xf86ShowUnusedOptions(pScrn->scrnIndex, pScrn->options); + +#ifdef XF86DRI + /* DRI finalization */ + if (info->directRenderingEnabled) { + /* Now that mi, cfb, drm and others have + done their thing, complete the DRI + setup. */ + info->directRenderingEnabled = RADEONDRIFinishScreenInit(pScreen); + } + if (info->directRenderingEnabled) { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Direct rendering enabled\n"); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Direct rendering disabled\n"); + } +#endif + + return TRUE; +} + +/* Write common registers (initialized to 0). */ +static void RADEONRestoreCommonRegisters(ScrnInfoPtr pScrn, + RADEONSavePtr restore) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + + OUTREG(RADEON_OVR_CLR, restore->ovr_clr); + OUTREG(RADEON_OVR_WID_LEFT_RIGHT, restore->ovr_wid_left_right); + OUTREG(RADEON_OVR_WID_TOP_BOTTOM, restore->ovr_wid_top_bottom); + OUTREG(RADEON_OV0_SCALE_CNTL, restore->ov0_scale_cntl); + OUTREG(RADEON_MPP_TB_CONFIG, restore->mpp_tb_config ); + OUTREG(RADEON_MPP_GP_CONFIG, restore->mpp_gp_config ); + OUTREG(RADEON_SUBPIC_CNTL, restore->subpic_cntl); + OUTREG(RADEON_VIPH_CONTROL, restore->viph_control); + OUTREG(RADEON_I2C_CNTL_1, restore->i2c_cntl_1); + OUTREG(RADEON_GEN_INT_CNTL, restore->gen_int_cntl); + OUTREG(RADEON_CAP0_TRIG_CNTL, restore->cap0_trig_cntl); + OUTREG(RADEON_CAP1_TRIG_CNTL, restore->cap1_trig_cntl); + OUTREG(RADEON_BUS_CNTL, restore->bus_cntl); +} + +/* Write CRTC registers. */ +static void RADEONRestoreCrtcRegisters(ScrnInfoPtr pScrn, + RADEONSavePtr restore) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + + OUTREG(RADEON_CRTC_GEN_CNTL, restore->crtc_gen_cntl); + + OUTREGP(RADEON_CRTC_EXT_CNTL, restore->crtc_ext_cntl, + RADEON_CRTC_VSYNC_DIS | + RADEON_CRTC_HSYNC_DIS | + RADEON_CRTC_DISPLAY_DIS); + + OUTREGP(RADEON_DAC_CNTL, restore->dac_cntl, + RADEON_DAC_RANGE_CNTL | + RADEON_DAC_BLANKING); + + OUTREG(RADEON_CRTC_H_TOTAL_DISP, restore->crtc_h_total_disp); + OUTREG(RADEON_CRTC_H_SYNC_STRT_WID, restore->crtc_h_sync_strt_wid); + OUTREG(RADEON_CRTC_V_TOTAL_DISP, restore->crtc_v_total_disp); + OUTREG(RADEON_CRTC_V_SYNC_STRT_WID, restore->crtc_v_sync_strt_wid); + OUTREG(RADEON_CRTC_OFFSET, restore->crtc_offset); + OUTREG(RADEON_CRTC_OFFSET_CNTL, restore->crtc_offset_cntl); + OUTREG(RADEON_CRTC_PITCH, restore->crtc_pitch); +} + +#ifdef ENABLE_FLAT_PANEL +/* Note: Radeon flat panel support has been disabled for now */ +/* Write flat panel registers */ +static void RADEONRestoreFPRegisters(ScrnInfoPtr pScrn, RADEONSavePtr restore) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + CARD32 tmp; + + OUTREG(RADEON_CRTC2_GEN_CNTL, restore->crtc2_gen_cntl); + OUTREG(RADEON_FP_CRTC_H_TOTAL_DISP, restore->fp_crtc_h_total_disp); + OUTREG(RADEON_FP_CRTC_V_TOTAL_DISP, restore->fp_crtc_v_total_disp); + OUTREG(RADEON_FP_GEN_CNTL, restore->fp_gen_cntl); + OUTREG(RADEON_FP_H_SYNC_STRT_WID, restore->fp_h_sync_strt_wid); + OUTREG(RADEON_FP_HORZ_STRETCH, restore->fp_horz_stretch); + OUTREG(RADEON_FP_PANEL_CNTL, restore->fp_panel_cntl); + OUTREG(RADEON_FP_V_SYNC_STRT_WID, restore->fp_v_sync_strt_wid); + OUTREG(RADEON_FP_VERT_STRETCH, restore->fp_vert_stretch); + OUTREG(RADEON_TMDS_CRC, restore->tmds_crc); + + tmp = INREG(RADEON_LVDS_GEN_CNTL); + if ((tmp & (RADEON_LVDS_ON | RADEON_LVDS_BLON)) == + (restore->lvds_gen_cntl & (RADEON_LVDS_ON | RADEON_LVDS_BLON))) { + OUTREG(RADEON_LVDS_GEN_CNTL, restore->lvds_gen_cntl); + } else { + if (restore->lvds_gen_cntl & (RADEON_LVDS_ON | RADEON_LVDS_BLON)) { + OUTREG(RADEON_LVDS_GEN_CNTL, + restore->lvds_gen_cntl & ~RADEON_LVDS_BLON); + usleep(RADEONPTR(pScrn)->PanelPwrDly * 1000); + OUTREG(RADEON_LVDS_GEN_CNTL, restore->lvds_gen_cntl); + } else { + OUTREG(RADEON_LVDS_GEN_CNTL, + restore->lvds_gen_cntl | RADEON_LVDS_BLON); + usleep(RADEONPTR(pScrn)->PanelPwrDly * 1000); + OUTREG(RADEON_LVDS_GEN_CNTL, restore->lvds_gen_cntl); + } + } +} +#endif + +#if RADEON_ATOMIC_UPDATE +static void RADEONPLLWaitForReadUpdateComplete(ScrnInfoPtr pScrn) +{ + while (INPLL(pScrn, RADEON_PPLL_REF_DIV) & RADEON_PPLL_ATOMIC_UPDATE_R); +} + +static void RADEONPLLWriteUpdate(ScrnInfoPtr pScrn) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + + OUTPLLP(pScrn, RADEON_PPLL_REF_DIV, RADEON_PPLL_ATOMIC_UPDATE_W, 0xffff); +} +#endif + +/* Write PLL registers. */ +static void RADEONRestorePLLRegisters(ScrnInfoPtr pScrn, RADEONSavePtr restore) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + +#if !RADEON_ATOMIC_UPDATE + while ( (INREG(RADEON_CLOCK_CNTL_INDEX) & RADEON_PLL_DIV_SEL) != + RADEON_PLL_DIV_SEL) { +#endif + OUTREGP(RADEON_CLOCK_CNTL_INDEX, RADEON_PLL_DIV_SEL, 0xffff); +#if !RADEON_ATOMIC_UPDATE + } +#endif + +#if RADEON_ATOMIC_UPDATE + OUTPLLP(pScrn, + RADEON_PPLL_CNTL, + RADEON_PPLL_RESET + | RADEON_PPLL_ATOMIC_UPDATE_EN + | RADEON_PPLL_VGA_ATOMIC_UPDATE_EN, + 0xffff); +#else + OUTPLLP(pScrn, + RADEON_PPLL_CNTL, + RADEON_PPLL_RESET, + 0xffff); +#endif + +#if RADEON_ATOMIC_UPDATE + RADEONPLLWaitForReadUpdateComplete(pScrn); +#endif + while ( (INPLL(pScrn, RADEON_PPLL_REF_DIV) & RADEON_PPLL_REF_DIV_MASK) != + (restore->ppll_ref_div & RADEON_PPLL_REF_DIV_MASK)) { + OUTPLLP(pScrn, RADEON_PPLL_REF_DIV, + restore->ppll_ref_div, ~RADEON_PPLL_REF_DIV_MASK); + } +#if RADEON_ATOMIC_UPDATE + RADEONPLLWriteUpdate(pScrn); +#endif + +#if RADEON_ATOMIC_UPDATE + RADEONPLLWaitForReadUpdateComplete(pScrn); +#endif + while ( (INPLL(pScrn, RADEON_PPLL_DIV_3) & RADEON_PPLL_FB3_DIV_MASK) != + (restore->ppll_div_3 & RADEON_PPLL_FB3_DIV_MASK)) { + OUTPLLP(pScrn, RADEON_PPLL_DIV_3, + restore->ppll_div_3, ~RADEON_PPLL_FB3_DIV_MASK); + } +#if RADEON_ATOMIC_UPDATE + RADEONPLLWriteUpdate(pScrn); +#endif + +#if RADEON_ATOMIC_UPDATE + RADEONPLLWaitForReadUpdateComplete(pScrn); +#endif + while ( (INPLL(pScrn, RADEON_PPLL_DIV_3) & RADEON_PPLL_POST3_DIV_MASK) != + (restore->ppll_div_3 & RADEON_PPLL_POST3_DIV_MASK)) { + OUTPLLP(pScrn, RADEON_PPLL_DIV_3, + restore->ppll_div_3, ~RADEON_PPLL_POST3_DIV_MASK); + } +#if RADEON_ATOMIC_UPDATE + RADEONPLLWriteUpdate(pScrn); +#endif + +#if RADEON_ATOMIC_UPDATE + RADEONPLLWaitForReadUpdateComplete(pScrn); +#endif + OUTPLL(RADEON_HTOTAL_CNTL, restore->htotal_cntl); +#if RADEON_ATOMIC_UPDATE + RADEONPLLWriteUpdate(pScrn); +#endif + + OUTPLLP(pScrn, RADEON_PPLL_CNTL, 0, ~RADEON_PPLL_RESET); + + RADEONTRACE(("Wrote: 0x%08x 0x%08x 0x%08x (0x%08x)\n", + restore->ppll_ref_div, + restore->ppll_div_3, + restore->htotal_cntl, + INPLL(pScrn, RADEON_PPLL_CNTL))); + RADEONTRACE(("Wrote: rd=%d, fd=%d, pd=%d\n", + restore->ppll_ref_div & RADEON_PPLL_REF_DIV_MASK, + restore->ppll_div_3 & RADEON_PPLL_FB3_DIV_MASK, + (restore->ppll_div_3 & RADEON_PPLL_POST3_DIV_MASK) >> 16)); +} + +/* Write DDA registers. */ +static void RADEONRestoreDDARegisters(ScrnInfoPtr pScrn, RADEONSavePtr restore) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + + OUTREG(RADEON_DDA_CONFIG, restore->dda_config); + OUTREG(RADEON_DDA_ON_OFF, restore->dda_on_off); +} + +/* Write palette data. */ +static void RADEONRestorePalette(ScrnInfoPtr pScrn, RADEONSavePtr restore) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + int i; + + if (!restore->palette_valid) return; + +#ifdef ENABLE_FLAT_PANEL + /* Note: Radeon flat panel support has been disabled for now */ + /* Select palette 0 (main CRTC) if using FP-enabled chip */ + if (info->HasPanelRegs) PAL_SELECT(0); +#endif + + OUTPAL_START(0); + for (i = 0; i < 256; i++) { + RADEONWaitForFifo(pScrn, 32); /* delay */ + OUTPAL_NEXT_CARD32(restore->palette[i]); + } +} + +/* Write out state to define a new video mode. */ +static void RADEONRestoreMode(ScrnInfoPtr pScrn, RADEONSavePtr restore) +{ +#ifdef ENABLE_FLAT_PANEL + RADEONInfoPtr info = RADEONPTR(pScrn); +#endif + + RADEONTRACE(("RADEONRestoreMode(%p)\n", restore)); + RADEONRestoreCommonRegisters(pScrn, restore); + RADEONRestoreCrtcRegisters(pScrn, restore); +#ifdef ENABLE_FLAT_PANEL + /* Note: Radeon flat panel support has been disabled for now */ + if (info->HasPanelRegs) + RADEONRestoreFPRegisters(pScrn, restore); + if (!info->HasPanelRegs || info->CRTOnly) + RADEONRestorePLLRegisters(pScrn, restore); +#else + RADEONRestorePLLRegisters(pScrn, restore); +#endif + RADEONRestoreDDARegisters(pScrn, restore); + RADEONRestorePalette(pScrn, restore); +} + +/* Read common registers. */ +static void RADEONSaveCommonRegisters(ScrnInfoPtr pScrn, RADEONSavePtr save) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + + save->ovr_clr = INREG(RADEON_OVR_CLR); + save->ovr_wid_left_right = INREG(RADEON_OVR_WID_LEFT_RIGHT); + save->ovr_wid_top_bottom = INREG(RADEON_OVR_WID_TOP_BOTTOM); + save->ov0_scale_cntl = INREG(RADEON_OV0_SCALE_CNTL); + save->mpp_tb_config = INREG(RADEON_MPP_TB_CONFIG); + save->mpp_gp_config = INREG(RADEON_MPP_GP_CONFIG); + save->subpic_cntl = INREG(RADEON_SUBPIC_CNTL); + save->viph_control = INREG(RADEON_VIPH_CONTROL); + save->i2c_cntl_1 = INREG(RADEON_I2C_CNTL_1); + save->gen_int_cntl = INREG(RADEON_GEN_INT_CNTL); + save->cap0_trig_cntl = INREG(RADEON_CAP0_TRIG_CNTL); + save->cap1_trig_cntl = INREG(RADEON_CAP1_TRIG_CNTL); + save->bus_cntl = INREG(RADEON_BUS_CNTL); +} + +/* Read CRTC registers. */ +static void RADEONSaveCrtcRegisters(ScrnInfoPtr pScrn, RADEONSavePtr save) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + + save->crtc_gen_cntl = INREG(RADEON_CRTC_GEN_CNTL); + save->crtc_ext_cntl = INREG(RADEON_CRTC_EXT_CNTL); + save->dac_cntl = INREG(RADEON_DAC_CNTL); + save->crtc_h_total_disp = INREG(RADEON_CRTC_H_TOTAL_DISP); + save->crtc_h_sync_strt_wid = INREG(RADEON_CRTC_H_SYNC_STRT_WID); + save->crtc_v_total_disp = INREG(RADEON_CRTC_V_TOTAL_DISP); + save->crtc_v_sync_strt_wid = INREG(RADEON_CRTC_V_SYNC_STRT_WID); + save->crtc_offset = INREG(RADEON_CRTC_OFFSET); + save->crtc_offset_cntl = INREG(RADEON_CRTC_OFFSET_CNTL); + save->crtc_pitch = INREG(RADEON_CRTC_PITCH); +} + +#ifdef ENABLE_FLAT_PANEL +/* Note: Radeon flat panel support has been disabled for now */ +/* Read flat panel registers */ +static void RADEONSaveFPRegisters(ScrnInfoPtr pScrn, RADEONSavePtr save) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + + save->crtc2_gen_cntl = INREG(RADEON_CRTC2_GEN_CNTL); + save->fp_crtc_h_total_disp = INREG(RADEON_FP_CRTC_H_TOTAL_DISP); + save->fp_crtc_v_total_disp = INREG(RADEON_FP_CRTC_V_TOTAL_DISP); + save->fp_gen_cntl = INREG(RADEON_FP_GEN_CNTL); + save->fp_h_sync_strt_wid = INREG(RADEON_FP_H_SYNC_STRT_WID); + save->fp_horz_stretch = INREG(RADEON_FP_HORZ_STRETCH); + save->fp_panel_cntl = INREG(RADEON_FP_PANEL_CNTL); + save->fp_v_sync_strt_wid = INREG(RADEON_FP_V_SYNC_STRT_WID); + save->fp_vert_stretch = INREG(RADEON_FP_VERT_STRETCH); + save->lvds_gen_cntl = INREG(RADEON_LVDS_GEN_CNTL); + save->tmds_crc = INREG(RADEON_TMDS_CRC); +} +#endif + +/* Read PLL registers. */ +static void RADEONSavePLLRegisters(ScrnInfoPtr pScrn, RADEONSavePtr save) +{ + save->ppll_ref_div = INPLL(pScrn, RADEON_PPLL_REF_DIV); + save->ppll_div_3 = INPLL(pScrn, RADEON_PPLL_DIV_3); + save->htotal_cntl = INPLL(pScrn, RADEON_HTOTAL_CNTL); + + RADEONTRACE(("Read: 0x%08x 0x%08x 0x%08x\n", + save->ppll_ref_div, + save->ppll_div_3, + save->htotal_cntl)); + RADEONTRACE(("Read: rd=%d, fd=%d, pd=%d\n", + save->ppll_ref_div & RADEON_PPLL_REF_DIV_MASK, + save->ppll_div_3 & RADEON_PPLL_FB3_DIV_MASK, + (save->ppll_div_3 & RADEON_PPLL_POST3_DIV_MASK) >> 16)); +} + +/* Read DDA registers. */ +static void RADEONSaveDDARegisters(ScrnInfoPtr pScrn, RADEONSavePtr save) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + + save->dda_config = INREG(RADEON_DDA_CONFIG); + save->dda_on_off = INREG(RADEON_DDA_ON_OFF); +} + +/* Read palette data. */ +static void RADEONSavePalette(ScrnInfoPtr pScrn, RADEONSavePtr save) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + int i; + +#ifdef ENABLE_FLAT_PANEL + /* Note: Radeon flat panel support has been disabled for now */ + /* Select palette 0 (main CRTC) if using FP-enabled chip */ + if (info->HasPanelRegs) PAL_SELECT(0); +#endif + + INPAL_START(0); + for (i = 0; i < 256; i++) save->palette[i] = INPAL_NEXT(); + save->palette_valid = TRUE; +} + +/* Save state that defines current video mode. */ +static void RADEONSaveMode(ScrnInfoPtr pScrn, RADEONSavePtr save) +{ + RADEONTRACE(("RADEONSaveMode(%p)\n", save)); + + RADEONSaveCommonRegisters(pScrn, save); + RADEONSaveCrtcRegisters(pScrn, save); +#ifdef ENABLE_FLAT_PANEL + /* Note: Radeon flat panel support has been disabled for now */ + if (RADEONPTR(pScrn)->HasPanelRegs) + RADEONSaveFPRegisters(pScrn, save); +#endif + RADEONSavePLLRegisters(pScrn, save); + RADEONSaveDDARegisters(pScrn, save); + RADEONSavePalette(pScrn, save); + + RADEONTRACE(("RADEONSaveMode returns %p\n", save)); +} + +/* Save everything needed to restore the original VC state. */ +static void RADEONSave(ScrnInfoPtr pScrn) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + RADEONSavePtr save = &info->SavedReg; + vgaHWPtr hwp = VGAHWPTR(pScrn); + + RADEONTRACE(("RADEONSave\n")); + if (info->FBDev) { + fbdevHWSave(pScrn); + return; + } + vgaHWUnlock(hwp); + vgaHWSave(pScrn, &hwp->SavedReg, VGA_SR_ALL); /* save mode, fonts, cmap */ + vgaHWLock(hwp); + + RADEONSaveMode(pScrn, save); + + save->dp_datatype = INREG(RADEON_DP_DATATYPE); + save->rbbm_soft_reset = INREG(RADEON_RBBM_SOFT_RESET); + save->clock_cntl_index = INREG(RADEON_CLOCK_CNTL_INDEX); + save->amcgpio_en_reg = INREG(RADEON_AMCGPIO_EN_REG); + save->amcgpio_mask = INREG(RADEON_AMCGPIO_MASK); +} + +/* Restore the original (text) mode. */ +static void RADEONRestore(ScrnInfoPtr pScrn) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + RADEONSavePtr restore = &info->SavedReg; + vgaHWPtr hwp = VGAHWPTR(pScrn); + + RADEONTRACE(("RADEONRestore\n")); + if (info->FBDev) { + fbdevHWRestore(pScrn); + return; + } + + RADEONBlank(pScrn); + + OUTREG(RADEON_AMCGPIO_MASK, restore->amcgpio_mask); + OUTREG(RADEON_AMCGPIO_EN_REG, restore->amcgpio_en_reg); + OUTREG(RADEON_CLOCK_CNTL_INDEX, restore->clock_cntl_index); + OUTREG(RADEON_RBBM_SOFT_RESET, restore->rbbm_soft_reset); + OUTREG(RADEON_DP_DATATYPE, restore->dp_datatype); + + RADEONRestoreMode(pScrn, restore); + vgaHWUnlock(hwp); + vgaHWRestore(pScrn, &hwp->SavedReg, VGA_SR_MODE | VGA_SR_FONTS ); + vgaHWLock(hwp); + +#if 0 + RADEONWaitForVerticalSync(pScrn); +#endif + RADEONUnblank(pScrn); +} + +/* Define common registers for requested video mode. */ +static void RADEONInitCommonRegisters(RADEONSavePtr save, DisplayModePtr mode, + RADEONInfoPtr info) +{ + save->ovr_clr = 0; + save->ovr_wid_left_right = 0; + save->ovr_wid_top_bottom = 0; + save->ov0_scale_cntl = 0; + save->mpp_tb_config = 0; + save->mpp_gp_config = 0; + save->subpic_cntl = 0; + save->viph_control = 0; + save->i2c_cntl_1 = 0; + save->rbbm_soft_reset = 0; + save->cap0_trig_cntl = 0; + save->cap1_trig_cntl = 0; + save->bus_cntl = info->BusCntl; + /* + * If bursts are enabled, turn on discards + * Radeon doesn't have write bursts + */ + if (save->bus_cntl & (RADEON_BUS_READ_BURST)) + save->bus_cntl |= RADEON_BUS_RD_DISCARD_EN; +} + +/* Define CRTC registers for requested video mode. */ +static Bool RADEONInitCrtcRegisters(ScrnInfoPtr pScrn, RADEONSavePtr save, + DisplayModePtr mode, RADEONInfoPtr info) +{ + int format; + int hsync_start; + int hsync_wid; + int hsync_fudge; + int vsync_wid; + int bytpp; + int hsync_fudge_default[] = { 0x00, 0x12, 0x09, 0x09, 0x06, 0x05 }; +#ifdef ENABLE_FLAT_PANEL + /* Note: Radeon flat panel support has been disabled for now */ + int hsync_fudge_fp[] = { 0x12, 0x11, 0x09, 0x09, 0x05, 0x05 }; + int hsync_fudge_fp_crt[] = { 0x12, 0x10, 0x08, 0x08, 0x04, 0x04 }; +#endif + + switch (info->CurrentLayout.pixel_code) { + case 4: format = 1; bytpp = 0; break; + case 8: format = 2; bytpp = 1; break; + case 15: format = 3; bytpp = 2; break; /* 555 */ + case 16: format = 4; bytpp = 2; break; /* 565 */ + case 24: format = 5; bytpp = 3; break; /* RGB */ + case 32: format = 6; bytpp = 4; break; /* xRGB */ + default: + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Unsupported pixel depth (%d)\n", info->CurrentLayout.bitsPerPixel); + return FALSE; + } + RADEONTRACE(("Format = %d (%d bytes per pixel)\n", format, bytpp)); + +#ifdef ENABLE_FLAT_PANEL + /* Note: Radeon flat panel support has been disabled for now */ + if (info->HasPanelRegs) + if (info->CRTOnly) hsync_fudge = hsync_fudge_fp_crt[format-1]; + else hsync_fudge = hsync_fudge_fp[format-1]; + else hsync_fudge = hsync_fudge_default[format-1]; +#else + hsync_fudge = hsync_fudge_default[format-1]; +#endif + + save->crtc_gen_cntl = (RADEON_CRTC_EXT_DISP_EN + | RADEON_CRTC_EN + | (format << 8) + | ((mode->Flags & V_DBLSCAN) + ? RADEON_CRTC_DBL_SCAN_EN + : 0) + | ((mode->Flags & V_INTERLACE) + ? RADEON_CRTC_INTERLACE_EN + : 0)); + + save->crtc_ext_cntl = RADEON_VGA_ATI_LINEAR | RADEON_XCRT_CNT_EN; + save->dac_cntl = (RADEON_DAC_MASK_ALL + | RADEON_DAC_VGA_ADR_EN + | (info->dac6bits ? 0 : RADEON_DAC_8BIT_EN)); + + save->crtc_h_total_disp = ((((mode->CrtcHTotal / 8) - 1) & 0xffff) + | (((mode->CrtcHDisplay / 8) - 1) << 16)); + + hsync_wid = (mode->CrtcHSyncEnd - mode->CrtcHSyncStart) / 8; + if (!hsync_wid) hsync_wid = 1; + if (hsync_wid > 0x3f) hsync_wid = 0x3f; + + hsync_start = mode->CrtcHSyncStart - 8 + hsync_fudge; + + save->crtc_h_sync_strt_wid = ((hsync_start & 0x1fff) + | (hsync_wid << 16) + | ((mode->Flags & V_NHSYNC) + ? RADEON_CRTC_H_SYNC_POL + : 0)); + +#if 1 + /* This works for double scan mode. */ + save->crtc_v_total_disp = (((mode->CrtcVTotal - 1) & 0xffff) + | ((mode->CrtcVDisplay - 1) << 16)); +#else + /* This is what cce/nbmode.c example code + does -- is this correct? */ + save->crtc_v_total_disp = (((mode->CrtcVTotal - 1) & 0xffff) + | ((mode->CrtcVDisplay + * ((mode->Flags & V_DBLSCAN) ? 2 : 1) - 1) + << 16)); +#endif + + vsync_wid = mode->CrtcVSyncEnd - mode->CrtcVSyncStart; + if (!vsync_wid) vsync_wid = 1; + if (vsync_wid > 0x1f) vsync_wid = 0x1f; + + save->crtc_v_sync_strt_wid = (((mode->CrtcVSyncStart - 1) & 0xfff) + | (vsync_wid << 16) + | ((mode->Flags & V_NVSYNC) + ? RADEON_CRTC_V_SYNC_POL + : 0)); + save->crtc_offset = 0; + save->crtc_offset_cntl = 0; + + save->crtc_pitch = ((pScrn->displayWidth * pScrn->bitsPerPixel) + + ((pScrn->bitsPerPixel * 8) -1)) / + (pScrn->bitsPerPixel * 8); + save->crtc_pitch |= save->crtc_pitch << 16; + + RADEONTRACE(("Pitch = %d bytes (virtualX = %d, displayWidth = %d)\n", + save->crtc_pitch, pScrn->virtualX, + info->CurrentLayout.displayWidth)); + return TRUE; +} + +#ifdef ENABLE_FLAT_PANEL +/* Note: Radeon flat panel support has been disabled for now */ +/* Define CRTC registers for requested video mode. */ +static void RADEONInitFPRegisters(ScrnInfoPtr pScrn, RADEONSavePtr orig, + RADEONSavePtr save, DisplayModePtr mode, + RADEONInfoPtr info) +{ + int xres = mode->CrtcHDisplay; + int yres = mode->CrtcVDisplay; + float Hratio, Vratio; + + if (info->CRTOnly) { + save->crtc_ext_cntl |= RADEON_CRTC_CRT_ON; + save->crtc2_gen_cntl = 0; + save->fp_gen_cntl = orig->fp_gen_cntl; + save->fp_gen_cntl &= ~(RADEON_FP_FPON | + RADEON_FP_CRTC_USE_SHADOW_VEND | + RADEON_FP_CRTC_HORZ_DIV2_EN | + RADEON_FP_CRTC_HOR_CRT_DIV2_DIS | + RADEON_FP_USE_SHADOW_EN); + save->fp_gen_cntl |= (RADEON_FP_SEL_CRTC2 | + RADEON_FP_CRTC_DONT_SHADOW_VPAR); + save->fp_panel_cntl = orig->fp_panel_cntl & ~RADEON_FP_DIGON; + save->lvds_gen_cntl = orig->lvds_gen_cntl & ~(RADEON_LVDS_ON | + RADEON_LVDS_BLON); + return; + } + + if (xres > info->PanelXRes) xres = info->PanelXRes; + if (yres > info->PanelYRes) yres = info->PanelYRes; + + Hratio = (float)xres/(float)info->PanelXRes; + Vratio = (float)yres/(float)info->PanelYRes; + + save->fp_horz_stretch = + (((((int)(Hratio * RADEON_HORZ_STRETCH_RATIO_MAX + 0.5)) + & RADEON_HORZ_STRETCH_RATIO_MASK) + << RADEON_HORZ_STRETCH_RATIO_SHIFT) | + (orig->fp_horz_stretch & (RADEON_HORZ_PANEL_SIZE | + RADEON_HORZ_FP_LOOP_STRETCH | + RADEON_HORZ_STRETCH_RESERVED))); + save->fp_horz_stretch &= ~RADEON_HORZ_AUTO_RATIO_FIX_EN; + if (Hratio == 1.0) save->fp_horz_stretch &= ~(RADEON_HORZ_STRETCH_BLEND | + RADEON_HORZ_STRETCH_ENABLE); + else save->fp_horz_stretch |= (RADEON_HORZ_STRETCH_BLEND | + RADEON_HORZ_STRETCH_ENABLE); + + save->fp_vert_stretch = + (((((int)(Vratio * RADEON_VERT_STRETCH_RATIO_MAX + 0.5)) + & RADEON_VERT_STRETCH_RATIO_MASK) + << RADEON_VERT_STRETCH_RATIO_SHIFT) | + (orig->fp_vert_stretch & (RADEON_VERT_PANEL_SIZE | + RADEON_VERT_STRETCH_RESERVED))); + save->fp_vert_stretch &= ~RADEON_VERT_AUTO_RATIO_EN; + if (Vratio == 1.0) save->fp_vert_stretch &= ~(RADEON_VERT_STRETCH_ENABLE | + RADEON_VERT_STRETCH_BLEND); + else save->fp_vert_stretch |= (RADEON_VERT_STRETCH_ENABLE | + RADEON_VERT_STRETCH_BLEND); + + save->fp_gen_cntl = (orig->fp_gen_cntl & ~(RADEON_FP_SEL_CRTC2 | + RADEON_FP_CRTC_USE_SHADOW_VEND | + RADEON_FP_CRTC_HORZ_DIV2_EN | + RADEON_FP_CRTC_HOR_CRT_DIV2_DIS | + RADEON_FP_USE_SHADOW_EN)); + if (orig->fp_gen_cntl & RADEON_FP_DETECT_SENSE) { + save->fp_gen_cntl |= (RADEON_FP_CRTC_DONT_SHADOW_VPAR | + RADEON_FP_TDMS_EN); + } + + save->fp_panel_cntl = orig->fp_panel_cntl; + save->lvds_gen_cntl = orig->lvds_gen_cntl; + + save->tmds_crc = orig->tmds_crc; + + /* Disable CRT output by disabling CRT output and setting the CRT + DAC to use CRTC2, which we set to 0's. In the future, we will + want to use the dual CRTC capabilities of the RADEON to allow both + the flat panel and external CRT to either simultaneously display + the same image or display two different images. */ + save->crtc_ext_cntl &= ~RADEON_CRTC_CRT_ON; + save->dac_cntl |= RADEON_DAC_CRT_SEL_CRTC2; + save->crtc2_gen_cntl = 0; + + /* WARNING: Be careful about turning on the flat panel */ +#if 1 + save->lvds_gen_cntl |= (RADEON_LVDS_ON | RADEON_LVDS_BLON); +#else + save->fp_panel_cntl |= (RADEON_FP_DIGON | RADEON_FP_BLON); + save->fp_gen_cntl |= (RADEON_FP_FPON); +#endif + + save->fp_crtc_h_total_disp = save->crtc_h_total_disp; + save->fp_crtc_v_total_disp = save->crtc_v_total_disp; + save->fp_h_sync_strt_wid = save->crtc_h_sync_strt_wid; + save->fp_v_sync_strt_wid = save->crtc_v_sync_strt_wid; +} +#endif + +/* Define PLL registers for requested video mode. */ +static void RADEONInitPLLRegisters(ScrnInfoPtr pScrn, RADEONSavePtr save, + DisplayModePtr mode, RADEONPLLPtr pll, + double dot_clock) +{ + int freq = dot_clock * 100; + struct { + int divider; + int bitvalue; + } *post_div, + post_divs[] = { + /* From RAGE 128 VR/RAGE 128 GL Register + Reference Manual (Technical Reference + Manual P/N RRG-G04100-C Rev. 0.04), page + 3-17 (PLL_DIV_[3:0]). */ + { 1, 0 }, /* VCLK_SRC */ + { 2, 1 }, /* VCLK_SRC/2 */ + { 4, 2 }, /* VCLK_SRC/4 */ + { 8, 3 }, /* VCLK_SRC/8 */ + { 3, 4 }, /* VCLK_SRC/3 */ + { 16, 5 }, /* VCLK_SRC/16 */ + { 6, 6 }, /* VCLK_SRC/6 */ + { 12, 7 }, /* VCLK_SRC/12 */ + { 0, 0 } + }; + + if (freq > pll->max_pll_freq) freq = pll->max_pll_freq; + if (freq * 12 < pll->min_pll_freq) freq = pll->min_pll_freq / 12; + + for (post_div = &post_divs[0]; post_div->divider; ++post_div) { + save->pll_output_freq = post_div->divider * freq; + if (save->pll_output_freq >= pll->min_pll_freq + && save->pll_output_freq <= pll->max_pll_freq) break; + } + + save->dot_clock_freq = freq; + save->feedback_div = RADEONDiv(pll->reference_div + * save->pll_output_freq, + pll->reference_freq); + save->post_div = post_div->divider; + + RADEONTRACE(("dc=%d, of=%d, fd=%d, pd=%d\n", + save->dot_clock_freq, + save->pll_output_freq, + save->feedback_div, + save->post_div)); + + save->ppll_ref_div = pll->reference_div; + save->ppll_div_3 = (save->feedback_div | (post_div->bitvalue << 16)); + save->htotal_cntl = 0; +} + +/* Define DDA registers for requested video mode. */ +static Bool RADEONInitDDARegisters(ScrnInfoPtr pScrn, RADEONSavePtr save, + DisplayModePtr mode, RADEONPLLPtr pll, + RADEONInfoPtr info) +{ + int DisplayFifoWidth = 128; + int DisplayFifoDepth = 32; + int XclkFreq; + int VclkFreq; + int XclksPerTransfer; + int XclksPerTransferPrecise; + int UseablePrecision; + int Roff; + int Ron; + + XclkFreq = pll->xclk; + + VclkFreq = RADEONDiv(pll->reference_freq * save->feedback_div, + pll->reference_div * save->post_div); + + XclksPerTransfer = RADEONDiv(XclkFreq * DisplayFifoWidth, + VclkFreq * + (info->CurrentLayout.pixel_bytes * 8)); + + UseablePrecision = RADEONMinBits(XclksPerTransfer) + 1; + + XclksPerTransferPrecise = RADEONDiv((XclkFreq * DisplayFifoWidth) + << (11 - UseablePrecision), + VclkFreq * + (info->CurrentLayout.pixel_bytes * 8)); + + Roff = XclksPerTransferPrecise * (DisplayFifoDepth - 4); + + Ron = (4 * info->ram->MB + + 3 * MAX(info->ram->Trcd - 2, 0) + + 2 * info->ram->Trp + + info->ram->Twr + + info->ram->CL + + info->ram->Tr2w + + XclksPerTransfer) << (11 - UseablePrecision); + + if (Ron + info->ram->Rloop >= Roff) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "(Ron = %d) + (Rloop = %d) >= (Roff = %d)\n", + Ron, info->ram->Rloop, Roff); + return FALSE; + } + + save->dda_config = (XclksPerTransferPrecise + | (UseablePrecision << 16) + | (info->ram->Rloop << 20)); + + save->dda_on_off = (Ron << 16) | Roff; + + RADEONTRACE(("XclkFreq = %d; VclkFreq = %d; per = %d, %d (useable = %d)\n", + XclkFreq, + VclkFreq, + XclksPerTransfer, + XclksPerTransferPrecise, + UseablePrecision)); + RADEONTRACE(("Roff = %d, Ron = %d, Rloop = %d\n", + Roff, Ron, info->ram->Rloop)); + + return TRUE; +} + + +/* Define initial palette for requested video mode. This doesn't do + anything for XFree86 4.0. */ +static void RADEONInitPalette(RADEONSavePtr save, RADEONInfoPtr info) +{ + save->palette_valid = FALSE; +} + +/* Define registers for a requested video mode. */ +static Bool RADEONInit(ScrnInfoPtr pScrn, DisplayModePtr mode, + RADEONSavePtr save) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + double dot_clock = mode->Clock/1000.0; + +#if RADEON_DEBUG + ErrorF("%-12.12s %7.2f %4d %4d %4d %4d %4d %4d %4d %4d (%d,%d)", + mode->name, + dot_clock, + + mode->HDisplay, + mode->HSyncStart, + mode->HSyncEnd, + mode->HTotal, + + mode->VDisplay, + mode->VSyncStart, + mode->VSyncEnd, + mode->VTotal, + pScrn->depth, + pScrn->bitsPerPixel); + if (mode->Flags & V_DBLSCAN) ErrorF(" D"); + if (mode->Flags & V_INTERLACE) ErrorF(" I"); + if (mode->Flags & V_PHSYNC) ErrorF(" +H"); + if (mode->Flags & V_NHSYNC) ErrorF(" -H"); + if (mode->Flags & V_PVSYNC) ErrorF(" +V"); + if (mode->Flags & V_NVSYNC) ErrorF(" -V"); + ErrorF("\n"); + ErrorF("%-12.12s %7.2f %4d %4d %4d %4d %4d %4d %4d %4d (%d,%d)", + mode->name, + dot_clock, + + mode->CrtcHDisplay, + mode->CrtcHSyncStart, + mode->CrtcHSyncEnd, + mode->CrtcHTotal, + + mode->CrtcVDisplay, + mode->CrtcVSyncStart, + mode->CrtcVSyncEnd, + mode->CrtcVTotal, + pScrn->depth, + pScrn->bitsPerPixel); + if (mode->Flags & V_DBLSCAN) ErrorF(" D"); + if (mode->Flags & V_INTERLACE) ErrorF(" I"); + if (mode->Flags & V_PHSYNC) ErrorF(" +H"); + if (mode->Flags & V_NHSYNC) ErrorF(" -H"); + if (mode->Flags & V_PVSYNC) ErrorF(" +V"); + if (mode->Flags & V_NVSYNC) ErrorF(" -V"); + ErrorF("\n"); +#endif + + info->Flags = mode->Flags; + + RADEONInitCommonRegisters(save, mode, info); + if (!RADEONInitCrtcRegisters(pScrn, save, mode, info)) return FALSE; +#ifdef ENABLE_FLAT_PANEL + /* Note: Radeon flat panel support has been disabled for now */ + if (info->HasPanelRegs) + RADEONInitFPRegisters(pScrn, &info->SavedReg, save, mode, info); +#endif + RADEONInitPLLRegisters(pScrn, save, mode, &info->pll, dot_clock); + if (!RADEONInitDDARegisters(pScrn, save, mode, &info->pll, info)) + return FALSE; + if (!info->PaletteSavedOnVT) RADEONInitPalette(save, info); + + RADEONTRACE(("RADEONInit returns %p\n", save)); + return TRUE; +} + +/* Initialize a new mode. */ +static Bool RADEONModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + + if (!RADEONInit(pScrn, mode, &info->ModeReg)) return FALSE; + /* FIXME? DRILock/DRIUnlock here? */ + pScrn->vtSema = TRUE; + RADEONBlank(pScrn); + RADEONRestoreMode(pScrn, &info->ModeReg); + RADEONUnblank(pScrn); + + info->CurrentLayout.mode = mode; + + return TRUE; +} + +static Bool RADEONSaveScreen(ScreenPtr pScreen, int mode) +{ + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + Bool unblank; + + unblank = xf86IsUnblank(mode); + if (unblank) + SetTimeSinceLastInputEvent(); + + if ((pScrn != NULL) && pScrn->vtSema) { + if (unblank) + RADEONUnblank(pScrn); + else + RADEONBlank(pScrn); + } + return TRUE; +} + +Bool RADEONSwitchMode(int scrnIndex, DisplayModePtr mode, int flags) +{ + return RADEONModeInit(xf86Screens[scrnIndex], mode); +} + +/* Used to disallow modes that are not supported by the hardware. */ +static int RADEONValidMode(int scrnIndex, DisplayModePtr mode, + Bool verbose, int flag) +{ +#ifdef ENABLE_FLAT_PANEL + /* Note: Radeon flat panel support has been disabled for now */ + ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + RADEONInfoPtr info = RADEONPTR(pScrn); + + if (info->HasPanelRegs) { + if (mode->Flags & V_INTERLACE) return MODE_NO_INTERLACE; + if (mode->Flags & V_DBLSCAN) return MODE_NO_DBLESCAN; + } + + if (info->HasPanelRegs && !info->CRTOnly && info->VBIOS) { + int i; + for (i = info->FPBIOSstart+64; RADEON_BIOS16(i) != 0; i += 2) { + int j = RADEON_BIOS16(i); + + if (mode->CrtcHDisplay == RADEON_BIOS16(j) && + mode->CrtcVDisplay == RADEON_BIOS16(j+2)) { + /* Assume we are using expanded mode */ + if (RADEON_BIOS16(j+5)) j = RADEON_BIOS16(j+5); + else j += 9; + + mode->Clock = (CARD32)RADEON_BIOS16(j) * 10; + + mode->HDisplay = mode->CrtcHDisplay = + ((RADEON_BIOS16(j+10) & 0x01ff)+1)*8; + mode->HSyncStart = mode->CrtcHSyncStart = + ((RADEON_BIOS16(j+12) & 0x01ff)+1)*8; + mode->HSyncEnd = mode->CrtcHSyncEnd = + mode->CrtcHSyncStart + (RADEON_BIOS8(j+14) & 0x1f); + mode->HTotal = mode->CrtcHTotal = + ((RADEON_BIOS16(j+8) & 0x01ff)+1)*8; + + mode->VDisplay = mode->CrtcVDisplay = + (RADEON_BIOS16(j+17) & 0x07ff)+1; + mode->VSyncStart = mode->CrtcVSyncStart = + (RADEON_BIOS16(j+19) & 0x07ff)+1; + mode->VSyncEnd = mode->CrtcVSyncEnd = + mode->CrtcVSyncStart + ((RADEON_BIOS16(j+19) >> 11)&0x1f); + mode->VTotal = mode->CrtcVTotal = + (RADEON_BIOS16(j+15) & 0x07ff)+1; + + return MODE_OK; + } + } + return MODE_NOMODE; + } +#endif + + return MODE_OK; +} + +/* Adjust viewport into virtual desktop such that (0,0) in viewport space + is (x,y) in virtual space. */ +void RADEONAdjustFrame(int scrnIndex, int x, int y, int flags) +{ + ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + int Base; + + Base = y * info->CurrentLayout.displayWidth + x; + + switch (info->CurrentLayout.pixel_code) { + case 15: + case 16: Base *= 2; break; + case 24: Base *= 3; break; + case 32: Base *= 4; break; + } + + Base &= ~7; /* 3 lower bits are always 0 */ + + if (info->CurrentLayout.pixel_code == 24) + Base += 8 * (Base % 3); /* Must be multiple of 8 and 3 */ + + OUTREG(RADEON_CRTC_OFFSET, Base); +} + +/* Called when VT switching back to the X server. Reinitialize the video + mode. */ +static Bool RADEONEnterVT(int scrnIndex, int flags) +{ + ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + RADEONInfoPtr info = RADEONPTR(pScrn); + + RADEONTRACE(("RADEONEnterVT\n")); +#ifdef XF86DRI + if (RADEONPTR(pScrn)->directRenderingEnabled) { + RADEONCPStart(pScrn); + DRIUnlock(pScrn->pScreen); + } +#endif + if (!RADEONModeInit(pScrn, pScrn->currentMode)) return FALSE; + if (info->accelOn) + RADEONEngineInit(pScrn); + + info->PaletteSavedOnVT = FALSE; + RADEONAdjustFrame(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0); + + return TRUE; +} + +/* Called when VT switching away from the X server. Restore the original + text mode. */ +static void RADEONLeaveVT(int scrnIndex, int flags) +{ + ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + RADEONInfoPtr info = RADEONPTR(pScrn); + RADEONSavePtr save = &info->ModeReg; + + RADEONTRACE(("RADEONLeaveVT\n")); +#ifdef XF86DRI + if (RADEONPTR(pScrn)->directRenderingEnabled) { + DRILock(pScrn->pScreen, 0); + RADEONCPStop(pScrn); + } +#endif + RADEONSavePalette(pScrn, save); + info->PaletteSavedOnVT = TRUE; + RADEONRestore(pScrn); +} + +static Bool +RADEONEnterVTFBDev(int scrnIndex, int flags) +{ + ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + RADEONInfoPtr info = RADEONPTR(pScrn); + RADEONSavePtr restore = &info->SavedReg; + fbdevHWEnterVT(scrnIndex,flags); + RADEONRestorePalette(pScrn,restore); + RADEONEngineInit(pScrn); + return TRUE; +} + +static void RADEONLeaveVTFBDev(int scrnIndex, int flags) +{ + ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + RADEONInfoPtr info = RADEONPTR(pScrn); + RADEONSavePtr save = &info->SavedReg; + RADEONSavePalette(pScrn,save); + fbdevHWLeaveVT(scrnIndex,flags); +} + +/* Called at the end of each server generation. Restore the original text + mode, unmap video memory, and unwrap and call the saved CloseScreen + function. */ +static Bool RADEONCloseScreen(int scrnIndex, ScreenPtr pScreen) +{ + ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + RADEONInfoPtr info = RADEONPTR(pScrn); + + RADEONTRACE(("RADEONCloseScreen\n")); + +#ifdef XF86DRI + /* Disable direct rendering */ + if (info->directRenderingEnabled) { + RADEONDRICloseScreen(pScreen); + info->directRenderingEnabled = FALSE; + } +#endif + + if (pScrn->vtSema) { + RADEONRestore(pScrn); + RADEONUnmapMem(pScrn); + } + + if (info->accel) XAADestroyInfoRec(info->accel); + info->accel = NULL; + + if (info->scratch_buffer[0]) xfree(info->scratch_buffer[0]); + info->scratch_buffer[0] = NULL; + + if (info->cursor) xf86DestroyCursorInfoRec(info->cursor); + info->cursor = NULL; + + if (info->DGAModes) xfree(info->DGAModes); + info->DGAModes = NULL; + + pScrn->vtSema = FALSE; + + pScreen->CloseScreen = info->CloseScreen; + return (*pScreen->CloseScreen)(scrnIndex, pScreen); +} + +static void RADEONFreeScreen(int scrnIndex, int flags) +{ + ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + + RADEONTRACE(("RADEONFreeScreen\n")); + if (xf86LoaderCheckSymbol("vgaHWFreeHWRec")) + vgaHWFreeHWRec(pScrn); + RADEONFreeRec(pScrn); +} + +#ifdef DPMSExtension +/* Sets VESA Display Power Management Signaling (DPMS) Mode. */ +static void RADEONDisplayPowerManagementSet(ScrnInfoPtr pScrn, + int PowerManagementMode, int flags) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + int mask = (RADEON_CRTC_DISPLAY_DIS + | RADEON_CRTC_HSYNC_DIS + | RADEON_CRTC_VSYNC_DIS); + + switch (PowerManagementMode) { + case DPMSModeOn: + /* Screen: On; HSync: On, VSync: On */ + OUTREGP(RADEON_CRTC_EXT_CNTL, 0, ~mask); + break; + case DPMSModeStandby: + /* Screen: Off; HSync: Off, VSync: On */ + OUTREGP(RADEON_CRTC_EXT_CNTL, + RADEON_CRTC_DISPLAY_DIS | RADEON_CRTC_HSYNC_DIS, ~mask); + break; + case DPMSModeSuspend: + /* Screen: Off; HSync: On, VSync: Off */ + OUTREGP(RADEON_CRTC_EXT_CNTL, + RADEON_CRTC_DISPLAY_DIS | RADEON_CRTC_VSYNC_DIS, ~mask); + break; + case DPMSModeOff: + /* Screen: Off; HSync: Off, VSync: Off */ + OUTREGP(RADEON_CRTC_EXT_CNTL, mask, ~mask); + break; + } +} +#endif diff --git a/xc/programs/Xserver/hw/xfree86/drivers/r128/radeon_probe.h b/xc/programs/Xserver/hw/xfree86/drivers/r128/radeon_probe.h new file mode 100644 index 000000000..7bf660aa2 --- /dev/null +++ b/xc/programs/Xserver/hw/xfree86/drivers/r128/radeon_probe.h @@ -0,0 +1,42 @@ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/radeon_probe.h,v 1.2 2000/10/23 21:16:49 tsi Exp $ */ +/************************************************************************** + +Copyright 2000 ATI Technologies Inc. and VA Linux Systems, Inc., + Sunnyvale, California. +All Rights Reserved. + +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 +on the rights to use, copy, modify, merge, publish, distribute, sub +license, 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 (including the next +paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS 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. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin <martin@valinux.com> + * + */ + +#ifndef _RADEON_PROBE_H_ +#define _RADEON_PROBE_H_ + +extern OptionInfoPtr RADEONAvailableOptions(int chipid, int busid); +extern void RADEONIdentify(int flags); +extern Bool RADEONProbe(DriverPtr drv, int flags); + +#endif diff --git a/xc/programs/Xserver/hw/xfree86/drivers/r128/radeon_reg.h b/xc/programs/Xserver/hw/xfree86/drivers/r128/radeon_reg.h new file mode 100644 index 000000000..86a73bec7 --- /dev/null +++ b/xc/programs/Xserver/hw/xfree86/drivers/r128/radeon_reg.h @@ -0,0 +1,1477 @@ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/radeon_reg.h,v 1.2 2000/10/18 18:54:04 alanh Exp $ */ +/************************************************************************** + +Copyright 2000 ATI Technologies Inc. and VA Linux Systems, Inc., + Sunnyvale, California. +All Rights Reserved. + +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 +on the rights to use, copy, modify, merge, publish, distribute, sub +license, 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 (including the next +paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS 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. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin <martin@valinux.com> + * Rickard E. Faith <faith@valinux.com> + * + * References: + * + * !!!! FIXME !!!! + * RAGE 128 VR/ RAGE 128 GL Register Reference Manual (Technical + * Reference Manual P/N RRG-G04100-C Rev. 0.04), ATI Technologies: April + * 1999. + * + * !!!! FIXME !!!! + * RAGE 128 Software Development Manual (Technical Reference Manual P/N + * SDK-G04000 Rev. 0.01), ATI Technologies: June 1999. + * + */ + +/* !!!! FIXME !!!! NOTE: THIS FILE HAS BEEN CONVERTED FROM r128_reg.h + * AND CONTAINS REGISTERS AND REGISTER DEFINITIONS THAT ARE NOT CORRECT + * ON THE RADEON. A FULL AUDIT OF THIS CODE IS NEEDED! */ + +#ifndef _RADEON_REG_H_ +#define _RADEON_REG_H_ +#include <compiler.h> + + /* Memory mapped register access macros */ +#define INREG8(addr) MMIO_IN8(RADEONMMIO, addr) +#define INREG16(addr) MMIO_IN16(RADEONMMIO, addr) +#define INREG(addr) MMIO_IN32(RADEONMMIO, addr) +#define OUTREG8(addr, val) MMIO_OUT8(RADEONMMIO, addr, val) +#define OUTREG16(addr, val) MMIO_OUT16(RADEONMMIO, addr, val) +#define OUTREG(addr, val) MMIO_OUT32(RADEONMMIO, addr, val) + +#define ADDRREG(addr) ((volatile CARD32 *)(RADEONMMIO + (addr))) + + +#define OUTREGP(addr, val, mask) \ + do { \ + CARD32 tmp = INREG(addr); \ + tmp &= (mask); \ + tmp |= (val); \ + OUTREG(addr, tmp); \ + } while (0) + +#define INPLL(pScrn, addr) RADEONINPLL(pScrn, addr) + +#if !RADEON_ATOMIC_UPDATE +#define OUTPLL(addr, val) \ + do { \ + while ( (INREG(RADEON_CLOCK_CNTL_INDEX) & 0x9f) != \ + (addr | RADEON_PLL_WR_EN)) { \ + OUTREG8(RADEON_CLOCK_CNTL_INDEX, (((addr) & 0x1f) | \ + RADEON_PLL_WR_EN)); \ + } \ + OUTREG(RADEON_CLOCK_CNTL_DATA, val); \ + } while (0) +#else +#define OUTPLL(addr, val) \ + do { \ + OUTREG8(RADEON_CLOCK_CNTL_INDEX, (((addr) & 0x1f) | \ + RADEON_PLL_WR_EN)); \ + OUTREG(RADEON_CLOCK_CNTL_DATA, val); \ + } while (0) +#endif + +#define OUTPLLP(pScrn, addr, val, mask) \ + do { \ + CARD32 tmp = INPLL(pScrn, addr); \ + tmp &= (mask); \ + tmp |= (val); \ + OUTPLL(addr, tmp); \ + } while (0) + +#define OUTPAL_START(idx) \ + do { \ + OUTREG8(RADEON_PALETTE_INDEX, (idx)); \ + } while (0) + +#define OUTPAL_NEXT(r, g, b) \ + do { \ + OUTREG(RADEON_PALETTE_DATA, ((r) << 16) | ((g) << 8) | (b)); \ + } while (0) + +#define OUTPAL_NEXT_CARD32(v) \ + do { \ + OUTREG(RADEON_PALETTE_DATA, (v & 0x00ffffff)); \ + } while (0) + +#define OUTPAL(idx, r, g, b) \ + do { \ + OUTPAL_START((idx)); \ + OUTPAL_NEXT((r), (g), (b)); \ + } while (0) + +#define INPAL_START(idx) \ + do { \ + OUTREG(RADEON_PALETTE_INDEX, (idx) << 16); \ + } while (0) + +#define INPAL_NEXT() INREG(RADEON_PALETTE_DATA) + +#define PAL_SELECT(idx) \ + do { \ + if (idx) { \ + OUTREG(RADEON_DAC_CNTL, INREG(RADEON_DAC_CNTL) | \ + RADEON_DAC_PALETTE_ACC_CTL); \ + } else { \ + OUTREG(RADEON_DAC_CNTL, INREG(RADEON_DAC_CNTL) & \ + ~RADEON_DAC_PALETTE_ACC_CTL); \ + } \ + } while (0) + +#define RADEON_ADAPTER_ID 0x0f2c /* PCI */ +#define RADEON_AGP_BASE 0x0170 +#define RADEON_AGP_CNTL 0x0174 +# define RADEON_AGP_APER_SIZE_256MB (0x00 << 0) +# define RADEON_AGP_APER_SIZE_128MB (0x20 << 0) +# define RADEON_AGP_APER_SIZE_64MB (0x30 << 0) +# define RADEON_AGP_APER_SIZE_32MB (0x38 << 0) +# define RADEON_AGP_APER_SIZE_16MB (0x3c << 0) +# define RADEON_AGP_APER_SIZE_8MB (0x3e << 0) +# define RADEON_AGP_APER_SIZE_4MB (0x3f << 0) +# define RADEON_AGP_APER_SIZE_MASK (0x3f << 0) +#define RADEON_AGP_COMMAND 0x0f60 /* PCI */ +#define RADEON_AGP_PLL_CNTL 0x000b /* PLL */ +#define RADEON_AGP_STATUS 0x0f5c /* PCI */ +# define RADEON_AGP_1X_MODE 0x01 +# define RADEON_AGP_2X_MODE 0x02 +# define RADEON_AGP_4X_MODE 0x04 +# define RADEON_AGP_MODE_MASK 0x07 +#define RADEON_AMCGPIO_A_REG 0x01a0 +#define RADEON_AMCGPIO_EN_REG 0x01a8 +#define RADEON_AMCGPIO_MASK 0x0194 +#define RADEON_AMCGPIO_Y_REG 0x01a4 +#define RADEON_ATTRDR 0x03c1 /* VGA */ +#define RADEON_ATTRDW 0x03c0 /* VGA */ +#define RADEON_ATTRX 0x03c0 /* VGA */ +# define RADEON_AUX1_SC_EN (1 << 0) +# define RADEON_AUX1_SC_MODE_OR (0 << 1) +# define RADEON_AUX1_SC_MODE_NAND (1 << 1) +# define RADEON_AUX2_SC_EN (1 << 2) +# define RADEON_AUX2_SC_MODE_OR (0 << 3) +# define RADEON_AUX2_SC_MODE_NAND (1 << 3) +# define RADEON_AUX3_SC_EN (1 << 4) +# define RADEON_AUX3_SC_MODE_OR (0 << 5) +# define RADEON_AUX3_SC_MODE_NAND (1 << 5) +#define RADEON_AUX_SC_CNTL 0x1660 +#define RADEON_AUX1_SC_BOTTOM 0x1670 +#define RADEON_AUX1_SC_LEFT 0x1664 +#define RADEON_AUX1_SC_RIGHT 0x1668 +#define RADEON_AUX1_SC_TOP 0x166c +#define RADEON_AUX2_SC_BOTTOM 0x1680 +#define RADEON_AUX2_SC_LEFT 0x1674 +#define RADEON_AUX2_SC_RIGHT 0x1678 +#define RADEON_AUX2_SC_TOP 0x167c +#define RADEON_AUX3_SC_BOTTOM 0x1690 +#define RADEON_AUX3_SC_LEFT 0x1684 +#define RADEON_AUX3_SC_RIGHT 0x1688 +#define RADEON_AUX3_SC_TOP 0x168c +#define RADEON_AUX_WINDOW_HORZ_CNTL 0x02d8 +#define RADEON_AUX_WINDOW_VERT_CNTL 0x02dc + +#define RADEON_BASE_CODE 0x0f0b +#define RADEON_BIOS_0_SCRATCH 0x0010 +#define RADEON_BIOS_1_SCRATCH 0x0014 +#define RADEON_BIOS_2_SCRATCH 0x0018 +#define RADEON_BIOS_3_SCRATCH 0x001c +#define RADEON_BIOS_ROM 0x0f30 /* PCI */ +#define RADEON_BIST 0x0f0f /* PCI */ +#define RADEON_BRUSH_DATA0 0x1480 +#define RADEON_BRUSH_DATA1 0x1484 +#define RADEON_BRUSH_DATA10 0x14a8 +#define RADEON_BRUSH_DATA11 0x14ac +#define RADEON_BRUSH_DATA12 0x14b0 +#define RADEON_BRUSH_DATA13 0x14b4 +#define RADEON_BRUSH_DATA14 0x14b8 +#define RADEON_BRUSH_DATA15 0x14bc +#define RADEON_BRUSH_DATA16 0x14c0 +#define RADEON_BRUSH_DATA17 0x14c4 +#define RADEON_BRUSH_DATA18 0x14c8 +#define RADEON_BRUSH_DATA19 0x14cc +#define RADEON_BRUSH_DATA2 0x1488 +#define RADEON_BRUSH_DATA20 0x14d0 +#define RADEON_BRUSH_DATA21 0x14d4 +#define RADEON_BRUSH_DATA22 0x14d8 +#define RADEON_BRUSH_DATA23 0x14dc +#define RADEON_BRUSH_DATA24 0x14e0 +#define RADEON_BRUSH_DATA25 0x14e4 +#define RADEON_BRUSH_DATA26 0x14e8 +#define RADEON_BRUSH_DATA27 0x14ec +#define RADEON_BRUSH_DATA28 0x14f0 +#define RADEON_BRUSH_DATA29 0x14f4 +#define RADEON_BRUSH_DATA3 0x148c +#define RADEON_BRUSH_DATA30 0x14f8 +#define RADEON_BRUSH_DATA31 0x14fc +#define RADEON_BRUSH_DATA32 0x1500 +#define RADEON_BRUSH_DATA33 0x1504 +#define RADEON_BRUSH_DATA34 0x1508 +#define RADEON_BRUSH_DATA35 0x150c +#define RADEON_BRUSH_DATA36 0x1510 +#define RADEON_BRUSH_DATA37 0x1514 +#define RADEON_BRUSH_DATA38 0x1518 +#define RADEON_BRUSH_DATA39 0x151c +#define RADEON_BRUSH_DATA4 0x1490 +#define RADEON_BRUSH_DATA40 0x1520 +#define RADEON_BRUSH_DATA41 0x1524 +#define RADEON_BRUSH_DATA42 0x1528 +#define RADEON_BRUSH_DATA43 0x152c +#define RADEON_BRUSH_DATA44 0x1530 +#define RADEON_BRUSH_DATA45 0x1534 +#define RADEON_BRUSH_DATA46 0x1538 +#define RADEON_BRUSH_DATA47 0x153c +#define RADEON_BRUSH_DATA48 0x1540 +#define RADEON_BRUSH_DATA49 0x1544 +#define RADEON_BRUSH_DATA5 0x1494 +#define RADEON_BRUSH_DATA50 0x1548 +#define RADEON_BRUSH_DATA51 0x154c +#define RADEON_BRUSH_DATA52 0x1550 +#define RADEON_BRUSH_DATA53 0x1554 +#define RADEON_BRUSH_DATA54 0x1558 +#define RADEON_BRUSH_DATA55 0x155c +#define RADEON_BRUSH_DATA56 0x1560 +#define RADEON_BRUSH_DATA57 0x1564 +#define RADEON_BRUSH_DATA58 0x1568 +#define RADEON_BRUSH_DATA59 0x156c +#define RADEON_BRUSH_DATA6 0x1498 +#define RADEON_BRUSH_DATA60 0x1570 +#define RADEON_BRUSH_DATA61 0x1574 +#define RADEON_BRUSH_DATA62 0x1578 +#define RADEON_BRUSH_DATA63 0x157c +#define RADEON_BRUSH_DATA7 0x149c +#define RADEON_BRUSH_DATA8 0x14a0 +#define RADEON_BRUSH_DATA9 0x14a4 +#define RADEON_BRUSH_SCALE 0x1470 +#define RADEON_BRUSH_Y_X 0x1474 +#define RADEON_BUS_CNTL 0x0030 +# define RADEON_BUS_MASTER_DIS (1 << 6) +# define RADEON_BUS_RD_DISCARD_EN (1 << 24) +# define RADEON_BUS_RD_ABORT_EN (1 << 25) +# define RADEON_BUS_MSTR_DISCONNECT_EN (1 << 28) +# define RADEON_BUS_WRT_BURST (1 << 29) +# define RADEON_BUS_READ_BURST (1 << 30) +#define RADEON_BUS_CNTL1 0x0034 +# define RADEON_BUS_WAIT_ON_LOCK_EN (1 << 4) + +#define RADEON_CACHE_CNTL 0x1724 +#define RADEON_CACHE_LINE 0x0f0c /* PCI */ +#define RADEON_CAP0_TRIG_CNTL 0x0950 /* ? */ +#define RADEON_CAP1_TRIG_CNTL 0x09c0 /* ? */ +#define RADEON_CAPABILITIES_ID 0x0f50 /* PCI */ +#define RADEON_CAPABILITIES_PTR 0x0f34 /* PCI */ +#define RADEON_CLK_PIN_CNTL 0x0001 /* PLL */ +#define RADEON_CLOCK_CNTL_DATA 0x000c +#define RADEON_CLOCK_CNTL_INDEX 0x0008 +# define RADEON_PLL_WR_EN (1 << 7) +# define RADEON_PLL_DIV_SEL (3 << 8) +#define RADEON_CLR_CMP_CLR_3D 0x1a24 +#define RADEON_CLR_CMP_CLR_DST 0x15c8 +#define RADEON_CLR_CMP_CLR_SRC 0x15c4 +#define RADEON_CLR_CMP_CNTL 0x15c0 +# define RADEON_SRC_CMP_EQ_COLOR (4 << 0) +# define RADEON_SRC_CMP_NEQ_COLOR (5 << 0) +# define RADEON_CLR_CMP_SRC_SOURCE (1 << 24) +#define RADEON_CLR_CMP_MASK 0x15cc +# define RADEON_CLR_CMP_MSK 0xffffffff +#define RADEON_CLR_CMP_MASK_3D 0x1A28 +#define RADEON_COMMAND 0x0f04 /* PCI */ +#define RADEON_COMPOSITE_SHADOW_ID 0x1a0c +#define RADEON_CONFIG_APER_0_BASE 0x0100 +#define RADEON_CONFIG_APER_1_BASE 0x0104 +#define RADEON_CONFIG_APER_SIZE 0x0108 +#define RADEON_CONFIG_BONDS 0x00e8 +#define RADEON_CONFIG_CNTL 0x00e0 +#define RADEON_CONFIG_MEMSIZE 0x00f8 +#define RADEON_CONFIG_MEMSIZE_EMBEDDED 0x0114 +#define RADEON_CONFIG_REG_1_BASE 0x010c +#define RADEON_CONFIG_REG_APER_SIZE 0x0110 +#define RADEON_CONFIG_XSTRAP 0x00e4 +#define RADEON_CONSTANT_COLOR_C 0x1d34 +# define RADEON_CONSTANT_COLOR_MASK 0x00ffffff +# define RADEON_CONSTANT_COLOR_ONE 0x00ffffff +# define RADEON_CONSTANT_COLOR_ZERO 0x00000000 +#define RADEON_CRC_CMDFIFO_ADDR 0x0740 +#define RADEON_CRC_CMDFIFO_DOUT 0x0744 +#define RADEON_CRTC_CRNT_FRAME 0x0214 +#define RADEON_CRTC_DEBUG 0x021c +#define RADEON_CRTC_EXT_CNTL 0x0054 +# define RADEON_CRTC_VGA_XOVERSCAN (1 << 0) +# define RADEON_VGA_ATI_LINEAR (1 << 3) +# define RADEON_XCRT_CNT_EN (1 << 6) +# define RADEON_CRTC_HSYNC_DIS (1 << 8) +# define RADEON_CRTC_VSYNC_DIS (1 << 9) +# define RADEON_CRTC_DISPLAY_DIS (1 << 10) +# define RADEON_CRTC_CRT_ON (1 << 15) +#define RADEON_CRTC_EXT_CNTL_DPMS_BYTE 0x0055 +# define RADEON_CRTC_HSYNC_DIS_BYTE (1 << 0) +# define RADEON_CRTC_VSYNC_DIS_BYTE (1 << 1) +# define RADEON_CRTC_DISPLAY_DIS_BYTE (1 << 2) +#define RADEON_CRTC_GEN_CNTL 0x0050 +# define RADEON_CRTC_DBL_SCAN_EN (1 << 0) +# define RADEON_CRTC_INTERLACE_EN (1 << 1) +# define RADEON_CRTC_CSYNC_EN (1 << 4) +# define RADEON_CRTC_CUR_EN (1 << 16) +# define RADEON_CRTC_CUR_MODE_MASK (7 << 17) +# define RADEON_CRTC_ICON_EN (1 << 20) +# define RADEON_CRTC_EXT_DISP_EN (1 << 24) +# define RADEON_CRTC_EN (1 << 25) +# define RADEON_CRTC_DISP_REQ_EN_B (1 << 26) +#define RADEON_CRTC_GUI_TRIG_VLINE 0x0218 +#define RADEON_CRTC_H_SYNC_STRT_WID 0x0204 +# define RADEON_CRTC_H_SYNC_STRT_PIX (0x07 << 0) +# define RADEON_CRTC_H_SYNC_STRT_CHAR (0x1ff << 3) +# define RADEON_CRTC_H_SYNC_STRT_CHAR_SHIFT 3 +# define RADEON_CRTC_H_SYNC_WID (0x3f << 16) +# define RADEON_CRTC_H_SYNC_WID_SHIFT 16 +# define RADEON_CRTC_H_SYNC_POL (1 << 23) +#define RADEON_CRTC_H_TOTAL_DISP 0x0200 +# define RADEON_CRTC_H_TOTAL (0x01ff << 0) +# define RADEON_CRTC_H_TOTAL_SHIFT 0 +# define RADEON_CRTC_H_DISP (0x00ff << 16) +# define RADEON_CRTC_H_DISP_SHIFT 16 +#define RADEON_CRTC_OFFSET 0x0224 +#define RADEON_CRTC_OFFSET_CNTL 0x0228 +#define RADEON_CRTC_PITCH 0x022c +#define RADEON_CRTC_STATUS 0x005c +# define RADEON_CRTC_VBLANK_SAVE (1 << 1) +#define RADEON_CRTC_V_SYNC_STRT_WID 0x020c +# define RADEON_CRTC_V_SYNC_STRT (0x7ff << 0) +# define RADEON_CRTC_V_SYNC_STRT_SHIFT 0 +# define RADEON_CRTC_V_SYNC_WID (0x1f << 16) +# define RADEON_CRTC_V_SYNC_WID_SHIFT 16 +# define RADEON_CRTC_V_SYNC_POL (1 << 23) +#define RADEON_CRTC_V_TOTAL_DISP 0x0208 +# define RADEON_CRTC_V_TOTAL (0x07ff << 0) +# define RADEON_CRTC_V_TOTAL_SHIFT 0 +# define RADEON_CRTC_V_DISP (0x07ff << 16) +# define RADEON_CRTC_V_DISP_SHIFT 16 +#define RADEON_CRTC_VLINE_CRNT_VLINE 0x0210 +# define RADEON_CRTC_CRNT_VLINE_MASK (0x7ff << 16) +#define RADEON_CRTC2_CRNT_FRAME 0x0314 +#define RADEON_CRTC2_DEBUG 0x031c +#define RADEON_CRTC2_GEN_CNTL 0x03f8 +#define RADEON_CRTC2_GUI_TRIG_VLINE 0x0318 +#define RADEON_CRTC2_H_SYNC_STRT_WID 0x0304 +#define RADEON_CRTC2_H_TOTAL_DISP 0x0300 +#define RADEON_CRTC2_OFFSET 0x0324 +#define RADEON_CRTC2_OFFSET_CNTL 0x0328 +#define RADEON_CRTC2_PITCH 0x032c +#define RADEON_CRTC2_STATUS 0x03fc +#define RADEON_CRTC2_V_SYNC_STRT_WID 0x030c +#define RADEON_CRTC2_V_TOTAL_DISP 0x0308 +#define RADEON_CRTC2_VLINE_CRNT_VLINE 0x0310 +#define RADEON_CRTC8_DATA 0x03d5 /* VGA, 0x3b5 */ +#define RADEON_CRTC8_IDX 0x03d4 /* VGA, 0x3b4 */ +#define RADEON_CUR_CLR0 0x026c +#define RADEON_CUR_CLR1 0x0270 +#define RADEON_CUR_HORZ_VERT_OFF 0x0268 +#define RADEON_CUR_HORZ_VERT_POSN 0x0264 +#define RADEON_CUR_OFFSET 0x0260 +# define RADEON_CUR_LOCK (1 << 31) + +#define RADEON_DAC_CNTL 0x0058 +# define RADEON_DAC_RANGE_CNTL (3 << 0) +# define RADEON_DAC_BLANKING (1 << 2) +# define RADEON_DAC_CRT_SEL_CRTC2 (1 << 4) +# define RADEON_DAC_PALETTE_ACC_CTL (1 << 5) +# define RADEON_DAC_8BIT_EN (1 << 8) +# define RADEON_DAC_VGA_ADR_EN (1 << 13) +# define RADEON_DAC_MASK_ALL (0xff << 24) +#define RADEON_DAC_CRC_SIG 0x02cc +#define RADEON_DAC_DATA 0x03c9 /* VGA */ +#define RADEON_DAC_MASK 0x03c6 /* VGA */ +#define RADEON_DAC_R_INDEX 0x03c7 /* VGA */ +#define RADEON_DAC_W_INDEX 0x03c8 /* VGA */ +#define RADEON_DDA_CONFIG 0x02e0 +#define RADEON_DDA_ON_OFF 0x02e4 +#define RADEON_DEFAULT_OFFSET 0x16e0 +#define RADEON_DEFAULT_PITCH 0x16e4 +#define RADEON_DEFAULT_SC_BOTTOM_RIGHT 0x16e8 +# define RADEON_DEFAULT_SC_RIGHT_MAX (0x1fff << 0) +# define RADEON_DEFAULT_SC_BOTTOM_MAX (0x1fff << 16) +#define RADEON_DESTINATION_3D_CLR_CMP_VAL 0x1820 +#define RADEON_DESTINATION_3D_CLR_CMP_MSK 0x1824 +#define RADEON_DEVICE_ID 0x0f02 /* PCI */ +#define RADEON_DISP_MISC_CNTL 0x0d00 +# define RADEON_SOFT_RESET_GRPH_PP (1 << 0) +#define RADEON_DP_BRUSH_BKGD_CLR 0x1478 +#define RADEON_DP_BRUSH_FRGD_CLR 0x147c +#define RADEON_DP_CNTL 0x16c0 +# define RADEON_DST_X_LEFT_TO_RIGHT (1 << 0) +# define RADEON_DST_Y_TOP_TO_BOTTOM (1 << 1) +#define RADEON_DP_CNTL_XDIR_YDIR_YMAJOR 0x16d0 +# define RADEON_DST_Y_MAJOR (1 << 2) +# define RADEON_DST_Y_DIR_TOP_TO_BOTTOM (1 << 15) +# define RADEON_DST_X_DIR_LEFT_TO_RIGHT (1 << 31) +#define RADEON_DP_DATATYPE 0x16c4 +# define RADEON_HOST_BIG_ENDIAN_EN (1 << 29) +#define RADEON_DP_GUI_MASTER_CNTL 0x146c +# define RADEON_GMC_SRC_PITCH_OFFSET_CNTL (1 << 0) +# define RADEON_GMC_DST_PITCH_OFFSET_CNTL (1 << 1) +# define RADEON_GMC_SRC_CLIPPING (1 << 2) +# define RADEON_GMC_DST_CLIPPING (1 << 3) +# define RADEON_GMC_BRUSH_DATATYPE_MASK (0x0f << 4) +# define RADEON_GMC_BRUSH_8X8_MONO_FG_BG (0 << 4) +# define RADEON_GMC_BRUSH_8X8_MONO_FG_LA (1 << 4) +# define RADEON_GMC_BRUSH_1X8_MONO_FG_BG (4 << 4) +# define RADEON_GMC_BRUSH_1X8_MONO_FG_LA (5 << 4) +# define RADEON_GMC_BRUSH_32x1_MONO_FG_BG (6 << 4) +# define RADEON_GMC_BRUSH_32x1_MONO_FG_LA (7 << 4) +# define RADEON_GMC_BRUSH_8x8_COLOR (10 << 4) +# define RADEON_GMC_BRUSH_1X8_COLOR (12 << 4) +# define RADEON_GMC_BRUSH_SOLID_COLOR (13 << 4) +# define RADEON_GMC_BRUSH_NONE (15 << 4) +# define RADEON_GMC_DST_8BPP_CI (2 << 8) +# define RADEON_GMC_DST_15BPP (3 << 8) +# define RADEON_GMC_DST_16BPP (4 << 8) +# define RADEON_GMC_DST_24BPP (5 << 8) +# define RADEON_GMC_DST_32BPP (6 << 8) +# define RADEON_GMC_DST_8BPP_RGB (7 << 8) +# define RADEON_GMC_DST_Y8 (8 << 8) +# define RADEON_GMC_DST_RGB8 (9 << 8) +# define RADEON_GMC_DST_VYUY (11 << 8) +# define RADEON_GMC_DST_YVYU (12 << 8) +# define RADEON_GMC_DST_AYUV444 (14 << 8) +# define RADEON_GMC_DST_ARGB4444 (15 << 8) +# define RADEON_GMC_DST_DATATYPE_MASK (0x0f << 8) +# define RADEON_GMC_DST_DATATYPE_SHIFT 8 +# define RADEON_GMC_SRC_DATATYPE_MASK (3 << 12) +# define RADEON_GMC_SRC_DATATYPE_MONO_FG_BG (0 << 12) +# define RADEON_GMC_SRC_DATATYPE_MONO_FG_LA (1 << 12) +# define RADEON_GMC_SRC_DATATYPE_COLOR (3 << 12) +# define RADEON_GMC_BYTE_PIX_ORDER (1 << 14) +# define RADEON_GMC_BYTE_MSB_TO_LSB (0 << 14) +# define RADEON_GMC_BYTE_LSB_TO_MSB (1 << 14) +# define RADEON_GMC_CONVERSION_TEMP (1 << 15) +# define RADEON_GMC_CONVERSION_TEMP_6500 (0 << 15) +# define RADEON_GMC_CONVERSION_TEMP_9300 (1 << 15) +# define RADEON_GMC_ROP3_MASK (0xff << 16) +# define RADEON_DP_SRC_SOURCE_MASK (7 << 24) +# define RADEON_DP_SRC_SOURCE_MEMORY (2 << 24) +# define RADEON_DP_SRC_SOURCE_HOST_DATA (3 << 24) +# define RADEON_GMC_3D_FCN_EN (1 << 27) +# define RADEON_GMC_CLR_CMP_CNTL_DIS (1 << 28) +# define RADEON_GMC_AUX_CLIP_DIS (1 << 29) +# define RADEON_GMC_WR_MSK_DIS (1 << 30) +# define RADEON_GMC_LD_BRUSH_Y_X (1 << 31) +# define RADEON_ROP3_ZERO 0x00000000 +# define RADEON_ROP3_DSa 0x00880000 +# define RADEON_ROP3_SDna 0x00440000 +# define RADEON_ROP3_S 0x00cc0000 +# define RADEON_ROP3_DSna 0x00220000 +# define RADEON_ROP3_D 0x00aa0000 +# define RADEON_ROP3_DSx 0x00660000 +# define RADEON_ROP3_DSo 0x00ee0000 +# define RADEON_ROP3_DSon 0x00110000 +# define RADEON_ROP3_DSxn 0x00990000 +# define RADEON_ROP3_Dn 0x00550000 +# define RADEON_ROP3_SDno 0x00dd0000 +# define RADEON_ROP3_Sn 0x00330000 +# define RADEON_ROP3_DSno 0x00bb0000 +# define RADEON_ROP3_DSan 0x00770000 +# define RADEON_ROP3_ONE 0x00ff0000 +# define RADEON_ROP3_DPa 0x00a00000 +# define RADEON_ROP3_PDna 0x00500000 +# define RADEON_ROP3_P 0x00f00000 +# define RADEON_ROP3_DPna 0x000a0000 +# define RADEON_ROP3_D 0x00aa0000 +# define RADEON_ROP3_DPx 0x005a0000 +# define RADEON_ROP3_DPo 0x00fa0000 +# define RADEON_ROP3_DPon 0x00050000 +# define RADEON_ROP3_PDxn 0x00a50000 +# define RADEON_ROP3_PDno 0x00f50000 +# define RADEON_ROP3_Pn 0x000f0000 +# define RADEON_ROP3_DPno 0x00af0000 +# define RADEON_ROP3_DPan 0x005f0000 + + +#define RADEON_DP_GUI_MASTER_CNTL_C 0x1c84 +#define RADEON_DP_MIX 0x16c8 +#define RADEON_DP_SRC_BKGD_CLR 0x15dc +#define RADEON_DP_SRC_FRGD_CLR 0x15d8 +#define RADEON_DP_WRITE_MASK 0x16cc +#define RADEON_DST_BRES_DEC 0x1630 +#define RADEON_DST_BRES_ERR 0x1628 +#define RADEON_DST_BRES_INC 0x162c +#define RADEON_DST_BRES_LNTH 0x1634 +#define RADEON_DST_BRES_LNTH_SUB 0x1638 +#define RADEON_DST_HEIGHT 0x1410 +#define RADEON_DST_HEIGHT_WIDTH 0x143c +#define RADEON_DST_HEIGHT_WIDTH_8 0x158c +#define RADEON_DST_HEIGHT_WIDTH_BW 0x15b4 +#define RADEON_DST_HEIGHT_Y 0x15a0 +#define RADEON_DST_LINE_START 0x1600 +#define RADEON_DST_LINE_END 0x1604 +#define RADEON_DST_OFFSET 0x1404 +#define RADEON_DST_PITCH 0x1408 +#define RADEON_DST_PITCH_OFFSET 0x142c +#define RADEON_DST_PITCH_OFFSET_C 0x1c80 +# define RADEON_PITCH_SHIFT 21 +#define RADEON_DST_WIDTH 0x140c +#define RADEON_DST_WIDTH_HEIGHT 0x1598 +#define RADEON_DST_WIDTH_X 0x1588 +#define RADEON_DST_WIDTH_X_INCY 0x159c +#define RADEON_DST_X 0x141c +#define RADEON_DST_X_SUB 0x15a4 +#define RADEON_DST_X_Y 0x1594 +#define RADEON_DST_Y 0x1420 +#define RADEON_DST_Y_SUB 0x15a8 +#define RADEON_DST_Y_X 0x1438 + +#define RADEON_FCP_CNTL 0x0012 /* PLL */ +#define RADEON_FLUSH_1 0x1704 +#define RADEON_FLUSH_2 0x1708 +#define RADEON_FLUSH_3 0x170c +#define RADEON_FLUSH_4 0x1710 +#define RADEON_FLUSH_5 0x1714 +#define RADEON_FLUSH_6 0x1718 +#define RADEON_FLUSH_7 0x171c +#define RADEON_FOG_3D_TABLE_START 0x1810 +#define RADEON_FOG_3D_TABLE_END 0x1814 +#define RADEON_FOG_3D_TABLE_DENSITY 0x181c +#define RADEON_FOG_TABLE_INDEX 0x1a14 +#define RADEON_FOG_TABLE_DATA 0x1a18 +#define RADEON_FP_CRTC_H_TOTAL_DISP 0x0250 +#define RADEON_FP_CRTC_V_TOTAL_DISP 0x0254 +#define RADEON_FP_GEN_CNTL 0x0284 +# define RADEON_FP_FPON (1 << 0) +# define RADEON_FP_TDMS_EN (1 << 2) +# define RADEON_FP_DETECT_SENSE (1 << 8) +# define RADEON_FP_SEL_CRTC2 (1 << 13) +# define RADEON_FP_CRTC_DONT_SHADOW_VPAR (1 << 16) +# define RADEON_FP_CRTC_USE_SHADOW_VEND (1 << 18) +# define RADEON_FP_CRTC_HORZ_DIV2_EN (1 << 20) +# define RADEON_FP_CRTC_HOR_CRT_DIV2_DIS (1 << 21) +# define RADEON_FP_USE_SHADOW_EN (1 << 24) +#define RADEON_FP_H_SYNC_STRT_WID 0x02c4 +#define RADEON_FP_HORZ_STRETCH 0x028c +# define RADEON_HORZ_STRETCH_RATIO_MASK 0xffff +# define RADEON_HORZ_STRETCH_RATIO_SHIFT 0 +# define RADEON_HORZ_STRETCH_RATIO_MAX 4096 +# define RADEON_HORZ_PANEL_SIZE (0xff << 16) +# define RADEON_HORZ_PANEL_SHIFT 16 +# define RADEON_HORZ_STRETCH_PIXREP (0 << 25) +# define RADEON_HORZ_STRETCH_BLEND (1 << 25) +# define RADEON_HORZ_STRETCH_ENABLE (1 << 26) +# define RADEON_HORZ_FP_LOOP_STRETCH (0x7 << 27) +# define RADEON_HORZ_STRETCH_RESERVED (1 << 30) +# define RADEON_HORZ_AUTO_RATIO_FIX_EN (1 << 31) + +#define RADEON_FP_PANEL_CNTL 0x0288 +# define RADEON_FP_DIGON (1 << 0) +# define RADEON_FP_BLON (1 << 1) +#define RADEON_FP_V_SYNC_STRT_WID 0x02c8 +#define RADEON_FP_VERT_STRETCH 0x0290 +# define RADEON_VERT_PANEL_SIZE (0x7ff << 0) +# define RADEON_VERT_PANEL_SHIFT 0 +# define RADEON_VERT_STRETCH_RATIO_MASK 0x3ff +# define RADEON_VERT_STRETCH_RATIO_SHIFT 11 +# define RADEON_VERT_STRETCH_RATIO_MAX 1024 +# define RADEON_VERT_STRETCH_ENABLE (1 << 24) +# define RADEON_VERT_STRETCH_LINEREP (0 << 25) +# define RADEON_VERT_STRETCH_BLEND (1 << 25) +# define RADEON_VERT_AUTO_RATIO_EN (1 << 26) +# define RADEON_VERT_STRETCH_RESERVED 0xf8e00000 + +#define RADEON_GEN_INT_CNTL 0x0040 +#define RADEON_GEN_INT_STATUS 0x0044 +# define RADEON_VSYNC_INT_AK (1 << 2) +# define RADEON_VSYNC_INT (1 << 2) +#define RADEON_RBBM_SOFT_RESET 0x00f0 +# define RADEON_SOFT_RESET_CP (1 << 0) +# define RADEON_SOFT_RESET_HI (1 << 1) +# define RADEON_SOFT_RESET_SE (1 << 2) +# define RADEON_SOFT_RESET_RE (1 << 3) +# define RADEON_SOFT_RESET_PP (1 << 4) +# define RADEON_SOFT_RESET_E2 (1 << 5) +# define RADEON_SOFT_RESET_RB (1 << 6) +# define RADEON_SOFT_RESET_HDP (1 << 7) +#define RADEON_GENENB 0x03c3 /* VGA */ +#define RADEON_GENFC_RD 0x03ca /* VGA */ +#define RADEON_GENFC_WT 0x03da /* VGA, 0x03ba */ +#define RADEON_GENMO_RD 0x03cc /* VGA */ +#define RADEON_GENMO_WT 0x03c2 /* VGA */ +#define RADEON_GENS0 0x03c2 /* VGA */ +#define RADEON_GENS1 0x03da /* VGA, 0x03ba */ +#define RADEON_GPIO_MONID 0x0068 +# define RADEON_GPIO_MONID_A_0 (1 << 0) +# define RADEON_GPIO_MONID_A_1 (1 << 1) +# define RADEON_GPIO_MONID_A_2 (1 << 2) +# define RADEON_GPIO_MONID_A_3 (1 << 3) +# define RADEON_GPIO_MONID_Y_0 (1 << 8) +# define RADEON_GPIO_MONID_Y_1 (1 << 9) +# define RADEON_GPIO_MONID_Y_2 (1 << 10) +# define RADEON_GPIO_MONID_Y_3 (1 << 11) +# define RADEON_GPIO_MONID_EN_0 (1 << 16) +# define RADEON_GPIO_MONID_EN_1 (1 << 17) +# define RADEON_GPIO_MONID_EN_2 (1 << 18) +# define RADEON_GPIO_MONID_EN_3 (1 << 19) +# define RADEON_GPIO_MONID_MASK_0 (1 << 24) +# define RADEON_GPIO_MONID_MASK_1 (1 << 25) +# define RADEON_GPIO_MONID_MASK_2 (1 << 26) +# define RADEON_GPIO_MONID_MASK_3 (1 << 27) +#define RADEON_GPIO_MONIDB 0x006c +#define RADEON_GRPH8_DATA 0x03cf /* VGA */ +#define RADEON_GRPH8_IDX 0x03ce /* VGA */ +#define RADEON_GUI_DEBUG0 0x16a0 +#define RADEON_GUI_DEBUG1 0x16a4 +#define RADEON_GUI_DEBUG2 0x16a8 +#define RADEON_GUI_DEBUG3 0x16ac +#define RADEON_GUI_DEBUG4 0x16b0 +#define RADEON_GUI_DEBUG5 0x16b4 +#define RADEON_GUI_DEBUG6 0x16b8 +#define RADEON_GUI_SCRATCH_REG0 0x15e0 +#define RADEON_GUI_SCRATCH_REG1 0x15e4 +#define RADEON_GUI_SCRATCH_REG2 0x15e8 +#define RADEON_GUI_SCRATCH_REG3 0x15ec +#define RADEON_GUI_SCRATCH_REG4 0x15f0 +#define RADEON_GUI_SCRATCH_REG5 0x15f4 +#define RADEON_HEADER 0x0f0e /* PCI */ +#define RADEON_HOST_DATA0 0x17c0 +#define RADEON_HOST_DATA1 0x17c4 +#define RADEON_HOST_DATA2 0x17c8 +#define RADEON_HOST_DATA3 0x17cc +#define RADEON_HOST_DATA4 0x17d0 +#define RADEON_HOST_DATA5 0x17d4 +#define RADEON_HOST_DATA6 0x17d8 +#define RADEON_HOST_DATA7 0x17dc +#define RADEON_HOST_DATA_LAST 0x17e0 +#define RADEON_HOST_PATH_CNTL 0x0130 +#define RADEON_HTOTAL_CNTL 0x0009 /* PLL */ +#define RADEON_HW_DEBUG 0x0128 +#define RADEON_HW_DEBUG2 0x011c + +#define RADEON_I2C_CNTL_1 0x0094 /* ? */ +#define RADEON_INTERRUPT_LINE 0x0f3c /* PCI */ +#define RADEON_INTERRUPT_PIN 0x0f3d /* PCI */ +#define RADEON_IO_BASE 0x0f14 /* PCI */ + +#define RADEON_LATENCY 0x0f0d /* PCI */ +#define RADEON_LEAD_BRES_DEC 0x1608 +#define RADEON_LEAD_BRES_LNTH 0x161c +#define RADEON_LEAD_BRES_LNTH_SUB 0x1624 +#define RADEON_LVDS_GEN_CNTL 0x02d0 +# define RADEON_LVDS_ON (1 << 0) +# define RADEON_LVDS_BLON (1 << 19) +# define RADEON_LVDS_SEL_CRTC2 (1 << 23) +# define RADEON_HSYNC_DELAY_SHIFT 28 +# define RADEON_HSYNC_DELAY_MASK (0xf << 28) + +#define RADEON_MAX_LATENCY 0x0f3f /* PCI */ +#define RADEON_MC_AGP_LOCATION 0x014c +#define RADEON_MC_FB_LOCATION 0x0148 +#define RADEON_MCLK_CNTL 0x0012 /* PLL */ +# define RADEON_FORCE_GCP (1 << 16) +# define RADEON_FORCE_PIPE3D_CP (1 << 17) +# define RADEON_FORCE_RCP (1 << 18) +#define RADEON_MDGPIO_A_REG 0x01ac +#define RADEON_MDGPIO_EN_REG 0x01b0 +#define RADEON_MDGPIO_MASK 0x0198 +#define RADEON_MDGPIO_Y_REG 0x01b4 +#define RADEON_MEM_ADDR_CONFIG 0x0148 +#define RADEON_MEM_BASE 0x0f10 /* PCI */ +#define RADEON_MEM_CNTL 0x0140 +#define RADEON_MEM_INIT_LAT_TIMER 0x0154 +#define RADEON_MEM_INTF_CNTL 0x014c +#define RADEON_MEM_SDRAM_MODE_REG 0x0158 +#define RADEON_MEM_STR_CNTL 0x0150 +#define RADEON_MEM_VGA_RP_SEL 0x003c +#define RADEON_MEM_VGA_WP_SEL 0x0038 +#define RADEON_MIN_GRANT 0x0f3e /* PCI */ +#define RADEON_MM_DATA 0x0004 +#define RADEON_MM_INDEX 0x0000 +#define RADEON_MPLL_CNTL 0x000e /* PLL */ +#define RADEON_MPP_TB_CONFIG 0x01c0 /* ? */ +#define RADEON_MPP_GP_CONFIG 0x01c8 /* ? */ + +#define RADEON_N_VIF_COUNT 0x0248 + +#define RADEON_OV0_SCALE_CNTL 0x0420 /* ? */ +#define RADEON_OVR_CLR 0x0230 +#define RADEON_OVR_WID_LEFT_RIGHT 0x0234 +#define RADEON_OVR_WID_TOP_BOTTOM 0x0238 + +/* first overlay unit (there is only one) */ + +#define RADEON_OV0_Y_X_START 0x0400 +#define RADEON_OV0_Y_X_END 0x0404 +#define RADEON_OV0_EXCLUSIVE_HORZ 0x0408 +# define RADEON_EXCL_HORZ_START_MASK 0x000000ff +# define RADEON_EXCL_HORZ_END_MASK 0x0000ff00 +# define RADEON_EXCL_HORZ_BACK_PORCH_MASK 0x00ff0000 +# define RADEON_EXCL_HORZ_EXCLUSIVE_EN 0x80000000 +#define RADEON_OV0_EXCLUSIVE_VERT 0x040C +# define RADEON_EXCL_VERT_START_MASK 0x000003ff +# define RADEON_EXCL_VERT_END_MASK 0x03ff0000 +#define RADEON_OV0_REG_LOAD_CNTL 0x0410 +# define RADEON_REG_LD_CTL_LOCK 0x00000001L +# define RADEON_REG_LD_CTL_VBLANK_DURING_LOCK 0x00000002L +# define RADEON_REG_LD_CTL_STALL_GUI_UNTIL_FLIP 0x00000004L +# define RADEON_REG_LD_CTL_LOCK_READBACK 0x00000008L +#define RADEON_OV0_SCALE_CNTL 0x0420 +# define RADEON_SCALER_PIX_EXPAND 0x00000001L +# define RADEON_SCALER_Y2R_TEMP 0x00000002L +# define RADEON_SCALER_HORZ_PICK_NEAREST 0x00000003L +# define RADEON_SCALER_VERT_PICK_NEAREST 0x00000004L +# define RADEON_SCALER_SIGNED_UV 0x00000010L +# define RADEON_SCALER_GAMMA_SEL_MASK 0x00000060L +# define RADEON_SCALER_GAMMA_SEL_BRIGHT 0x00000000L +# define RADEON_SCALER_GAMMA_SEL_G22 0x00000020L +# define RADEON_SCALER_GAMMA_SEL_G18 0x00000040L +# define RADEON_SCALER_GAMMA_SEL_G14 0x00000060L +# define RADEON_SCALER_COMCORE_SHIFT_UP_ONE 0x00000080L +# define RADEON_SCALER_SURFAC_FORMAT 0x00000f00L +# define RADEON_SCALER_SOURCE_15BPP 0x00000300L +# define RADEON_SCALER_SOURCE_16BPP 0x00000400L +# define RADEON_SCALER_SOURCE_32BPP 0x00000600L +# define RADEON_SCALER_SOURCE_YUV9 0x00000900L +# define RADEON_SCALER_SOURCE_YUV12 0x00000A00L +# define RADEON_SCALER_SOURCE_VYUY422 0x00000B00L +# define RADEON_SCALER_SOURCE_YVYU422 0x00000C00L +# define RADEON_SCALER_SMART_SWITCH 0x00008000L +# define RADEON_SCALER_BURST_PER_PLANE 0x00ff0000L +# define RADEON_SCALER_DOUBLE_BUFFER 0x01000000L +# define RADEON_SCALER_DIS_LIMIT 0x08000000L +# define RADEON_SCALER_PRG_LOAD_START 0x10000000L +# define RADEON_SCALER_INT_EMU 0x20000000L +# define RADEON_SCALER_ENABLE 0x40000000L +# define RADEON_SCALER_SOFT_RESET 0x80000000L +#define RADEON_OV0_V_INC 0x0424 +#define RADEON_OV0_P1_V_ACCUM_INIT 0x0428 +# define RADEON_OV0_P1_MAX_LN_IN_PER_LN_OUT 0x00000003L +# define RADEON_OV0_P1_V_ACCUM_INIT_MASK 0x01ff8000L +#define RADEON_OV0_P23_V_ACCUM_INIT 0x042C +#define RADEON_OV0_P1_BLANK_LINES_AT_TOP 0x0430 +# define RADEON_P1_BLNK_LN_AT_TOP_M1_MASK 0x00000fffL +# define RADEON_P1_ACTIVE_LINES_M1 0x0fff0000L +#define RADEON_OV0_P23_BLANK_LINES_AT_TOP 0x0434 +# define RADEON_P23_BLNK_LN_AT_TOP_M1_MASK 0x000007ffL +# define RADEON_P23_ACTIVE_LINES_M1 0x07ff0000L +#define RADEON_OV0_VID_BUF0_BASE_ADRS 0x0440 +# define RADEON_VIF_BUF0_PITCH_SEL 0x00000001L +# define RADEON_VIF_BUF0_TILE_ADRS 0x00000002L +# define RADEON_VIF_BUF0_BASE_ADRS_MASK 0x03fffff0L +# define RADEON_VIF_BUF0_1ST_LINE_LSBS_MASK 0x48000000L +#define RADEON_OV0_VID_BUF1_BASE_ADRS 0x0444 +# define RADEON_VIF_BUF1_PITCH_SEL 0x00000001L +# define RADEON_VIF_BUF1_TILE_ADRS 0x00000002L +# define RADEON_VIF_BUF1_BASE_ADRS_MASK 0x03fffff0L +# define RADEON_VIF_BUF1_1ST_LINE_LSBS_MASK 0x48000000L +#define RADEON_OV0_VID_BUF2_BASE_ADRS 0x0448 +# define RADEON_VIF_BUF2_PITCH_SEL 0x00000001L +# define RADEON_VIF_BUF2_TILE_ADRS 0x00000002L +# define RADEON_VIF_BUF2_BASE_ADRS_MASK 0x03fffff0L +# define RADEON_VIF_BUF2_1ST_LINE_LSBS_MASK 0x48000000L +#define RADEON_OV0_VID_BUF3_BASE_ADRS 0x044C +#define RADEON_OV0_VID_BUF4_BASE_ADRS 0x0450 +#define RADEON_OV0_VID_BUF5_BASE_ADRS 0x0454 +#define RADEON_OV0_VID_BUF_PITCH0_VALUE 0x0460 +#define RADEON_OV0_VID_BUF_PITCH1_VALUE 0x0464 +#define RADEON_OV0_AUTO_FLIP_CNTL 0x0470 +#define RADEON_OV0_DEINTERLACE_PATTERN 0x0474 +#define RADEON_OV0_H_INC 0x0480 +#define RADEON_OV0_STEP_BY 0x0484 +#define RADEON_OV0_P1_H_ACCUM_INIT 0x0488 +#define RADEON_OV0_P23_H_ACCUM_INIT 0x048C +#define RADEON_OV0_P1_X_START_END 0x0494 +#define RADEON_OV0_P2_X_START_END 0x0498 +#define RADEON_OV0_P3_X_START_END 0x049C +#define RADEON_OV0_FILTER_CNTL 0x04A0 +#define RADEON_OV0_FOUR_TAP_COEF_0 0x04B0 +#define RADEON_OV0_FOUR_TAP_COEF_1 0x04B4 +#define RADEON_OV0_FOUR_TAP_COEF_2 0x04B8 +#define RADEON_OV0_FOUR_TAP_COEF_3 0x04BC +#define RADEON_OV0_FOUR_TAP_COEF_4 0x04C0 +#define RADEON_OV0_COLOUR_CNTL 0x04E0 +#define RADEON_OV0_VIDEO_KEY_CLR 0x04E4 +#define RADEON_OV0_VIDEO_KEY_MSK 0x04E8 +#define RADEON_OV0_GRAPHICS_KEY_CLR 0x04EC +#define RADEON_OV0_GRAPHICS_KEY_MSK 0x04F0 +#define RADEON_OV0_KEY_CNTL 0x04F4 +# define RADEON_VIDEO_KEY_FN_MASK 0x00000007L +# define RADEON_VIDEO_KEY_FN_FALSE 0x00000000L +# define RADEON_VIDEO_KEY_FN_TRUE 0x00000001L +# define RADEON_VIDEO_KEY_FN_EQ 0x00000004L +# define RADEON_VIDEO_KEY_FN_NE 0x00000005L +# define RADEON_GRAPHIC_KEY_FN_MASK 0x00000070L +# define RADEON_GRAPHIC_KEY_FN_FALSE 0x00000000L +# define RADEON_GRAPHIC_KEY_FN_TRUE 0x00000010L +# define RADEON_GRAPHIC_KEY_FN_EQ 0x00000040L +# define RADEON_GRAPHIC_KEY_FN_NE 0x00000050L +# define RADEON_CMP_MIX_MASK 0x00000100L +# define RADEON_CMP_MIX_OR 0x00000000L +# define RADEON_CMP_MIX_AND 0x00000100L +#define RADEON_OV0_TEST 0x04F8 + +#define RADEON_PALETTE_DATA 0x00b4 +#define RADEON_PALETTE_30_DATA 0x00b8 +#define RADEON_PALETTE_INDEX 0x00b0 +#define RADEON_PCI_GART_PAGE 0x017c +#define RADEON_PLANE_3D_MASK_C 0x1d44 +#define RADEON_PLL_TEST_CNTL 0x0013 /* PLL */ +#define RADEON_PMI_CAP_ID 0x0f5c /* PCI */ +#define RADEON_PMI_DATA 0x0f63 /* PCI */ +#define RADEON_PMI_NXT_CAP_PTR 0x0f5d /* PCI */ +#define RADEON_PMI_PMC_REG 0x0f5e /* PCI */ +#define RADEON_PMI_PMCSR_REG 0x0f60 /* PCI */ +#define RADEON_PMI_REGISTER 0x0f5c /* PCI */ +#define RADEON_PPLL_CNTL 0x0002 /* PLL */ +# define RADEON_PPLL_RESET (1 << 0) +# define RADEON_PPLL_SLEEP (1 << 1) +# define RADEON_PPLL_ATOMIC_UPDATE_EN (1 << 16) +# define RADEON_PPLL_VGA_ATOMIC_UPDATE_EN (1 << 17) +# define RADEON_PPLL_ATOMIC_UPDATE_VSYNC (1 << 18) +#define RADEON_PPLL_DIV_0 0x0004 /* PLL */ +#define RADEON_PPLL_DIV_1 0x0005 /* PLL */ +#define RADEON_PPLL_DIV_2 0x0006 /* PLL */ +#define RADEON_PPLL_DIV_3 0x0007 /* PLL */ +# define RADEON_PPLL_FB3_DIV_MASK 0x07ff +# define RADEON_PPLL_POST3_DIV_MASK 0x00070000 +#define RADEON_PPLL_REF_DIV 0x0003 /* PLL */ +# define RADEON_PPLL_REF_DIV_MASK 0x03ff +# define RADEON_PPLL_ATOMIC_UPDATE_R (1 << 15) /* same as _W */ +# define RADEON_PPLL_ATOMIC_UPDATE_W (1 << 15) /* same as _R */ +#define RADEON_PWR_MNGMT_CNTL_STATUS 0x0f60 /* PCI */ +#define RADEON_RBBM_SOFT_RESET 0x00f0 +#define RADEON_RBBM_STATUS 0x0e40 +# define RADEON_RBBM_FIFOCNT_MASK 0x007f +# define RADEON_RBBM_ACTIVE (1 << 31) +#define RADEON_RB2D_DSTCACHE_CTLSTAT 0x342c +# define RADEON_RB2D_DC_FLUSH_ALL 0xf +# define RADEON_RB2D_DC_BUSY (1 << 31) +#define RADEON_RB2D_DSTCACHE_MODE 0x3428 +#define RADEON_REG_BASE 0x0f18 /* PCI */ +#define RADEON_REGPROG_INF 0x0f09 /* PCI */ +#define RADEON_REVISION_ID 0x0f08 /* PCI */ + +#define RADEON_SC_BOTTOM 0x164c +#define RADEON_SC_BOTTOM_RIGHT 0x16f0 +#define RADEON_SC_BOTTOM_RIGHT_C 0x1c8c +#define RADEON_SC_LEFT 0x1640 +#define RADEON_SC_RIGHT 0x1644 +#define RADEON_SC_TOP 0x1648 +#define RADEON_SC_TOP_LEFT 0x16ec +#define RADEON_SC_TOP_LEFT_C 0x1c88 +#define RADEON_SDRAM_MODE_REG 0x0158 +#define RADEON_SEQ8_DATA 0x03c5 /* VGA */ +#define RADEON_SEQ8_IDX 0x03c4 /* VGA */ +#define RADEON_SNAPSHOT_F_COUNT 0x0244 +#define RADEON_SNAPSHOT_VH_COUNTS 0x0240 +#define RADEON_SNAPSHOT_VIF_COUNT 0x024c +#define RADEON_SRC_OFFSET 0x15ac +#define RADEON_SRC_PITCH 0x15b0 +#define RADEON_SRC_PITCH_OFFSET 0x1428 +#define RADEON_SRC_SC_BOTTOM 0x165c +#define RADEON_SRC_SC_BOTTOM_RIGHT 0x16f4 +#define RADEON_SRC_SC_RIGHT 0x1654 +#define RADEON_SRC_X 0x1414 +#define RADEON_SRC_X_Y 0x1590 +#define RADEON_SRC_Y 0x1418 +#define RADEON_SRC_Y_X 0x1434 +#define RADEON_STATUS 0x0f06 /* PCI */ +#define RADEON_SUBPIC_CNTL 0x0540 /* ? */ +#define RADEON_SUB_CLASS 0x0f0a /* PCI */ +#define RADEON_SURFACE_DELAY 0x0b00 +#define RADEON_SURFACE0_INFO 0x0b0c +#define RADEON_SURFACE0_LOWER_BOUND 0x0b04 +#define RADEON_SURFACE0_UPPER_BOUND 0x0b08 +#define RADEON_SURFACE1_INFO 0x0b1c +#define RADEON_SURFACE1_LOWER_BOUND 0x0b14 +#define RADEON_SURFACE1_UPPER_BOUND 0x0b18 +#define RADEON_SURFACE2_INFO 0x0b2c +#define RADEON_SURFACE2_LOWER_BOUND 0x0b24 +#define RADEON_SURFACE2_UPPER_BOUND 0x0b28 +#define RADEON_SURFACE3_INFO 0x0b3c +#define RADEON_SURFACE3_LOWER_BOUND 0x0b34 +#define RADEON_SURFACE3_UPPER_BOUND 0x0b38 +#define RADEON_SW_SEMAPHORE 0x013c + +#define RADEON_TEST_DEBUG_CNTL 0x0120 +#define RADEON_TEST_DEBUG_MUX 0x0124 +#define RADEON_TEST_DEBUG_OUT 0x012c +#define RADEON_TMDS_CRC 0x02a0 +#define RADEON_TRAIL_BRES_DEC 0x1614 +#define RADEON_TRAIL_BRES_ERR 0x160c +#define RADEON_TRAIL_BRES_INC 0x1610 +#define RADEON_TRAIL_X 0x1618 +#define RADEON_TRAIL_X_SUB 0x1620 + +#define RADEON_VCLK_ECP_CNTL 0x0008 /* PLL */ +#define RADEON_VENDOR_ID 0x0f00 /* PCI */ +#define RADEON_VGA_DDA_CONFIG 0x02e8 +#define RADEON_VGA_DDA_ON_OFF 0x02ec +#define RADEON_VID_BUFFER_CONTROL 0x0900 +#define RADEON_VIDEOMUX_CNTL 0x0190 +#define RADEON_VIPH_CONTROL 0x0c40 /* ? */ + +#define RADEON_WAIT_UNTIL 0x1720 + +#define RADEON_X_MPLL_REF_FB_DIV 0x000a /* PLL */ +#define RADEON_XCLK_CNTL 0x000d /* PLL */ +#define RADEON_XDLL_CNTL 0x000c /* PLL */ +#define RADEON_XPLL_CNTL 0x000b /* PLL */ + + /* Registers for CCE and Microcode Engine */ +#define RADEON_CP_ME_RAM_ADDR 0x07d4 +#define RADEON_CP_ME_RAM_RADDR 0x07d8 +#define RADEON_CP_ME_RAM_DATAH 0x07dc +#define RADEON_CP_ME_RAM_DATAL 0x07e0 + +#define RADEON_CP_RB_BASE 0x0700 +#define RADEON_CP_RB_CNTL 0x0704 +#define RADEON_CP_RB_RPTR_ADDR 0x070c +#define RADEON_CP_RB_RPTR 0x0710 +#define RADEON_CP_RB_WPTR 0x0714 +# define RADEON_PM4_BUFFER_DL_DONE (1 << 31) + +#define RADEON_CP_IB_BASE 0x0738 +#define RADEON_CP_IB_BUFSZ 0x073c + +#define RADEON_CP_CSQ_CNTL 0x0740 +# define RADEON_CSQ_PRIDIS_INDDIS (0 << 28) +# define RADEON_CSQ_PRIPIO_INDDIS (1 << 28) +# define RADEON_CSQ_PRIBM_INDDIS (2 << 28) +# define RADEON_CSQ_PRIPIO_INDBM (3 << 28) +# define RADEON_CSQ_PRIBM_INDBM (4 << 28) +# define RADEON_CSQ_PRIPIO_INDPIO (15 << 28) +#define RADEON_CP_RB_WPTR_DELAY 0x0718 +# define RADEON_PRE_WRITE_TIMER_SHIFT 0 +# define RADEON_PRE_WRITE_LIMIT_SHIFT 23 + +#define RADEON_AIC_CNTL 0x01d0 +# define RADEON_PCIGART_TRANSLATE_EN (1 << 0) + +#define RADEON_PM4_VC_FPU_SETUP 0x071c +# define RADEON_FRONT_DIR_CW (0 << 0) +# define RADEON_FRONT_DIR_CCW (1 << 0) +# define RADEON_FRONT_DIR_MASK (1 << 0) +# define RADEON_BACKFACE_CULL (0 << 1) +# define RADEON_BACKFACE_POINTS (1 << 1) +# define RADEON_BACKFACE_LINES (2 << 1) +# define RADEON_BACKFACE_SOLID (3 << 1) +# define RADEON_BACKFACE_MASK (3 << 1) +# define RADEON_FRONTFACE_CULL (0 << 3) +# define RADEON_FRONTFACE_POINTS (1 << 3) +# define RADEON_FRONTFACE_LINES (2 << 3) +# define RADEON_FRONTFACE_SOLID (3 << 3) +# define RADEON_FRONTFACE_MASK (3 << 3) +# define RADEON_FPU_COLOR_SOLID (0 << 5) +# define RADEON_FPU_COLOR_FLAT (1 << 5) +# define RADEON_FPU_COLOR_GOURAUD (2 << 5) +# define RADEON_FPU_COLOR_GOURAUD2 (3 << 5) +# define RADEON_FPU_COLOR_MASK (3 << 5) +# define RADEON_FPU_SUB_PIX_2BITS (0 << 7) +# define RADEON_FPU_SUB_PIX_4BITS (1 << 7) +# define RADEON_FPU_MODE_2D (0 << 8) +# define RADEON_FPU_MODE_3D (1 << 8) +# define RADEON_TRAP_BITS_DISABLE (1 << 9) +# define RADEON_EDGE_ANTIALIAS (1 << 10) +# define RADEON_SUPERSAMPLE (1 << 11) +# define RADEON_XFACTOR_2 (0 << 12) +# define RADEON_XFACTOR_4 (1 << 12) +# define RADEON_YFACTOR_2 (0 << 13) +# define RADEON_YFACTOR_4 (1 << 13) +# define RADEON_FLAT_SHADE_VERTEX_D3D (0 << 14) +# define RADEON_FLAT_SHADE_VERTEX_OGL (1 << 14) +# define RADEON_FPU_ROUND_TRUNCATE (0 << 15) +# define RADEON_FPU_ROUND_NEAREST (1 << 15) +# define RADEON_WM_SEL_8DW (0 << 16) +# define RADEON_WM_SEL_16DW (1 << 16) +# define RADEON_WM_SEL_32DW (2 << 16) +#define RADEON_PM4_VC_DEBUG_CONFIG 0x07a4 +#define RADEON_PM4_VC_STAT 0x07a8 +#define RADEON_PM4_VC_TIMESTAMP0 0x07b0 +#define RADEON_PM4_VC_TIMESTAMP1 0x07b4 +#define RADEON_PM4_STAT 0x07b8 +# define RADEON_PM4_FIFOCNT_MASK 0x0fff +# define RADEON_PM4_BUSY (1 << 16) +# define RADEON_PM4_GUI_ACTIVE (1 << 31) +#define RADEON_PM4_BUFFER_ADDR 0x07f0 +#define RADEON_CP_ME_CNTL 0x07d0 +# define RADEON_CP_ME_FREERUN (1 << 30) +#define RADEON_PM4_FIFO_DATA_EVEN 0x1000 +#define RADEON_PM4_FIFO_DATA_ODD 0x1004 + +#define RADEON_SCALE_3D_CNTL 0x1a00 +# define RADEON_SCALE_DITHER_ERR_DIFF (0 << 1) +# define RADEON_SCALE_DITHER_TABLE (1 << 1) +# define RADEON_TEX_CACHE_SIZE_FULL (0 << 2) +# define RADEON_TEX_CACHE_SIZE_HALF (1 << 2) +# define RADEON_DITHER_INIT_CURR (0 << 3) +# define RADEON_DITHER_INIT_RESET (1 << 3) +# define RADEON_ROUND_24BIT (1 << 4) +# define RADEON_TEX_CACHE_DISABLE (1 << 5) +# define RADEON_SCALE_3D_NOOP (0 << 6) +# define RADEON_SCALE_3D_SCALE (1 << 6) +# define RADEON_SCALE_3D_TEXMAP_SHADE (2 << 6) +# define RADEON_SCALE_PIX_BLEND (0 << 8) +# define RADEON_SCALE_PIX_REPLICATE (1 << 8) +# define RADEON_TEX_CACHE_SPLIT (1 << 9) +# define RADEON_APPLE_YUV_MODE (1 << 10) +# define RADEON_TEX_CACHE_PALLETE_MODE (1 << 11) +# define RADEON_ALPHA_COMB_ADD_CLAMP (0 << 12) +# define RADEON_ALPHA_COMB_ADD_NCLAMP (1 << 12) +# define RADEON_ALPHA_COMB_SUB_DST_SRC_CLAMP (2 << 12) +# define RADEON_ALPHA_COMB_SUB_DST_SRC_NCLAMP (3 << 12) +# define RADEON_FOG_TABLE (1 << 14) +# define RADEON_SIGNED_DST_CLAMP (1 << 15) +# define RADEON_ALPHA_BLEND_SRC_ZERO (0 << 16) +# define RADEON_ALPHA_BLEND_SRC_ONE (1 << 16) +# define RADEON_ALPHA_BLEND_SRC_SRCCOLOR (2 << 16) +# define RADEON_ALPHA_BLEND_SRC_INVSRCCOLOR (3 << 16) +# define RADEON_ALPHA_BLEND_SRC_SRCALPHA (4 << 16) +# define RADEON_ALPHA_BLEND_SRC_INVSRCALPHA (5 << 16) +# define RADEON_ALPHA_BLEND_SRC_DSTALPHA (6 << 16) +# define RADEON_ALPHA_BLEND_SRC_INVDSTALPHA (7 << 16) +# define RADEON_ALPHA_BLEND_SRC_DSTCOLOR (8 << 16) +# define RADEON_ALPHA_BLEND_SRC_INVDSTCOLOR (9 << 16) +# define RADEON_ALPHA_BLEND_SRC_SAT (10 << 16) +# define RADEON_ALPHA_BLEND_SRC_BLEND (11 << 16) +# define RADEON_ALPHA_BLEND_SRC_INVBLEND (12 << 16) +# define RADEON_ALPHA_BLEND_DST_ZERO (0 << 20) +# define RADEON_ALPHA_BLEND_DST_ONE (1 << 20) +# define RADEON_ALPHA_BLEND_DST_SRCCOLOR (2 << 20) +# define RADEON_ALPHA_BLEND_DST_INVSRCCOLOR (3 << 20) +# define RADEON_ALPHA_BLEND_DST_SRCALPHA (4 << 20) +# define RADEON_ALPHA_BLEND_DST_INVSRCALPHA (5 << 20) +# define RADEON_ALPHA_BLEND_DST_DSTALPHA (6 << 20) +# define RADEON_ALPHA_BLEND_DST_INVDSTALPHA (7 << 20) +# define RADEON_ALPHA_BLEND_DST_DSTCOLOR (8 << 20) +# define RADEON_ALPHA_BLEND_DST_INVDSTCOLOR (9 << 20) +# define RADEON_ALPHA_TEST_NEVER (0 << 24) +# define RADEON_ALPHA_TEST_LESS (1 << 24) +# define RADEON_ALPHA_TEST_LESSEQUAL (2 << 24) +# define RADEON_ALPHA_TEST_EQUAL (3 << 24) +# define RADEON_ALPHA_TEST_GREATEREQUAL (4 << 24) +# define RADEON_ALPHA_TEST_GREATER (5 << 24) +# define RADEON_ALPHA_TEST_NEQUAL (6 << 24) +# define RADEON_ALPHA_TEST_ALWAYS (7 << 24) +# define RADEON_COMPOSITE_SHADOW_CMP_EQUAL (0 << 28) +# define RADEON_COMPOSITE_SHADOW_CMP_NEQUAL (1 << 28) +# define RADEON_COMPOSITE_SHADOW (1 << 29) +# define RADEON_TEX_MAP_ALPHA_IN_TEXTURE (1 << 30) +# define RADEON_TEX_CACHE_LINE_SIZE_8QW (0 << 31) +# define RADEON_TEX_CACHE_LINE_SIZE_4QW (1 << 31) +#define RADEON_SCALE_3D_DATATYPE 0x1a20 + +#define RADEON_SETUP_CNTL 0x1bc4 +# define RADEON_DONT_START_TRIANGLE (1 << 0) +# define RADEON_Z_BIAS (0 << 1) +# define RADEON_DONT_START_ANY_ON (1 << 2) +# define RADEON_COLOR_SOLID_COLOR (0 << 3) +# define RADEON_COLOR_FLAT_VERT_1 (1 << 3) +# define RADEON_COLOR_FLAT_VERT_2 (2 << 3) +# define RADEON_COLOR_FLAT_VERT_3 (3 << 3) +# define RADEON_COLOR_GOURAUD (4 << 3) +# define RADEON_PRIM_TYPE_TRI (0 << 7) +# define RADEON_PRIM_TYPE_LINE (1 << 7) +# define RADEON_PRIM_TYPE_POINT (2 << 7) +# define RADEON_PRIM_TYPE_POLY_EDGE (3 << 7) +# define RADEON_TEXTURE_ST_MULT_W (0 << 9) +# define RADEON_TEXTURE_ST_DIRECT (1 << 9) +# define RADEON_STARTING_VERTEX_1 (1 << 14) +# define RADEON_STARTING_VERTEX_2 (2 << 14) +# define RADEON_STARTING_VERTEX_3 (3 << 14) +# define RADEON_ENDING_VERTEX_1 (1 << 16) +# define RADEON_ENDING_VERTEX_2 (2 << 16) +# define RADEON_ENDING_VERTEX_3 (3 << 16) +# define RADEON_SU_POLY_LINE_LAST (0 << 18) +# define RADEON_SU_POLY_LINE_NOT_LAST (1 << 18) +# define RADEON_SUB_PIX_2BITS (0 << 19) +# define RADEON_SUB_PIX_4BITS (1 << 19) +# define RADEON_SET_UP_CONTINUE (1 << 31) + +#define RADEON_WINDOW_XY_OFFSET 0x1bcc +# define RADEON_WINDOW_Y_SHIFT 4 +# define RADEON_WINDOW_X_SHIFT 20 + +#define RADEON_Z_OFFSET_C 0x1c90 +#define RADEON_Z_PITCH_C 0x1c94 +#define RADEON_Z_STEN_CNTL_C 0x1c98 +# define RADEON_Z_PIX_WIDTH_16 (0 << 1) +# define RADEON_Z_PIX_WIDTH_24 (1 << 1) +# define RADEON_Z_PIX_WIDTH_32 (2 << 1) +# define RADEON_Z_PIX_WIDTH_MASK (3 << 1) +# define RADEON_Z_TEST_NEVER (0 << 4) +# define RADEON_Z_TEST_LESS (1 << 4) +# define RADEON_Z_TEST_LESSEQUAL (2 << 4) +# define RADEON_Z_TEST_EQUAL (3 << 4) +# define RADEON_Z_TEST_GREATEREQUAL (4 << 4) +# define RADEON_Z_TEST_GREATER (5 << 4) +# define RADEON_Z_TEST_NEQUAL (6 << 4) +# define RADEON_Z_TEST_ALWAYS (7 << 4) +# define RADEON_Z_TEST_MASK (7 << 4) +# define RADEON_STENCIL_TEST_NEVER (0 << 12) +# define RADEON_STENCIL_TEST_LESS (1 << 12) +# define RADEON_STENCIL_TEST_LESSEQUAL (2 << 12) +# define RADEON_STENCIL_TEST_EQUAL (3 << 12) +# define RADEON_STENCIL_TEST_GREATEREQUAL (4 << 12) +# define RADEON_STENCIL_TEST_GREATER (5 << 12) +# define RADEON_STENCIL_TEST_NEQUAL (6 << 12) +# define RADEON_STENCIL_TEST_ALWAYS (7 << 12) +# define RADEON_STENCIL_S_FAIL_KEEP (0 << 16) +# define RADEON_STENCIL_S_FAIL_ZERO (1 << 16) +# define RADEON_STENCIL_S_FAIL_REPLACE (2 << 16) +# define RADEON_STENCIL_S_FAIL_INC (3 << 16) +# define RADEON_STENCIL_S_FAIL_DEC (4 << 16) +# define RADEON_STENCIL_S_FAIL_INV (5 << 16) +# define RADEON_STENCIL_ZPASS_KEEP (0 << 20) +# define RADEON_STENCIL_ZPASS_ZERO (1 << 20) +# define RADEON_STENCIL_ZPASS_REPLACE (2 << 20) +# define RADEON_STENCIL_ZPASS_INC (3 << 20) +# define RADEON_STENCIL_ZPASS_DEC (4 << 20) +# define RADEON_STENCIL_ZPASS_INV (5 << 20) +# define RADEON_STENCIL_ZFAIL_KEEP (0 << 24) +# define RADEON_STENCIL_ZFAIL_ZERO (1 << 24) +# define RADEON_STENCIL_ZFAIL_REPLACE (2 << 24) +# define RADEON_STENCIL_ZFAIL_INC (3 << 24) +# define RADEON_STENCIL_ZFAIL_DEC (4 << 24) +# define RADEON_STENCIL_ZFAIL_INV (5 << 24) +#define RADEON_TEX_CNTL_C 0x1c9c +# define RADEON_Z_ENABLE (1 << 0) +# define RADEON_Z_WRITE_ENABLE (1 << 1) +# define RADEON_STENCIL_ENABLE (1 << 3) +# define RADEON_SHADE_ENABLE (0 << 4) +# define RADEON_TEXMAP_ENABLE (1 << 4) +# define RADEON_SEC_TEXMAP_ENABLE (1 << 5) +# define RADEON_FOG_ENABLE (1 << 7) +# define RADEON_DITHER_ENABLE (1 << 8) +# define RADEON_ALPHA_ENABLE (1 << 9) +# define RADEON_ALPHA_TEST_ENABLE (1 << 10) +# define RADEON_SPEC_LIGHT_ENABLE (1 << 11) +# define RADEON_TEX_CHROMA_KEY_ENABLE (1 << 12) +# define RADEON_ALPHA_IN_TEX_COMPLETE_A (0 << 13) +# define RADEON_ALPHA_IN_TEX_LSB_A (1 << 13) +# define RADEON_LIGHT_DIS (0 << 14) +# define RADEON_LIGHT_COPY (1 << 14) +# define RADEON_LIGHT_MODULATE (2 << 14) +# define RADEON_LIGHT_ADD (3 << 14) +# define RADEON_LIGHT_BLEND_CONSTANT (4 << 14) +# define RADEON_LIGHT_BLEND_TEXTURE (5 << 14) +# define RADEON_LIGHT_BLEND_VERTEX (6 << 14) +# define RADEON_LIGHT_BLEND_CONST_COLOR (7 << 14) +# define RADEON_ALPHA_LIGHT_DIS (0 << 18) +# define RADEON_ALPHA_LIGHT_COPY (1 << 18) +# define RADEON_ALPHA_LIGHT_MODULATE (2 << 18) +# define RADEON_ALPHA_LIGHT_ADD (3 << 18) +# define RADEON_ANTI_ALIAS (1 << 21) +# define RADEON_TEX_CACHE_FLUSH (1 << 23) +# define RADEON_LOD_BIAS_SHIFT 24 +#define RADEON_MISC_3D_STATE_CNTL_REG 0x1ca0 +# define RADEON_REF_ALPHA_MASK 0xff +# define RADEON_MISC_SCALE_3D_NOOP (0 << 8) +# define RADEON_MISC_SCALE_3D_SCALE (1 << 8) +# define RADEON_MISC_SCALE_3D_TEXMAP_SHADE (2 << 8) +# define RADEON_MISC_SCALE_PIX_BLEND (0 << 10) +# define RADEON_MISC_SCALE_PIX_REPLICATE (1 << 10) +# define RADEON_ALPHA_COMB_ADD_CLAMP (0 << 12) +# define RADEON_ALPHA_COMB_ADD_NO_CLAMP (1 << 12) +# define RADEON_ALPHA_COMB_SUB_SRC_DST_CLAMP (2 << 12) +# define RADEON_ALPHA_COMB_SUB_SRC_DST_NO_CLAMP (3 << 12) +# define RADEON_FOG_VERTEX (0 << 14) +# define RADEON_FOG_TABLE (1 << 14) +# define RADEON_ALPHA_BLEND_SRC_ZERO (0 << 16) +# define RADEON_ALPHA_BLEND_SRC_ONE (1 << 16) +# define RADEON_ALPHA_BLEND_SRC_SRCCOLOR (2 << 16) +# define RADEON_ALPHA_BLEND_SRC_INVSRCCOLOR (3 << 16) +# define RADEON_ALPHA_BLEND_SRC_SRCALPHA (4 << 16) +# define RADEON_ALPHA_BLEND_SRC_INVSRCALPHA (5 << 16) +# define RADEON_ALPHA_BLEND_SRC_DESTALPHA (6 << 16) +# define RADEON_ALPHA_BLEND_SRC_INVDESTALPHA (7 << 16) +# define RADEON_ALPHA_BLEND_SRC_DESTCOLOR (8 << 16) +# define RADEON_ALPHA_BLEND_SRC_INVDESTCOLOR (9 << 16) +# define RADEON_ALPHA_BLEND_SRC_SRCALPHASAT (10 << 16) +# define RADEON_ALPHA_BLEND_SRC_BOTHSRCALPHA (11 << 16) +# define RADEON_ALPHA_BLEND_SRC_BOTHINVSRCALPHA (12 << 16) +# define RADEON_ALPHA_BLEND_SRC_MASK (15 << 16) +# define RADEON_ALPHA_BLEND_DST_ZERO (0 << 20) +# define RADEON_ALPHA_BLEND_DST_ONE (1 << 20) +# define RADEON_ALPHA_BLEND_DST_SRCCOLOR (2 << 20) +# define RADEON_ALPHA_BLEND_DST_INVSRCCOLOR (3 << 20) +# define RADEON_ALPHA_BLEND_DST_SRCALPHA (4 << 20) +# define RADEON_ALPHA_BLEND_DST_INVSRCALPHA (5 << 20) +# define RADEON_ALPHA_BLEND_DST_DESTALPHA (6 << 20) +# define RADEON_ALPHA_BLEND_DST_INVDESTALPHA (7 << 20) +# define RADEON_ALPHA_BLEND_DST_DESTCOLOR (8 << 20) +# define RADEON_ALPHA_BLEND_DST_INVDESTCOLOR (9 << 20) +# define RADEON_ALPHA_BLEND_DST_SRCALPHASAT (10 << 20) +# define RADEON_ALPHA_BLEND_DST_MASK (15 << 20) +# define RADEON_ALPHA_TEST_NEVER (0 << 24) +# define RADEON_ALPHA_TEST_LESS (1 << 24) +# define RADEON_ALPHA_TEST_LESSEQUAL (2 << 24) +# define RADEON_ALPHA_TEST_EQUAL (3 << 24) +# define RADEON_ALPHA_TEST_GREATEREQUAL (4 << 24) +# define RADEON_ALPHA_TEST_GREATER (5 << 24) +# define RADEON_ALPHA_TEST_NEQUAL (6 << 24) +# define RADEON_ALPHA_TEST_ALWAYS (7 << 24) +# define RADEON_ALPHA_TEST_MASK (7 << 24) +#define RADEON_TEXTURE_CLR_CMP_CLR_C 0x1ca4 +#define RADEON_TEXTURE_CLR_CMP_MSK_C 0x1ca8 +#define RADEON_FOG_COLOR_C 0x1cac +# define RADEON_FOG_BLUE_SHIFT 0 +# define RADEON_FOG_GREEN_SHIFT 8 +# define RADEON_FOG_RED_SHIFT 16 +#define RADEON_PRIM_TEX_CNTL_C 0x1cb0 +# define RADEON_MIN_BLEND_NEAREST (0 << 1) +# define RADEON_MIN_BLEND_LINEAR (1 << 1) +# define RADEON_MIN_BLEND_MIPNEAREST (2 << 1) +# define RADEON_MIN_BLEND_MIPLINEAR (3 << 1) +# define RADEON_MIN_BLEND_LINEARMIPNEAREST (4 << 1) +# define RADEON_MIN_BLEND_LINEARMIPLINEAR (5 << 1) +# define RADEON_MIN_BLEND_MASK (7 << 1) +# define RADEON_MAG_BLEND_NEAREST (0 << 4) +# define RADEON_MAG_BLEND_LINEAR (1 << 4) +# define RADEON_MAG_BLEND_MASK (7 << 4) +# define RADEON_MIP_MAP_DISABLE (1 << 7) +# define RADEON_TEX_CLAMP_S_WRAP (0 << 8) +# define RADEON_TEX_CLAMP_S_MIRROR (1 << 8) +# define RADEON_TEX_CLAMP_S_CLAMP (2 << 8) +# define RADEON_TEX_CLAMP_S_BORDER_COLOR (3 << 8) +# define RADEON_TEX_CLAMP_S_MASK (3 << 8) +# define RADEON_TEX_WRAP_S (1 << 10) +# define RADEON_TEX_CLAMP_T_WRAP (0 << 11) +# define RADEON_TEX_CLAMP_T_MIRROR (1 << 11) +# define RADEON_TEX_CLAMP_T_CLAMP (2 << 11) +# define RADEON_TEX_CLAMP_T_BORDER_COLOR (3 << 11) +# define RADEON_TEX_CLAMP_T_MASK (3 << 11) +# define RADEON_TEX_WRAP_T (1 << 13) +# define RADEON_TEX_PERSPECTIVE_DISABLE (1 << 14) +# define RADEON_DATATYPE_VQ (0 << 16) +# define RADEON_DATATYPE_CI4 (1 << 16) +# define RADEON_DATATYPE_CI8 (2 << 16) +# define RADEON_DATATYPE_ARGB1555 (3 << 16) +# define RADEON_DATATYPE_RGB565 (4 << 16) +# define RADEON_DATATYPE_RGB888 (5 << 16) +# define RADEON_DATATYPE_ARGB8888 (6 << 16) +# define RADEON_DATATYPE_RGB332 (7 << 16) +# define RADEON_DATATYPE_Y8 (8 << 16) +# define RADEON_DATATYPE_RGB8 (9 << 16) +# define RADEON_DATATYPE_CI16 (10 << 16) +# define RADEON_DATATYPE_YUV422 (11 << 16) +# define RADEON_DATATYPE_YUV422_2 (12 << 16) +# define RADEON_DATATYPE_AYUV444 (14 << 16) +# define RADEON_DATATYPE_ARGB4444 (15 << 16) +# define RADEON_PALLETE_EITHER (0 << 20) +# define RADEON_PALLETE_1 (1 << 20) +# define RADEON_PALLETE_2 (2 << 20) +# define RADEON_PSEUDOCOLOR_DT_RGB565 (0 << 24) +# define RADEON_PSEUDOCOLOR_DT_ARGB1555 (1 << 24) +# define RADEON_PSEUDOCOLOR_DT_ARGB4444 (2 << 24) +#define RADEON_PRIM_TEXTURE_COMBINE_CNTL_C 0x1cb4 +# define RADEON_COMB_DIS (0 << 0) +# define RADEON_COMB_COPY (1 << 0) +# define RADEON_COMB_COPY_INP (2 << 0) +# define RADEON_COMB_MODULATE (3 << 0) +# define RADEON_COMB_MODULATE2X (4 << 0) +# define RADEON_COMB_MODULATE4X (5 << 0) +# define RADEON_COMB_ADD (6 << 0) +# define RADEON_COMB_ADD_SIGNED (7 << 0) +# define RADEON_COMB_BLEND_VERTEX (8 << 0) +# define RADEON_COMB_BLEND_TEXTURE (9 << 0) +# define RADEON_COMB_BLEND_CONST (10 << 0) +# define RADEON_COMB_BLEND_PREMULT (11 << 0) +# define RADEON_COMB_BLEND_PREV (12 << 0) +# define RADEON_COMB_BLEND_PREMULT_INV (13 << 0) +# define RADEON_COMB_ADD_SIGNED2X (14 << 0) +# define RADEON_COMB_BLEND_CONST_COLOR (15 << 0) +# define RADEON_COMB_MASK (15 << 0) +# define RADEON_COLOR_FACTOR_TEX (4 << 4) +# define RADEON_COLOR_FACTOR_NTEX (5 << 4) +# define RADEON_COLOR_FACTOR_ALPHA (6 << 4) +# define RADEON_COLOR_FACTOR_NALPHA (7 << 4) +# define RADEON_COLOR_FACTOR_MASK (15 << 4) +# define RADEON_INPUT_FACTOR_CONST_COLOR (2 << 10) +# define RADEON_INPUT_FACTOR_CONST_ALPHA (3 << 10) +# define RADEON_INPUT_FACTOR_INT_COLOR (4 << 10) +# define RADEON_INPUT_FACTOR_INT_ALPHA (5 << 10) +# define RADEON_INPUT_FACTOR_MASK (15 << 10) +# define RADEON_COMB_ALPHA_DIS (0 << 14) +# define RADEON_COMB_ALPHA_COPY (1 << 14) +# define RADEON_COMB_ALPHA_COPY_INP (2 << 14) +# define RADEON_COMB_ALPHA_MODULATE (3 << 14) +# define RADEON_COMB_ALPHA_MODULATE2X (4 << 14) +# define RADEON_COMB_ALPHA_MODULATE4X (5 << 14) +# define RADEON_COMB_ALPHA_ADD (6 << 14) +# define RADEON_COMB_ALPHA_ADD_SIGNED (7 << 14) +# define RADEON_COMB_ALPHA_ADD_SIGNED2X (14 << 14) +# define RADEON_COMB_ALPHA_MASK (15 << 14) +# define RADEON_ALPHA_FACTOR_TEX_ALPHA (6 << 18) +# define RADEON_ALPHA_FACTOR_NTEX_ALPHA (7 << 18) +# define RADEON_ALPHA_FACTOR_MASK (15 << 18) +# define RADEON_INP_FACTOR_A_CONST_ALPHA (1 << 25) +# define RADEON_INP_FACTOR_A_INT_ALPHA (2 << 25) +# define RADEON_INP_FACTOR_A_MASK (7 << 25) +#define RADEON_TEX_SIZE_PITCH_C 0x1cb8 +# define RADEON_TEX_PITCH_SHIFT 0 +# define RADEON_TEX_SIZE_SHIFT 4 +# define RADEON_TEX_HEIGHT_SHIFT 8 +# define RADEON_TEX_MIN_SIZE_SHIFT 12 +# define RADEON_SEC_TEX_PITCH_SHIFT 16 +# define RADEON_SEC_TEX_SIZE_SHIFT 20 +# define RADEON_SEC_TEX_HEIGHT_SHIFT 24 +# define RADEON_SEC_TEX_MIN_SIZE_SHIFT 28 +# define RADEON_TEX_PITCH_MASK (0x0f << 0) +# define RADEON_TEX_SIZE_MASK (0x0f << 4) +# define RADEON_TEX_HEIGHT_MASK (0x0f << 8) +# define RADEON_TEX_MIN_SIZE_MASK (0x0f << 12) +# define RADEON_SEC_TEX_PITCH_MASK (0x0f << 16) +# define RADEON_SEC_TEX_SIZE_MASK (0x0f << 20) +# define RADEON_SEC_TEX_HEIGHT_MASK (0x0f << 24) +# define RADEON_SEC_TEX_MIN_SIZE_MASK (0x0f << 28) +# define RADEON_TEX_SIZE_PITCH_SHIFT 0 +# define RADEON_SEC_TEX_SIZE_PITCH_SHIFT 16 +# define RADEON_TEX_SIZE_PITCH_MASK (0xffff << 0) +# define RADEON_SEC_TEX_SIZE_PITCH_MASK (0xffff << 16) +#define RADEON_PRIM_TEX_0_OFFSET_C 0x1cbc +#define RADEON_PRIM_TEX_1_OFFSET_C 0x1cc0 +#define RADEON_PRIM_TEX_2_OFFSET_C 0x1cc4 +#define RADEON_PRIM_TEX_3_OFFSET_C 0x1cc8 +#define RADEON_PRIM_TEX_4_OFFSET_C 0x1ccc +#define RADEON_PRIM_TEX_5_OFFSET_C 0x1cd0 +#define RADEON_PRIM_TEX_6_OFFSET_C 0x1cd4 +#define RADEON_PRIM_TEX_7_OFFSET_C 0x1cd8 +#define RADEON_PRIM_TEX_8_OFFSET_C 0x1cdc +#define RADEON_PRIM_TEX_9_OFFSET_C 0x1ce0 +#define RADEON_PRIM_TEX_10_OFFSET_C 0x1ce4 +# define RADEON_TEX_NO_TILE (0 << 30) +# define RADEON_TEX_TILED_BY_HOST (1 << 30) +# define RADEON_TEX_TILED_BY_STORAGE (2 << 30) +# define RADEON_TEX_TILED_BY_STORAGE2 (3 << 30) + +#define RADEON_SEC_TEX_CNTL_C 0x1d00 +# define RADEON_SEC_SELECT_PRIM_ST (0 << 0) +# define RADEON_SEC_SELECT_SEC_ST (1 << 0) +#define RADEON_SEC_TEX_COMBINE_CNTL_C 0x1d04 +# define RADEON_INPUT_FACTOR_PREV_COLOR (8 << 10) +# define RADEON_INPUT_FACTOR_PREV_ALPHA (9 << 10) +# define RADEON_INP_FACTOR_A_PREV_ALPHA (4 << 25) +#define RADEON_SEC_TEX_0_OFFSET_C 0x1d08 +#define RADEON_SEC_TEX_1_OFFSET_C 0x1d0c +#define RADEON_SEC_TEX_2_OFFSET_C 0x1d10 +#define RADEON_SEC_TEX_3_OFFSET_C 0x1d14 +#define RADEON_SEC_TEX_4_OFFSET_C 0x1d18 +#define RADEON_SEC_TEX_5_OFFSET_C 0x1d1c +#define RADEON_SEC_TEX_6_OFFSET_C 0x1d20 +#define RADEON_SEC_TEX_7_OFFSET_C 0x1d24 +#define RADEON_SEC_TEX_8_OFFSET_C 0x1d28 +#define RADEON_SEC_TEX_9_OFFSET_C 0x1d2c +#define RADEON_SEC_TEX_10_OFFSET_C 0x1d30 +#define RADEON_CONSTANT_COLOR_C 0x1d34 +# define RADEON_CONSTANT_BLUE_SHIFT 0 +# define RADEON_CONSTANT_GREEN_SHIFT 8 +# define RADEON_CONSTANT_RED_SHIFT 16 +# define RADEON_CONSTANT_ALPHA_SHIFT 24 +#define RADEON_PRIM_TEXTURE_BORDER_COLOR_C 0x1d38 +# define RADEON_PRIM_TEX_BORDER_BLUE_SHIFT 0 +# define RADEON_PRIM_TEX_BORDER_GREEN_SHIFT 8 +# define RADEON_PRIM_TEX_BORDER_RED_SHIFT 16 +# define RADEON_PRIM_TEX_BORDER_ALPHA_SHIFT 24 +#define RADEON_SEC_TEXTURE_BORDER_COLOR_C 0x1d3c +# define RADEON_SEC_TEX_BORDER_BLUE_SHIFT 0 +# define RADEON_SEC_TEX_BORDER_GREEN_SHIFT 8 +# define RADEON_SEC_TEX_BORDER_RED_SHIFT 16 +# define RADEON_SEC_TEX_BORDER_ALPHA_SHIFT 24 +#define RADEON_STEN_REF_MASK_C 0x1d40 +# define RADEON_STEN_REFERENCE_SHIFT 0 +# define RADEON_STEN_MASK_SHIFT 16 +# define RADEON_STEN_WRITE_MASK_SHIFT 24 +#define RADEON_PLANE_3D_MASK_C 0x1d44 +#define RADEON_TEX_CACHE_STAT_COUNT 0x1974 + + + /* Constants */ +#define RADEON_AGP_TEX_OFFSET 0x02000000 + +#define RADEON_VB_AGE_REG RADEON_GUI_SCRATCH_REG0 +#define RADEON_SWAP_AGE_REG RADEON_GUI_SCRATCH_REG1 + + /* CCE packet types */ +#define RADEON_CCE_PACKET0 0x00000000 +#define RADEON_CCE_PACKET0_ONE_REG_WR 0x00008000 +#define RADEON_CCE_PACKET1 0x40000000 +#define RADEON_CCE_PACKET2 0x80000000 +#define RADEON_CCE_PACKET3_NOP 0xC0001000 +#define RADEON_CCE_PACKET3_PAINT 0xC0001100 +#define RADEON_CCE_PACKET3_BITBLT 0xC0001200 +#define RADEON_CCE_PACKET3_SMALLTEXT 0xC0001300 +#define RADEON_CCE_PACKET3_HOSTDATA_BLT 0xC0001400 +#define RADEON_CCE_PACKET3_POLYLINE 0xC0001500 +#define RADEON_CCE_PACKET3_SCALING 0xC0001600 +#define RADEON_CCE_PACKET3_TRANS_SCALING 0xC0001700 +#define RADEON_CCE_PACKET3_POLYSCANLINES 0xC0001800 +#define RADEON_CCE_PACKET3_NEXT_CHAR 0xC0001900 +#define RADEON_CCE_PACKET3_PAINT_MULTI 0xC0001A00 +#define RADEON_CCE_PACKET3_BITBLT_MULTI 0xC0001B00 +#define RADEON_CCE_PACKET3_PLY_NEXTSCAN 0xC0001D00 +#define RADEON_CCE_PACKET3_SET_SCISSORS 0xC0001E00 +#define RADEON_CCE_PACKET3_SET_MODE24BPP 0xC0001F00 +#define RADEON_CCE_PACKET3_CNTL_PAINT 0xC0009100 +#define RADEON_CCE_PACKET3_CNTL_BITBLT 0xC0009200 +#define RADEON_CCE_PACKET3_CNTL_SMALLTEXT 0xC0009300 +#define RADEON_CCE_PACKET3_CNTL_HOSTDATA_BLT 0xC0009400 +#define RADEON_CCE_PACKET3_CNTL_POLYLINE 0xC0009500 +#define RADEON_CCE_PACKET3_CNTL_SCALING 0xC0009600 +#define RADEON_CCE_PACKET3_CNTL_TRANS_SCALING 0xC0009700 +#define RADEON_CCE_PACKET3_CNTL_POLYSCANLINES 0xC0009800 +#define RADEON_CCE_PACKET3_CNTL_NEXT_CHAR 0xC0009900 +#define RADEON_CCE_PACKET3_CNTL_PAINT_MULTI 0xC0009A00 +#define RADEON_CCE_PACKET3_CNTL_BITBLT_MULTI 0xC0009B00 +#define RADEON_CCE_PACKET3_CNTL_TRANS_BITBLT 0xC0009C00 +#define RADEON_CCE_PACKET3_3D_SAVE_CONTEXT 0xC0002000 +#define RADEON_CCE_PACKET3_3D_PLAY_CONTEXT 0xC0002100 +#define RADEON_CCE_PACKET3_3D_RNDR_GEN_INDX_PRIM 0xC0002300 +#define RADEON_CCE_PACKET3_3D_RNDR_GEN_PRIM 0xC0002500 +#define RADEON_CCE_PACKET3_LOAD_PALETTE 0xC0002C00 +#define RADEON_CCE_PACKET3_PURGE 0xC0002D00 +#define RADEON_CCE_PACKET3_NEXT_VERTEX_BUNDLE 0xC0002E00 +# define RADEON_CCE_PACKET_MASK 0xC0000000 +# define RADEON_CCE_PACKET_COUNT_MASK 0x3fff0000 +# define RADEON_CCE_PACKET_MAX_DWORDS (1 << 14) +# define RADEON_CCE_PACKET0_REG_MASK 0x000007ff +# define RADEON_CCE_PACKET1_REG0_MASK 0x000007ff +# define RADEON_CCE_PACKET1_REG1_MASK 0x003ff800 + +#define RADEON_CCE_VC_FRMT_RHW 0x00000001 +#define RADEON_CCE_VC_FRMT_DIFFUSE_BGR 0x00000002 +#define RADEON_CCE_VC_FRMT_DIFFUSE_A 0x00000004 +#define RADEON_CCE_VC_FRMT_DIFFUSE_ARGB 0x00000008 +#define RADEON_CCE_VC_FRMT_SPEC_BGR 0x00000010 +#define RADEON_CCE_VC_FRMT_SPEC_F 0x00000020 +#define RADEON_CCE_VC_FRMT_SPEC_FRGB 0x00000040 +#define RADEON_CCE_VC_FRMT_S_T 0x00000080 +#define RADEON_CCE_VC_FRMT_S2_T2 0x00000100 +#define RADEON_CCE_VC_FRMT_RHW2 0x00000200 + +#define RADEON_CCE_VC_CNTL_PRIM_TYPE_NONE 0x00000000 +#define RADEON_CCE_VC_CNTL_PRIM_TYPE_POINT 0x00000001 +#define RADEON_CCE_VC_CNTL_PRIM_TYPE_LINE 0x00000002 +#define RADEON_CCE_VC_CNTL_PRIM_TYPE_POLY_LINE 0x00000003 +#define RADEON_CCE_VC_CNTL_PRIM_TYPE_TRI_LIST 0x00000004 +#define RADEON_CCE_VC_CNTL_PRIM_TYPE_TRI_FAN 0x00000005 +#define RADEON_CCE_VC_CNTL_PRIM_TYPE_TRI_STRIP 0x00000006 +#define RADEON_CCE_VC_CNTL_PRIM_TYPE_TRI_TYPE2 0x00000007 +#define RADEON_CCE_VC_CNTL_PRIM_WALK_IND 0x00000010 +#define RADEON_CCE_VC_CNTL_PRIM_WALK_LIST 0x00000020 +#define RADEON_CCE_VC_CNTL_PRIM_WALK_RING 0x00000030 +#define RADEON_CCE_VC_CNTL_NUM_SHIFT 16 + +#endif diff --git a/xc/programs/Xserver/hw/xfree86/drivers/sis/init300.c b/xc/programs/Xserver/hw/xfree86/drivers/sis/init300.c index 2b669d811..261d29ee1 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/sis/init300.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/sis/init300.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/init300.c,v 1.3 2000/09/22 11:35:46 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/init300.c,v 1.4 2000/09/26 15:57:14 tsi Exp $ */ #include "xf86.h" #include "xf86PciInfo.h" @@ -1062,7 +1062,7 @@ USHORT CalcRefreshRate(ScrnInfoPtr pScrn, DisplayModePtr mode) break; } - while(RefreshRate[Index][i] != NULL) + while(RefreshRate[Index][i] != 0) { if(temp == RefreshRate[Index][i]) { diff --git a/xc/programs/Xserver/hw/xfree86/drivers/sis/sis_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/sis/sis_dri.c index 446b4d29e..7d72a139d 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/sis/sis_dri.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/sis/sis_dri.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/sis_dri.c,v 1.3 2000/09/22 11:35:46 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/sis_dri.c,v 1.6 2000/10/10 16:38:19 alanh Exp $ */ /* modified from tdfx_dri.c, mga_dri.c */ @@ -24,9 +24,6 @@ #include "sis300_accel.h" -#include "sis_drm_public.h" -#include "drm.h" - extern void GlxSetVisualConfigs( int nconfigs, __GLXvisualConfig *configs, @@ -371,13 +368,7 @@ Bool SISDRIScreenInit(ScreenPtr pScreen) pSISDRI->AGPCmdBufOffset = pSIS->agpCmdBufAddr - pSIS->agpAddr; pSISDRI->AGPCmdBufSize = pSIS->agpCmdBufSize; - { - drm_sis_agp_t agp; - - agp.offset = AGP_CMDBUF_SIZE; - agp.size = AGP_SIZE - AGP_CMDBUF_SIZE; - xf86ioctl(pSIS->drmSubFD, SIS_IOCTL_AGP_INIT, &agp); - } + drmSiSAgpInit(pSIS->drmSubFD, AGP_CMDBUF_SIZE,(AGP_SIZE - AGP_CMDBUF_SIZE)); } while(0); diff --git a/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dga.c b/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dga.c index 5729c5e31..3ba43df23 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dga.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dga.c @@ -21,7 +21,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dga.c,v 1.1 2000/05/23 04:47:44 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dga.c,v 1.2 2000/10/17 16:53:17 tsi Exp $ */ #include "xf86.h" #include "xf86_OSproc.h" @@ -153,7 +153,7 @@ static Bool FFB_OpenFramebuffer(ScrnInfoPtr pScrn, char **name, unsigned char ** { FFBPtr pFfb = GET_FFB_FROM_SCRN(pScrn); - *name = &pFfb->psdp->device; + *name = pFfb->psdp->device; /* We give the user the dumb frame buffer. */ *mem = (unsigned char *)FFB_DFB24_VOFF; diff --git a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx.h b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx.h index 74eab72e8..17221f249 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx.h +++ b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx.h @@ -5,7 +5,7 @@ Copyright: 1998,1999 */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx.h,v 1.10 2000/06/17 00:03:24 martin Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx.h,v 1.11 2000/09/26 15:57:14 tsi Exp $ */ #ifndef _TDFX_H_ #define _TDFX_H_ @@ -149,8 +149,8 @@ typedef struct _TDFXRec { int MaxClock; int ChipType; pciVideoPtr PciInfo; - int LinearAddr[MAXCHIPS]; - int MMIOAddr[MAXCHIPS]; + unsigned long LinearAddr[MAXCHIPS]; + unsigned long MMIOAddr[MAXCHIPS]; EntityInfoPtr pEnt; int numChips; PCITAG PciTag[MAXCHIPS]; diff --git a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_accel.c b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_accel.c index 87960acf3..89ba45a50 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_accel.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_accel.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_accel.c,v 1.14 2000/08/25 16:25:36 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_accel.c,v 1.15 2000/09/24 13:51:30 alanh Exp $ */ /* All drivers should typically include these */ #include "xf86.h" diff --git a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c index 0831c92b4..a9fc4499b 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c,v 1.10 2000/06/23 23:43:45 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c,v 1.12 2000/09/26 15:57:15 tsi Exp $ */ #include "xf86.h" #include "xf86_OSproc.h" @@ -307,7 +307,7 @@ Bool TDFXDRIScreenInit(ScreenPtr pScreen) pDRIInfo = DRICreateInfoRec(); if (!pDRIInfo) { xf86DrvMsg(pScreen->myNum, X_ERROR, - "DRICreatInfoRect() failed, disabling DRI.\n"); + "DRICreateInfoRect() failed, disabling DRI.\n"); return FALSE; } @@ -449,10 +449,6 @@ TDFXCreateContext(ScreenPtr pScreen, VisualPtr visual, drmContext hwContext, void *pVisualConfigPriv, DRIContextType contextStore) { - TDFXConfigPrivPtr pTDFXConfig = (TDFXConfigPrivPtr)pVisualConfigPriv; - TDFXDRIContextPtr ctx; - - ctx=(TDFXDRIContextPtr)contextStore; return TRUE; } @@ -460,8 +456,6 @@ static void TDFXDestroyContext(ScreenPtr pScreen, drmContext hwContext, DRIContextType contextStore) { - TDFXDRIContextPtr ctx; - ctx=(TDFXDRIContextPtr)contextStore; } Bool diff --git a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c index 201216076..48c16e61e 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c @@ -25,7 +25,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c,v 1.42 2000/09/20 00:09:30 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c,v 1.43 2000/09/24 13:51:31 alanh Exp $ */ /* * Authors: diff --git a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfxdefs.h b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfxdefs.h index b5ea9f908..850f35398 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfxdefs.h +++ b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfxdefs.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfxdefs.h,v 1.6 2000/06/17 00:03:25 martin Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfxdefs.h,v 1.7 2000/09/24 13:51:31 alanh Exp $ */ /* Voodoo Banshee driver version 1.0.1 diff --git a/xc/programs/Xserver/hw/xfree86/drivers/tga/tga_accel.c b/xc/programs/Xserver/hw/xfree86/drivers/tga/tga_accel.c index d875edefc..52fdb941b 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/tga/tga_accel.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/tga/tga_accel.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tga/tga_accel.c,v 1.10 2000/03/06 22:59:31 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tga/tga_accel.c,v 1.11 2000/10/20 12:57:26 alanh Exp $ */ /* * Copyright 1996,1997 by Alan Hourihane, Wigan, England. @@ -135,14 +135,11 @@ DEC21030AccelInit(ScreenPtr pScreen) TGA_AccelInfoRec->SubsequentSolidFillRect = TGASubsequentSolidFillRect; /* screen to screen copy */ - if(pTga->depthflag == BPP8PACKED) { /* screen to screen copy apparently doesn't work - for 32bpp tga */ - TGA_AccelInfoRec->ScreenToScreenCopyFlags = NO_TRANSPARENCY; - TGA_AccelInfoRec->SetupForScreenToScreenCopy = - TGASetupForScreenToScreenCopy; - TGA_AccelInfoRec->SubsequentScreenToScreenCopy = - TGASubsequentScreenToScreenCopy; - } + TGA_AccelInfoRec->ScreenToScreenCopyFlags = NO_TRANSPARENCY; + TGA_AccelInfoRec->SetupForScreenToScreenCopy = + TGASetupForScreenToScreenCopy; + TGA_AccelInfoRec->SubsequentScreenToScreenCopy = + TGASubsequentScreenToScreenCopy; /* mono 8x8 pattern fill */ @@ -155,21 +152,19 @@ DEC21030AccelInit(ScreenPtr pScreen) /* color expand */ /* does not work for 32bpp (yet) */ - if(pTga->depthflag == BPP8PACKED) { - TGA_AccelInfoRec->ScanlineCPUToScreenColorExpandFillFlags = - BIT_ORDER_IN_BYTE_LSBFIRST; - - TGA_AccelInfoRec->NumScanlineColorExpandBuffers = 1; - pTga->buffers[0] = (CARD32 *)malloc(CE_BUFSIZE); - TGA_AccelInfoRec->ScanlineColorExpandBuffers = - (unsigned char **)pTga->buffers; - TGA_AccelInfoRec->SetupForScanlineCPUToScreenColorExpandFill = - TGASetupForScanlineCPUToScreenColorExpandFill; - TGA_AccelInfoRec->SubsequentScanlineCPUToScreenColorExpandFill = - TGASubsequentScanlineCPUToScreenColorExpandFill; - TGA_AccelInfoRec->SubsequentColorExpandScanline = - TGASubsequentColorExpandScanline; - } + TGA_AccelInfoRec->ScanlineCPUToScreenColorExpandFillFlags = + BIT_ORDER_IN_BYTE_LSBFIRST; + + TGA_AccelInfoRec->NumScanlineColorExpandBuffers = 1; + pTga->buffers[0] = (CARD32 *)malloc(CE_BUFSIZE); + TGA_AccelInfoRec->ScanlineColorExpandBuffers = + (unsigned char **)pTga->buffers; + TGA_AccelInfoRec->SetupForScanlineCPUToScreenColorExpandFill = + TGASetupForScanlineCPUToScreenColorExpandFill; + TGA_AccelInfoRec->SubsequentScanlineCPUToScreenColorExpandFill = + TGASubsequentScanlineCPUToScreenColorExpandFill; + TGA_AccelInfoRec->SubsequentColorExpandScanline = + TGASubsequentColorExpandScanline; /* lines */ @@ -210,9 +205,9 @@ TGASetupForScanlineCPUToScreenColorExpandFill(ScrnInfoPtr pScrn, #ifdef PROFILE unsigned int start, stop; #endif - register unsigned long iobase, offset; TGAPtr pTga = NULL; unsigned int fgcolor = 0, bgcolor = 0, pmask = 0; + TGA_DECL(); pTga = TGAPTR(pScrn); TGA_GET_IOBASE(); @@ -274,8 +269,8 @@ TGASubsequentScanlineCPUToScreenColorExpandFill(ScrnInfoPtr pScrn, #ifdef PROFILE unsigned int start, stop; #endif - register unsigned long iobase, offset; TGAPtr pTga; + TGA_DECL(); pTga = TGAPTR(pScrn); TGA_GET_IOBASE(); @@ -315,27 +310,32 @@ TGASubsequentColorExpandScanline(ScrnInfoPtr pScrn, int bufno) #ifdef PROFILE unsigned int start, stop; #endif - register unsigned long iobase, offset; TGAPtr pTga; unsigned char *p = NULL; int width = 0; unsigned int addr; unsigned int pixelmask = 0; unsigned int stipple; + unsigned int align_mask; int align = 0; int skipleft; CARD32 c = 0, d = 0; CARD32 *e = NULL; int i = 0, num_dwords = 0; + TGA_DECL(); pTga = TGAPTR(pScrn); TGA_GET_IOBASE(); TGA_GET_OFFSET(); -/* ErrorF("TGASubsequentColorExpandScanline called\n"); */ -/* if(pTga->transparent_pattern_p) */ -/* ErrorF("transparent color expand\n"); */ + align_mask = (pTga->depthflag == BPP24) ? 0x0f : 0x03; + +#if 0 + ErrorF("TGASubsequentColorExpandScanline called\n"); + if(pTga->transparent_pattern_p) + ErrorF("transparent color expand\n"); +#endif p = (unsigned char *)pTga->buffers[0]; addr = FB_OFFSET(pTga->ce_x, pTga->ce_y); @@ -345,12 +345,13 @@ TGASubsequentColorExpandScanline(ScrnInfoPtr pScrn, int bufno) while(width > 0) { if(!pTga->transparent_pattern_p) pixelmask = 0xFFFFFFFF; - if(addr & 0x3) { - align = addr & 0x3; - if(!pTga->transparent_pattern_p) + + align = (addr & align_mask) / pTga->Bpp; /* no. pixels out of align */ + if (align) { + if (!pTga->transparent_pattern_p) pixelmask <<= align; -/* ErrorF("aligment is %d\n", align); */ - addr -= align; +/* ErrorF("alignment is %d\n", align); */ + addr -= align * pTga->Bpp; width += align; e = (CARD32 *)p; @@ -369,41 +370,43 @@ TGASubsequentColorExpandScanline(ScrnInfoPtr pScrn, int bufno) } } - - if(!pTga->transparent_pattern_p) { - if(skipleft) { + if (!pTga->transparent_pattern_p) { + if (skipleft) { pixelmask <<= skipleft; skipleft = 0; } - if(width < 32) + if (width < 32) { pixelmask &= (0xFFFFFFFF >> (32 - width)); + } + TGA_FAST_WRITE_REG(pixelmask, TGA_PIXELMASK_REG); } else { unsigned int *i = NULL; /* ErrorF("transparent scanline with x = %d, y = %d, w = %d, h = %d\n", pTga->ce_x, pTga->ce_y, pTga->ce_width, pTga->ce_height); */ - if(skipleft) { + if (skipleft) { i = (unsigned int *)p; *i &= (0xFFFFFFFF << skipleft); skipleft = 0; } - if(width < 32) { + if (width < 32) { i = (unsigned int *)p; *i &= (0xFFFFFFFF >> (32 - width)); } } - if(!pTga->transparent_pattern_p) - TGA_FAST_WRITE_REG(pixelmask, TGA_PIXELMASK_REG); - TGA_FAST_WRITE_REG(addr, TGA_ADDRESS_REG); stipple = *((unsigned int *)p); - TGA_FAST_WRITE_REG(stipple, TGA_CONTINUE_REG); - addr += 32; + switch (pTga->Chipset) { + case PCI_CHIP_TGA2: + *(unsigned int *)(pTga->FbBase + addr) = stipple; WMB; + break; + case PCI_CHIP_DEC21030: + TGA_FAST_WRITE_REG(addr, TGA_ADDRESS_REG); + TGA_FAST_WRITE_REG(stipple, TGA_CONTINUE_REG); + } + addr += 32 * pTga->Bpp; p += 4; width -= 32; - if(align) { - align = 0; - } } pTga->ce_height--; if(pTga->ce_height == 0) { @@ -430,9 +433,9 @@ TGASetupForSolidFill(ScrnInfoPtr pScrn, int color, int rop, #ifdef PROFILE unsigned int start, stop; #endif - register unsigned long iobase, offset; TGAPtr pTga; unsigned int fgcolor = 0, pmask = 0; + TGA_DECL(); pTga = TGAPTR(pScrn); TGA_GET_IOBASE(); @@ -487,8 +490,8 @@ TGASubsequentSolidFillRect(ScrnInfoPtr pScrn, int x, int y, int w, int h) #ifdef PROFILE unsigned int stop, start; #endif - register unsigned long iobase, offset; TGAPtr pTga; + TGA_DECL(); pTga = TGAPTR(pScrn); TGA_GET_IOBASE(); @@ -547,9 +550,9 @@ TGASetupForScreenToScreenCopy(ScrnInfoPtr pScrn, int xdir, int ydir, #ifdef PROFILE unsigned int start, stop; #endif - register unsigned long iobase, offset; TGAPtr pTga; unsigned int pmask = 0; + TGA_DECL(); pTga = TGAPTR(pScrn); TGA_GET_IOBASE(); @@ -557,9 +560,7 @@ TGASetupForScreenToScreenCopy(ScrnInfoPtr pScrn, int xdir, int ydir, /* see section 6.2.9 */ - /* ErrorF("TGASetupForScreenToScreenCopy called\n"); */ - - if(pTga->depthflag == BPP8PACKED) { + if (pTga->depthflag == BPP8PACKED) { pmask = planemask | (planemask << 8) | (planemask << 16) | (planemask << 24); } @@ -572,7 +573,7 @@ TGASetupForScreenToScreenCopy(ScrnInfoPtr pScrn, int xdir, int ydir, pTga->current_rop = rop | pTga->depthflag; /* do we copy a rectangle from top to bottom or bottom to top? */ - if(ydir == -1) { + if (ydir == -1) { pTga->blitdir = BLIT_FORWARDS; } else { @@ -581,6 +582,7 @@ TGASetupForScreenToScreenCopy(ScrnInfoPtr pScrn, int xdir, int ydir, TGA_SAVE_OFFSET(); return; } + /* * This is the implementation of the SubsequentForScreenToScreenCopy * that sends commands to the coprocessor to perform a screen-to-screen @@ -601,23 +603,32 @@ TGASubsequentScreenToScreenCopy(ScrnInfoPtr pScrn, int x1, int y1, int x2, #ifdef PROFILE unsigned int stop, start; #endif - register unsigned long iobase, offset; TGAPtr pTga; + TGA_DECL(); pTga = TGAPTR(pScrn); TGA_GET_IOBASE(); TGA_GET_OFFSET(); - - /* ErrorF("TGASubsequentScreenToScreenCopy called\n"); */ - +#if 0 + ErrorF("TGASubsequentScreenToScreenCopy(,%d,%d,%d,%d,%d,%d):" + " COPY %s BLIT %s\n", + x1, y1, x2, y2, w, h, (x2 > x1 && (x1 + w) > x2)?"BWD":"FWD", + (pTga->blitdir == BLIT_FORWARDS)?"FWD":"BWD"); +#endif + TGASync(pScrn); /* ?? */ + TGA_FAST_WRITE_REG(COPY | X11 | pTga->depthflag, TGA_MODE_REG); TGA_FAST_WRITE_REG(pTga->current_rop, TGA_RASTEROP_REG); TGA_FAST_WRITE_REG(pTga->current_planemask, TGA_PLANEMASK_REG); +#if 1 if(x2 > x1 && (x1 + w) > x2) copy_func = TGACopyLineBackwards; else copy_func = TGACopyLineForwards; +#else + copy_func = TGACopyLineForwards; +#endif TGA_SAVE_OFFSET(); if(pTga->blitdir == BLIT_FORWARDS) { @@ -631,6 +642,8 @@ TGASubsequentScreenToScreenCopy(ScrnInfoPtr pScrn, int x1, int y1, int x2, } } + TGASync(pScrn); /* ?? */ + TGA_GET_OFFSET(); TGA_FAST_WRITE_REG(SIMPLE | X11 | pTga->depthflag, TGA_MODE_REG); TGA_FAST_WRITE_REG(MIX_SRC | pTga->depthflag, TGA_RASTEROP_REG); @@ -648,59 +661,84 @@ TGACopyLineForwards(ScrnInfoPtr pScrn, int x1, int y1, int x2, int y2, int w) int read; unsigned long source_address, destination_address; unsigned int mask_source, mask_destination; + unsigned int cando, cando_mask; int source_align, destination_align; int pixel_shift; - register unsigned long iobase, offset; #ifdef PROFILE unsigned int start, stop; #endif TGAPtr pTga; + TGA_DECL(); pTga = TGAPTR(pScrn); TGA_GET_IOBASE(); TGA_GET_OFFSET(); + cando = 32; + cando_mask = 0xFFFFFFFFU; + if (pTga->Chipset == PCI_CHIP_DEC21030 && pTga->depthflag == BPP24) { + cando = 16; + cando_mask = 0x0000FFFFU; + } + source_address = FB_OFFSET(x1, y1); destination_address = FB_OFFSET(x2, y2); - +#if 0 + ErrorF("CPY-FWD(,%d,%d,%d,%d,%d): sadr = 0x%lx, dadr = 0x%lx\n", + x1, y1, x2, y2, w, source_address, destination_address); +#endif read = 0; - while(read < w) { - mask_source = 0xFFFFFFFF; - if((w - read) >= 32) - mask_destination = 0xFFFFFFFF; + while (read < w) { + + mask_source = cando_mask; + if ((w - read) >= cando) + mask_destination = cando_mask; else - mask_destination = ((unsigned int)0xFFFFFFFF) >> (32 - (w - read)); + mask_destination = cando_mask >> (cando - (w - read)); + source_align = source_address & 0x07; + source_address -= source_align; + mask_source <<= source_align / pTga->Bpp; + /* mask_source &= cando_mask; */ + destination_align = destination_address & 0x07; - source_address = source_address - source_align; - mask_source <<= source_align; - destination_address = destination_address - destination_align; - mask_destination <<= destination_align; + destination_address -= destination_align; + mask_destination <<= destination_align / pTga->Bpp; + /* mask_destination &= cando_mask; */ - if(destination_align >= source_align) + if (destination_align >= source_align) pixel_shift = destination_align - source_align; else { pixel_shift = 8 - (source_align - destination_align); /* we need to prime the residue register in this case */ - destination_address = destination_address - 8; - mask_destination <<= 8; + destination_address -= 8; + mask_destination <<= 8 / pTga->Bpp; + mask_destination &= cando_mask;/* ?? */ } - + TGA_FAST_WRITE_REG(pixel_shift, TGA_PIXELSHIFT_REG); - /* use GADR and GCTR */ - TGA_FAST_WRITE_REG(source_address, TGA_ADDRESS_REG); - TGA_FAST_WRITE_REG(mask_source, TGA_CONTINUE_REG); - TGA_FAST_WRITE_REG(destination_address, TGA_ADDRESS_REG); - TGA_FAST_WRITE_REG(mask_destination, TGA_CONTINUE_REG); + switch (pTga->Chipset) { + case PCI_CHIP_TGA2: + *(unsigned int *)(pTga->FbBase + source_address) = mask_source; WMB; + *(unsigned int *)(pTga->FbBase + destination_address) = mask_destination; WMB; + break; + case PCI_CHIP_DEC21030: + /* use GADR and GCTR */ + TGA_FAST_WRITE_REG(source_address, TGA_ADDRESS_REG); + TGA_FAST_WRITE_REG(mask_source, TGA_CONTINUE_REG); + TGA_FAST_WRITE_REG(destination_address, TGA_ADDRESS_REG); + TGA_FAST_WRITE_REG(mask_destination, TGA_CONTINUE_REG); + break; + } - source_address = source_address + (32 - pixel_shift); - destination_address += 32; + source_address += (cando - (pixel_shift / pTga->Bpp)) * pTga->Bpp; + destination_address += cando * pTga->Bpp; - read += 32; - read -= destination_align; /* "read" is perhaps better + read += cando; + read -= destination_align / pTga->Bpp; /* "read" is perhaps better called "written"... */ - if(destination_align < source_align) { - read -= 8; + if (destination_align < source_align) { + read -= 8 / pTga->Bpp; } } @@ -720,124 +758,166 @@ TGACopyLineBackwards(ScrnInfoPtr pScrn, int x1, int y1, int x2, unsigned long a1, a2; unsigned long source_address, destination_address; unsigned int mask_source, mask_destination; + unsigned int cando, cando_mask; int source_align, destination_align; int pixel_shift; int read; #ifdef PROFILE unsigned int start, stop; #endif - register unsigned long iobase, offset; TGAPtr pTga; + TGA_DECL(); pTga = TGAPTR(pScrn); TGA_GET_IOBASE(); TGA_GET_OFFSET(); + cando = 32; + cando_mask = 0xFFFFFFFFU; + if (pTga->Chipset == PCI_CHIP_DEC21030 && pTga->depthflag == BPP24) { + cando = 16; + cando_mask = 0x0000FFFFU; + } + a1 = FB_OFFSET(x1, y1); a2 = FB_OFFSET(x2, y2); - source_address = FB_OFFSET((x1 + w) - 32, y1); - destination_address = FB_OFFSET((x2 + w) - 32, y2); - + source_address = FB_OFFSET((x1 + w) - cando, y1); + destination_address = FB_OFFSET((x2 + w) - cando, y2); + +#if 0 + ErrorF("CPY-BWD(,%d,%d,%d,%d,%d): sadr = 0x%lx, dadr = 0x%lx" + " a1 0x%lx a2 0x%lx\n", + x1, y1, x2, y2, w, source_address, destination_address, a1, a2); +#endif + read = 0; - while(read < w) { - mask_source = 0xFFFFFFFF; - if((w - read) >= 32) - mask_destination = 0xFFFFFFFF; - else - mask_destination = ((unsigned int)0xFFFFFFFF) << (32 - (w - read)); + while (read < w) { + mask_source = cando_mask; + if ((w - read) >= cando) + mask_destination = cando_mask; + else { + mask_destination = ((unsigned int)cando_mask) << (cando - (w - read)); + mask_destination &= cando_mask; /* esp. for cando==16 */ + } source_align = source_address & 0x07; destination_align = destination_address & 0x07; - if(read == 0 && destination_align && + if (read == 0 && destination_align && (source_align > destination_align)) { /* we want to take out all the destination_align pixels in one little copy first, then move on to the main stuff */ unsigned long tmp_src, tmp_dest; unsigned int tmp_src_mask, tmp_dest_mask; - tmp_src = (a1 + w) - source_align; - tmp_dest = ((a2 + w) - destination_align) - 8; - tmp_src_mask = 0xFFFFFFFF; - tmp_dest_mask = ((unsigned int)0x000000FF) >> (8 - destination_align); - tmp_dest_mask <<= 8; + tmp_src = a1 + (w - (source_align / pTga->Bpp)) * pTga->Bpp; + tmp_dest = a2 + (w - (destination_align / pTga->Bpp) - (8 / pTga->Bpp)) * pTga->Bpp; + tmp_src_mask = cando_mask; + tmp_dest_mask = ((unsigned int)0x000000FF) >> (8 - destination_align) / pTga->Bpp; + tmp_dest_mask <<= 8 / pTga->Bpp; pixel_shift = (8 - source_align) + destination_align; - +#if 0 + ErrorF("CPY-BWD - premature copy: sa = %d, da = %d, ps =%d\n", + source_align, destination_align, pixel_shift); +#endif TGA_FAST_WRITE_REG(pixel_shift, TGA_PIXELSHIFT_REG); - TGA_FAST_WRITE_REG(tmp_src, TGA_ADDRESS_REG); - TGA_FAST_WRITE_REG(tmp_src_mask, TGA_CONTINUE_REG); - TGA_FAST_WRITE_REG(tmp_dest, TGA_ADDRESS_REG); - TGA_FAST_WRITE_REG(tmp_dest_mask, TGA_CONTINUE_REG); - -/* ErrorF("premature copy: sa = %d, da = %d, ps =%d\n", source_align, */ -/* destination_align, pixel_shift); */ + switch (pTga->Chipset) + { + case PCI_CHIP_TGA2: + *(unsigned int *)(pTga->FbBase + tmp_src) = tmp_src_mask; WMB; + *(unsigned int *)(pTga->FbBase + tmp_dest) = tmp_dest_mask; WMB; + break; + case PCI_CHIP_DEC21030: + /* use GADR and GCTR */ + TGA_FAST_WRITE_REG(tmp_src, TGA_ADDRESS_REG); + TGA_FAST_WRITE_REG(tmp_src_mask, TGA_CONTINUE_REG); + TGA_FAST_WRITE_REG(tmp_dest, TGA_ADDRESS_REG); + TGA_FAST_WRITE_REG(tmp_dest_mask, TGA_CONTINUE_REG); + break; + } source_address += (8 - source_align); - mask_source >>= (8 - source_align); - mask_source >>= destination_align; - mask_destination >>= destination_align; + mask_source >>= (8 - source_align) / pTga->Bpp; + mask_source >>= destination_align / pTga->Bpp; + mask_destination >>= destination_align / pTga->Bpp; } - else if(read == 0 && (source_align != destination_align)) { + else if (read == 0 && (source_align != destination_align)) { source_address += (8 - source_align); /* mask_source >>= (8 - source_align); */ - /* if we comment this out, it breaks...TGA tries to + /* if we uncomment this, it breaks...TGA tries to optimize away a read of our last pixels... */ } - else if(source_align) { + else if (source_align) { source_address += (8 - source_align); - mask_source >>= (8 - source_align); + mask_source >>= (8 - source_align) / pTga->Bpp; } - if(destination_align) { + + if (destination_align) { destination_address += (8 - destination_align); - mask_destination >>= (8 - destination_align); + mask_destination >>= (8 - destination_align) / pTga->Bpp; } - if(destination_align >= source_align) + if (destination_align >= source_align) pixel_shift = destination_align - source_align; else { pixel_shift = (8 - source_align) + destination_align; - if(destination_align) { + if (destination_align) { source_address += 8; - mask_source >>= 8; + mask_source >>= 8 / pTga->Bpp; } } +#if 0 + ErrorF("CPY-BWD - normal: sadr 0x%lx sm 0x%x dadr 0x%lx dm 0x%x" + " sa %d da %d ps %d read %d\n", + source_address, mask_source, + destination_address, mask_destination, + source_align, destination_align, pixel_shift, read); +#endif TGA_FAST_WRITE_REG(pixel_shift, TGA_PIXELSHIFT_REG); - /* use GADR and GCTR */ - TGA_FAST_WRITE_REG(source_address, TGA_ADDRESS_REG); - TGA_FAST_WRITE_REG(mask_source, TGA_CONTINUE_REG); - TGA_FAST_WRITE_REG(destination_address, TGA_ADDRESS_REG); - TGA_FAST_WRITE_REG(mask_destination, TGA_CONTINUE_REG); + switch (pTga->Chipset) { + case PCI_CHIP_TGA2: + *(unsigned int *)(pTga->FbBase + source_address) = mask_source; WMB; + *(unsigned int *)(pTga->FbBase + destination_address) = mask_destination; WMB; + break; + case PCI_CHIP_DEC21030: + /* use GADR and GCTR */ + TGA_FAST_WRITE_REG(source_address, TGA_ADDRESS_REG); + TGA_FAST_WRITE_REG(mask_source, TGA_CONTINUE_REG); + TGA_FAST_WRITE_REG(destination_address, TGA_ADDRESS_REG); + TGA_FAST_WRITE_REG(mask_destination, TGA_CONTINUE_REG); + break; + } /* if(read == 0) */ /* ErrorF("sa = %d, da = %d, ps = %d\n", source_align, destination_align, */ /* pixel_shift); */ - if(destination_align > source_align) { - source_address -= 24; - destination_address -= (32 - pixel_shift); - if(read == 0) - read += 24 + source_align; + if (destination_align > source_align) { + source_address -= cando * pTga->Bpp - 8; + destination_address -= (cando - (pixel_shift / pTga->Bpp)) * pTga->Bpp; + if (read == 0) + read += (cando - 8 / pTga->Bpp) + source_align / pTga->Bpp; else - read += 24; + read += cando - 8 / pTga->Bpp; } - else if(destination_align == source_align) { - source_address -= 32; - destination_address -= 32; - if(read == 0 && destination_align) - read += (32 - (8 - destination_align)); + else if (destination_align == source_align) { + source_address -= cando * pTga->Bpp; + destination_address -= cando * pTga->Bpp; + if (read == 0 && destination_align) + read += (cando - (8 - destination_align) / pTga->Bpp); else - read += 32; + read += cando; } - else if(source_align > destination_align) { - source_address -= 24; - destination_address -= (32 - pixel_shift); + else if (source_align > destination_align) { + source_address -= cando * pTga->Bpp - 8; + destination_address -= (cando - (pixel_shift / pTga->Bpp)) * pTga->Bpp; /* only happens when read == 0 */ - if(destination_align) - read += 16 + source_align; + if (destination_align) + read += (cando - 16 / pTga->Bpp) + source_align / pTga->Bpp; else - read += 32 - pixel_shift; + read += cando - pixel_shift / pTga->Bpp; } } @@ -852,9 +932,9 @@ TGASetupForMono8x8PatternFill(ScrnInfoPtr pScrn, int patx, int paty, #ifdef PROFILE unsigned int start, stop; #endif - register unsigned long iobase, offset; TGAPtr pTga; unsigned int fgcolor = 0, bgcolor = 0, pmask = 0; + TGA_DECL(); pTga = TGAPTR(pScrn); TGA_GET_IOBASE(); @@ -925,7 +1005,7 @@ TGASubsequentMono8x8PatternFillRect(ScrnInfoPtr pScrn, int patx, int paty, #ifdef PROFILE register unsigned int stop, start; #endif - register unsigned long iobase, offset; + TGA_DECL(); /* ErrorF("TGASubsequentMono8x8PatternFillRect called with x = %d, y = %d, w = %d, h = %d\n", x, y, w, h); */ @@ -1005,9 +1085,9 @@ TGASetupForSolidLine(ScrnInfoPtr pScrn, int color, int rop, #ifdef PROFILE unsigned int start, stop; #endif - register unsigned long iobase, offset; TGAPtr pTga = NULL; unsigned int fgcolor = 0, pmask = 0; + TGA_DECL(); pTga = TGAPTR(pScrn); TGA_GET_IOBASE(); @@ -1056,10 +1136,10 @@ TGASubsequentSolidLine(ScrnInfoPtr pScrn, int x1, int y1, int x2, int y2, #ifdef PROFILE unsigned int start, stop; #endif - register unsigned long iobase, offset; TGAPtr pTga = NULL; CARD32 abs_dx = 0, abs_dy = 0, address = 0, octant_reg = 0; int length = 0; + TGA_DECL(); pTga = TGAPTR(pScrn); TGA_GET_IOBASE(); @@ -1136,10 +1216,9 @@ TGASetupForClippedLine(ScrnInfoPtr pScrn, int x1, int y1, int x2, int y2, #ifdef PROFILE unsigned int start, stop; #endif - register unsigned long iobase, offset; TGAPtr pTga = NULL; CARD32 abs_dx = 0, abs_dy = 0, octant_reg = 0; - + TGA_DECL(); pTga = TGAPTR(pScrn); TGA_GET_IOBASE(); @@ -1200,10 +1279,10 @@ TGASubsequentClippedSolidLine(ScrnInfoPtr pScrn, int x1, int y1, int len, #ifdef PROFILE unsigned int start, stop; #endif - register unsigned long iobase, offset; TGAPtr pTga = NULL; CARD32 address = 0; int length = 0; + TGA_DECL(); pTga = TGAPTR(pScrn); TGA_GET_IOBASE(); @@ -1246,9 +1325,9 @@ TGASetupForDashedLine(ScrnInfoPtr pScrn, int fg, int bg, int rop, #ifdef PROFILE unsigned int start = 0, stop = 0; #endif - register unsigned long iobase = 0, offset = 0; TGAPtr pTga = NULL; unsigned int color1 = 0, color2 = 0, pmask = 0; + TGA_DECL(); pTga = TGAPTR(pScrn); TGA_GET_IOBASE(); @@ -1293,13 +1372,13 @@ TGASubsequentDashedLine(ScrnInfoPtr pScrn, int x1, int y1, int x2, #ifdef PROFILE unsigned int start, stop; #endif - register unsigned long iobase, offset; TGAPtr pTga = NULL; CARD32 abs_dx = 0, abs_dy = 0, address = 0, octant_reg = 0; int length = 0; CARD16 line_mask = 0; int pattern_overflow = 0; int l = 0; + TGA_DECL(); pTga = TGAPTR(pScrn); TGA_GET_IOBASE(); @@ -1418,13 +1497,13 @@ TGASubsequentClippedDashedLine(ScrnInfoPtr pScrn, int x1, int y1, int len, #ifdef PROFILE unsigned int start, stop; #endif - register unsigned long iobase, offset; TGAPtr pTga = NULL; CARD32 address = 0; int length = 0; CARD16 line_mask = 0; int pattern_overflow = 0; int l = 0; + TGA_DECL(); pTga = TGAPTR(pScrn); TGA_GET_IOBASE(); diff --git a/xc/programs/Xserver/hw/xfree86/loader/xf86sym.c b/xc/programs/Xserver/hw/xfree86/loader/xf86sym.c index 37ccbee14..6b080d5d9 100644 --- a/xc/programs/Xserver/hw/xfree86/loader/xf86sym.c +++ b/xc/programs/Xserver/hw/xfree86/loader/xf86sym.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/xf86sym.c,v 1.163 2000/09/19 12:46:21 eich Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/xf86sym.c,v 1.167 2000/10/24 22:45:09 dawes Exp $ */ /* * @@ -38,7 +38,7 @@ #include "xf86Parser.h" #include "xf86Config.h" #ifdef XINPUT -#include "xf86Xinput.h" +# include "xf86Xinput.h" #endif #include "xf86OSmouse.h" #include "xf86xv.h" @@ -62,13 +62,13 @@ int sysctlbyname(const char*, void *, size_t *, void *, size_t); #endif /* XXX Should get all of these from elsewhere */ -#if defined (PowerMAX_OS) -#undef inb -#undef inw -#undef inl -#undef outb -#undef outw -#undef outl +#if defined(PowerMAX_OS) || (defined(sun) && defined(SVR4)) +# undef inb +# undef inw +# undef inl +# undef outb +# undef outw +# undef outl extern void outb(unsigned int a, unsigned char b); extern void outw(unsigned int a, unsigned short w); @@ -79,7 +79,7 @@ extern unsigned long inl(unsigned int a); #endif #if defined(__alpha__) -#ifdef linux +# ifdef linux extern unsigned long _bus_base(void); extern void _outb(char val, unsigned short port); extern void _outw(short val, unsigned short port); @@ -87,17 +87,17 @@ extern void _outl(int val, unsigned short port); extern unsigned int _inb(unsigned short port); extern unsigned int _inw(unsigned short port); extern unsigned int _inl(unsigned short port); -#endif +# endif -#ifdef __FreeBSD__ -#include <sys/types.h> +# ifdef __FreeBSD__ +# include <sys/types.h> extern void outb(u_int32_t port, u_int8_t val); extern void outw(u_int32_t port, u_int16_t val); extern void outl(u_int32_t port, u_int32_t val); extern u_int8_t inb(u_int32_t port); extern u_int16_t inw(u_int32_t port); extern u_int32_t inl(u_int32_t port); -#endif +# endif extern void* __divl(long, long); extern void* __reml(long, long); @@ -110,15 +110,24 @@ extern void* __remqu(long, long); #endif #if defined(__ia64__) +extern long __divdf3(long, long); extern long __divdi3(long, long); +extern long __divsf3(long, long); extern long __moddi3(long, long); -extern long __divdf3(long, long); +extern long __udivdi3(long, long); +extern long __umoddi3(long, long); +extern void _outb(char val, unsigned short port); +extern void _outw(short val, unsigned short port); +extern void _outl(int val, unsigned short port); +extern unsigned int _inb(unsigned short port); +extern unsigned int _inw(unsigned short port); +extern unsigned int _inl(unsigned short port); #endif #if defined(__sparc__) && defined(__GNUC__) -#define SYMFUNCDOT(func) { "." #func, (funcptr)&__sparc_dot_ ## func }, -#define SYMFUNCDOT89(func) { "." #func, (funcptr)&func ## _sparcv89 }, -#define DEFFUNCDOT(func) \ +# define SYMFUNCDOT(func) { "." #func, (funcptr)&__sparc_dot_ ## func }, +# define SYMFUNCDOT89(func) { "." #func, (funcptr)&func ## _sparcv89 }, +# define DEFFUNCDOT(func) \ extern void __sparc_dot_ ## func (void) __asm__ ("." #func); \ extern void func ## _sparcv89 (void); DEFFUNCDOT(rem) @@ -893,9 +902,9 @@ LOOKUP xfree86LookupTab[] = { of the X server) easier. */ SYMFUNC(xf86InstallSIGIOHandler) SYMFUNC(xf86RemoveSIGIOHandler) -#ifdef __alpha__ +# ifdef __alpha__ SYMFUNC(_bus_base) -#endif +# endif #endif SYMFUNC(xf86BlockSIGIO) SYMFUNC(xf86UnblockSIGIO) @@ -910,21 +919,21 @@ LOOKUP xfree86LookupTab[] = { SYMFUNC(__remq) SYMFUNC(__remqu) -#ifdef linux +# ifdef linux SYMFUNC(_outw) SYMFUNC(_outb) SYMFUNC(_outl) SYMFUNC(_inb) SYMFUNC(_inw) SYMFUNC(_inl) -#else +# else SYMFUNC(outw) SYMFUNC(outb) SYMFUNC(outl) SYMFUNC(inb) SYMFUNC(inw) SYMFUNC(inl) -#endif +# endif SYMFUNC(xf86ReadMmio32) SYMFUNC(xf86ReadMmio16) SYMFUNC(xf86ReadMmio8) @@ -936,6 +945,14 @@ LOOKUP xfree86LookupTab[] = { SYMFUNC(xf86WriteMmioNB8) SYMFUNC(memcpy) #endif +#if defined(sun) || defined(SVR4) && !defined(USL) + SYMFUNC(inb) + SYMFUNC(inw) + SYMFUNC(inl) + SYMFUNC(outb) + SYMFUNC(outw) + SYMFUNC(outl) +#endif #if defined(__powerpc__) SYMFUNC(inb) SYMFUNC(inw) @@ -943,7 +960,7 @@ LOOKUP xfree86LookupTab[] = { SYMFUNC(outb) SYMFUNC(outw) SYMFUNC(outl) -#if defined(NO_INLINE) || defined(Lynx) +# if defined(NO_INLINE) || defined(Lynx) SYMFUNC(mem_barrier) SYMFUNC(ldl_u) SYMFUNC(eieio) @@ -957,14 +974,14 @@ LOOKUP xfree86LookupTab[] = { SYMFUNC(stq_u) SYMFUNC(stw_u) SYMFUNC(write_mem_barrier) -#endif +# endif SYMFUNC(rdinx) SYMFUNC(wrinx) SYMFUNC(modinx) SYMFUNC(testrg) SYMFUNC(testinx2) SYMFUNC(testinx) -#if defined(Lynx) +# if defined(Lynx) SYMFUNC(_restf14) SYMFUNC(_restf17) SYMFUNC(_restf18) @@ -991,20 +1008,29 @@ LOOKUP xfree86LookupTab[] = { SYMFUNC(_savef27) SYMFUNC(_savef28) SYMFUNC(_savef29) -#endif -#if PPCIO_DEBUG +# endif +# if PPCIO_DEBUG SYMFUNC(debug_inb) SYMFUNC(debug_inw) SYMFUNC(debug_inl) SYMFUNC(debug_outb) SYMFUNC(debug_outw) SYMFUNC(debug_outl) -#endif +# endif #endif #if defined(__ia64__) + SYMFUNC(__divdf3) SYMFUNC(__divdi3) + SYMFUNC(__divsf3) SYMFUNC(__moddi3) - SYMFUNC(__divdf3) + SYMFUNC(__udivdi3) + SYMFUNC(__umoddi3) + SYMFUNC(_outw) + SYMFUNC(_outb) + SYMFUNC(_outl) + SYMFUNC(_inb) + SYMFUNC(_inw) + SYMFUNC(_inl) #endif #ifdef __FreeBSD__ diff --git a/xc/programs/Xserver/hw/xfree86/os-support/bsd/drm/Imakefile b/xc/programs/Xserver/hw/xfree86/os-support/bsd/drm/Imakefile index f0fa864fb..41328aab9 100644 --- a/xc/programs/Xserver/hw/xfree86/os-support/bsd/drm/Imakefile +++ b/xc/programs/Xserver/hw/xfree86/os-support/bsd/drm/Imakefile @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/drm/Imakefile,v 1.2 2000/08/16 01:45:30 dawes Exp $ +XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/drm/Imakefile,v 1.3 2000/10/27 21:14:55 dawes Exp $ XCOMM $PI: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/Imakefile,v 1.7 1999/09/14 19:55:15 faith Exp $ #define IHaveModules @@ -14,8 +14,8 @@ MOBJ = drmmodule.o MTRR_DEFINES = -DHAS_MTRR_SUPPORT #endif -SRCS = xf86drm.c xf86drmHash.c xf86drmRandom.c xf86drmSL.c xf86drmI810.c xf86drmMga.c xf86drmR128.c $(MSRC) -OBJS = xf86drm.o xf86drmHash.o xf86drmRandom.o xf86drmSL.o xf86drmI810.o xf86drmMga.o xf86drmR128.o $(MOBJ) +SRCS = xf86drm.c xf86drmHash.c xf86drmRandom.c xf86drmSL.c xf86drmI810.c xf86drmMga.c xf86drmR128.c xf86drmSiS.c $(MSRC) +OBJS = xf86drm.o xf86drmHash.o xf86drmRandom.o xf86drmSL.o xf86drmI810.o xf86drmMga.o xf86drmR128.o xf86drmSiS.o $(MOBJ) INCLUDES = -I$(XF86COMSRC) -I$(XF86OSSRC) -I. -I$(SERVERSRC)/include \ @@ -46,5 +46,6 @@ LinkSourceFile(xf86drmMga.c,$(XF86OSSRC)/linux/drm) LinkSourceFile(xf86drmR128.c,$(XF86OSSRC)/linux/drm) LinkSourceFile(xf86drmRandom.c,$(XF86OSSRC)/linux/drm) LinkSourceFile(xf86drmSL.c,$(XF86OSSRC)/linux/drm) +LinkSourceFile(xf86drmSiS.c,$(XF86OSSRC)/linux/drm) InstallDriverSDKLibraryModule(drm,$(DRIVERSDKMODULEDIR),freebsd) diff --git a/xc/programs/Xserver/hw/xfree86/os-support/bsd/drm/kernel/Imakefile b/xc/programs/Xserver/hw/xfree86/os-support/bsd/drm/kernel/Imakefile index 81445a7d3..47dff5bfb 100644 --- a/xc/programs/Xserver/hw/xfree86/os-support/bsd/drm/kernel/Imakefile +++ b/xc/programs/Xserver/hw/xfree86/os-support/bsd/drm/kernel/Imakefile @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/drm/kernel/Imakefile,v 1.2 2000/08/16 01:45:31 dawes Exp $ +XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/drm/kernel/Imakefile,v 1.3 2000/10/27 16:59:40 dawes Exp $ #include <Server.tmpl> @@ -18,7 +18,7 @@ LinkSourceFile(drm.h,$(XF86OSSRC)/linux/drm/kernel) LinkSourceFile(i810_drm.h,$(XF86OSSRC)/linux/drm/kernel) LinkSourceFile(mga_drm.h,$(XF86OSSRC)/linux/drm/kernel) LinkSourceFile(r128_drm.h,$(XF86OSSRC)/linux/drm/kernel) -LinkSourceFile(sis_drm_public.h,$(XF86OSSRC)/linux/drm/kernel) +LinkSourceFile(sis_drm.h,$(XF86OSSRC)/linux/drm/kernel) XCOMM This is a kludge until we determine how best to build the diff --git a/xc/programs/Xserver/hw/xfree86/os-support/bus/linuxSbus.c b/xc/programs/Xserver/hw/xfree86/os-support/bus/linuxSbus.c index 0852eba20..36700c0d9 100644 --- a/xc/programs/Xserver/hw/xfree86/os-support/bus/linuxSbus.c +++ b/xc/programs/Xserver/hw/xfree86/os-support/bus/linuxSbus.c @@ -20,7 +20,7 @@ * 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. */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/linuxSbus.c,v 1.3 2000/06/30 17:15:18 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/linuxSbus.c,v 1.4 2000/10/17 16:53:19 tsi Exp $ */ #include <fcntl.h> #include <stdio.h> @@ -550,8 +550,8 @@ xf86SbusHideOsHwCursor(sbusDevicePtr psdp) fbcursor.cmap.red = zeros; fbcursor.cmap.green = zeros; fbcursor.cmap.blue = zeros; - fbcursor.image = zeros; - fbcursor.mask = zeros; + fbcursor.image = (char *)zeros; + fbcursor.mask = (char *)zeros; fbcursor.size.x = 32; fbcursor.size.y = 1; fbcursor.set = FB_CUR_SETALL; diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/Imakefile b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/Imakefile index 5620604a0..853185757 100644 --- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/Imakefile +++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/Imakefile @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/Imakefile,v 1.6 2000/06/17 00:03:34 martin Exp $ +XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/Imakefile,v 1.7 2000/10/10 16:38:43 alanh Exp $ #define IHaveModules #include <Server.tmpl> @@ -13,8 +13,8 @@ MOBJ = drmmodule.o MTRR_DEFINES = -DHAS_MTRR_SUPPORT #endif -SRCS = xf86drm.c xf86drmHash.c xf86drmRandom.c xf86drmSL.c xf86drmI810.c xf86drmMga.c xf86drmR128.c $(MSRC) -OBJS = xf86drm.o xf86drmHash.o xf86drmRandom.o xf86drmSL.o xf86drmI810.o xf86drmMga.o xf86drmR128.o $(MOBJ) +SRCS = xf86drm.c xf86drmHash.c xf86drmRandom.c xf86drmSL.c xf86drmI810.c xf86drmMga.c xf86drmR128.c xf86drmSiS.c $(MSRC) +OBJS = xf86drm.o xf86drmHash.o xf86drmRandom.o xf86drmSL.o xf86drmI810.o xf86drmMga.o xf86drmR128.o xf86drmSiS.o $(MOBJ) INCLUDES = -I$(XF86COMSRC) -I$(XF86OSSRC) -I. -I$(SERVERSRC)/include \ -I$(XINCLUDESRC) -I$(EXTINCSRC) -I../.. -Ikernel diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.linux b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.linux index b76cbeaf6..adf190059 100644 --- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.linux +++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.linux @@ -113,15 +113,15 @@ all:; @echo Error: Could not locate kernel tree in $A $B $C else SMP := $(shell gcc -E -nostdinc -I$(TREE) picker.c 2>/dev/null \ | grep -s 'SMP = ' | cut -d' ' -f3) -MODULES := $(shell gcc -E -nostdinc -I $(TREE) picker.c 2>/dev/null \ +MODULES := $(shell gcc -E -nostdinc -I$(TREE) picker.c 2>/dev/null \ | grep -s 'MODULES = ' | cut -d' ' -f3) -MODVERSIONS := $(shell gcc -E -nostdinc -I $(TREE) picker.c 2>/dev/null \ +MODVERSIONS := $(shell gcc -E -nostdinc -I$(TREE) picker.c 2>/dev/null \ | grep -s 'MODVERSIONS = ' | cut -d' ' -f3) AGP := $(shell gcc -E -nostdinc -I$(TREE) picker.c 2>/dev/null \ | grep -s 'AGP = ' | cut -d' ' -f3) SIS := $(shell gcc -E -nostdinc -I$(TREE) picker.c 2>/dev/null \ | grep -s 'SIS = ' | cut -d' ' -f3) -PARAMS := $(shell if fgrep kill_fasync $(TREE)/linux/fs.h \ +PARAMS := $(shell if fgrep kill_fasync $(TREE)/linux/fs.h 2>/dev/null \ | egrep -q '(band|int, int)'; then echo 3; else echo 2; fi) MACHINE := $(shell echo `uname -m`) ifeq ($(AGP),0) diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm.h b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm.h index b182f2c99..57032d6e2 100644 --- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm.h +++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm.h @@ -82,6 +82,7 @@ typedef struct drm_clip_rect { #include "mga_drm.h" #include "i810_drm.h" #include "r128_drm.h" +#include "sis_drm.h" typedef struct drm_version { int version_major; /* Major version */ @@ -369,4 +370,14 @@ typedef struct drm_agp_info { #define DRM_IOCTL_R128_PACKET DRM_IOW( 0x44, drm_r128_packet_t) #define DRM_IOCTL_R128_VERTEX DRM_IOW( 0x45, drm_r128_vertex_t) +/* SiS specific ioctls */ +#define SIS_IOCTL_FB_ALLOC DRM_IOWR( 0x44, drm_sis_mem_t) +#define SIS_IOCTL_FB_FREE DRM_IOW( 0x45, drm_sis_mem_t) +#define SIS_IOCTL_AGP_INIT DRM_IOWR( 0x53, drm_sis_agp_t) +#define SIS_IOCTL_AGP_ALLOC DRM_IOWR( 0x54, drm_sis_mem_t) +#define SIS_IOCTL_AGP_FREE DRM_IOW( 0x55, drm_sis_mem_t) +#define SIS_IOCTL_FLIP DRM_IOW( 0x48, drm_sis_flip_t) +#define SIS_IOCTL_FLIP_INIT DRM_IO( 0x49) +#define SIS_IOCTL_FLIP_FINAL DRM_IO( 0x50) + #endif diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drmP.h b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drmP.h index 6be90c516..46e08e057 100644 --- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drmP.h +++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drmP.h @@ -59,6 +59,15 @@ #include <asm/io.h> #include <asm/mman.h> #include <asm/uaccess.h> + +#ifndef copy_to_user_ret +#define copy_to_user_ret(to,from,n,retval) ({ if (copy_to_user(to,from,n)) return retval; }) +#endif + +#ifndef copy_from_user_ret +#define copy_from_user_ret(to,from,n,retval) ({ if (copy_from_user(to,from,n)) return retval; }) +#endif + #ifdef CONFIG_MTRR #include <asm/mtrr.h> #endif diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_bufs.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_bufs.c index 05d941b4c..00c0ea7f9 100644 --- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_bufs.c +++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_bufs.c @@ -420,6 +420,7 @@ int mga_infobufs(struct inode *inode, struct file *filp, unsigned int cmd, sizeof(dma->bufs[0] .freelist.high_mark))) return -EFAULT; + ++count; } } diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/picker.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/picker.c index 77519a561..4b4fbe90c 100644 --- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/picker.c +++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/picker.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/picker.c,v 1.3 2000/09/01 02:31:40 tsi Exp $ */ #include <linux/config.h> #include <linux/version.h> diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/r128_drm.h b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/r128_drm.h index ac6f73bcd..8a0cd1967 100644 --- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/r128_drm.h +++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/r128_drm.h @@ -57,9 +57,9 @@ typedef struct drm_r128_init { } drm_r128_init_t; typedef struct drm_r128_packet { - unsigned long *buffer; - int count; - int flags; + void *buffer; + int count; + int flags; } drm_r128_packet_t; typedef enum drm_r128_prim { diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/r128_drv.h b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/r128_drv.h index 63b98c727..da2f676d3 100644 --- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/r128_drv.h +++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/r128_drv.h @@ -197,7 +197,7 @@ extern int r128_context_switch_complete(drm_device_t *dev, int new); #define R128_MAX_USEC_TIMEOUT 100000 /* 100 ms */ -#define R128_BASE(reg) ((u32)(dev_priv->mmio->handle)) +#define R128_BASE(reg) ((unsigned long)(dev_priv->mmio->handle)) #define R128_ADDR(reg) (R128_BASE(reg) + reg) #define R128_DEREF(reg) *(__volatile__ int *)R128_ADDR(reg) diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/sis_mm.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/sis_mm.c index e6e8ed7dd..9a8f83ea9 100644 --- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/sis_mm.c +++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/sis_mm.c @@ -33,9 +33,6 @@ #include "sis_drm.h" #include "sis_ds.h" #include "sis_drv.h" -#include <linux/fb.h> -#include <linux/sisfb.h> -#include <linux/interrupt.h> #define MAX_CONTEXT 100 #define VIDEO_TYPE 0 @@ -73,7 +70,7 @@ static int del_alloc_set(int context, int type, unsigned int val) } /* fb management via fb device */ -#if 1 +#if 0 int sis_fb_alloc(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) { diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c index c933f5935..5c2c08c3b 100644 --- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c +++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c @@ -27,7 +27,7 @@ * Authors: Rickard E. (Rik) Faith <faith@valinux.com> * Kevin E. Martin <martin@valinux.com> * - * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c,v 1.16 2000/08/28 16:55:52 dawes Exp $ + * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c,v 1.17 2000/09/24 13:51:32 alanh Exp $ * */ diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/int10/linux.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/int10/linux.c index 71cbf4bcf..04a9ececc 100644 --- a/xc/programs/Xserver/hw/xfree86/os-support/linux/int10/linux.c +++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/int10/linux.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/int10/linux.c,v 1.14 2000/07/21 21:04:05 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/int10/linux.c,v 1.15 2000/10/17 16:53:20 tsi Exp $ */ /* * linux specific part of the int10 module * Copyright 1999 Egbert Eich @@ -12,7 +12,11 @@ #define _INT10_PRIVATE #include "xf86int10.h" #include "int10Defines.h" +#ifdef __sparc__ +#define DEV_MEM "/dev/fb" +#else #define DEV_MEM "/dev/mem" +#endif #ifndef XFree86LOADER #include <sys/mman.h> #ifndef MAP_FAILED diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/lnxResource.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/lnxResource.c index c1db77996..5e783fcf2 100644 --- a/xc/programs/Xserver/hw/xfree86/os-support/linux/lnxResource.c +++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/lnxResource.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnxResource.c,v 3.10 2000/09/19 12:46:22 eich Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnxResource.c,v 3.11 2000/10/17 16:53:20 tsi Exp $ */ /* Resource information code */ @@ -156,7 +156,11 @@ xf86AccResFromOS(resPtr ret) * for now until we get something better. */ +#ifdef __sparc__ +resRange PciAvoid[] = {_END}; +#else resRange PciAvoid[] = {_PCI_AVOID_PC_STYLE, _END}; +#endif resPtr xf86BusAccWindowsFromOS(void) @@ -167,7 +171,11 @@ xf86BusAccWindowsFromOS(void) RANGE(range,0,0xffffffff,ResExcMemBlock); ret = xf86AddResToList(ret, &range, -1); +#ifdef __sparc__ + RANGE(range,0,0x00ffffff,ResExcIoBlock); +#else RANGE(range,0,0x0000ffff,ResExcIoBlock); +#endif ret = xf86AddResToList(ret, &range, -1); return ret; } @@ -181,7 +189,11 @@ xf86PciBusAccWindowsFromOS(void) RANGE(range,0,0xffffffff,ResExcMemBlock); ret = xf86AddResToList(ret, &range, -1); +#ifdef __sparc__ + RANGE(range,0,0x00ffffff,ResExcIoBlock); +#else RANGE(range,0,0x0000ffff,ResExcIoBlock); +#endif ret = xf86AddResToList(ret, &range, -1); return ret; } @@ -195,7 +207,11 @@ xf86IsaBusAccWindowsFromOS(void) RANGE(range,0,0xffffffff,ResExcMemBlock); ret = xf86AddResToList(ret, &range, -1); +#ifdef __sparc__ + RANGE(range,0,0x00ffffff,ResExcIoBlock); +#else RANGE(range,0,0x0000ffff,ResExcIoBlock); +#endif ret = xf86AddResToList(ret, &range, -1); return ret; } diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_pci.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_pci.c index a47431310..6d3e0644d 100644 --- a/xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_pci.c +++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_pci.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_pci.c,v 3.4 2000/02/08 17:19:22 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_pci.c,v 3.5 2000/10/17 16:53:20 tsi Exp $ */ #include <stdio.h> #include "X.h" @@ -28,14 +28,9 @@ xf86GetPciSizeFromOS(PCITAG tag, int index, int* bits) do { res = fgets(c,0xff,file); if (res) { -#if defined WORD64 || defined LONG64 -#define ILF "\t%*16x\t%*16x\t%*16x\t%*16x\t%*16x\t%*16x\t%*16x" -#define LF "\t%16x\t%16x\t%16x\t%16x\t%16x\t%16x\t%16x" -#else -#define ILF "\t%*08x\t%*08x\t%*08x\t%*08x\t%*08x\t%*08x\t%*08x" -#define LF "\t%08x\t%08x\t%08x\t%08x\t%08x\t%08x\t%08x" -#endif - num = sscanf(res,"%02x%02x\t%*04x%*04x\t%*x"ILF LF, + num = sscanf(res,"%02x%02x\t%*04x%*04x\t%*x" + "\t%*x\t%*x\t%*x\t%*x\t%*x\t%*x\t%*x" + "\t%x\t%x\t%x\t%x\t%x\t%x\t%x", &bus,&devfn,&size[0],&size[1],&size[2],&size[3], &size[4],&size[5],&size[6]); if (num != 9) { /* apparantly not 2.3 style */ diff --git a/xc/programs/Xserver/hw/xfree86/os-support/shared/drm/kernel/drm.h b/xc/programs/Xserver/hw/xfree86/os-support/shared/drm/kernel/drm.h index b182f2c99..57032d6e2 100644 --- a/xc/programs/Xserver/hw/xfree86/os-support/shared/drm/kernel/drm.h +++ b/xc/programs/Xserver/hw/xfree86/os-support/shared/drm/kernel/drm.h @@ -82,6 +82,7 @@ typedef struct drm_clip_rect { #include "mga_drm.h" #include "i810_drm.h" #include "r128_drm.h" +#include "sis_drm.h" typedef struct drm_version { int version_major; /* Major version */ @@ -369,4 +370,14 @@ typedef struct drm_agp_info { #define DRM_IOCTL_R128_PACKET DRM_IOW( 0x44, drm_r128_packet_t) #define DRM_IOCTL_R128_VERTEX DRM_IOW( 0x45, drm_r128_vertex_t) +/* SiS specific ioctls */ +#define SIS_IOCTL_FB_ALLOC DRM_IOWR( 0x44, drm_sis_mem_t) +#define SIS_IOCTL_FB_FREE DRM_IOW( 0x45, drm_sis_mem_t) +#define SIS_IOCTL_AGP_INIT DRM_IOWR( 0x53, drm_sis_agp_t) +#define SIS_IOCTL_AGP_ALLOC DRM_IOWR( 0x54, drm_sis_mem_t) +#define SIS_IOCTL_AGP_FREE DRM_IOW( 0x55, drm_sis_mem_t) +#define SIS_IOCTL_FLIP DRM_IOW( 0x48, drm_sis_flip_t) +#define SIS_IOCTL_FLIP_INIT DRM_IO( 0x49) +#define SIS_IOCTL_FLIP_FINAL DRM_IO( 0x50) + #endif diff --git a/xc/programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c b/xc/programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c index 247125e6d..9a7a85a31 100644 --- a/xc/programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c +++ b/xc/programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c,v 1.69 2000/09/19 12:46:22 eich Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c,v 1.70 2000/09/26 15:57:20 tsi Exp $ */ /* * Copyright 1997 by The XFree86 Project, Inc. * @@ -1888,12 +1888,12 @@ xf86shmdt(char *addr) int xf86setjmp(xf86jmp_buf xf86env) { - return setjmp(xf86env); + return setjmp((void *)xf86env); } void xf86longjmp(xf86jmp_buf xf86env, int val) { - longjmp(xf86env,val); + longjmp((void *)xf86env, val); } diff --git a/xc/programs/Xserver/hw/xfree86/os-support/vbe/vbe.c b/xc/programs/Xserver/hw/xfree86/os-support/vbe/vbe.c index 84639a593..0b32b0218 100644 --- a/xc/programs/Xserver/hw/xfree86/os-support/vbe/vbe.c +++ b/xc/programs/Xserver/hw/xfree86/os-support/vbe/vbe.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/vbe/vbe.c,v 1.12 2000/08/04 16:13:41 eich Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/vbe/vbe.c,v 1.13 2000/10/12 11:19:41 tsi Exp $ */ #include "xf86.h" #include "xf86_ansic.h" @@ -60,20 +60,23 @@ VBEInit(xf86Int10InfoPtr pInt, int entityIndex) xf86ExecX86int10(pInt); - if ((pInt->ax & 0xff) != 0x4f) goto error; + if ((pInt->ax & 0xff) != 0x4f) { + xf86DrvMsgVerb(screen,X_INFO,3,"VESA BIOS not detected\n"); + goto error; + } switch (pInt->ax & 0xff00) { case 0: - xf86DrvMsg(screen,X_INFO,"VESA Bios detected\n"); + xf86DrvMsg(screen,X_INFO,"VESA BIOS detected\n"); break; case 0x100: - xf86DrvMsg(screen,X_INFO,"VESA Bios function failed\n"); + xf86DrvMsg(screen,X_INFO,"VESA BIOS function failed\n"); goto error; case 0x200: - xf86DrvMsg(screen,X_INFO,"VESA Bios not supported\n"); + xf86DrvMsg(screen,X_INFO,"VESA BIOS not supported\n"); goto error; case 0x300: - xf86DrvMsg(screen,X_INFO,"VESA Bios not supported in current mode\n"); + xf86DrvMsg(screen,X_INFO,"VESA BIOS not supported in current mode\n"); goto error; default: xf86DrvMsg(screen,X_INFO,"Invalid\n"); diff --git a/xc/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h b/xc/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h index a129fc0cf..58c86a106 100644 --- a/xc/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h +++ b/xc/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h @@ -22,7 +22,7 @@ * */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h,v 3.42 2000/09/19 12:46:21 eich Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h,v 3.43 2000/10/24 22:45:10 dawes Exp $ */ #ifndef _XF86_ANSIC_H #define _XF86_ANSIC_H @@ -62,8 +62,12 @@ #endif #ifndef NULL +#if (defined(SVR4) || defined(SYSV)) && !defined(__GNUC__) +#define NULL 0 +#else #define NULL ((void *)0) #endif +#endif #ifndef EOF #define EOF (-1) #endif diff --git a/xc/programs/Xserver/hw/xfree86/os-support/xf86drm.h b/xc/programs/Xserver/hw/xfree86/os-support/xf86drm.h index 563daff13..de77ddd8b 100644 --- a/xc/programs/Xserver/hw/xfree86/os-support/xf86drm.h +++ b/xc/programs/Xserver/hw/xfree86/os-support/xf86drm.h @@ -26,7 +26,7 @@ * * Author: Rickard E. (Rik) Faith <faith@valinux.com> * - * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86drm.h,v 1.11 2000/08/28 16:27:00 dawes Exp $ + * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86drm.h,v 1.12 2000/09/24 13:51:32 alanh Exp $ * */ diff --git a/xc/programs/Xserver/hw/xfree86/os-support/xf86drmMga.h b/xc/programs/Xserver/hw/xfree86/os-support/xf86drmMga.h index 33c523a00..75157024f 100644 --- a/xc/programs/Xserver/hw/xfree86/os-support/xf86drmMga.h +++ b/xc/programs/Xserver/hw/xfree86/os-support/xf86drmMga.h @@ -1,5 +1,7 @@ +/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86drmMga.h,v 3.3 2000/09/26 15:57:19 tsi Exp $ */ -/* WARNING: If you change any of these defines, make sure to change +/* + * WARNING: If you change any of these defines, make sure to change * the kernel include file as well (mga_drm.h) */ diff --git a/xc/programs/Xserver/hw/xfree86/xaa/xaaInit.c b/xc/programs/Xserver/hw/xfree86/xaa/xaaInit.c index d5f4cd97a..69c2dce13 100644 --- a/xc/programs/Xserver/hw/xfree86/xaa/xaaInit.c +++ b/xc/programs/Xserver/hw/xfree86/xaa/xaaInit.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaInit.c,v 1.30 2000/09/24 18:28:56 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaInit.c,v 1.31 2000/09/28 20:48:00 mvojkovi Exp $ */ #include "misc.h" #include "xf86.h" @@ -106,6 +106,7 @@ XAAInit(ScreenPtr pScreen, XAAInfoRecPtr infoRec) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; XAAScreenPtr pScreenPriv; + int i; #ifdef RENDER PictureScreenPtr ps = GetPictureScreen(pScreen); #endif @@ -134,10 +135,16 @@ XAAInit(ScreenPtr pScreen, XAAInfoRecPtr infoRec) infoRec->Flags &= ~(PIXMAP_CACHE | OFFSCREEN_PIXMAPS); if(!(infoRec->Flags & LINEAR_FRAMEBUFFER)) infoRec->Flags &= ~OFFSCREEN_PIXMAPS; -#if 0 - if(pScreen->backingStoreSupport || pScreen->saveUnderSupport) - infoRec->Flags &= ~OFFSCREEN_PIXMAPS; -#endif + + if(!infoRec->FullPlanemask) { /* for backwards compatibility */ + infoRec->FullPlanemask = (1 << pScrn->depth) - 1; + infoRec->FullPlanemasks[pScrn->depth - 1] = infoRec->FullPlanemask; + } + + for(i = 0; i < 32; i++) { + if(!infoRec->FullPlanemasks[i]) /* keep any set by caller */ + infoRec->FullPlanemasks[i] = (1 << (i+1)) - 1; + } if(!XAAInitAccel(pScreen, infoRec)) return FALSE; pScreenPriv->AccelInfoRec = infoRec; @@ -275,7 +282,8 @@ XAAGetImage ( ((pDraw->type == DRAWABLE_WINDOW) || IS_OFFSCREEN_PIXMAP(pDraw))) { if(infoRec->ReadPixmap && (format == ZPixmap) && - ((planemask & infoRec->FullPlanemask) == infoRec->FullPlanemask) && + ((planemask & infoRec->FullPlanemasks[pDraw->depth - 1]) == + infoRec->FullPlanemasks[pDraw->depth - 1]) && (pDraw->bitsPerPixel == BitsPerPixel(pDraw->depth))) { (*infoRec->ReadPixmap)(pScrn, diff --git a/xc/programs/Xserver/hw/xfree86/xaa/xaaPict.c b/xc/programs/Xserver/hw/xfree86/xaa/xaaPict.c index f8fdde77c..b065aa35b 100644 --- a/xc/programs/Xserver/hw/xfree86/xaa/xaaPict.c +++ b/xc/programs/Xserver/hw/xfree86/xaa/xaaPict.c @@ -1,5 +1,5 @@ /* - * $XFree86$ + * $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaPict.c,v 1.5 2000/10/22 20:54:30 mvojkovi Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -33,13 +33,250 @@ #include "windowstr.h" #include "xf86str.h" #include "mi.h" -#include "miline.h" +#include "picturestr.h" +#include "glyphstr.h" +#include "picture.h" +#include "mipict.h" #include "xaa.h" #include "xaalocal.h" #include "xaawrap.h" #include "xf86fbman.h" #include "servermd.h" +static Bool +XAAGetRGBAFromPixel( + CARD32 pixel, + CARD16 *red, + CARD16 *green, + CARD16 *blue, + CARD16 *alpha, + CARD32 format +){ + + *alpha = 0xffff; + + switch(PICT_FORMAT_BPP(format)) { + case 32: + switch(format) { + case PICT_a8r8g8b8: + *alpha = (pixel >> 24) & 0x000000ff; + *alpha |= *alpha << 8; + case PICT_x8r8g8b8: + *blue = pixel & 0x000000ff; + *blue |= *blue << 8; + *green = pixel & 0x0000ff00; + *green |= *green >> 8; + *red = (pixel >> 16) & 0x000000ff; + *red |= *red << 8; + return TRUE; + case PICT_a8b8g8r8: + *alpha = (pixel >> 24) & 0x000000ff; + *alpha |= *alpha << 8; + case PICT_x8b8g8r8: + *red = pixel & 0x000000ff; + *red |= *red << 8; + *green = pixel & 0x0000ff00; + *green |= *green >> 8; + *blue = (pixel >> 16) & 0x000000ff; + *blue |= *blue << 8; + return TRUE; + default: + break; + } + break; + case 24: + switch(format) { + case PICT_r8g8b8: + *blue = pixel & 0x000000ff; + *blue |= *blue << 8; + *green = pixel & 0x0000ff00; + *green |= *green >> 8; + *red = (pixel >> 16) & 0x000000ff; + *red |= *red << 8; + return TRUE; + case PICT_b8g8r8: + *red = pixel & 0x000000ff; + *red |= *red << 8; + *green = pixel & 0x0000ff00; + *green |= *green >> 8; + *blue = (pixel >> 16) & 0x000000ff; + *blue |= *blue << 8; + return TRUE; + default: + break; + } + break; + case 16: + case 8: + case 4: + default: + return FALSE; + } + + return FALSE; +} + +/* 8:8:8 + PICT_a8 -> 8:8:8:8 texture */ + +void +XAA_888_plus_PICT_a8_to_8888 ( + CARD32 color, + CARD8 *alphaPtr, /* in bytes */ + int alphaPitch, + CARD32 *dstPtr, + int dstPitch, /* in dwords */ + int width, + int height +){ + int x; + + color &= 0x00ffffff; + + while(height--) { + for(x = 0; x < width; x++) + dstPtr[x] = color | (alphaPtr[x] << 24); + dstPtr += dstPitch; + alphaPtr += alphaPitch; + } +} + + +Bool +XAADoComposite ( + CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst, + CARD16 width, + CARD16 height +){ + ScreenPtr pScreen = pDst->pDrawable->pScreen; + XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen); + RegionRec region; + CARD32 *formats; + BoxPtr pbox; + int nbox; + + if(!infoRec->pScrn->vtSema || + ((pDst->pDrawable->type != DRAWABLE_WINDOW) && + !IS_OFFSCREEN_PIXMAP(pDst->pDrawable))) + return FALSE; + + xDst += pDst->pDrawable->x; + yDst += pDst->pDrawable->y; + xSrc += pSrc->pDrawable->x; + ySrc += pSrc->pDrawable->y; + + if(pMask) { + /* for now we only do it if there is a 1x1 (solid) source */ + + if((pSrc->pDrawable->width == 1) && (pSrc->pDrawable->height == 1)) { + CARD16 red, green, blue, alpha; + CARD32 pixel = + *((CARD32*)(((PixmapPtr)(pSrc->pDrawable))->devPrivate.ptr)); + + if(!XAAGetRGBAFromPixel(pixel,&red,&green,&blue,&alpha,pSrc->format)) + return FALSE; + + if((alpha != 0xffff) && + (infoRec->CPUToScreenAlphaTextureFlags & XAA_RENDER_NO_SRC_ALPHA)) + return FALSE; + + formats = infoRec->CPUToScreenAlphaTextureFormats; + + while(*formats != pMask->format) { + if(!(*formats)) return FALSE; + formats++; + } + + xMask += pMask->pDrawable->x; + yMask += pMask->pDrawable->y; + + if (!miComputeCompositeRegion (®ion, pSrc, pMask, pDst, + xSrc, ySrc, xMask, yMask, xDst, yDst, + width, height)) + return TRUE; + + nbox = REGION_NUM_RECTS(®ion); + pbox = REGION_RECTS(®ion); + + if(!nbox) + return TRUE; + + if(!(infoRec->SetupForCPUToScreenAlphaTexture)(infoRec->pScrn, + op, red, green, blue, alpha, pMask->format, + ((PixmapPtr)(pMask->pDrawable))->devPrivate.ptr, + ((PixmapPtr)(pMask->pDrawable))->devKind, + pMask->pDrawable->width, pMask->pDrawable->height, 0)) + return FALSE; + + xMask -= xDst; + yMask -= yDst; + + while(nbox--) { + (*infoRec->SubsequentCPUToScreenAlphaTexture)(infoRec->pScrn, + pbox->x1, pbox->y1, + pbox->x1 + xMask, pbox->y1 + yMask, + pbox->x2 - pbox->x1, pbox->y2 - pbox->y1); + pbox++; + } + + SET_SYNC_FLAG(infoRec); + REGION_UNINIT(pScreen, ®ion); + return TRUE; + } + } else { + formats = infoRec->CPUToScreenTextureFormats; + + while(*formats != pSrc->format) { + if(!(*formats)) return FALSE; + formats++; + } + + if (!miComputeCompositeRegion (®ion, pSrc, pMask, pDst, + xSrc, ySrc, xMask, yMask, xDst, yDst, + width, height)) + return TRUE; + + nbox = REGION_NUM_RECTS(®ion); + pbox = REGION_RECTS(®ion); + + if(!nbox) + return TRUE; + + if(!(infoRec->SetupForCPUToScreenTexture)(infoRec->pScrn, + op, pSrc->format, + ((PixmapPtr)(pSrc->pDrawable))->devPrivate.ptr, + ((PixmapPtr)(pSrc->pDrawable))->devKind, + pSrc->pDrawable->width, pSrc->pDrawable->height, 0)) + return FALSE; + + xSrc -= xDst; + ySrc -= yDst; + + while(nbox--) { + (*infoRec->SubsequentCPUToScreenTexture)(infoRec->pScrn, + pbox->x1, pbox->y1, + pbox->x1 + xSrc, pbox->y1 + ySrc, + pbox->x2 - pbox->x1, pbox->y2 - pbox->y1); + pbox++; + } + + SET_SYNC_FLAG(infoRec); + REGION_UNINIT(pScreen, ®ion); + return TRUE; + } + + + return FALSE; +} + void XAAComposite (CARD8 op, @@ -56,9 +293,16 @@ XAAComposite (CARD8 op, CARD16 height) { ScreenPtr pScreen = pDst->pDrawable->pScreen; + XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen); XAA_RENDER_PROLOGUE(pScreen, Composite); - SYNC_CHECK(pDst->pDrawable); - (*GetPictureScreen(pScreen)->Composite) (op, + + if(!infoRec->Composite || + !(*infoRec->Composite)(op, pSrc, pMask, pDst, + xSrc, ySrc, xMask, yMask, xDst, yDst, + width, height)) + { + SYNC_CHECK(pDst->pDrawable); + (*GetPictureScreen(pScreen)->Composite) (op, pSrc, pMask, pDst, @@ -70,6 +314,11 @@ XAAComposite (CARD8 op, yDst, width, height); + } + + if(pDst->pDrawable->type == DRAWABLE_PIXMAP) + (XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pDst->pDrawable)))->flags |= DIRTY; + XAA_RENDER_EPILOGUE(pScreen, Composite, XAAComposite); } @@ -85,9 +334,20 @@ XAAGlyphs (CARD8 op, GlyphPtr *glyphs) { ScreenPtr pScreen = pDst->pDrawable->pScreen; + XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen); XAA_RENDER_PROLOGUE(pScreen, Glyphs); - SYNC_CHECK(pDst->pDrawable); - (*GetPictureScreen(pScreen)->Glyphs) (op, pSrc, pDst, maskFormat, + + if(!infoRec->Glyphs || + !(*infoRec->Glyphs)(op, pSrc, pDst, maskFormat, + xSrc, ySrc, nlist, list, glyphs)) + { + SYNC_CHECK(pDst->pDrawable); + (*GetPictureScreen(pScreen)->Glyphs) (op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs); + } + + if(pDst->pDrawable->type == DRAWABLE_PIXMAP) + (XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pDst->pDrawable)))->flags |= DIRTY; + XAA_RENDER_EPILOGUE(pScreen, Glyphs, XAAGlyphs); } diff --git a/xc/programs/Xserver/hw/xfree86/xf86cfg/Imakefile b/xc/programs/Xserver/hw/xfree86/xf86cfg/Imakefile index 702961eb8..8b81fb207 100644 --- a/xc/programs/Xserver/hw/xfree86/xf86cfg/Imakefile +++ b/xc/programs/Xserver/hw/xfree86/xf86cfg/Imakefile @@ -1,7 +1,12 @@ -XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/Imakefile,v 1.6 2000/06/13 23:15:51 dawes Exp $ +XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/Imakefile,v 1.9 2000/10/23 21:16:51 tsi Exp $ XCOMM CDEBUGFLAGS=-g -Wall -ansi -pedantic +#if DoLoadableServer +LDSRCS = libc_wrapper.c loader.c +LDOBJS = libc_wrapper.o loader.o +#endif + SRCS =\ accessx.c\ card-cfg.c\ @@ -10,12 +15,14 @@ SRCS =\ help.c\ interface.c\ keyboard-cfg.c\ + $(LDSRCS) \ monitor-cfg.c\ mouse-cfg.c\ options.c\ screen-cfg.c\ screen.c\ startx.c\ + stubs.c\ vidmode.c\ xf86config.c @@ -27,12 +34,14 @@ OBJS =\ help.o\ interface.o\ keyboard-cfg.o\ + $(LDOBJS) \ monitor-cfg.o\ mouse-cfg.o\ options.o\ screen-cfg.o\ screen.o\ startx.o\ + stubs.o\ vidmode.o\ xf86config.o @@ -61,9 +70,21 @@ XPMPICS =\ AllTarget(ProgramTargetName($(PROG))) +#if DoLoadableServer +LOADERLIB = -L../loader -lxloader -L../dummylib -ldummy +DEFINES = -DUSE_MODULES +INCLUDES = -I../common -I../loader -I$(XF86OSSRC) \ + -I$(SERVERSRC)/include -I$(XINCLUDESRC) +WRAPPERDEFINES = -DSELF_CONTAINED_WRAPPER +#endif + +#if HasDlopen +DLLIB = DlLibrary +#endif + LOCAL_LIBRARIES = $(XKBUILIB) $(XKBFILELIB) -lxf86config $(XXF86MISCLIB) \ $(XXF86VMLIB) $(XAWLIB) $(XMULIB) $(XTOOLLIB) \ - $(XPMLIB) $(XLIB) -lm + $(XPMLIB) $(LOADERLIB) $(DLLIB) $(XLIB) -lm NormalProgramTarget($(PROG),$(OBJS),,$(LOCAL_LIBRARIES),) InstallProgramWithFlags($(PROG),$(BINDIR),NullParameter) @@ -73,4 +94,10 @@ InstallAppDefaults(XF86Cfg) InstallManPage(xf86cfg,$(MANDIR)) NormalLibraryObjectRule() + +#if DoLoadableServer +LinkSourceFile(libc_wrapper.c, $(XF86OSSRC)/shared) +SpecialCObjectRule(libc_wrapper,NullParameter,$(WRAPPERDEFINES) $(EXT_DEFINES)) +#endif + DependTarget() diff --git a/xc/programs/Xserver/hw/xfree86/xf86cfg/XF86Cfg.ad b/xc/programs/Xserver/hw/xfree86/xf86cfg/XF86Cfg.ad index 2ef449bbd..4702a17e2 100644 --- a/xc/programs/Xserver/hw/xfree86/xf86cfg/XF86Cfg.ad +++ b/xc/programs/Xserver/hw/xfree86/xf86cfg/XF86Cfg.ad @@ -26,7 +26,7 @@ !! !! Author: Paulo César Pereira de Andrade <pcpa@conectiva.com.br> !! -!! $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/XF86Cfg.ad,v 1.4 2000/08/01 20:05:43 dawes Exp $ +!! $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/XF86Cfg.ad,v 1.5 2000/10/20 14:59:05 alanh Exp $ !! *Form.background: gray85 @@ -193,6 +193,7 @@ lines -1,0,0,0,0,-1 *commands.card.tip: Add video card *commands.monitor.tip: Add monitor +*topM.justify: left *topM.label: Configure Layout *topM*layout.label: Configure Layout *topM*screen.label: Configure Screen @@ -201,6 +202,9 @@ lines -1,0,0,0,0,-1 *topM.showGrip: False *work.showGrip: False +*MenuButton.leftBitmap: menu10 +*SmeBSB.HorizontalMargins: 18 + *back.label: << Back *next.label: Next >> *ok.label: Ok @@ -359,12 +363,26 @@ lines -1,0,0,0,0,-1 *cardModel.filter.fromHoriz: label *cardModel.filter.width: 171 *cardModel.viewport.width: 302 -*cardModel.viewport.height: 244 +*cardModel.viewport.height: 212 +*cardModel.driver.justify: left +*cardModel.driverL.label: Driver +*cardModel.driverL.fromVert: viewport +*cardModel.driverL.width: 50 +*cardModel.driverL.justify: right +*cardModel.driver.fromVert: viewport +*cardModel.driver.fromHoriz: driverL +*cardModel.driver.width: 250 +*cardModel.driver.left: chainRight +*cardModel.driver.right: chainRight *cardModel.busidL.label: BusID -*cardModel.busidL.fromVert: viewport -*cardModel.busid.fromVert: viewport +*cardModel.busidL.fromVert: driver +*cardModel.busidL.width: 50 +*cardModel.busidL.justify: right +*cardModel.busid.fromVert: driver *cardModel.busid.fromHoriz: busidL -*cardModel.busid.width: 255 +*cardModel.busid.width: 250 +*cardModel.busid.left: chainRight +*cardModel.busid.right: chainRight *cardModel.viewport.forceBars: True *cardModel.viewport.allowVert: True *cardModel.viewport.useRight: True @@ -398,18 +416,18 @@ lines -1,0,0,0,0,-1 .xf86cfg.pane.work.Simple.borderWidth: 1 .xf86cfg.pane.work.Simple.translations:\ -<Btn1Down>: select-device()\n\ -<Btn1Motion>: move-device()\n\ -<Btn1Up>: unselect-device()\n\ -<Btn3Down>: device-popup()\n\ -<Btn3Up>: device-popdown() +Any<Btn1Down>: select-device()\n\ +Any<Btn1Motion>: move-device()\n\ +Any<Btn1Up>: unselect-device()\n\ +Any<Btn3Down>: device-popup()\n\ +Any<Btn3Up>: device-popdown() .xf86cfg.pane.work.screen.translations:\ -<Btn1Down>: select-device()\n\ -<Btn1Motion>: move-device()\n\ -<Btn1Up>: unselect-device()\n\ -<Btn3Down>: device-popup()\n\ -<Btn3Up>: device-popdown() +Any<Btn1Down>: select-device()\n\ +Any<Btn1Motion>: move-device()\n\ +Any<Btn1Up>: unselect-device()\n\ +Any<Btn3Down>: device-popup()\n\ +Any<Btn3Up>: device-popdown() XF86Cfg.translations: #override \ <Message>WM_PROTOCOLS: quit() @@ -473,6 +491,14 @@ XF86Cfg.translations: #override \ *options*viewport.right: chainRight *options*list.longest: 376 +*options*driverOpts.label: Options for driver\ +*options*driverOpts.justify: left +*options*driverOpts.width: 278 +*options*popdown.label: Popdown dialog +*options*driverOpts.tip: This menu shows:\n\ + o option name\n\ + o option type + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! monitor !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -760,10 +786,16 @@ Press ESC or stop button to quit. *screenD*unselect.fromHoriz: viewL *screenD*select.fromVert: modeL *screenD*unselect.fromVert: select +*screenD*up.fromHoriz: viewL +*screenD*down.fromHoriz: viewL +*screenD*up.fromVert: unselect +*screenD*down.fromVert: up *screenD*viewR.fromHoriz: select *screenD*viewR.fromVert: modeL -*screenD*select.label: -> -*screenD*unselect.label: <- +*screenD*select.bitmap: right.xbm +*screenD*unselect.bitmap: left.xbm +*screenD*up.bitmap: up.xbm +*screenD*down.bitmap: down.xbm *screenD*viewL.width: 133 *screenD*viewR.width: 133 *screenD*viewL.height: 184 diff --git a/xc/programs/Xserver/hw/xfree86/xf86cfg/accessx.c b/xc/programs/Xserver/hw/xfree86/xf86cfg/accessx.c index 3a5557fe8..3842ff230 100644 --- a/xc/programs/Xserver/hw/xfree86/xf86cfg/accessx.c +++ b/xc/programs/Xserver/hw/xfree86/xf86cfg/accessx.c @@ -26,7 +26,7 @@ * * Author: Paulo César Pereira de Andrade <pcpa@conectiva.com.br> * - * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/accessx.c,v 1.5 2000/08/01 20:05:43 dawes Exp $ + * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/accessx.c,v 1.7 2000/10/20 14:59:05 alanh Exp $ */ #include "config.h" @@ -84,6 +84,10 @@ static void ScaleJumpCallback(Widget, XtPointer, XtPointer); static void ApplyCallback(Widget, XtPointer, XtPointer); static void AccessXInitialize(void); +void CloseAccessXAction(Widget, XEvent*, String*, Cardinal*); +void AccessXConfigureStart(void); +void AccessXConfigureEnd(void); + /* * Implementation */ @@ -368,7 +372,7 @@ AccessXInitialize(void) XtSetArg(args[0], XtNstate, &state); XtGetValues(timeoutToggle, args, 1); - ScaleEnableCallback(enable, (XtPointer)timeout, (XtPointer)(int)state); + ScaleEnableCallback(enable, (XtPointer)timeout, (XtPointer)(long)state); if (xkb_info->xkb->ctrls->ax_timeout > 60) val = (float)(xkb_info->xkb->ctrls->ax_timeout - 60) / (float)(MAX_TIMEOUT * 60); @@ -378,11 +382,11 @@ AccessXInitialize(void) XtSetArg(args[0], XtNstate, &state); XtGetValues(sticky, args, 1); - EnableCallback(sticky, (XtPointer)stickyForm, (XtPointer)(int)state); + EnableCallback(sticky, (XtPointer)stickyForm, (XtPointer)(long)state); XtSetArg(args[0], XtNstate, &state); XtGetValues(mouse, args, 1); - EnableCallback(mouse, (XtPointer)mouseForm, (XtPointer)(int)state); + EnableCallback(mouse, (XtPointer)mouseForm, (XtPointer)(long)state); if (xkb_info->xkb->ctrls->mk_time_to_max > 10) val = (float)((xkb_info->xkb->ctrls->mk_time_to_max * (40. / 10.))) / (float)(MAX_MOUSE_TIME * 100); @@ -408,7 +412,7 @@ AccessXInitialize(void) XtSetArg(args[0], XtNstate, &state); XtGetValues(repeat, args, 1); - EnableCallback(repeat, (XtPointer)repeatForm, (XtPointer)(int)state); + EnableCallback(repeat, (XtPointer)repeatForm, (XtPointer)(long)state); if (xkb_info->xkb->ctrls->repeat_interval > 5) val = (float)(xkb_info->xkb->ctrls->repeat_interval - 5) / (float)(MAX_REPEAT_RATE * 1000); @@ -426,7 +430,7 @@ AccessXInitialize(void) XtSetArg(args[0], XtNstate, &state); XtGetValues(slowToggle, args, 1); - EnableCallback(slowToggle, (XtPointer)slowForm, (XtPointer)(int)state); + EnableCallback(slowToggle, (XtPointer)slowForm, (XtPointer)(long)state); if (xkb_info->xkb->ctrls->slow_keys_delay > 10) val = (float)(xkb_info->xkb->ctrls->repeat_delay - 10) / (float)(MAX_SLOW_TIME * 1000); @@ -436,7 +440,7 @@ AccessXInitialize(void) XtSetArg(args[0], XtNstate, &state); XtGetValues(bounceToggle, args, 1); - EnableCallback(bounceToggle, (XtPointer)bounceForm, (XtPointer)(int)state); + EnableCallback(bounceToggle, (XtPointer)bounceForm, (XtPointer)(long)state); if (xkb_info->xkb->ctrls->debounce_delay > 10) val = (float)(xkb_info->xkb->ctrls->debounce_delay - 10) / (float)(MAX_BOUNCE_TIME * 1000); @@ -446,7 +450,7 @@ AccessXInitialize(void) XtSetArg(args[0], XtNstate, &state); XtGetValues(enable, args, 1); - EnableCallback(enable, (XtPointer)form, (XtPointer)(int)state); + EnableCallback(enable, (XtPointer)form, (XtPointer)(long)state); } void @@ -467,7 +471,7 @@ AccessXConfigureEnd(void) static void EnableCallback(Widget w, XtPointer user_data, XtPointer call_data) { - XtSetSensitive((XtPointer)user_data, (int)call_data); + XtSetSensitive(user_data, (long)call_data); } /*ARGSUSED*/ @@ -476,9 +480,9 @@ ScaleEnableCallback(Widget w, XtPointer user_data, XtPointer call_data) { Scale *scale = (Scale*)user_data; - XtSetSensitive(scale->label, (int)call_data); - XtSetSensitive(scale->number, (int)call_data); - XtSetSensitive(scale->scroller, (int)call_data); + XtSetSensitive(scale->label, (long)call_data); + XtSetSensitive(scale->number, (long)call_data); + XtSetSensitive(scale->scroller, (long)call_data); } static void diff --git a/xc/programs/Xserver/hw/xfree86/xf86cfg/card-cfg.c b/xc/programs/Xserver/hw/xfree86/xf86cfg/card-cfg.c index 8513a9089..a8bb243d2 100644 --- a/xc/programs/Xserver/hw/xfree86/xf86cfg/card-cfg.c +++ b/xc/programs/Xserver/hw/xfree86/xf86cfg/card-cfg.c @@ -26,33 +26,45 @@ * * Author: Paulo César Pereira de Andrade <pcpa@conectiva.com.br> * - * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/card-cfg.c,v 1.2 2000/06/13 23:15:51 dawes Exp $ + * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/card-cfg.c,v 1.3 2000/10/20 14:59:05 alanh Exp $ */ #include "xf86config.h" #include "mouse-cfg.h" #include "cards.h" +#include "card-cfg.h" #include <X11/Xaw/AsciiText.h> #include <X11/Xaw/Form.h> #include <X11/Xaw/Label.h> #include <X11/Xaw/List.h> +#include <X11/Xaw/MenuButton.h> +#include <X11/Xaw/SmeBSB.h> +#include <X11/Xaw/SimpleMenu.h> #include <X11/Xaw/Viewport.h> +#ifdef USE_MODULES +#include "loader.h" +#endif /* * Prototypes */ static Bool CardConfigCheck(void); static void CardModelCallback(Widget, XtPointer, XtPointer); +#ifdef USE_MODULES +static void DriverCallback(Widget, XtPointer, XtPointer); +#endif /* * Initialization */ static CardsEntry *card_entry; static XF86ConfDevicePtr current_device; -static Widget filter, list, busid; +static Widget filter, list, driver, busid; static char **cards = NULL; static int ncards; - +#ifdef USE_MODULES +static char *driver_str; +#endif /* * Implementation @@ -65,7 +77,7 @@ CardConfig(XtPointer config) /* XF86OptionPtr option;*/ char card_name[32]; Arg args[1]; - char *bus; + char *bus, *drv_nam; xf86info.cur_list = CARD; XtSetSensitive(back, xf86info.lists[CARD].cur_function > 0); @@ -98,6 +110,12 @@ CardConfig(XtPointer config) XtSetValues(ident_widget, args, 1); XtSetArg(args[0], XtNstring, card->dev_busid); XtSetValues(busid, args, 1); +#ifdef USE_MODULES + XtSetArg(args[0], XtNlabel, driver_str = card->dev_driver); +#else + XtSetArg(args[0], XtNstring, card->dev_driver); +#endif + XtSetValues(driver, args, 1); } else { XF86ConfDevicePtr device = XF86Config->conf_device_lst; @@ -110,13 +128,19 @@ CardConfig(XtPointer config) do { ++ndevices; XmuSnprintf(card_name, sizeof(card_name), "Card%d", ndevices); - } while (xf86FindDevice(card_name, + } while (xf86findDevice(card_name, XF86Config->conf_device_lst)); XtSetArg(args[0], XtNstring, card_name); XtSetValues(ident_widget, args, 1); XtSetArg(args[0], XtNstring, ""); XtSetValues(busid, args, 1); +#ifdef USE_MODULES + XtSetArg(args[0], XtNlabel, driver_str = "vga"); +#else + XtSetArg(args[0], XtNstring, "vga"); +#endif + XtSetValues(driver, args, 1); } if (ConfigLoop(CardConfigCheck) == True) { @@ -154,12 +178,22 @@ CardConfig(XtPointer config) } } if (strcasecmp(card->dev_identifier, ident_string)) - xf86RenameDevice(XF86Config, card, ident_string); + xf86renameDevice(XF86Config, card, ident_string); XtSetArg(args[0], XtNstring, &bus); XtGetValues(busid, args, 1); XtFree(card->dev_busid); card->dev_busid = XtNewString(bus); +#ifdef USE_MODULES + drv_nam = driver_str; +#else + XtSetArg(args[0], XtNstring, &drv_nam); + XtGetValues(driver, args, 1); +#endif + + XtFree(card->dev_driver); + card->dev_driver = XtNewString(drv_nam); + return ((XtPointer)card); } @@ -170,9 +204,19 @@ static Bool CardConfigCheck(void) { XF86ConfDevicePtr device = XF86Config->conf_device_lst; + char *drv_nam; + +#ifdef USE_MODULES + drv_nam = driver_str; +#else + Arg args[1]; + XtSetArg(args[0], XtNstring, &drv_nam); + XtGetValues(driver, args, 1); +#endif if (ident_string == NULL || strlen(ident_string) == 0 || - (current_device == NULL && card_entry == NULL)) + (current_device == NULL && card_entry == NULL) || + drv_nam == NULL || *drv_nam == '\0') return (False); while (device != NULL) { @@ -230,6 +274,9 @@ CardModelCallback(Widget w, XtPointer user_data, XtPointer call_data) else first = 0; + XtSetArg(args[0], XtNstring, card_entry->driver ? card_entry->driver : "vga"); + XtSetValues(driver, args, 1); + str = XtNewString(tip); XtSetArg(args[0], XtNtip, str); XtSetValues(filter, args, 1); @@ -273,6 +320,19 @@ CardFilterAction(Widget w, XEvent *ev, String *params, Cardinal *num_params) XtManageChild(list); } +#ifdef USE_MODULES +/*ARGSUSED*/ +static void +DriverCallback(Widget w, XtPointer user_data, XtPointer call_data) +{ + Arg args[1]; + + driver_str = XtName(w); + XtSetArg(args[0], XtNlabel, driver_str); + XtSetValues(driver, args, 1); +} +#endif + void CardModel(XF86SetupInfo *info) { @@ -303,6 +363,31 @@ CardModel(XF86SetupInfo *info) NULL, 0); XtAddCallback(list, XtNcallback, CardModelCallback, (XtPointer)info); + XtCreateManagedWidget("driverL", labelWidgetClass, model, NULL, 0); +#ifdef USE_MODULES + driver = XtVaCreateManagedWidget("driver", menuButtonWidgetClass, + model, + XtNmenuName, "driverM", + NULL, 0); + { + Widget menu, sme; + xf86cfgDriverOptions *opts = video_driver_info; + + menu = XtCreatePopupShell("driverM", simpleMenuWidgetClass, + driver, NULL, 0); + while (opts) { + sme = XtCreateManagedWidget(opts->name, smeBSBObjectClass, + menu, NULL, 0); + XtAddCallback(sme, XtNcallback, DriverCallback, NULL); + opts = opts->next; + } + } +#else + driver = XtVaCreateManagedWidget("driver", asciiTextWidgetClass, + model, + XtNeditType, XawtextEdit, + NULL, 0); +#endif XtCreateManagedWidget("busidL", labelWidgetClass, model, NULL, 0); busid = XtVaCreateManagedWidget("busid", asciiTextWidgetClass, model, diff --git a/xc/programs/Xserver/hw/xfree86/xf86cfg/config.c b/xc/programs/Xserver/hw/xfree86/xf86cfg/config.c index 284a72d3f..4bfc62826 100644 --- a/xc/programs/Xserver/hw/xfree86/xf86cfg/config.c +++ b/xc/programs/Xserver/hw/xfree86/xf86cfg/config.c @@ -26,7 +26,7 @@ * * Author: Paulo César Pereira de Andrade <pcpa@conectiva.com.br> * - * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/config.c,v 1.2 2000/05/18 16:29:59 dawes Exp $ + * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/config.c,v 1.4 2000/10/27 18:31:05 dawes Exp $ */ #include "config.h" @@ -42,9 +42,22 @@ #include <X11/Xaw/Command.h> #include <X11/Shell.h> -#define CONFPATH "%A,%R,/etc/X11/%R,%P/etc/X11/%R,%E,%F,/etc/X11/%F," \ - "%P/etc/X11/%F,%D/%X,/etc/X11/%X,/etc/%X,%P/etc/X11/%X.%H," \ - "%P/etc/X11/%X,%P/lib/X11/%X.%H,%P/lib/X11/%X" +#define CONFPATH "%A," "%R," \ + "/etc/X11/%R," "%P/etc/X11/%R," \ + "%E," "%F," \ + "/etc/X11/%F," "%P/etc/X11/%F," \ + "%D/%X," \ + "/etc/X11/%X-%M," "/etc/X11/%X," "/etc/%X," \ + "%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \ + "%P/etc/X11/%X," \ + "%P/lib/X11/%X.%H," "%P/lib/X11/%X-%M," \ + "%P/lib/X11/%X" +#define USER_CONFPATH "/etc/X11/%S," "%P/etc/X11/%S," \ + "/etc/X11/%G," "%P/etc/X11/%G," \ + "%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \ + "%P/etc/X11/%X," \ + "%P/lib/X11/%X.%H," "%P/lib/X11/%X-%M," \ + "%P/lib/X11/%X" /* * Prototypes @@ -118,11 +131,13 @@ StartConfig(void) first = 0; /* Read initial configuration */ - if ((filename = xf86OpenConfigFile(CONFPATH, XF86Config_path, NULL)) == NULL) { + if ((filename = xf86openConfigFile(getuid() == 0 ? CONFPATH : USER_CONFPATH, + XF86Config_path, NULL)) == NULL) { fprintf(stderr, "Cannot to open config file.\n"); exit(1); } - if ((XF86Config = xf86ReadConfigFile()) == NULL) { + XF86Config_path = filename; + if ((XF86Config = xf86readConfigFile()) == NULL) { fprintf(stderr, "Problem when parsing config file\n"); exit(1); } diff --git a/xc/programs/Xserver/hw/xfree86/xf86cfg/config.h b/xc/programs/Xserver/hw/xfree86/xf86cfg/config.h index a912fa380..c2593d62f 100644 --- a/xc/programs/Xserver/hw/xfree86/xf86cfg/config.h +++ b/xc/programs/Xserver/hw/xfree86/xf86cfg/config.h @@ -26,7 +26,7 @@ * * Author: Paulo César Pereira de Andrade <pcpa@conectiva.com.br> * - * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/config.h,v 1.5 2000/08/04 16:13:44 eich Exp $ + * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/config.h,v 1.6 2000/10/20 14:59:05 alanh Exp $ */ #include <X11/IntrinsicP.h> @@ -112,7 +112,7 @@ struct _XF86SetupInfo { XF86SetupFunctionList *lists; }; -typedef Bool (*ConfigCheckFunction)(); +typedef Bool (*ConfigCheckFunction)(void); typedef struct _xf86cfgDevice xf86cfgDevice; diff --git a/xc/programs/Xserver/hw/xfree86/xf86cfg/help.c b/xc/programs/Xserver/hw/xfree86/xf86cfg/help.c index a970b1006..8f53a52ed 100644 --- a/xc/programs/Xserver/hw/xfree86/xf86cfg/help.c +++ b/xc/programs/Xserver/hw/xfree86/xf86cfg/help.c @@ -26,7 +26,7 @@ * * Author: Paulo César Pereira de Andrade <pcpa@conectiva.com.br> * - * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/help.c,v 1.1 2000/06/13 23:15:51 dawes Exp $ + * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/help.c,v 1.3 2000/10/20 14:59:05 alanh Exp $ */ #include <X11/IntrinsicP.h> @@ -39,11 +39,13 @@ #include <X11/Xaw/Text.h> #include <X11/Xaw/TextSinkP.h> #include <X11/Xaw/TextSrcP.h> +#include <X11/Xmu/SysUtil.h> #include <X11/Xmu/Xmu.h> #ifndef X_NOT_STDC_ENV #include <stdlib.h> /* for bsearch() */ #endif #include <ctype.h> +#include "help.h" /* * Prototypes @@ -64,7 +66,7 @@ static Bool popped_up = False; /* * Implementation */ -Bool +void Help(char *topic) { Widget source; @@ -256,7 +258,6 @@ struct _Html_SourceInfo { /* * Proptotypes */ -void Html_ModeStart(Widget); void Html_ModeEnd(Widget); static void Html_ModeInit(void); static void Html_ParseCallback(Widget, XtPointer, XtPointer); @@ -269,7 +270,7 @@ static void Html_Commit(Html_Parser*); static void Html_AddEntities(Html_Parser*, Html_Item*); static int Html_Put(Html_Parser*, int); -static char *Html_Puts(Html_Parser*, char*); +static void Html_Puts(Html_Parser*, char*); static int Html_Format1(Html_Parser*); static int Html_Format2(Html_Parser*); static int Html_Format3(Html_Parser*); @@ -737,7 +738,8 @@ Html_Commit(Html_Parser *parser) position, length, Qli); else XawTextSourceAddEntity(parser->source, 0, /*XAW_TENT_LITEM,*/ - XAW_TENTF_HIDE, (XtPointer)head->li++, + XAW_TENTF_HIDE, + (XtPointer)(long)head->li++, position, length, Qli); } else if (quark == Qhide) @@ -1219,7 +1221,7 @@ Html_Put(Html_Parser *parser, int ch) return (ch); } -static char * +static void Html_Puts(Html_Parser *parser, char *str) { int len = strlen(str); diff --git a/xc/programs/Xserver/hw/xfree86/xf86cfg/interface.c b/xc/programs/Xserver/hw/xfree86/xf86cfg/interface.c index e83cec850..59c49d142 100644 --- a/xc/programs/Xserver/hw/xfree86/xf86cfg/interface.c +++ b/xc/programs/Xserver/hw/xfree86/xf86cfg/interface.c @@ -26,7 +26,7 @@ * * Author: Paulo César Pereira de Andrade <pcpa@conectiva.com.br> * - * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/interface.c,v 1.5 2000/08/04 16:13:44 eich Exp $ + * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/interface.c,v 1.8 2000/10/27 18:31:05 dawes Exp $ */ #include <X11/IntrinsicP.h> @@ -58,6 +58,7 @@ #include "options.h" #include "vidmode.h" #include "help.h" +#include "stubs.h" #define randomize() srand((unsigned)time((time_t*)NULL)) #define DefaultXFree86Dir "/usr/X11R6" @@ -91,6 +92,7 @@ static Bool AskConfig(void); void WriteConfigAction(Widget, XEvent*, String*, Cardinal*); static void ScreenSetup(Bool); void QuitAction(Widget, XEvent*, String*, Cardinal*); +void PopdownErrorCallback(Widget, XtPointer, XtPointer); static void ErrorCancelAction(Widget, XEvent*, String*, Cardinal*); static void QuitCancelAction(Widget, XEvent*, String*, Cardinal*); static void HelpCallback(Widget, XtPointer, XtPointer); @@ -109,7 +111,10 @@ char *XF86Config_path = NULL; char *XF86Module_path = NULL; char *XF86Font_path = NULL; char *XF86RGB_path = NULL; +char *XkbConfig_path = NULL; char *XFree86Dir; +static char XF86Config_path_static[1024]; +static char XkbConfig_path_static[1024]; Bool xf86config_set = False; xf86cfgComputer computer; @@ -187,6 +192,10 @@ main(int argc, char *argv[]) XF86ConfLayoutPtr lay; int i, startedx; +#ifdef USE_MODULES + xf86Verbose = 1; +#endif + if ((XFree86Dir = getenv("XWINHOME")) == NULL) XFree86Dir = DefaultXFree86Dir; @@ -212,8 +221,10 @@ main(int argc, char *argv[]) } startedx = startx(); - if (XF86Config_path == NULL) - XF86Config_path = "/etc/X11/XF86Config"; +/* if (XF86Config_path == NULL) + XF86Config_path = "/etc/X11/XF86Config-4";*/ + if (XkbConfig_path == NULL) + XkbConfig_path = XkbConfigDir XkbConfigFile; toplevel = XtAppInitialize(&appcon, "XF86Cfg", /* optionDescList, XtNumber(optionDescList),*/ NULL, 0, @@ -379,6 +390,10 @@ main(int argc, char *argv[]) } } +#ifdef USE_MODULES + LoaderInitializeOptions(); +#endif + XtAppMainLoop(appcon); if (startedx) endx(); @@ -400,7 +415,7 @@ WriteConfig(Widget w, XtPointer user_data, XtPointer call_data) { asking_cf = 0; XtPopdown(shell_cf); - write_cf = (int)user_data; + write_cf = (long)user_data; } /*ARGSUSED*/ @@ -460,7 +475,7 @@ AskConfig(void) break; case CF_XKBConfig: str = "XKB"; - XtSetArg(args[num_args], XtNvalue, XkbConfigDir XkbConfigFile); + XtSetArg(args[num_args], XtNvalue, XkbConfig_path); ++num_args; break; } @@ -483,8 +498,24 @@ AskConfig(void) while (asking_cf) XtAppProcessEvent(XtWidgetToApplicationContext(shell_cf), XtIMAll); - if (write_cf > 0) - XF86Config_path = XawDialogGetValueString(dialog); + if (write_cf > 0) { + switch (cf_state) { + case CF_XF86Config: + XF86Config_path = XawDialogGetValueString(dialog); + XmuSnprintf(XF86Config_path_static, + sizeof(XF86Config_path_static), + "%s", XF86Config_path); + XF86Config_path = XF86Config_path_static; + break; + case CF_XKBConfig: + XkbConfig_path = XawDialogGetValueString(dialog); + XmuSnprintf(XkbConfig_path_static, + sizeof(XkbConfig_path_static), + "%s", XkbConfig_path); + XkbConfig_path = XkbConfig_path_static; + break; + } + } return (write_cf); } @@ -523,9 +554,9 @@ QuitCallback(Widget w, XtPointer user_data, XtPointer call_data) break; case 1: if ((cf_state == CF_XF86Config && - !xf86WriteConfigFile(XF86Config_path, XF86Config)) || + !xf86writeConfigFile(XF86Config_path, XF86Config)) || (cf_state == CF_XKBConfig && - !WriteXKBConfiguration(XkbConfigDir XkbConfigFile, + !WriteXKBConfiguration(XkbConfig_path, &xkb_info->config))) { static Widget shell; @@ -861,13 +892,13 @@ SelectLayoutCallback(Widget w, XtPointer user_data, XtPointer call_data) do { ++num_layouts; XmuSnprintf(name, sizeof(name), "Layout%d", num_layouts); - } while (xf86FindLayout(name, + } while (xf86findLayout(name, XF86Config->conf_layout_lst) != NULL); l = (XF86ConfLayoutPtr)XtCalloc(1, sizeof(XF86ConfLayoutRec)); l->lay_identifier = XtNewString(name); XF86Config->conf_layout_lst = - xf86AddLayout(XF86Config->conf_layout_lst, l); + xf86addLayout(XF86Config->conf_layout_lst, l); layoutsme = XtVaCreateManagedWidget("sme", smeBSBObjectClass, layoutp, XtNlabel, name, @@ -948,7 +979,7 @@ DefaultLayoutCallback(Widget w, XtPointer user_data, XtPointer call_data) XtGetValues(sme, args, 1); prev = XF86Config->conf_layout_lst; - lay = xf86FindLayout(str, prev); + lay = xf86findLayout(str, prev); if (prev == lay) return; @@ -997,7 +1028,7 @@ RemoveLayoutCallback(Widget w, XtPointer user_data, XtPointer call_data) XtSetArg(args[0], XtNlabel, &str); XtGetValues(sme, args, 1); prev = XF86Config->conf_layout_lst; - lay = xf86FindLayout(str, prev); + lay = xf86findLayout(str, prev); tmp = prev; while (tmp != NULL) { if (tmp == lay) @@ -1039,7 +1070,7 @@ RemoveLayoutCallback(Widget w, XtPointer user_data, XtPointer call_data) DrawCables(); } - xf86RemoveLayout(XF86Config, rem); + xf86removeLayout(XF86Config, rem); XtDestroyWidget(sme); } @@ -1151,7 +1182,7 @@ SetTip(xf86cfgDevice *device) void AddDeviceCallback(Widget w, XtPointer user_data, XtPointer call_data) { - AddDevice((int)user_data, NULL, 6, 6); + AddDevice((long)user_data, NULL, 6, 6); } void @@ -1169,7 +1200,7 @@ ConfigureDeviceCallback(Widget w, XtPointer user_data, XtPointer call_data) if (mouse != NULL && computer.devices[i]->config == NULL) { XF86Config->conf_input_lst = - xf86AddInput(XF86Config->conf_input_lst, + xf86addInput(XF86Config->conf_input_lst, mouse); computer.devices[i]->config = (XtPointer)mouse; } @@ -1181,7 +1212,7 @@ ConfigureDeviceCallback(Widget w, XtPointer user_data, XtPointer call_data) if (keyboard != NULL && computer.devices[i]->config == NULL) { XF86Config->conf_input_lst = - xf86AddInput(XF86Config->conf_input_lst, + xf86addInput(XF86Config->conf_input_lst, keyboard); computer.devices[i]->config = (XtPointer)keyboard; } @@ -1193,7 +1224,7 @@ ConfigureDeviceCallback(Widget w, XtPointer user_data, XtPointer call_data) if (card != NULL && computer.devices[i]->config == NULL) { XF86Config->conf_device_lst = - xf86AddDevice(XF86Config->conf_device_lst, + xf86addDevice(XF86Config->conf_device_lst, card); computer.devices[i]->config = (XtPointer)card; } @@ -1208,7 +1239,7 @@ ConfigureDeviceCallback(Widget w, XtPointer user_data, XtPointer call_data) if (monitor != NULL && computer.devices[i]->config == NULL) { XF86Config->conf_monitor_lst = - xf86AddMonitor(XF86Config->conf_monitor_lst, + xf86addMonitor(XF86Config->conf_monitor_lst, monitor); computer.devices[i]->config = (XtPointer)monitor; } @@ -1236,6 +1267,9 @@ OptionsCallback(Widget w, XtPointer user_data, XtPointer call_data) { int i; XF86OptionPtr *options; +#ifdef USE_MODULES + xf86cfgDriverOptions *drv_opts = NULL; +#endif if (config_mode == CONFIG_SCREEN) { for (i = 0; i < computer.num_screens; i++) @@ -1265,6 +1299,21 @@ OptionsCallback(Widget w, XtPointer user_data, XtPointer call_data) case CARD: options = (XF86OptionPtr*)&(((XF86ConfDevicePtr) (computer.devices[i]->config))->dev_option_lst); +#ifdef USE_MODULES + { + char *drv = ((XF86ConfDevicePtr) + (computer.devices[i]->config))->dev_driver; + + if (drv) { + drv_opts = video_driver_info; + while (drv_opts) { + if (strcmp(drv_opts->name, drv) == 0) + break; + drv_opts = drv_opts->next; + } + } + } +#endif break; case MONITOR: options = (XF86OptionPtr*)&(((XF86ConfMonitorPtr) @@ -1274,13 +1323,18 @@ OptionsCallback(Widget w, XtPointer user_data, XtPointer call_data) } } +#ifdef USE_MODULES + OptionsPopup(options, drv_opts ? drv_opts->name : NULL, + drv_opts ? drv_opts->option : NULL); +#else OptionsPopup(options); +#endif if (config_mode == CONFIG_SCREEN) { XF86OptionPtr option, options; int rotate; options = computer.screens[i]->screen->scrn_option_lst; - if ((option = xf86FindOption(options, "Rotate")) != NULL) { + if ((option = xf86findOption(options, "Rotate")) != NULL) { if (option->opt_val != NULL) rotate = strcasecmp(option->opt_val, "CW") == 0 ? 1 : strcasecmp(option->opt_val, "CCW") == 0 ? -1 : 0; @@ -1351,14 +1405,14 @@ EnableDeviceCallback(Widget w, XtPointer user_data, XtPointer call_data) nex->iref_inputdev = input; nex->iref_inputdev_str = XtNewString(input->inp_identifier); if (nmouses == 0 && computer.devices[i]->type == MOUSE) - option = xf86NewOption(XtNewString("CorePointer"), NULL); + option = xf86newOption(XtNewString("CorePointer"), NULL); else if (nkeyboards == 0 && computer.devices[i]->type == KEYBOARD) - option = xf86NewOption(XtNewString("CoreKeyboard"), NULL); + option = xf86newOption(XtNewString("CoreKeyboard"), NULL); else - option = xf86NewOption(XtNewString("SendCoreEvents"), NULL); + option = xf86newOption(XtNewString("SendCoreEvents"), NULL); nex->iref_option_lst = option; computer.layout->lay_input_lst = - xf86AddInputref(computer.layout->lay_input_lst, nex); + xf86addInputref(computer.layout->lay_input_lst, nex); } break; case CARD: for (i = 0; i < computer.num_screens; i++) { @@ -1372,7 +1426,7 @@ EnableDeviceCallback(Widget w, XtPointer user_data, XtPointer call_data) adj->adj_screen_str = XtNewString(computer.screens[i]-> screen->scrn_identifier); computer.layout->lay_adjacency_lst = (XF86ConfAdjacencyPtr) - addListItem((GenericListPtr)computer.layout-> + xf86addListItem((GenericListPtr)computer.layout-> lay_adjacency_lst, (GenericListPtr)adj); computer.screens[i]->state = USED; } @@ -1411,7 +1465,7 @@ DisableDeviceCallback(Widget w, XtPointer user_data, XtPointer call_data) switch (computer.devices[i]->type) { case MOUSE: case KEYBOARD: - xf86RemoveInputRef(computer.layout, + xf86removeInputRef(computer.layout, (XF86ConfInputPtr)(computer.devices[i]->config)); break; case CARD: { @@ -1425,7 +1479,7 @@ DisableDeviceCallback(Widget w, XtPointer user_data, XtPointer call_data) adj = computer.layout->lay_adjacency_lst; while (adj != NULL) { if (adj->adj_screen == computer.screens[j]->screen) { - xf86RemoveAdjacency(computer.layout, adj); + xf86removeAdjacency(computer.layout, adj); break; } adj = (XF86ConfAdjacencyPtr)(adj->list.next); @@ -1480,7 +1534,7 @@ RemoveDeviceCallback(Widget w, XtPointer user_data, XtPointer call_data) switch (computer.devices[i]->type) { case MOUSE: case KEYBOARD: - xf86RemoveInput(XF86Config, + xf86removeInput(XF86Config, (XF86ConfInputPtr)(computer.devices[i]->config)); break; case CARD: @@ -1496,7 +1550,7 @@ RemoveDeviceCallback(Widget w, XtPointer user_data, XtPointer call_data) --j; } if (computer.devices[i]->refcount <= 0) - xf86RemoveDevice(XF86Config, + xf86removeDevice(XF86Config, (XF86ConfDevicePtr)(computer.devices[i]->config)); } else if (computer.devices[i]->type == MONITOR) { @@ -1507,7 +1561,7 @@ RemoveDeviceCallback(Widget w, XtPointer user_data, XtPointer call_data) --j; } if (computer.devices[i]->refcount <= 0) - xf86RemoveMonitor(XF86Config, + xf86removeMonitor(XF86Config, (XF86ConfMonitorPtr)(computer.devices[i]->config)); } @@ -1717,7 +1771,7 @@ void RenameLayoutAction(Widget w, XEvent *event, XtSetArg(args[0], XtNlabel, name); XtSetValues(layoutsme, args, 1); - xf86RenameLayout(XF86Config, computer.layout, name); + xf86renameLayout(XF86Config, computer.layout, name); } /*ARGSUSED*/ @@ -1785,7 +1839,7 @@ DrawCable(Display *display, Window window, int o_x, int o_y, int d_x, int d_y) void SetConfigModeCallback(Widget w, XtPointer user_data, XtPointer call_data) { - int i, mode = (int)user_data; + int i, mode = (long)user_data; Arg args[3]; char *ptr; static Dimension height; diff --git a/xc/programs/Xserver/hw/xfree86/xf86cfg/keyboard-cfg.c b/xc/programs/Xserver/hw/xfree86/xf86cfg/keyboard-cfg.c index 3c6bbb8c9..c1737d9d5 100644 --- a/xc/programs/Xserver/hw/xfree86/xf86cfg/keyboard-cfg.c +++ b/xc/programs/Xserver/hw/xfree86/xf86cfg/keyboard-cfg.c @@ -26,7 +26,7 @@ * * Author: Paulo César Pereira de Andrade <pcpa@conectiva.com.br> * - * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/keyboard-cfg.c,v 1.7 2000/08/04 03:51:49 tsi Exp $ + * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/keyboard-cfg.c,v 1.8 2000/10/20 14:59:05 alanh Exp $ */ #include "xf86config.h" @@ -144,11 +144,11 @@ KeyboardConfig(XtPointer config) current_input = keyboard; if (keyboard != NULL) { - if ((option = xf86FindOption(keyboard->inp_option_lst, XkbModel)) != NULL) + if ((option = xf86findOption(keyboard->inp_option_lst, XkbModel)) != NULL) xkb_info->defs.model = model = option->opt_val; else xkb_info->defs.model = model = xkb_model.name[0]; - if ((option = xf86FindOption(keyboard->inp_option_lst, XkbLayout)) != NULL) + if ((option = xf86findOption(keyboard->inp_option_lst, XkbLayout)) != NULL) xkb_info->defs.layout = layout = option->opt_val; else xkb_info->defs.layout = layout = xkb_layout.name[0]; @@ -172,7 +172,7 @@ KeyboardConfig(XtPointer config) ++nkeyboards; XmuSnprintf(keyboard_name, sizeof(keyboard_name), "Keyboard%d", nkeyboards); - } while (xf86FindInput(keyboard_name, + } while (xf86findInput(keyboard_name, XF86Config->conf_input_lst)); model = xkb_model.name[0]; @@ -194,7 +194,7 @@ KeyboardConfig(XtPointer config) keyboard->list.next = NULL; keyboard->inp_identifier = XtNewString(ident_string); keyboard->inp_driver = XtNewString("keyboard"); - keyboard->inp_option_lst = xf86NewOption(XtNewString(XkbModel), + keyboard->inp_option_lst = xf86newOption(XtNewString(XkbModel), XtNewString(model)); xf86addNewOption(keyboard->inp_option_lst, XtNewString(XkbLayout), XtNewString(layout)); @@ -220,37 +220,37 @@ KeyboardConfig(XtPointer config) break; } - if ((option = xf86FindOption(keyboard->inp_option_lst, XkbModel)) + if ((option = xf86findOption(keyboard->inp_option_lst, XkbModel)) != NULL) { XtFree(option->opt_val); option->opt_val = XtNewString(model); XtFree(option->opt_comment); } -/* else { + else { if (keyboard->inp_option_lst == NULL) - keyboard->inp_option_lst = xf86NewOption(XtNewString(XkbModel), + keyboard->inp_option_lst = xf86newOption(XtNewString(XkbModel), XtNewString(model)); else xf86addNewOption(keyboard->inp_option_lst, XtNewString(XkbModel), XtNewString(model)); - }*/ + } XtFree(xkb_info->config.model); xkb_info->config.model = XtNewString(model); - if ((option = xf86FindOption(keyboard->inp_option_lst, XkbLayout)) + if ((option = xf86findOption(keyboard->inp_option_lst, XkbLayout)) != NULL) { XtFree(option->opt_val); option->opt_val = XtNewString(layout); XtFree(option->opt_comment); } - /*else + else xf86addNewOption(keyboard->inp_option_lst, - XtNewString(XkbLayout), XtNewString(layout));*/ + XtNewString(XkbLayout), XtNewString(layout)); XtFree(xkb_info->config.layout); xkb_info->config.layout = XtNewString(layout); } if (strcasecmp(keyboard->inp_identifier, ident_string)) - xf86RenameInput(XF86Config, keyboard, ident_string); + xf86renameInput(XF86Config, keyboard, ident_string); xkb_info->conf = keyboard; return ((XtPointer)keyboard); @@ -434,7 +434,7 @@ InitializeKeyboard(void) if (xkb_info->config.model != NULL) xkb_info->defs.model = xkb_info->config.model; - else if ((option = xf86FindOption(keyboard->inp_option_lst, "XkbModel")) + else if ((option = xf86findOption(keyboard->inp_option_lst, "XkbModel")) != NULL) xkb_info->defs.model = option->opt_val; else @@ -442,7 +442,7 @@ InitializeKeyboard(void) if (xkb_info->config.layout != NULL) xkb_info->defs.layout = xkb_info->config.layout; - else if ((option = xf86FindOption(keyboard->inp_option_lst, "XkbLayout")) + else if ((option = xf86findOption(keyboard->inp_option_lst, "XkbLayout")) != NULL) xkb_info->defs.layout = option->opt_val; else diff --git a/xc/programs/Xserver/hw/xfree86/xf86cfg/monitor-cfg.c b/xc/programs/Xserver/hw/xfree86/xf86cfg/monitor-cfg.c index 44a03ae68..3bfdbf57c 100644 --- a/xc/programs/Xserver/hw/xfree86/xf86cfg/monitor-cfg.c +++ b/xc/programs/Xserver/hw/xfree86/xf86cfg/monitor-cfg.c @@ -26,7 +26,7 @@ * * Author: Paulo César Pereira de Andrade <pcpa@conectiva.com.br> * - * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/monitor-cfg.c,v 1.2 2000/05/18 16:29:59 dawes Exp $ + * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/monitor-cfg.c,v 1.3 2000/10/20 14:59:06 alanh Exp $ */ #include "xf86config.h" @@ -173,7 +173,7 @@ MonitorConfig(XtPointer conf) ++nmonitors; XmuSnprintf(monitor_name, sizeof(monitor_name), "Monitor%d", nmonitors); - } while (xf86FindMonitor(monitor_name, + } while (xf86findMonitor(monitor_name, XF86Config->conf_monitor_lst)); XtSetArg(args[0], XtNstring, monitor_name); @@ -200,7 +200,7 @@ MonitorConfig(XtPointer conf) (monitor->mon_n_vrefresh = mon_n_vrefresh)); if (strcasecmp(monitor->mon_identifier, ident_string)) - xf86RenameMonitor(XF86Config, monitor, ident_string); + xf86renameMonitor(XF86Config, monitor, ident_string); if (oldcard != card) { int i; @@ -210,7 +210,7 @@ MonitorConfig(XtPointer conf) break; if (computer.devices[i]->config == NULL) XF86Config->conf_monitor_lst = - xf86AddMonitor(XF86Config->conf_monitor_lst, + xf86addMonitor(XF86Config->conf_monitor_lst, monitor); computer.devices[i]->config = (XtPointer)monitor; ChangeScreen(monitor, monitor, card, oldcard); diff --git a/xc/programs/Xserver/hw/xfree86/xf86cfg/mouse-cfg.c b/xc/programs/Xserver/hw/xfree86/xf86cfg/mouse-cfg.c index 3e4e73807..e3949d60e 100644 --- a/xc/programs/Xserver/hw/xfree86/xf86cfg/mouse-cfg.c +++ b/xc/programs/Xserver/hw/xfree86/xf86cfg/mouse-cfg.c @@ -26,7 +26,7 @@ * * Author: Paulo César Pereira de Andrade <pcpa@conectiva.com.br> * - * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/mouse-cfg.c,v 1.3 2000/08/01 20:05:43 dawes Exp $ + * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/mouse-cfg.c,v 1.5 2000/10/20 14:59:06 alanh Exp $ */ #include "xf86config.h" @@ -40,7 +40,7 @@ #include <X11/extensions/xf86misc.h> /* - * Prootypes + * Prototypes */ static void MouseDeviceCallback(Widget, XtPointer, XtPointer); static void MouseProtocolCallback(Widget, XtPointer, XtPointer); @@ -91,13 +91,13 @@ MouseConfig(XtPointer config) current_input = mouse; if (mouse != NULL) { - emulate = xf86FindOption(mouse->inp_option_lst, + emulate = xf86findOption(mouse->inp_option_lst, Emulate3Buttons) != NULL; - if ((option = xf86FindOption(mouse->inp_option_lst, Device)) != NULL) + if ((option = xf86findOption(mouse->inp_option_lst, Device)) != NULL) device = option->opt_val; else device = NULL; - if ((option = xf86FindOption(mouse->inp_option_lst, Protocol)) != NULL) + if ((option = xf86findOption(mouse->inp_option_lst, Protocol)) != NULL) protocol = option->opt_val; else protocol = NULL; @@ -117,7 +117,7 @@ MouseConfig(XtPointer config) do { ++nmouses; XmuSnprintf(mouse_name, sizeof(mouse_name), "Mouse%d", nmouses); - } while (xf86FindInput(mouse_name, + } while (xf86findInput(mouse_name, XF86Config->conf_input_lst)); XtSetArg(args[0], XtNstring, mouse_name); @@ -143,7 +143,7 @@ MouseConfig(XtPointer config) mouse->list.next = NULL; mouse->inp_identifier = XtNewString(ident_string); mouse->inp_driver = XtNewString("mouse"); - mouse->inp_option_lst = xf86NewOption(XtNewString(Device), + mouse->inp_option_lst = xf86newOption(XtNewString(Device), XtNewString(device)); xf86addNewOption(mouse->inp_option_lst, XtNewString(Protocol), XtNewString(protocol)); @@ -157,21 +157,21 @@ MouseConfig(XtPointer config) mouse->inp_comment = NULL; } else { - if ((option = xf86FindOption(mouse->inp_option_lst, Device)) != NULL) { + if ((option = xf86findOption(mouse->inp_option_lst, Device)) != NULL) { XtFree(option->opt_val); option->opt_val = XtNewString(device); XtFree(option->opt_comment); } else { if (mouse->inp_option_lst == NULL) - mouse->inp_option_lst = xf86NewOption(XtNewString(Device), + mouse->inp_option_lst = xf86newOption(XtNewString(Device), XtNewString(device)); else xf86addNewOption(mouse->inp_option_lst, XtNewString(Device), XtNewString(device)); } - if ((option = xf86FindOption(mouse->inp_option_lst, Protocol)) != NULL) { + if ((option = xf86findOption(mouse->inp_option_lst, Protocol)) != NULL) { XtFree(option->opt_val); option->opt_val = XtNewString(protocol); XtFree(option->opt_comment); @@ -181,8 +181,8 @@ MouseConfig(XtPointer config) XtNewString(Protocol), XtNewString(protocol)); if (emulate == False) { - xf86RemoveOption(&(mouse->inp_option_lst), Emulate3Buttons); - xf86RemoveOption(&(mouse->inp_option_lst), Emulate3Timeout); + xf86removeOption(&(mouse->inp_option_lst), Emulate3Buttons); + xf86removeOption(&(mouse->inp_option_lst), Emulate3Timeout); } else if (emulate) { xf86addNewOption(mouse->inp_option_lst, @@ -192,7 +192,7 @@ MouseConfig(XtPointer config) } } if (strcasecmp(mouse->inp_identifier, ident_string)) - xf86RenameInput(XF86Config, mouse, ident_string); + xf86renameInput(XF86Config, mouse, ident_string); return ((XtPointer)mouse); } @@ -244,7 +244,7 @@ MouseProtocolCallback(Widget w, XtPointer user_data, XtPointer call_data) static void MouseEmulateCallback(Widget w, XtPointer user_data, XtPointer call_data) { - emulate = (Bool)call_data; + emulate = (Bool)(long)call_data; } static void @@ -375,8 +375,8 @@ MouseDeviceAndProtocol(XF86SetupInfo *info) NULL, 0); XtAddCallback(listP, XtNcallback, MouseProtocolCallback, NULL); - emul3 = XtCreateManagedWidget("emulate3", toggleWidgetClass, - mouse_dp, NULL, 0); + emul3 = XtVaCreateManagedWidget("emulate3", toggleWidgetClass, + mouse_dp, XtNstate, True, NULL, 0); XtAddCallback(emul3, XtNcallback, MouseEmulateCallback, NULL); apply = XtCreateManagedWidget("apply", commandWidgetClass, mouse_dp, NULL, 0); diff --git a/xc/programs/Xserver/hw/xfree86/xf86cfg/options.c b/xc/programs/Xserver/hw/xfree86/xf86cfg/options.c index 2381fb623..e3ff91b51 100644 --- a/xc/programs/Xserver/hw/xfree86/xf86cfg/options.c +++ b/xc/programs/Xserver/hw/xfree86/xf86cfg/options.c @@ -26,7 +26,7 @@ * * Author: Paulo César Pereira de Andrade <pcpa@conectiva.com.br> * - * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/options.c,v 1.2 2000/05/18 16:29:59 dawes Exp $ + * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/options.c,v 1.3 2000/10/20 14:59:07 alanh Exp $ */ #include "options.h" @@ -35,7 +35,10 @@ #include <X11/Xaw/AsciiText.h> #include <X11/Xaw/List.h> #include <X11/Xaw/Command.h> +#include <X11/Xaw/MenuButton.h> #include <X11/Xaw/Paned.h> +#include <X11/Xaw/SimpleMenP.h> +#include <X11/Xaw/SmeBSB.h> #include <X11/Xaw/Viewport.h> /* @@ -47,6 +50,9 @@ static void AddOption(Widget, XtPointer, XtPointer); static void RemoveOption(Widget, XtPointer, XtPointer); static void UpdateOption(Widget, XtPointer, XtPointer); static void UpdateOptionList(void); +#ifdef USE_MODULES +static void AddDriverOption(Widget, XtPointer, XtPointer); +#endif /* * Initialization @@ -59,10 +65,24 @@ static int option_index, popped = False; /* * Implementation */ +#ifdef USE_MODULES +void +OptionsPopup(XF86OptionPtr *opts, char *driver, OptionInfoPtr drv_opts) +#else void OptionsPopup(XF86OptionPtr *opts) +#endif { static int first = 1; +#ifdef USE_MODULES + static Widget button, menu; + static char label[256], menuName[16]; + Widget sme; + char buf[256]; + int i = 0; + Arg args[1]; + static int menuN; +#endif option_str = NULL; options = opts; @@ -111,12 +131,76 @@ OptionsPopup(XF86OptionPtr *opts) XtAddCallback(list, XtNcallback, SelectOptionCallback, NULL); bottom = XtCreateManagedWidget("bottom", formWidgetClass, pane, NULL, 0); - popdown = XtCreateManagedWidget("popdown", commandWidgetClass, +#ifdef USE_MODULES + button = XtCreateManagedWidget("driverOpts", menuButtonWidgetClass, + bottom, NULL, 0); +#endif + popdown = XtVaCreateManagedWidget("popdown", commandWidgetClass, bottom, NULL, 0); +#ifdef USE_MODULES + XtVaSetValues(popdown, XtNfromHoriz, button, NULL, 0); +#endif + XtAddCallback(popdown, XtNcallback, PopdownCallback, NULL); XtRealizeWidget(shell); XSetWMProtocols(DPY, XtWindow(shell), &wm_delete_window, 1); + +#ifdef USE_MODULES + { + char *str; + + XtSetArg(args[0], XtNlabel, &str); + XtGetValues(button, args, 1); + XmuSnprintf(label, sizeof(label), "%s", str); + } +#endif + } + +#ifdef USE_MODULES + if (menu) + XtDestroyWidget(menu); + XmuSnprintf(menuName, sizeof(buf), "optionM%d", menuN); + menuN = !menuN; + menu = XtCreatePopupShell(menuName, simpleMenuWidgetClass, button, + NULL, 0); + XtVaSetValues(button, XtNmenuName, menuName, NULL, 0); + if (drv_opts) { + int len, longest = 0; + char fmt[32]; + static char *types[] = { + "none", "integer", "(non null) string", "string", "real", + "boolean", "frequency", + }; + + for (i = 0; drv_opts[i].name != NULL; i++) { + len = strlen(drv_opts[i].name); + if (len > longest) + longest = len; + } + XmuSnprintf(fmt, sizeof(fmt), "%c-%ds %%s", '%', longest); + for (; drv_opts->name != NULL; drv_opts++) { + char *type; + + if (drv_opts->type >= OPTV_NONE && drv_opts->type <= OPTV_FREQ) + type = types[drv_opts->type]; + else + type = "UNKNOWN"; + + XmuSnprintf(buf, sizeof(buf), fmt, drv_opts->name, type); + sme = XtVaCreateManagedWidget(drv_opts->name, smeBSBObjectClass, + menu, XtNlabel, buf, NULL, 0); + XtAddCallback(sme, XtNcallback, AddDriverOption, (XtPointer)drv_opts); + } + } + if (i) { + XmuSnprintf(buf, sizeof(buf), "%s%s", label, driver); + XtSetArg(args[0], XtNlabel, buf); + XtSetValues(button, args, 1); + XtMapWidget(button); } + else + XtUnmapWidget(button); +#endif UpdateOptionList(); popped = True; @@ -201,7 +285,7 @@ SelectOptionCallback(Widget w, XtPointer user_data, XtPointer call_data) option_str = info->string; option_index = info->list_index; - if ((option = xf86FindOption(*options, info->string)) != NULL) { + if ((option = xf86findOption(*options, info->string)) != NULL) { XtSetArg(args[0], XtNstring, option->opt_name); XtSetValues(name, args, 1); XtSetArg(args[0], XtNstring, @@ -223,7 +307,7 @@ AddOption(Widget w, XtPointer user_data, XtPointer call_data) XtGetValues(name, args, 1); XtSetArg(args[0], XtNstring, &val); XtGetValues(value, args, 1); - if (xf86FindOption(*options, nam) != NULL || strlen(nam) == 0) + if (xf86findOption(*options, nam) != NULL || strlen(nam) == 0) /* XXX xf86addNewOption will trash the option linked list if * the options being added already exists. */ @@ -233,6 +317,25 @@ AddOption(Widget w, XtPointer user_data, XtPointer call_data) UpdateOptionList(); } +#ifdef USE_MODULES +/*ARGSUSED*/ +static void +AddDriverOption(Widget w, XtPointer user_data, XtPointer call_data) +{ + Arg args[1]; + OptionInfoPtr opt = (OptionInfoPtr)user_data; + XF86OptionPtr option; + + XtSetArg(args[0], XtNstring, opt->name); + XtSetValues(name, args, 1); + if ((option = xf86findOption(*options, opt->name)) == NULL) + XtSetArg(args[0], XtNstring, ""); + else + XtSetArg(args[0], XtNstring, option->opt_val); + XtSetValues(value, args, 1); +} +#endif + /*ARGSUSED*/ static void RemoveOption(Widget w, XtPointer user_data, XtPointer call_data) @@ -242,7 +345,7 @@ RemoveOption(Widget w, XtPointer user_data, XtPointer call_data) XtSetArg(args[0], XtNstring, &str); XtGetValues(name, args, 1); - xf86RemoveOption(options, str); + xf86removeOption(options, str); UpdateOptionList(); } @@ -250,7 +353,7 @@ RemoveOption(Widget w, XtPointer user_data, XtPointer call_data) static void UpdateOption(Widget w, XtPointer user_data, XtPointer call_data) { -/* xf86RemoveOption(options, option_str); +/* xf86removeOption(options, option_str); AddOption(w, user_data, call_data); UpdateOptionList();*/ @@ -262,7 +365,7 @@ UpdateOption(Widget w, XtPointer user_data, XtPointer call_data) XtGetValues(name, args, 1); XtSetArg(args[0], XtNstring, &val); XtGetValues(value, args, 1); - if ((option = xf86FindOption(*options, option_str)) == NULL) + if ((option = xf86findOption(*options, option_str)) == NULL) return; XtFree(option->opt_name); option->opt_name = option_str = XtNewString(nam); diff --git a/xc/programs/Xserver/hw/xfree86/xf86cfg/options.h b/xc/programs/Xserver/hw/xfree86/xf86cfg/options.h index 0ab081f79..eb5b4474a 100644 --- a/xc/programs/Xserver/hw/xfree86/xf86cfg/options.h +++ b/xc/programs/Xserver/hw/xfree86/xf86cfg/options.h @@ -26,13 +26,20 @@ * * Author: Paulo César Pereira de Andrade <pcpa@conectiva.com.br> * - * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/options.h,v 1.2 2000/05/18 16:29:59 dawes Exp $ + * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/options.h,v 1.3 2000/10/20 14:59:07 alanh Exp $ */ #include "config.h" +#ifdef USE_MODULES +#include "loader.h" +#endif /* * Prototypes */ +#ifdef USE_MODULES +void OptionsPopup(XF86OptionPtr*, char*, OptionInfoPtr); +#else void OptionsPopup(XF86OptionPtr*); +#endif void OptionsCancelAction(Widget, XEvent*, String*, Cardinal*); diff --git a/xc/programs/Xserver/hw/xfree86/xf86cfg/screen-cfg.c b/xc/programs/Xserver/hw/xfree86/xf86cfg/screen-cfg.c index 8a6c514be..bda0942df 100644 --- a/xc/programs/Xserver/hw/xfree86/xf86cfg/screen-cfg.c +++ b/xc/programs/Xserver/hw/xfree86/xf86cfg/screen-cfg.c @@ -26,7 +26,7 @@ * * Author: Paulo César Pereira de Andrade <pcpa@conectiva.com.br> * - * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/screen-cfg.c,v 1.2 2000/05/18 16:29:59 dawes Exp $ + * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/screen-cfg.c,v 1.4 2000/10/20 14:59:07 alanh Exp $ */ #include "xf86config.h" @@ -37,6 +37,9 @@ #include <X11/Xaw/List.h> #include <X11/Xaw/Toggle.h> #include <X11/Xaw/Viewport.h> +#ifdef USE_MODULES +#include "loader.h" +#endif #define CW 1 #define CCW -1 @@ -49,6 +52,7 @@ static void SelectIndexCallback(Widget, XtPointer, XtPointer); static void UnselectIndexCallback(Widget, XtPointer, XtPointer); static void SelectCallback(Widget, XtPointer, XtPointer); static void UnselectCallback(Widget, XtPointer, XtPointer); +static void MoveCallback(Widget, XtPointer, XtPointer); static void RotateCallback(Widget, XtPointer, XtPointer); /* @@ -152,13 +156,13 @@ ScreenConfig(XtPointer conf) if (disp == NULL) { disp = (XF86ConfDisplayPtr)XtCalloc(1, sizeof(XF86ConfDisplayRec)); screen->scrn_display_lst = (XF86ConfDisplayPtr) - addListItem((GenericListPtr)(screen->scrn_display_lst), + xf86addListItem((GenericListPtr)(screen->scrn_display_lst), (GenericListPtr)(disp)); disp->disp_depth = default_depth; } if (strcasecmp(screen->scrn_identifier, ident_string)) - xf86RenameScreen(XF86Config, screen, ident_string); + xf86renameScreen(XF86Config, screen, ident_string); screen->scrn_defaultdepth = default_depth; @@ -207,7 +211,7 @@ ScreenConfig(XtPointer conf) static char *Rotate = "Rotate"; if (screen->scrn_option_lst != NULL) - xf86RemoveOption(&screen->scrn_option_lst, Rotate); + xf86removeOption(&screen->scrn_option_lst, Rotate); if (rotate) screen->scrn_option_lst = xf86addNewOption(screen->scrn_option_lst, @@ -242,7 +246,7 @@ static void DepthCallback(Widget w, XtPointer user_data, XtPointer call_data) { if (call_data != NULL) - default_depth = (int)user_data; + default_depth = (long)user_data; } /*ARGSUSED*/ @@ -289,7 +293,19 @@ SelectCallback(Widget w, XtPointer user_data, XtPointer call_data) XtSetArg(args[0], XtNlist, defmodes); XtSetArg(args[1], XtNnumberStrings, ndefmodes); XtSetValues(listR, args, 2); - unsel_index = -1; + + XawListUnhighlight(listR); + if (ndefmodes > 1 || (ndefmodes == 1 && *defmodes[0] != '\0')) { + if (unsel_index >= ndefmodes) + unsel_index = ndefmodes - 1; + XawListHighlight(listR, unsel_index = ndefmodes - 1); + } + else + unsel_index = -1; + + /* force realyout */ + XtUnmanageChild(listR); + XtManageChild(listR); } /*ARGSUSED*/ @@ -297,10 +313,26 @@ static void UnselectCallback(Widget w, XtPointer user_data, XtPointer call_data) { Arg args[2]; + char **modes; + Cardinal num_modes; if (unsel_index < 0 || unsel_index >= ndefmodes) return; + XawListUnhighlight(listL); + XtSetArg(args[0], XtNlist, &modes); + XtSetArg(args[1], XtNnumberStrings, &num_modes); + XtGetValues(listL, args, 2); + if (modes) { + for (sel_index = 0; sel_index < num_modes; sel_index++) + if (strcmp(defmodes[unsel_index], modes[sel_index]) == 0) + break; + if (sel_index < num_modes) + XawListHighlight(listL, sel_index); + else + sel_index = -1; + } + XtFree(defmodes[unsel_index]); if (--ndefmodes > unsel_index) memmove(&defmodes[unsel_index], &defmodes[unsel_index + 1], @@ -317,7 +349,40 @@ UnselectCallback(Widget w, XtPointer user_data, XtPointer call_data) XtSetArg(args[0], XtNlist, defmodes); XtSetArg(args[1], XtNnumberStrings, ndefmodes); XtSetValues(listR, args, 2); - unsel_index = -1; + + XawListUnhighlight(listR); + if (ndefmodes > 1 || (ndefmodes == 1 && *defmodes[0] != '\0')) { + if (unsel_index >= ndefmodes) + unsel_index = ndefmodes - 1; + XawListHighlight(listR, unsel_index); + } + else + unsel_index = -1; +} + +/*ARGSUSED*/ +static void +MoveCallback(Widget w, XtPointer user_data, XtPointer call_data) +{ + char *tmp; + Bool down = (Bool)user_data; + + if (unsel_index < 0 || unsel_index >= ndefmodes) + return; + + if ((down && unsel_index + 1 >= ndefmodes) || + (!down && unsel_index - 1 < 0)) + return; + + tmp = defmodes[unsel_index]; + if (down) + defmodes[unsel_index] = defmodes[++unsel_index]; + else + defmodes[unsel_index] = defmodes[--unsel_index]; + defmodes[unsel_index] = tmp; + + XawListUnhighlight(listR); + XawListHighlight(listR, unsel_index); } /*ARGSUSED*/ @@ -325,7 +390,7 @@ void RotateCallback(Widget w, XtPointer user_data, XtPointer call_data) { if (call_data != NULL) - rotate = (int)user_data; + rotate = (long)user_data; else rotate = 0; } @@ -333,11 +398,15 @@ RotateCallback(Widget w, XtPointer user_data, XtPointer call_data) void ScreenDialog(XF86SetupInfo *info) { - static Widget dialog, d1, d4, d8, d16, d24, cw, ccw; + static Widget dialog, d1, d4, d8, d16, d24, labelRotate, cw, ccw; Arg args[2]; XF86ConfMonitorPtr mon = screen->scrn_monitor; XF86ConfModeLinePtr mline = mon != NULL ? mon->mon_modeline_lst : NULL; int i; +#ifdef USE_MODULES + xf86cfgDriverOptions *drv_opts = video_driver_info; + Bool foundRotate = False; +#endif while (nmodes > 0) XtFree(modes[--nmodes]); @@ -391,13 +460,20 @@ ScreenDialog(XF86SetupInfo *info) command = XtCreateManagedWidget("unselect", commandWidgetClass, dialog, NULL, 0); XtAddCallback(command, XtNcallback, UnselectCallback, NULL); + command = XtCreateManagedWidget("up", commandWidgetClass, + dialog, NULL, 0); + XtAddCallback(command, XtNcallback, MoveCallback, (XtPointer)False); + command = XtCreateManagedWidget("down", commandWidgetClass, + dialog, NULL, 0); + XtAddCallback(command, XtNcallback, MoveCallback, (XtPointer)True); viewport = XtCreateManagedWidget("viewR", viewportWidgetClass, dialog, NULL, 0); listR = XtCreateManagedWidget("listRight", listWidgetClass, viewport, NULL, 0); XtAddCallback(listR, XtNcallback, UnselectIndexCallback, NULL); - XtCreateManagedWidget("rotate", labelWidgetClass, dialog, NULL, 0); + labelRotate = XtCreateManagedWidget("rotate", labelWidgetClass, + dialog, NULL, 0); cw = XtCreateManagedWidget("CW", toggleWidgetClass, dialog, NULL, 0); XtAddCallback(cw, XtNcallback, RotateCallback, (XtPointer)CW); ccw = XtVaCreateManagedWidget("CCW", toggleWidgetClass, dialog, @@ -407,6 +483,34 @@ ScreenDialog(XF86SetupInfo *info) XtRealizeWidget(dialog); } +#ifdef USE_MODULES + while (drv_opts) { + if (strcmp(drv_opts->name, screen->scrn_device->dev_driver) == 0) { + OptionInfoPtr opts = drv_opts->option; + + while (opts->name) { + if (xf86nameCompare(opts->name, "Rotate") == 0) { + foundRotate = True; + break; + } + opts++; + } + break; + } + drv_opts = drv_opts->next; + } + + if (!foundRotate) { + XtUnmapWidget(labelRotate); + XtUnmapWidget(cw); + XtUnmapWidget(ccw); + } + else { + XtMapWidget(labelRotate); + XtMapWidget(cw); + XtMapWidget(ccw); + } +#endif if (rotate == CW) { XtVaSetValues(cw, XtNstate, True, NULL, 0); XtVaSetValues(ccw, XtNstate, False, NULL, 0); diff --git a/xc/programs/Xserver/hw/xfree86/xf86cfg/screen.c b/xc/programs/Xserver/hw/xfree86/xf86cfg/screen.c index 36b8ce5cb..0876e89d9 100644 --- a/xc/programs/Xserver/hw/xfree86/xf86cfg/screen.c +++ b/xc/programs/Xserver/hw/xfree86/xf86cfg/screen.c @@ -26,7 +26,7 @@ * * Author: Paulo César Pereira de Andrade <pcpa@conectiva.com.br> * - * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/screen.c,v 1.3 2000/06/13 23:15:52 dawes Exp $ + * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/screen.c,v 1.4 2000/10/20 14:59:07 alanh Exp $ */ #include <X11/IntrinsicP.h> @@ -74,31 +74,31 @@ CreateScreenWidget(xf86cfgScreen *screen) */ if (screen->monitor != NULL) { options = ((XF86ConfMonitorPtr)(screen->monitor->config))->mon_option_lst; - if ((option = xf86FindOption(options, Rotate)) != NULL) { + if ((option = xf86findOption(options, Rotate)) != NULL) { if (option->opt_val != NULL) rotate = strcasecmp(option->opt_val, _CW) == 0 ? CW : strcasecmp(option->opt_val, _CCW) == 0 ? CCW : 0; - xf86RemoveOption(&((XF86ConfMonitorPtr)(screen->monitor->config)) + xf86removeOption(&((XF86ConfMonitorPtr)(screen->monitor->config)) ->mon_option_lst, Rotate); } } if (screen->card != NULL) { options = ((XF86ConfDevicePtr)(screen->card->config))->dev_option_lst; - if ((option = xf86FindOption(options, Rotate)) != NULL) { + if ((option = xf86findOption(options, Rotate)) != NULL) { if (option->opt_val != NULL) rotate += strcasecmp(option->opt_val, _CW) == 0 ? CW : strcasecmp(option->opt_val, _CCW) == 0 ? CCW : 0; - xf86RemoveOption(&((XF86ConfDevicePtr)(screen->card->config)) + xf86removeOption(&((XF86ConfDevicePtr)(screen->card->config)) ->dev_option_lst, Rotate); } } options = screen->screen->scrn_option_lst; - if ((option = xf86FindOption(options, Rotate)) != NULL) { + if ((option = xf86findOption(options, Rotate)) != NULL) { if (option->opt_val != NULL) rotate += strcasecmp(option->opt_val, _CW) == 0 ? CW : strcasecmp(option->opt_val, _CCW) == 0 ? CCW : 0; - xf86RemoveOption(&screen->screen->scrn_option_lst, Rotate); + xf86removeOption(&screen->screen->scrn_option_lst, Rotate); } rotate = rotate > 0 ? CW : rotate < 0 ? CCW : 0; @@ -195,7 +195,7 @@ AddScreen(xf86cfgDevice *mon, xf86cfgDevice *dev) ++nscreens; XmuSnprintf(screen_name, sizeof(screen_name), "Screen%d", nscreens); - } while (xf86FindScreen(screen_name, + } while (xf86findScreen(screen_name, XF86Config->conf_screen_lst) != NULL); screen = (XF86ConfScreenPtr)XtCalloc(1, sizeof(XF86ConfScreenRec)); @@ -205,7 +205,7 @@ AddScreen(xf86cfgDevice *mon, xf86cfgDevice *dev) screen->scrn_monitor_str = XtNewString(((XF86ConfMonitorPtr)(mon->config))->mon_identifier); screen->scrn_monitor = (XF86ConfMonitorPtr)(mon->config); XF86Config->conf_screen_lst = - xf86AddScreen(XF86Config->conf_screen_lst, screen); + xf86addScreen(XF86Config->conf_screen_lst, screen); adj = (XF86ConfAdjacencyPtr)XtCalloc(1, sizeof(XF86ConfAdjacencyRec)); adj->adj_screen = screen; @@ -214,7 +214,7 @@ AddScreen(xf86cfgDevice *mon, xf86cfgDevice *dev) computer.layout = XF86Config->conf_layout_lst = (XF86ConfLayoutPtr) XtCalloc(1, sizeof(XF86ConfLayoutRec)); computer.layout->lay_adjacency_lst = (XF86ConfAdjacencyPtr) - addListItem((GenericListPtr)computer.layout->lay_adjacency_lst, + xf86addListItem((GenericListPtr)computer.layout->lay_adjacency_lst, (GenericListPtr)adj); computer.screens = (xf86cfgScreen**) @@ -263,7 +263,7 @@ RemoveScreen(xf86cfgDevice *mon, xf86cfgDevice *dev) } } - xf86RemoveScreen(XF86Config, screen); + xf86removeScreen(XF86Config, screen); } void @@ -695,7 +695,7 @@ AdjustScreenUI(void) XF86ConfScreenPtr s; if (adj->adj_where >= CONF_ADJ_RIGHTOF < adj->adj_where <= CONF_ADJ_BELOW) { - s = xf86FindScreen(adj->adj_refscreen, XF86Config->conf_screen_lst); + s = xf86findScreen(adj->adj_refscreen, XF86Config->conf_screen_lst); for (i = 0; i < computer.num_screens; i++) if (computer.screens[i]->screen == s) break; @@ -793,6 +793,9 @@ AdjustScreenUI(void) for (i = 0; i < computer.num_screens; i++) if (computer.screens[i]->state == USED1) computer.screens[i]->state = USED; + else + XLowerWindow(XtDisplay(computer.screens[i]->widget), + XtWindow(computer.screens[i]->widget)); w = work->core.width / (columns + 1) - 5; h = work->core.height / (rows + 1) - 5; diff --git a/xc/programs/Xserver/hw/xfree86/xf86cfg/vidmode.c b/xc/programs/Xserver/hw/xfree86/xf86cfg/vidmode.c index a7ddd3e27..e9dafe5cf 100644 --- a/xc/programs/Xserver/hw/xfree86/xf86cfg/vidmode.c +++ b/xc/programs/Xserver/hw/xfree86/xf86cfg/vidmode.c @@ -26,7 +26,7 @@ * * Author: Paulo César Pereira de Andrade <pcpa@conectiva.com.br> * - * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/vidmode.c,v 1.1 2000/05/18 16:30:00 dawes Exp $ + * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/vidmode.c,v 1.3 2000/10/20 14:59:08 alanh Exp $ */ /* @@ -474,7 +474,6 @@ VideoModeInitialize(void) rep = XtCreateManagedWidget("prev", commandWidgetClass, vtune, NULL, 0); XtAddCallback(rep, XtNcallback, SwitchCallback, (XtPointer)-1); mode = XtCreateManagedWidget("mode", menuButtonWidgetClass, vtune, NULL, 0); - menu = XtCreatePopupShell("menu", simpleMenuWidgetClass, vtune, NULL, 0); rep = XtCreateManagedWidget("next", commandWidgetClass, vtune, NULL, 0); XtAddCallback(rep, XtNcallback, SwitchCallback, (XtPointer)1); @@ -494,7 +493,8 @@ VideoModeInitialize(void) XmuSnprintf(name, sizeof(name), "%s.%d", dispstr, i); rep = XtCreateManagedWidget(name, smeBSBObjectClass, screenp, NULL, 0); - XtAddCallback(rep, XtNcallback, ChangeScreenCallback, (XtPointer)i); + XtAddCallback(rep, XtNcallback, ChangeScreenCallback, + (XtPointer)(long)i); if (i == 0) { screenb = XtVaCreateManagedWidget("screenB", menuButtonWidgetClass, vtune, @@ -504,8 +504,6 @@ VideoModeInitialize(void) } } XtRealizeWidget(screenp); - monitor = XtCreatePopupShell("monitorP", simpleMenuWidgetClass, - vtune, NULL, 0); rep = XtCreateManagedWidget("up", repeaterWidgetClass, vtune, NULL, 0); @@ -579,8 +577,8 @@ VideoModeInitialize(void) add = XtCreateManagedWidget("add", commandWidgetClass, vtune, NULL, 0); XtAddCallback(add, XtNcallback, AddModeCallback, NULL); XtCreateManagedWidget("addto", labelWidgetClass, vtune, NULL, 0); - monitorb = XtVaCreateManagedWidget("ident", menuButtonWidgetClass, vtune, - XtNmenuName, "monitorP", NULL, 0); + monitorb = XtCreateManagedWidget("ident", menuButtonWidgetClass, vtune, + NULL, 0); XtCreateManagedWidget("as", labelWidgetClass, vtune, NULL, 0); text = XtVaCreateManagedWidget("text", asciiTextWidgetClass, vtune, XtNeditType, XawtextEdit, NULL, 0); @@ -601,10 +599,11 @@ VideoModeConfigureStart(void) else XtMapWidget(vtune); if (vidtune != NULL) { - int i; Arg args[1]; Boolean state; XF86ConfMonitorPtr mon; + static char menuName[16]; + static int menuN; XtErrorFunc = XSetErrorHandler(VidmodeError); XF86VidModeLockModeSwitch(XtDisplay(toplevel), vidtune->screen, True); @@ -617,8 +616,14 @@ VideoModeConfigureStart(void) XtSetSensitive(apply, !state); autoflag = state; - for (i = 0; i < ((CompositeWidget)monitor)->composite.num_children; i++) - XtDestroyWidget(((CompositeWidget)monitor)->composite.children[i]); + if (monitor) + XtDestroyWidget(monitor); + XmuSnprintf(menuName, sizeof(menuName), "menuP%d", menuN); + menuN = !menuN; + monitor = XtCreatePopupShell(menuName, simpleMenuWidgetClass, + vtune, NULL, 0); + XtVaSetValues(monitorb, XtNmenuName, menuName, NULL, 0); + mon = XF86Config->conf_monitor_lst; while (mon != NULL) { Widget sme = XtCreateManagedWidget(mon->mon_identifier, @@ -782,7 +787,7 @@ AdjustMonitorCallback(Widget w, XtPointer client_data, XtPointer call_data) { if (repeater != w) return; - switch ((int)client_data) { + switch ((long)client_data) { case LEFT: if (modeline.hsyncend + 4 < modeline.htotal) { modeline.hsyncstart += 4; @@ -936,7 +941,7 @@ ApplyCallback(Widget w, XtPointer call_data, XtPointer client_data) static void AutoCallback(Widget w, XtPointer call_data, XtPointer client_data) { - autoflag = (Bool)client_data; + autoflag = (Bool)(long)client_data; XtSetSensitive(apply, !autoflag); } @@ -970,7 +975,7 @@ SelectCallback(Widget w, XtPointer call_data, XtPointer client_data) static void SwitchCallback(Widget w, XtPointer call_data, XtPointer client_data) { - int direction = (int)call_data; + int direction = (long)call_data; Arg args[1]; Bool result; char label[32]; @@ -1021,7 +1026,7 @@ ChangeScreenCallback(Widget w, XtPointer call_data, XtPointer client_data) { Arg args[1]; - screenno = (int)call_data; + screenno = (long)call_data; if (screenno > computer.num_vidmodes || screenno < 0 || vidtune == computer.vidmodes[screenno]) return; @@ -1069,13 +1074,19 @@ GetModes(void) int i; char label[32]; Arg args[1]; + static char menuName[16]; + static int menuN; XFree(vidtune->infos); XF86VidModeGetAllModeLines(XtDisplay(toplevel), vidtune->screen, &vidtune->num_infos, &vidtune->infos); - for (i = 0; i < ((CompositeWidget)menu)->composite.num_children; i++) - XtDestroyWidget(((CompositeWidget)menu)->composite.children[i]); + XmuSnprintf(menuName, sizeof(menuName), "menu%d", menuN); + menuN = !menuN; + if (menu) + XtDestroyWidget(menu); + menu = XtCreatePopupShell(menuName, simpleMenuWidgetClass, vtune, NULL, 0); + XtVaSetValues(mode, XtNmenuName, menuName, NULL, 0); for (i = 0; i < vidtune->num_infos; i++) { Widget sme; @@ -1105,7 +1116,7 @@ PopdownForce(Widget w, XtPointer user_data, XtPointer call_data) { asking_force = 0; XtPopdown(forceshell); - do_force = (int)user_data; + do_force = (long)user_data; } void @@ -1155,7 +1166,7 @@ AddModeCallback(Widget w, XtPointer call_data, XtPointer client_data) XBell(XtDisplay(w), 80); return; } - if (xf86FindModeLine(label, vidtune->monitor->mon_modeline_lst) + if (xf86findModeLine(label, vidtune->monitor->mon_modeline_lst) != NULL && !ForceAddMode()) return; @@ -1174,7 +1185,7 @@ AddModeCallback(Widget w, XtPointer call_data, XtPointer client_data) mode->ml_flags = modeline.flags; mode->ml_hskew = modeline.hskew; vidtune->monitor->mon_modeline_lst = - xf86AddModeLine(vidtune->monitor->mon_modeline_lst, mode); + xf86addModeLine(vidtune->monitor->mon_modeline_lst, mode); } else XBell(XtDisplay(w), 80); diff --git a/xc/programs/Xserver/hw/xfree86/xf86cfg/xf86config.c b/xc/programs/Xserver/hw/xfree86/xf86cfg/xf86config.c index 33c32019c..908568967 100644 --- a/xc/programs/Xserver/hw/xfree86/xf86cfg/xf86config.c +++ b/xc/programs/Xserver/hw/xfree86/xf86cfg/xf86config.c @@ -26,7 +26,7 @@ * * Author: Paulo César Pereira de Andrade <pcpa@conectiva.com.br> * - * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/xf86config.c,v 1.2 2000/05/18 16:30:01 dawes Exp $ + * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/xf86config.c,v 1.3 2000/10/20 14:59:08 alanh Exp $ */ #include "xf86config.h" @@ -35,31 +35,7 @@ * Implementation */ int -ErrorF(const char *fmt, ...) -{ - int retval; - va_list ap; - - Va_start(ap, fmt); - retval = vfprintf(stderr, fmt, ap); - - va_end(ap); - - return (retval); -} - -int -VErrorF(const char *fmt, va_list ap) -{ - int retval; - - retval = vfprintf(stderr, fmt, ap); - - return (retval); -} - -int -xf86RemoveOption(XF86OptionPtr *options, char *name) +xf86removeOption(XF86OptionPtr *options, char *name) { XF86OptionPtr opt = *options, prev = opt; @@ -85,7 +61,7 @@ xf86RemoveOption(XF86OptionPtr *options, char *name) } int -xf86RemoveInput(XF86ConfigPtr config, XF86ConfInputPtr input) +xf86removeInput(XF86ConfigPtr config, XF86ConfInputPtr input) { XF86ConfInputPtr prev, inp = config->conf_input_lst; XF86ConfLayoutPtr lay = config->conf_layout_lst; @@ -109,21 +85,21 @@ xf86RemoveInput(XF86ConfigPtr config, XF86ConfInputPtr input) /* remove references */ while (lay != NULL) { - xf86RemoveInputRef(lay, inp); + xf86removeInputRef(lay, inp); lay = (XF86ConfLayoutPtr)(lay->list.next); } XtFree(inp->inp_identifier); XtFree(inp->inp_driver); XtFree(inp->inp_comment); - xf86OptionListFree(inp->inp_option_lst); + xf86optionListFree(inp->inp_option_lst); XtFree((XtPointer)inp); return (True); } int -xf86RemoveInputRef(XF86ConfLayoutPtr layout, XF86ConfInputPtr input) +xf86removeInputRef(XF86ConfLayoutPtr layout, XF86ConfInputPtr input) { XF86ConfInputrefPtr prev, iref = layout->lay_input_lst; @@ -131,7 +107,7 @@ xf86RemoveInputRef(XF86ConfLayoutPtr layout, XF86ConfInputPtr input) while (iref != NULL) { if (iref->iref_inputdev == input) { XtFree(iref->iref_inputdev_str); - xf86OptionListFree(iref->iref_option_lst); + xf86optionListFree(iref->iref_option_lst); if (prev == iref) layout->lay_input_lst = (XF86ConfInputrefPtr)(iref->list.next); @@ -149,7 +125,7 @@ xf86RemoveInputRef(XF86ConfLayoutPtr layout, XF86ConfInputPtr input) } int -xf86RemoveDevice(XF86ConfigPtr config, XF86ConfDevicePtr device) +xf86removeDevice(XF86ConfigPtr config, XF86ConfDevicePtr device) { XF86ConfDevicePtr prev, dev = config->conf_device_lst; XF86ConfScreenPtr psc, scr = config->conf_screen_lst; @@ -175,7 +151,7 @@ xf86RemoveDevice(XF86ConfigPtr config, XF86ConfDevicePtr device) psc = scr; while (scr != NULL) { if (scr->scrn_device == device) { - xf86RemoveScreen(config, scr); + xf86removeScreen(config, scr); if (scr == psc) scr = config->conf_screen_lst; else @@ -196,14 +172,14 @@ xf86RemoveDevice(XF86ConfigPtr config, XF86ConfDevicePtr device) XtFree(dev->dev_ramdac); XtFree(dev->dev_clockchip); XtFree(dev->dev_comment); - xf86OptionListFree(dev->dev_option_lst); + xf86optionListFree(dev->dev_option_lst); XtFree((XtPointer)dev); return (True); } int -xf86RemoveMonitor(XF86ConfigPtr config, XF86ConfMonitorPtr monitor) +xf86removeMonitor(XF86ConfigPtr config, XF86ConfMonitorPtr monitor) { XF86ConfMonitorPtr prev, mon = config->conf_monitor_lst; XF86ConfScreenPtr psc, scr = config->conf_screen_lst; @@ -229,7 +205,7 @@ xf86RemoveMonitor(XF86ConfigPtr config, XF86ConfMonitorPtr monitor) psc = scr; while (scr != NULL) { if (scr->scrn_monitor == monitor) { - xf86RemoveScreen(config, scr); + xf86removeScreen(config, scr); if (scr == psc) scr = config->conf_screen_lst; else @@ -244,14 +220,14 @@ xf86RemoveMonitor(XF86ConfigPtr config, XF86ConfMonitorPtr monitor) XtFree(mon->mon_vendor); XtFree(mon->mon_modelname); XtFree(mon->mon_comment); - xf86OptionListFree(mon->mon_option_lst); + xf86optionListFree(mon->mon_option_lst); XtFree((XtPointer)mon); return (True); } int -xf86RemoveScreen(XF86ConfigPtr config, XF86ConfScreenPtr screen) +xf86removeScreen(XF86ConfigPtr config, XF86ConfScreenPtr screen) { XF86ConfScreenPtr prev, scrn; XF86ConfLayoutPtr lay; @@ -338,14 +314,14 @@ xf86RemoveScreen(XF86ConfigPtr config, XF86ConfScreenPtr screen) XtFree(screen->scrn_obso_driver); XtFree(screen->scrn_monitor_str); XtFree(screen->scrn_device_str); - xf86OptionListFree(screen->scrn_option_lst); + xf86optionListFree(screen->scrn_option_lst); XtFree((XtPointer)screen); return (True); } int -xf86RemoveAdjacency(XF86ConfLayoutPtr layout, XF86ConfAdjacencyPtr adjacency) +xf86removeAdjacency(XF86ConfLayoutPtr layout, XF86ConfAdjacencyPtr adjacency) { XF86ConfAdjacencyPtr prev, adj = layout->lay_adjacency_lst; @@ -378,7 +354,7 @@ xf86RemoveAdjacency(XF86ConfLayoutPtr layout, XF86ConfAdjacencyPtr adjacency) } int -xf86RemoveInactive(XF86ConfLayoutPtr layout, XF86ConfInactivePtr inactive) +xf86removeInactive(XF86ConfLayoutPtr layout, XF86ConfInactivePtr inactive) { XF86ConfInactivePtr prev, inac = layout->lay_inactive_lst; @@ -406,7 +382,7 @@ xf86RemoveInactive(XF86ConfLayoutPtr layout, XF86ConfInactivePtr inactive) } int -xf86RemoveLayout(XF86ConfigPtr config, XF86ConfLayoutPtr layout) +xf86removeLayout(XF86ConfigPtr config, XF86ConfLayoutPtr layout) { XF86ConfLayoutPtr prev, lay = config->conf_layout_lst; XF86ConfAdjacencyPtr adj, nadj; @@ -430,25 +406,25 @@ xf86RemoveLayout(XF86ConfigPtr config, XF86ConfLayoutPtr layout) adj = lay->lay_adjacency_lst; while (adj != NULL) { nadj = (XF86ConfAdjacencyPtr)(adj->list.next); - xf86RemoveAdjacency(lay, adj); + xf86removeAdjacency(lay, adj); adj = nadj; } inac = lay->lay_inactive_lst; while (inac != NULL) { ninac = (XF86ConfInactivePtr)(inac->list.next); - xf86RemoveInactive(lay, inac); + xf86removeInactive(lay, inac); inac = ninac; } iref = lay->lay_input_lst; while (iref != NULL) { niref = (XF86ConfInputrefPtr)(iref->list.next); - xf86RemoveInputRef(lay, iref->iref_inputdev); + xf86removeInputRef(lay, iref->iref_inputdev); iref = niref; } - xf86OptionListFree(lay->lay_option_lst); + xf86optionListFree(lay->lay_option_lst); if (prev == lay) config->conf_layout_lst = (XF86ConfLayoutPtr)(lay->list.next); @@ -461,7 +437,7 @@ xf86RemoveLayout(XF86ConfigPtr config, XF86ConfLayoutPtr layout) } int -xf86RenameInput(XF86ConfigPtr config, XF86ConfInputPtr input, char *name) +xf86renameInput(XF86ConfigPtr config, XF86ConfInputPtr input, char *name) { XF86ConfLayoutPtr lay = config->conf_layout_lst; @@ -488,7 +464,7 @@ xf86RenameInput(XF86ConfigPtr config, XF86ConfInputPtr input, char *name) } int -xf86RenameDevice(XF86ConfigPtr config, XF86ConfDevicePtr dev, char *name) +xf86renameDevice(XF86ConfigPtr config, XF86ConfDevicePtr dev, char *name) { XF86ConfScreenPtr scr = config->conf_screen_lst; @@ -511,7 +487,7 @@ xf86RenameDevice(XF86ConfigPtr config, XF86ConfDevicePtr dev, char *name) } int -xf86RenameMonitor(XF86ConfigPtr config, XF86ConfMonitorPtr mon, char *name) +xf86renameMonitor(XF86ConfigPtr config, XF86ConfMonitorPtr mon, char *name) { XF86ConfScreenPtr scr = config->conf_screen_lst; @@ -534,7 +510,7 @@ xf86RenameMonitor(XF86ConfigPtr config, XF86ConfMonitorPtr mon, char *name) } int -xf86RenameLayout(XF86ConfigPtr config, XF86ConfLayoutPtr layout, char *name) +xf86renameLayout(XF86ConfigPtr config, XF86ConfLayoutPtr layout, char *name) { if (config == NULL || layout == NULL || name == NULL || *name == '\0') return (False); @@ -546,7 +522,7 @@ xf86RenameLayout(XF86ConfigPtr config, XF86ConfLayoutPtr layout, char *name) } int -xf86RenameScreen(XF86ConfigPtr config, XF86ConfScreenPtr scrn, char *name) +xf86renameScreen(XF86ConfigPtr config, XF86ConfScreenPtr scrn, char *name) { XF86ConfLayoutPtr lay = config->conf_layout_lst; diff --git a/xc/programs/Xserver/hw/xfree86/xf86cfg/xf86config.h b/xc/programs/Xserver/hw/xfree86/xf86cfg/xf86config.h index ee8747246..4392a53db 100644 --- a/xc/programs/Xserver/hw/xfree86/xf86cfg/xf86config.h +++ b/xc/programs/Xserver/hw/xfree86/xf86cfg/xf86config.h @@ -26,44 +26,44 @@ * * Author: Paulo César Pereira de Andrade <pcpa@conectiva.com.br> * - * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/xf86config.h,v 1.2 2000/05/18 16:30:01 dawes Exp $ + * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/xf86config.h,v 1.3 2000/10/20 14:59:08 alanh Exp $ */ #include "config.h" -#define xf86OptionListFree OptionListFree -#define xf86AddInput(head, ptr) \ - (XF86ConfInputPtr)addListItem((GenericListPtr)(head), (GenericListPtr)(ptr)) -#define xf86AddInputref(head, ptr) \ - (XF86ConfInputrefPtr)addListItem((GenericListPtr)(head), (GenericListPtr)(ptr)) -#define xf86AddDevice(head, ptr) \ - (XF86ConfDevicePtr)addListItem((GenericListPtr)(head), (GenericListPtr)(ptr)) -#define xf86AddMonitor(head, ptr) \ - (XF86ConfMonitorPtr)addListItem((GenericListPtr)(head), (GenericListPtr)(ptr)) -#define xf86AddScreen(head, ptr) \ - (XF86ConfScreenPtr)addListItem((GenericListPtr)(head), (GenericListPtr)(ptr)) -#define xf86AddLayout(head, ptr) \ - (XF86ConfLayoutPtr)addListItem((GenericListPtr)(head), (GenericListPtr)(ptr)) -#define xf86AddModeLine(head, ptr) \ - (XF86ConfModeLinePtr)addListItem((GenericListPtr)(head), (GenericListPtr)(ptr)) -#define xf86NewOption NewOption -#define xf86addNewOption addNewOption -#define xf86FindOption FindOption +#ifndef _xf86cfg_xf86config_h +#define _xf86cfg_xf86config_h -int ErrorF(const char*, ...); -int VErrorF(const char*, va_list); -int xf86RemoveOption(XF86OptionPtr*, char*); -int xf86RemoveInput(XF86ConfigPtr, XF86ConfInputPtr); -int xf86RemoveInputRef(XF86ConfLayoutPtr, XF86ConfInputPtr); -int xf86RemoveDevice(XF86ConfigPtr, XF86ConfDevicePtr); -int xf86RemoveMonitor(XF86ConfigPtr, XF86ConfMonitorPtr); -int xf86RemoveScreen(XF86ConfigPtr, XF86ConfScreenPtr); -int xf86RemoveAdjacency(XF86ConfLayoutPtr, XF86ConfAdjacencyPtr); -int xf86RemoveInactive(XF86ConfLayoutPtr, XF86ConfInactivePtr); -int xf86RemoveLayout(XF86ConfigPtr, XF86ConfLayoutPtr); +#define xf86addInput(head, ptr) \ + (XF86ConfInputPtr)xf86addListItem((GenericListPtr)(head), (GenericListPtr)(ptr)) +#define xf86addInputref(head, ptr) \ + (XF86ConfInputrefPtr)xf86addListItem((GenericListPtr)(head), (GenericListPtr)(ptr)) +#define xf86addDevice(head, ptr) \ + (XF86ConfDevicePtr)xf86addListItem((GenericListPtr)(head), (GenericListPtr)(ptr)) +#define xf86addMonitor(head, ptr) \ + (XF86ConfMonitorPtr)xf86addListItem((GenericListPtr)(head), (GenericListPtr)(ptr)) +#define xf86addScreen(head, ptr) \ + (XF86ConfScreenPtr)xf86addListItem((GenericListPtr)(head), (GenericListPtr)(ptr)) +#define xf86addLayout(head, ptr) \ + (XF86ConfLayoutPtr)xf86addListItem((GenericListPtr)(head), (GenericListPtr)(ptr)) +#define xf86addModeLine(head, ptr) \ + (XF86ConfModeLinePtr)xf86addListItem((GenericListPtr)(head), (GenericListPtr)(ptr)) + +int xf86removeOption(XF86OptionPtr*, char*); +int xf86removeInput(XF86ConfigPtr, XF86ConfInputPtr); +int xf86removeInputRef(XF86ConfLayoutPtr, XF86ConfInputPtr); +int xf86removeDevice(XF86ConfigPtr, XF86ConfDevicePtr); +int xf86removeMonitor(XF86ConfigPtr, XF86ConfMonitorPtr); +int xf86removeScreen(XF86ConfigPtr, XF86ConfScreenPtr); +int xf86removeAdjacency(XF86ConfLayoutPtr, XF86ConfAdjacencyPtr); +int xf86removeInactive(XF86ConfLayoutPtr, XF86ConfInactivePtr); +int xf86removeLayout(XF86ConfigPtr, XF86ConfLayoutPtr); + +int xf86renameInput(XF86ConfigPtr, XF86ConfInputPtr, char*); +int xf86renameDevice(XF86ConfigPtr, XF86ConfDevicePtr, char*); +int xf86renameMonitor(XF86ConfigPtr, XF86ConfMonitorPtr, char*); +int xf86renameLayout(XF86ConfigPtr, XF86ConfLayoutPtr, char*); +int xf86renameScreen(XF86ConfigPtr, XF86ConfScreenPtr, char*); + +#endif /* _xf86cfg_xf86config_h */ -int xf86RenameInput(XF86ConfigPtr, XF86ConfInputPtr, char*); -int xf86RenameDevice(XF86ConfigPtr, XF86ConfDevicePtr, char*); -int xf86RenameMonitor(XF86ConfigPtr, XF86ConfMonitorPtr, char*); -int xf86RenameLayout(XF86ConfigPtr, XF86ConfLayoutPtr, char*); -int xf86RenameScreen(XF86ConfigPtr, XF86ConfScreenPtr, char*); diff --git a/xc/programs/Xserver/hw/xwin/Imakefile b/xc/programs/Xserver/hw/xwin/Imakefile index 18743c54c..e8545a270 100644 --- a/xc/programs/Xserver/hw/xwin/Imakefile +++ b/xc/programs/Xserver/hw/xwin/Imakefile @@ -1,5 +1,5 @@ XCOMM $XConsortium: Imakefile /main/10 1996/12/02 10:20:33 lehors $ -XCOMM $XFree86: xc/programs/Xserver/hw/xwin/Imakefile,v 1.1 2000/08/10 17:40:37 dawes Exp $ +XCOMM $XFree86: xc/programs/Xserver/hw/xwin/Imakefile,v 1.2 2000/10/26 17:57:57 dawes Exp $ #include <Server.tmpl> #if HasShm @@ -18,9 +18,9 @@ OBJS1 = os2_stubs.o -SRCSA = InitInput.c InitOutput.c stubs.c miinitext.c directx.c ntux_xf.c +SRCSA = InitInput.c InitOutput.c stubs.c miinitext.c directx.c -OBJSA = InitInput.o InitOutput.o stubs.o miinitext.o directx.o ntux_xf.o +OBJSA = InitInput.o InitOutput.o stubs.o miinitext.o directx.o INCLUDES = -I. -I$(XBUILDINCDIR) -I$(FONTINCSRC) \ -I../../cfb -I../../mfb -I../../mi -I../../include -I../../os \ diff --git a/xc/programs/Xserver/render/miglyph.c b/xc/programs/Xserver/render/miglyph.c index 67c3164e5..cf408ea12 100644 --- a/xc/programs/Xserver/render/miglyph.c +++ b/xc/programs/Xserver/render/miglyph.c @@ -1,5 +1,5 @@ /* - * $XFree86$ + * $XFree86: xc/programs/Xserver/render/miglyph.c,v 1.3 2000/10/02 05:25:45 keithp Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -59,7 +59,7 @@ miGlyphExtents (int nlist, x1 = x - glyph->info.x; if (x1 < MINSHORT) x1 = MINSHORT; - y1 = x - glyph->info.y; + y1 = y - glyph->info.y; if (y1 < MINSHORT) y1 = MINSHORT; x2 = x1 + glyph->info.width; @@ -227,5 +227,7 @@ miGlyphs (CARD8 op, 0, 0, x, y, width, height); + FreePicture ((pointer) pMask, (XID) 0); + (*pScreen->DestroyPixmap) (pMaskPixmap); } } diff --git a/xc/programs/Xserver/render/picture.c b/xc/programs/Xserver/render/picture.c index 5ea0cdaa1..2db742752 100644 --- a/xc/programs/Xserver/render/picture.c +++ b/xc/programs/Xserver/render/picture.c @@ -1,5 +1,5 @@ /* - * $XFree86: xc/programs/Xserver/render/picture.c,v 1.3 2000/08/30 18:00:41 keithp Exp $ + * $XFree86: xc/programs/Xserver/render/picture.c,v 1.8 2000/10/21 00:26:13 keithp Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -226,11 +226,33 @@ PictureMatchVisual (ScreenPtr pScreen, int depth, VisualPtr pVisual) return 0; } +PictFormatPtr +PictureMatchFormat (ScreenPtr pScreen, int depth, CARD32 f) +{ + PictureScreenPtr ps = GetPictureScreen(pScreen); + PictFormatPtr format; + int nformat; + int type; + + if (!ps) + return 0; + format = ps->formats; + nformat = ps->nformats; + while (nformat--) + { + if (format->depth == depth && format->format == f & 0xffffff) + return format; + format++; + } + return 0; +} + Bool PictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats) { PictureScreenPtr ps; int n; + CARD32 type, a, r, g, b; if (PictureGeneration != serverGeneration) { @@ -262,6 +284,27 @@ PictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats) xfree (formats); return FALSE; } + if (formats[n].type == PictTypeIndexed) + { + type = PICT_TYPE_INDEX; + a = r = g = b = 0; + } + else + { + if ((formats[n].direct.redMask| + formats[n].direct.blueMask| + formats[n].direct.greenMask) == 0) + type = PICT_TYPE_A; + else if (formats[n].direct.red > formats[n].direct.blue) + type = PICT_TYPE_ARGB; + else + type = PICT_TYPE_ABGR; + a = Ones (formats[n].direct.alphaMask); + r = Ones (formats[n].direct.redMask); + g = Ones (formats[n].direct.greenMask); + b = Ones (formats[n].direct.blueMask); + } + formats[n].format = PICT_FORMAT(0,type,a,r,g,b); } ps = (PictureScreenPtr) xalloc (sizeof (PictureScreenRec)); if (!ps) @@ -372,6 +415,7 @@ CreatePicture (Picture pid, pPicture->id = pid; pPicture->pDrawable = pDrawable; pPicture->pFormat = pFormat; + pPicture->format = pFormat->format | (pDrawable->bitsPerPixel << 24); if (pDrawable->type == DRAWABLE_PIXMAP) { ++((PixmapPtr)pDrawable)->refcnt; @@ -636,8 +680,26 @@ FreePicture (pointer value, if (pPicture->alphaMap) FreePicture ((pointer) pPicture->alphaMap, (XID) 0); (*ps->DestroyPicture) (pPicture); - if (pPicture->pDrawable->type == DRAWABLE_PIXMAP) + if (pPicture->pDrawable->type == DRAWABLE_WINDOW) + { + WindowPtr pWindow = (WindowPtr) pPicture->pDrawable; + PicturePtr *pPrev; + + for (pPrev = (PicturePtr *) &((pWindow)->devPrivates[PictureWindowPrivateIndex].ptr); + *pPrev; + pPrev = &(*pPrev)->pNext) + { + if (*pPrev == pPicture) + { + *pPrev = pPicture->pNext; + break; + } + } + } + else if (pPicture->pDrawable->type == DRAWABLE_PIXMAP) + { (*pScreen->DestroyPixmap) ((PixmapPtr)pPicture->pDrawable); + } xfree (pPicture); } return Success; diff --git a/xc/programs/Xserver/render/picture.h b/xc/programs/Xserver/render/picture.h index 13afdd6cf..694526e95 100644 --- a/xc/programs/Xserver/render/picture.h +++ b/xc/programs/Xserver/render/picture.h @@ -1,5 +1,5 @@ /* - * $XFree86$ + * $XFree86: xc/programs/Xserver/render/picture.h,v 1.4 2000/10/07 05:58:18 keithp Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -30,4 +30,75 @@ typedef struct _DirectFormat *DirectFormatPtr; typedef struct _PictFormat *PictFormatPtr; typedef struct _Picture *PicturePtr; +/* + * While the protocol is generous in format support, the + * sample implementation allows only packed RGB and GBR + * representations for data to simplify software rendering, + */ +#define PICT_FORMAT(bpp,type,a,r,g,b) (((bpp) << 24) | \ + ((type) << 16) | \ + ((a) << 12) | \ + ((r) << 8) | \ + ((g) << 4) | \ + ((b))) + +#define PICT_FORMAT_BPP(f) (((f) >> 24) ) +#define PICT_FORMAT_TYPE(f) (((f) >> 16) & 0xff) +#define PICT_FORMAT_A(f) (((f) >> 12) & 0x0f) +#define PICT_FORMAT_R(f) (((f) >> 8) & 0x0f) +#define PICT_FORMAT_G(f) (((f) >> 4) & 0x0f) +#define PICT_FORMAT_B(f) (((f) ) & 0x0f) + +#define PICT_OTHER 0 +#define PICT_TYPE_A 1 +#define PICT_TYPE_ARGB 2 +#define PICT_TYPE_ABGR 3 +#define PICT_TYPE_INDEX 4 + +#define PICT_FORMAT_COLOR(f) (PICT_FORMAT_TYPE(f) & 2) + +/* 32bpp formats */ +#define PICT_a8r8g8b8 PICT_FORMAT(32,PICT_TYPE_ARGB,8,8,8,8) +#define PICT_x8r8g8b8 PICT_FORMAT(32,PICT_TYPE_ARGB,0,8,8,8) +#define PICT_a8b8g8r8 PICT_FORMAT(32,PICT_TYPE_ABGR,8,8,8,8) +#define PICT_x8b8g8r8 PICT_FORMAT(32,PICT_TYPE_ABGR,0,8,8,8) + +/* 24bpp formats */ +#define PICT_r8g8b8 PICT_FORMAT(24,PICT_TYPE_ARGB,0,8,8,8) +#define PICT_b8g8r8 PICT_FORMAT(24,PICT_TYPE_ABGR,0,8,8,8) + +/* 16bpp formats */ +#define PICT_r5g6b5 PICT_FORMAT(16,PICT_TYPE_ARGB,0,5,6,5) +#define PICT_b5g6r5 PICT_FORMAT(16,PICT_TYPE_ABGR,0,5,6,5) + +#define PICT_a1r5g5b5 PICT_FORMAT(16,PICT_TYPE_ARGB,1,5,5,5) +#define PICT_x1r5g5b5 PICT_FORMAT(16,PICT_TYPE_ARGB,0,5,5,5) +#define PICT_a1b5g5r5 PICT_FORMAT(16,PICT_TYPE_ABGR,1,5,5,5) +#define PICT_x1b5g5r5 PICT_FORMAT(16,PICT_TYPE_ABGR,0,5,5,5) + +/* 8bpp formats */ +#define PICT_a8 PICT_FORMAT(8,PICT_TYPE_A,8,0,0,0) +#define PICT_r3g3b2 PICT_FORMAT(8,PICT_TYPE_ARGB,0,3,3,2) +#define PICT_b2g3r3 PICT_FORMAT(8,PICT_TYPE_ABGR,0,3,3,2) +#define PICT_a2r2g2b2 PICT_FORMAT(8,PICT_TYPE_ARGB,2,2,2,2) +#define PICT_a2b2g2r2 PICT_FORMAT(8,PICT_TYPE_ABGR,2,2,2,2) + +/* 4bpp formats */ +#define PICT_a4 PICT_FORMAT(4,PICT_TYPE_A,4,0,0,0) +#define PICT_r1g2b1 PICT_FORMAT(4,PICT_TYPE_ARGB,0,1,2,1) +#define PICT_b1g2r1 PICT_FORMAT(4,PICT_TYPE_ABGR,0,1,2,1) +#define PICT_a1r1g1b1 PICT_FORMAT(4,PICT_TYPE_ARGB,1,1,1,1) +#define PICT_a1b1g1r1 PICT_FORMAT(4,PICT_TYPE_ABGR,1,1,1,1) + +/* 1bpp formats */ +#define PICT_a1 PICT_FORMAT(1,PICT_TYPE_A,1,0,0,0) + +#define FixedToInt(f) (int) ((f) >> 8) +#define IntToFixed(i) ((Fixed) (i) << 8) +#define FixedE ((Fixed) 1) +#define Fixed1 (IntToFixed(1)) +#define Fixed1minusE (Fixed1 - FixedE) +#define FixedCeil(f) (((f) + Fixed1minusE) & ~Fixed1MinusE) +#define FixedFloor(f) ((f) & ~Fixed1MinusE) + #endif /* _PICTURE_H_ */ diff --git a/xc/programs/Xserver/render/picturestr.h b/xc/programs/Xserver/render/picturestr.h index 98506c094..b40eaa15b 100644 --- a/xc/programs/Xserver/render/picturestr.h +++ b/xc/programs/Xserver/render/picturestr.h @@ -1,5 +1,5 @@ /* - * $XFree86$ + * $XFree86: xc/programs/Xserver/render/picturestr.h,v 1.6 2000/10/11 23:55:33 tsi Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -39,7 +39,8 @@ typedef struct _DirectFormat { } DirectFormatRec; typedef struct _PictFormat { - unsigned long id; + CARD32 id; + CARD32 format; /* except bpp */ unsigned char type; unsigned char depth; DirectFormatRec direct; @@ -49,6 +50,7 @@ typedef struct _PictFormat { typedef struct _Picture { DrawablePtr pDrawable; PictFormatPtr pFormat; + CARD32 format; /* PICT_FORMAT */ int refcnt; CARD32 id; PicturePtr pNext; /* chain on same drawable */ @@ -169,7 +171,7 @@ Bool PictureDestroyWindow (WindowPtr pWindow); Bool -PictureCloseScreen (int index, ScreenPtr pScreen); +PictureCloseScreen (int Index, ScreenPtr pScreen); PictFormatPtr PictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp); @@ -177,6 +179,9 @@ PictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp); PictFormatPtr PictureMatchVisual (ScreenPtr pScreen, int depth, VisualPtr pVisual); +PictFormatPtr +PictureMatchFormat (ScreenPtr pScreen, int depth, CARD32 format); + Bool PictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats); @@ -214,11 +219,6 @@ int FreePictFormat (pointer pPictFormat, XID pid); -int -FreeGlyphSet (pointer pGlyphset, - XID gid); - - void CompositePicture (CARD8 op, PicturePtr pSrc, diff --git a/xc/programs/Xserver/render/render.c b/xc/programs/Xserver/render/render.c index ee09a3cbf..0e037b9c0 100644 --- a/xc/programs/Xserver/render/render.c +++ b/xc/programs/Xserver/render/render.c @@ -1,5 +1,5 @@ /* - * $XFree86$ + * $XFree86: xc/programs/Xserver/render/render.c,v 1.5 2000/10/13 02:51:03 keithp Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -294,7 +294,6 @@ ProcRenderQueryPictFormats (ClientPtr client) for (s = 0; s < screenInfo.numScreens; s++) { pScreen = screenInfo.screens[s]; - ps = GetPictureScreen(pScreen); pictDepth = (xPictDepth *) (pictScreen + 1); ndepth = 0; for (d = 0; d < pScreen->numDepths; d++) @@ -331,7 +330,11 @@ ProcRenderQueryPictFormats (ClientPtr client) pictDepth = (xPictDepth *) pictVisual; } pictScreen->nDepth = ndepth; - pictScreen->fallback = ps->fallback->id; + ps = GetPictureScreen(pScreen); + if (ps) + pictScreen->fallback = ps->fallback->id; + else + pictScreen->fallback = 0; if (client->swapped) { swapl (&pictScreen->nDepth, n); |