diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-05-31 20:50:38 +0200 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-05-31 20:50:38 +0200 |
commit | 7c4b35e87012bd2e82483c109281bd1ea42ae8a2 (patch) | |
tree | 2fe816c661fa102c69f3f6b75d62ebcc4d0cb9bb /src/video_out/libdha/sysdep/libdha_os2.c | |
parent | 39a3ba441844251b8fd2900864418cae92802b9d (diff) | |
download | xine-lib-7c4b35e87012bd2e82483c109281bd1ea42ae8a2.tar.gz xine-lib-7c4b35e87012bd2e82483c109281bd1ea42ae8a2.tar.bz2 |
Move vidix and libdha into contrib/.
--HG--
rename : src/video_out/libdha/.hgignore => contrib/libdha/.hgignore
rename : src/video_out/libdha/AsmMacros.h => contrib/libdha/AsmMacros.h
rename : src/video_out/libdha/Makefile.am => contrib/libdha/Makefile.am
rename : src/video_out/libdha/README => contrib/libdha/README
rename : src/video_out/libdha/bin/Makefile.am => contrib/libdha/bin/Makefile.am
rename : src/video_out/libdha/bin/README => contrib/libdha/bin/README
rename : src/video_out/libdha/bin/mapdev.copyright => contrib/libdha/bin/mapdev.copyright
rename : src/video_out/libdha/bin/mapdev.vxd => contrib/libdha/bin/mapdev.vxd
rename : src/video_out/libdha/cpu_flush.c => contrib/libdha/cpu_flush.c
rename : src/video_out/libdha/irq.c => contrib/libdha/irq.c
rename : src/video_out/libdha/kernelhelper/Makefile.am => contrib/libdha/kernelhelper/Makefile.am
rename : src/video_out/libdha/kernelhelper/README => contrib/libdha/kernelhelper/README
rename : src/video_out/libdha/kernelhelper/dhahelper.c => contrib/libdha/kernelhelper/dhahelper.c
rename : src/video_out/libdha/kernelhelper/dhahelper.h => contrib/libdha/kernelhelper/dhahelper.h
rename : src/video_out/libdha/kernelhelper/test.c => contrib/libdha/kernelhelper/test.c
rename : src/video_out/libdha/libdha.c => contrib/libdha/libdha.c
rename : src/video_out/libdha/libdha.h => contrib/libdha/libdha.h
rename : src/video_out/libdha/mmi.c => contrib/libdha/mmi.c
rename : src/video_out/libdha/mtrr.c => contrib/libdha/mtrr.c
rename : src/video_out/libdha/oth/Makefile.am => contrib/libdha/oth/Makefile.am
rename : src/video_out/libdha/oth/pci.db => contrib/libdha/oth/pci.db
rename : src/video_out/libdha/pci.c => contrib/libdha/pci.c
rename : src/video_out/libdha/pci_db2c.awk => contrib/libdha/pci_db2c.awk
rename : src/video_out/libdha/ports.c => contrib/libdha/ports.c
rename : src/video_out/libdha/sysdep/AsmMacros_alpha.h => contrib/libdha/sysdep/AsmMacros_alpha.h
rename : src/video_out/libdha/sysdep/AsmMacros_arm32.h => contrib/libdha/sysdep/AsmMacros_arm32.h
rename : src/video_out/libdha/sysdep/AsmMacros_generic.h => contrib/libdha/sysdep/AsmMacros_generic.h
rename : src/video_out/libdha/sysdep/AsmMacros_ia64.h => contrib/libdha/sysdep/AsmMacros_ia64.h
rename : src/video_out/libdha/sysdep/AsmMacros_powerpc.h => contrib/libdha/sysdep/AsmMacros_powerpc.h
rename : src/video_out/libdha/sysdep/AsmMacros_sparc.h => contrib/libdha/sysdep/AsmMacros_sparc.h
rename : src/video_out/libdha/sysdep/AsmMacros_x86.h => contrib/libdha/sysdep/AsmMacros_x86.h
rename : src/video_out/libdha/sysdep/Makefile.am => contrib/libdha/sysdep/Makefile.am
rename : src/video_out/libdha/sysdep/libdha_os2.c => contrib/libdha/sysdep/libdha_os2.c
rename : src/video_out/libdha/sysdep/libdha_win32.c => contrib/libdha/sysdep/libdha_win32.c
rename : src/video_out/libdha/sysdep/pci_386bsd.c => contrib/libdha/sysdep/pci_386bsd.c
rename : src/video_out/libdha/sysdep/pci_alpha.c => contrib/libdha/sysdep/pci_alpha.c
rename : src/video_out/libdha/sysdep/pci_arm32.c => contrib/libdha/sysdep/pci_arm32.c
rename : src/video_out/libdha/sysdep/pci_bsdi.c => contrib/libdha/sysdep/pci_bsdi.c
rename : src/video_out/libdha/sysdep/pci_freebsd.c => contrib/libdha/sysdep/pci_freebsd.c
rename : src/video_out/libdha/sysdep/pci_generic_cpu.c => contrib/libdha/sysdep/pci_generic_cpu.c
rename : src/video_out/libdha/sysdep/pci_generic_os.c => contrib/libdha/sysdep/pci_generic_os.c
rename : src/video_out/libdha/sysdep/pci_ia64.c => contrib/libdha/sysdep/pci_ia64.c
rename : src/video_out/libdha/sysdep/pci_isc.c => contrib/libdha/sysdep/pci_isc.c
rename : src/video_out/libdha/sysdep/pci_linux.c => contrib/libdha/sysdep/pci_linux.c
rename : src/video_out/libdha/sysdep/pci_lynx.c => contrib/libdha/sysdep/pci_lynx.c
rename : src/video_out/libdha/sysdep/pci_mach386.c => contrib/libdha/sysdep/pci_mach386.c
rename : src/video_out/libdha/sysdep/pci_netbsd.c => contrib/libdha/sysdep/pci_netbsd.c
rename : src/video_out/libdha/sysdep/pci_openbsd.c => contrib/libdha/sysdep/pci_openbsd.c
rename : src/video_out/libdha/sysdep/pci_os2.c => contrib/libdha/sysdep/pci_os2.c
rename : src/video_out/libdha/sysdep/pci_powerpc.c => contrib/libdha/sysdep/pci_powerpc.c
rename : src/video_out/libdha/sysdep/pci_sco.c => contrib/libdha/sysdep/pci_sco.c
rename : src/video_out/libdha/sysdep/pci_sparc.c => contrib/libdha/sysdep/pci_sparc.c
rename : src/video_out/libdha/sysdep/pci_svr4.c => contrib/libdha/sysdep/pci_svr4.c
rename : src/video_out/libdha/sysdep/pci_win32.c => contrib/libdha/sysdep/pci_win32.c
rename : src/video_out/libdha/sysdep/pci_x86.c => contrib/libdha/sysdep/pci_x86.c
rename : src/video_out/libdha/test.c => contrib/libdha/test.c
rename : src/video_out/vidix/Makefile.am => contrib/vidix/Makefile.am
rename : src/video_out/vidix/README => contrib/vidix/README
rename : src/video_out/vidix/drivers/Makefile.am => contrib/vidix/drivers/Makefile.am
rename : src/video_out/vidix/drivers/cyberblade_regs.h => contrib/vidix/drivers/cyberblade_regs.h
rename : src/video_out/vidix/drivers/cyberblade_vid.c => contrib/vidix/drivers/cyberblade_vid.c
rename : src/video_out/vidix/drivers/genfb_vid.c => contrib/vidix/drivers/genfb_vid.c
rename : src/video_out/vidix/drivers/glint_regs.h => contrib/vidix/drivers/glint_regs.h
rename : src/video_out/vidix/drivers/mach64.h => contrib/vidix/drivers/mach64.h
rename : src/video_out/vidix/drivers/mach64_vid.c => contrib/vidix/drivers/mach64_vid.c
rename : src/video_out/vidix/drivers/mga_vid.c => contrib/vidix/drivers/mga_vid.c
rename : src/video_out/vidix/drivers/nvidia_vid.c => contrib/vidix/drivers/nvidia_vid.c
rename : src/video_out/vidix/drivers/pm2_vid.c => contrib/vidix/drivers/pm2_vid.c
rename : src/video_out/vidix/drivers/pm3_regs.h => contrib/vidix/drivers/pm3_regs.h
rename : src/video_out/vidix/drivers/pm3_vid.c => contrib/vidix/drivers/pm3_vid.c
rename : src/video_out/vidix/drivers/radeon.h => contrib/vidix/drivers/radeon.h
rename : src/video_out/vidix/drivers/radeon_vid.c => contrib/vidix/drivers/radeon_vid.c
rename : src/video_out/vidix/drivers/savage_regs.h => contrib/vidix/drivers/savage_regs.h
rename : src/video_out/vidix/drivers/savage_vid.c => contrib/vidix/drivers/savage_vid.c
rename : src/video_out/vidix/drivers/sis_bridge.c => contrib/vidix/drivers/sis_bridge.c
rename : src/video_out/vidix/drivers/sis_defs.h => contrib/vidix/drivers/sis_defs.h
rename : src/video_out/vidix/drivers/sis_regs.h => contrib/vidix/drivers/sis_regs.h
rename : src/video_out/vidix/drivers/sis_vid.c => contrib/vidix/drivers/sis_vid.c
rename : src/video_out/vidix/drivers/unichrome_regs.h => contrib/vidix/drivers/unichrome_regs.h
rename : src/video_out/vidix/drivers/unichrome_vid.c => contrib/vidix/drivers/unichrome_vid.c
rename : src/video_out/vidix/fourcc.h => contrib/vidix/fourcc.h
rename : src/video_out/vidix/vidix.h => contrib/vidix/vidix.h
rename : src/video_out/vidix/vidix.txt => contrib/vidix/vidix.txt
rename : src/video_out/vidix/vidixlib.c => contrib/vidix/vidixlib.c
rename : src/video_out/vidix/vidixlib.h => contrib/vidix/vidixlib.h
Diffstat (limited to 'src/video_out/libdha/sysdep/libdha_os2.c')
-rw-r--r-- | src/video_out/libdha/sysdep/libdha_os2.c | 161 |
1 files changed, 0 insertions, 161 deletions
diff --git a/src/video_out/libdha/sysdep/libdha_os2.c b/src/video_out/libdha/sysdep/libdha_os2.c deleted file mode 100644 index 041f6be71..000000000 --- a/src/video_out/libdha/sysdep/libdha_os2.c +++ /dev/null @@ -1,161 +0,0 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/os2/os2_video.c,v 3.14 2000/10/28 01:42:28 mvojkovi Exp $ */ -/* Modified for libdha by Nick Kurshev. */ -/* - * (c) Copyright 1994,1999 by Holger Veit - * <Holger.Veit@gmd.de> - * Modified 1996 by Sebastien Marineau <marineau@genie.uottawa.ca> - * - * 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 - * HOLGER VEIT 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 Holger Veit shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from Holger Veit. - * - */ -/* $XConsortium: os2_video.c /main/8 1996/10/27 11:49:02 kaleb $ */ - -#define INCL_DOSFILEMGR -#include "os2.h" - -/***************************************************************************/ -/* Video Memory Mapping helper functions */ -/***************************************************************************/ - -/* This section uses the xf86sup.sys driver developed for xfree86. - * The driver allows mapping of physical memory - * You must install it with a line DEVICE=path\xf86sup.sys in config.sys. - */ - -static HFILE mapdev = -1; -static ULONG stored_virt_addr; -static char* mappath = "\\DEV\\PMAP$"; -static HFILE open_mmap() -{ - APIRET rc; - ULONG action; - - if (mapdev != -1) - return mapdev; - - rc = DosOpen((PSZ)mappath, (PHFILE)&mapdev, (PULONG)&action, - (ULONG)0, FILE_SYSTEM, FILE_OPEN, - OPEN_SHARE_DENYNONE|OPEN_FLAGS_NOINHERIT|OPEN_ACCESS_READONLY, - (ULONG)0); - if (rc!=0) - mapdev = -1; - return mapdev; -} - -static void close_mmap() -{ - if (mapdev != -1) - DosClose(mapdev); - mapdev = -1; -} - -/* this structure is used as a parameter packet for the direct access - * ioctl of pmap$ - */ - -/* Changed here for structure of driver PMAP$ */ - -typedef struct{ - ULONG addr; - ULONG size; -} DIOParPkt; - -/* This is the data packet for the mapping function */ - -typedef struct { - ULONG addr; - USHORT sel; -} DIODtaPkt; - -/***************************************************************************/ -/* Video Memory Mapping section */ -/***************************************************************************/ - -static long callcount = 0L; - -/* ARGSUSED */ -void * map_phys_mem(unsigned long base, unsigned long size) -{ - DIOParPkt par; - ULONG plen; - DIODtaPkt dta; - ULONG dlen; - static BOOL ErrRedir = FALSE; - APIRET rc; - - par.addr = (ULONG)base; - par.size = (ULONG)size; - plen = sizeof(par); - dlen = sizeof(dta); - - open_mmap(); - if (mapdev == -1) - { - perror("libdha: device xf86sup.sys is not installed"); - exit(1); - } - if ((rc=DosDevIOCtl(mapdev, (ULONG)0x76, (ULONG)0x44, - (PVOID)&par, (ULONG)plen, (PULONG)&plen, - (PVOID)&dta, (ULONG)dlen, (PULONG)&dlen)) == 0) { - if (dlen==sizeof(dta)) { - callcount++; - return (void *)dta.addr; - } - /*else fail*/ - } - return (void *)-1; -} - -/* ARGSUSED */ -void unmap_phys_mem(void * base, unsigned long size) -{ - DIOParPkt par; - ULONG plen,vmaddr; - -/* We need here the VIRTADDR for unmapping, not the physical address */ -/* This should be taken care of either here by keeping track of allocated */ -/* pointers, but this is also already done in the driver... Thus it would */ -/* be a waste to do this tracking twice. Can this be changed when the fn. */ -/* is called? This would require tracking this function in all servers, */ -/* and changing it appropriately to call this with the virtual adress */ -/* If the above mapping function is only called once, then we can store */ -/* the virtual adress and use it here.... */ - - par.addr = (ULONG)base; - par.size = 0xffffffff; /* This is the virtual address parameter. Set this to ignore */ - plen = sizeof(par); - - if (mapdev != -1) - { - DosDevIOCtl(mapdev, (ULONG)0x76, (ULONG)0x46, - (PVOID)&par, (ULONG)plen, (PULONG)&plen, - &vmaddr, sizeof(ULONG), &plen); - callcount--; - } -/* Now if more than one region has been allocated and we close the driver, - * the other pointers will immediately become invalid. We avoid closing - * driver for now, but this should be fixed for server exit - */ - - if(!callcount) close_mmap(); -} |