diff options
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/sis/sis_common2.h | 10 | ||||
-rw-r--r-- | src/mesa/drivers/dri/sis/sis_context.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/sis/sis_debug.c | 156 | ||||
-rw-r--r-- | src/mesa/drivers/dri/sis/sis_debug.h | 45 |
4 files changed, 0 insertions, 215 deletions
diff --git a/src/mesa/drivers/dri/sis/sis_common2.h b/src/mesa/drivers/dri/sis/sis_common2.h index c52abd5e510..4860da3d454 100644 --- a/src/mesa/drivers/dri/sis/sis_common2.h +++ b/src/mesa/drivers/dri/sis/sis_common2.h @@ -34,16 +34,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef _sis_common_h_ #define _sis_common_h_ -#if 0 -#define free(x) -#define calloc(x,y) sis_debug_malloc((x)*(y)) -extern void *sis_debug_malloc(int x); -#endif - -#if defined(SIS_DUMP) -#include "sis_debug.h" -#endif - #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/src/mesa/drivers/dri/sis/sis_context.c b/src/mesa/drivers/dri/sis/sis_context.c index 6f307a25992..101b97b7b80 100644 --- a/src/mesa/drivers/dri/sis/sis_context.c +++ b/src/mesa/drivers/dri/sis/sis_context.c @@ -175,10 +175,6 @@ sisCreateContext( const __GLcontextModes *glVisual, smesa->sarea = (SISSAREAPriv *)((char *)sPriv->pSAREA + sisScreen->sarea_priv_offset); -#if defined(SIS_DUMP) - IOBase4Debug = GET_IOBase (smesa); -#endif - /* support ARGB8888 and RGB565 */ switch (smesa->bytesPerPixel) { diff --git a/src/mesa/drivers/dri/sis/sis_debug.c b/src/mesa/drivers/dri/sis/sis_debug.c deleted file mode 100644 index 99cb09c255e..00000000000 --- a/src/mesa/drivers/dri/sis/sis_debug.c +++ /dev/null @@ -1,156 +0,0 @@ -/************************************************************************** - -Copyright 2000 Silicon Integrated Systems Corp, Inc., HsinChu, Taiwan. -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 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 SILICON INTEGRATED SYSTEMS CORP 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. - -**************************************************************************/ -/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_debug.c,v 1.5 2000/09/26 15:56:48 tsi Exp $ */ - -/* - * Authors: - * Sung-Ching Lin <[email protected]> - * - */ - -/* - * dump HW states, set environment variable SIS_DEBUG - * to enable these functions - */ - -#include <fcntl.h> -#include <assert.h> - -#include "sis_context.h" - -/* for SiS 300/630/540 */ -#define MMIOLength (0x8FFF-0x8800+1) -#define MMIO3DOffset (0x8800) -#define FILE_NAME "300.dump" - -char *IOBase4Debug = 0; - -char *prevLockFile = NULL; -int prevLockLine = 0; - -GLint _empty[0x10000]; - -void -dump_agp (void *addr, int dword_count) -{ - if (!getenv ("SIS_DEBUG")) - return; - - { - int i; - FILE *file = fopen ("300agp.dump", "w"); - - if (file) - { - for (i = 0; i < dword_count; i++) - { - fprintf (file, "%f\n", *(float *) addr); - ((unsigned char *) addr) += 4; - } - fclose (file); - } - } -} - -void -d2f_once (GLcontext * ctx) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - sisContextPtr smesa = SIS_CONTEXT(ctx); - - static int serialNumber = -1; - - if (serialNumber == smesa->serialNumber) - return; - else - serialNumber = smesa->serialNumber; - - d2f(); -} - -void -d2f (void) -{ - if (!getenv ("SIS_DEBUG")) - return; - - /* dump 0x8800 - 0x8AFF */ - { - int fh; - int rval; - void *addr = IOBase4Debug + MMIO3DOffset; - - assert (IOBase4Debug); - - if ((fh = open (FILE_NAME, O_WRONLY | O_CREAT, S_IREAD | S_IWRITE)) != -1) - { - rval = write (fh, addr, MMIOLength); - assert (rval != -1); - close (fh); - } - } -} - -/* dump to HW */ -void -d2h (char *file_name) -{ - int fh; - int rval; - void *addr[MMIOLength]; - - if (!getenv ("SIS_DEBUG")) - return; - - if ((fh = open (file_name, O_CREAT, S_IREAD | S_IWRITE)) != -1) - { - rval = read (fh, addr, MMIOLength); - assert (rval != -1); - close (fh); - } - memcpy (IOBase4Debug + MMIO3DOffset, addr, MMIOLength); - -} - -/* dump video memory to file */ -void -dvidmem (unsigned char *addr, int size) -{ - int fh; - int rval; - static char *file_name = "vidmem.dump"; - - if (!getenv ("SIS_DEBUG")) - return; - - if ((fh = open (file_name, O_WRONLY | O_CREAT, S_IREAD | S_IWRITE)) != -1) - { - rval = write (fh, addr, size); - assert (rval != -1); - close (fh); - } -} diff --git a/src/mesa/drivers/dri/sis/sis_debug.h b/src/mesa/drivers/dri/sis/sis_debug.h deleted file mode 100644 index 5e2b30912ac..00000000000 --- a/src/mesa/drivers/dri/sis/sis_debug.h +++ /dev/null @@ -1,45 +0,0 @@ -/************************************************************************** - -Copyright 2000 Silicon Integrated Systems Corp, Inc., HsinChu, Taiwan. -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 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 SILICON INTEGRATED SYSTEMS CORP 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. - -**************************************************************************/ -/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_debug.h,v 1.3 2000/09/26 15:56:48 tsi Exp $ */ - -/* - * Authors: - * Sung-Ching Lin <[email protected]> - * - */ - -#ifndef _sis_debug_h_ -#define _sis_debug_h_ - -void dump_agp (void *addr, int dword_count); -void d2f (void); -void d2f_once (GLcontext * ctx); -void d2h (char *file_name); -void dvidmem (unsigned char *addr, int size); -extern char *IOBase4Debug; - -#endif |