diff options
Diffstat (limited to 'vidix')
79 files changed, 0 insertions, 41856 deletions
diff --git a/vidix/.gitignore b/vidix/.gitignore deleted file mode 100644 index 96d02a288a..0000000000 --- a/vidix/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -/pci_dev_ids.c -/pci_ids.h -/pci_names.c -/pci_names.h -/pci_vendors.h diff --git a/vidix/AsmMacros.h b/vidix/AsmMacros.h deleted file mode 100644 index e798770ebe..0000000000 --- a/vidix/AsmMacros.h +++ /dev/null @@ -1,83 +0,0 @@ -/* $XConsortium: AsmMacros.h /main/13 1996/10/25 11:33:12 kaleb $ */ -/* - * (c) Copyright 1993,1994 by David Wexelblat <dwex@xfree86.org> - * - * 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 - * DAVID WEXELBLAT 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 David Wexelblat shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from David Wexelblat. - * - */ -/* - * Copyright 1997 - * Digital Equipment Corporation. All rights reserved. - * This software is furnished under license and may be used and copied only in - * accordance with the following terms and conditions. Subject to these - * conditions, you may download, copy, install, use, modify and distribute - * this software in source and/or binary form. No title or ownership is - * transferred hereby. - * - * 1) Any source code used, modified or distributed must reproduce and retain - * this copyright notice and list of conditions as they appear in the source - * file. - * - * 2) No right is granted to use any trade name, trademark, or logo of Digital - * Equipment Corporation. Neither the "Digital Equipment Corporation" name - * nor any trademark or logo of Digital Equipment Corporation may be used - * to endorse or promote products derived from this software without the - * prior written permission of Digital Equipment Corporation. - * - * 3) This software is provided "AS-IS" and any express or implied warranties, - * including but not limited to, any implied warranties of merchantability, - * fitness for a particular purpose, or non-infringement are disclaimed. In - * no event shall DIGITAL be liable for any damages whatsoever, and in - * particular, DIGITAL shall not be liable for special, indirect, - * consequential, or incidental damages or damages for - * lost profits, loss of revenue or loss of use, whether such damages arise - * in contract, - * negligence, tort, under statute, in equity, at law or otherwise, even if - * advised of the possibility of such damage. - * - */ - -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/chips/util/AsmMacros.h,v 1.1 2001/11/16 21:13:34 tsi Exp $ */ - -/* - * Modified for readability by Nick Kurshev -*/ - -#ifndef MPLAYER_ASMMACROS_H -#define MPLAYER_ASMMACROS_H - -#if defined(__alpha__) -#include "sysdep/AsmMacros_alpha.h" -#elif defined(__ia64__) -#include "sysdep/AsmMacros_ia64.h" -#elif defined(__sparc__) -#include "sysdep/AsmMacros_sparc.h" -#elif defined( __arm32__ ) -#include "sysdep/AsmMacros_arm32.h" -#elif defined(__powerpc__) -#include "sysdep/AsmMacros_powerpc.h" -#else -#include "sysdep/AsmMacros_x86.h" -#endif - -#endif /* MPLAYER_ASMMACROS_H */ diff --git a/vidix/README b/vidix/README deleted file mode 100644 index 3fd498027b..0000000000 --- a/vidix/README +++ /dev/null @@ -1,10 +0,0 @@ -VIDIX - Video Interface for *niX. -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -This library was designed and introduced as interface to userspace drivers -to provide DGA everywhere where it's possible (unline X11). -I hope that these drivers will be portable same as X11 (not only on *nix). - -For details on how to develop a new driver see trunk/DOCS/tech/vidix.txt - -IMPORTANT: These are NOT linux kernel drivers. If you are looking for -the mga_vid linux kernel drivers, please cd ../drivers thanks. diff --git a/vidix/README.dha b/vidix/README.dha deleted file mode 100644 index 6232b051b7..0000000000 --- a/vidix/README.dha +++ /dev/null @@ -1,30 +0,0 @@ -lidbha - Direct Hardware Access library -======================================= - -This library was designed for providing direct hardware access under different -OS'es and architectures, so it's platform- and os-independent. - -The main project on the top of libdha is Vidix. It provides userspace -video drivers for Matrox, Ati, 3Dlabs, Trident (and it's still evolving). - -For the full list of supported OS'es read the sources, anyway here's a 'reported -as working' list (these platforms are used daily): - Linux/x86 - FreeBSD/x86 - NetBSD/x86 - Linux/PPC - -There are different ways to access the hardware, normally only ROOT can do that. -With root privileges libdha will run fine, but there are some others ways -to use it as a normal user: -1, set the SUID bit on the binary (in this way it runs with root privileges) -2, use svgalib kernel helper (please read the comment in the Makefile) -3, use dhahelper (not yet finished) - -The library is based on XFree86 and gfxdump (a utility from the GATOS project) -sources. - -Original import and design by Nick Kurshev and Alex Beregszaszi. -Current maintenance and dhahelper by Alex Beregszaszi. -Svgalib kernelhelper support by Matan Ziv-Av. -(for the e-mail addresses see the AUTHORS file in MPlayer) diff --git a/vidix/cyberblade_regs.h b/vidix/cyberblade_regs.h deleted file mode 100644 index b2fbcb1670..0000000000 --- a/vidix/cyberblade_regs.h +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright 1992-2000 by Alan Hourihane, Wigan, England - * - * 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 - * 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 - * "as is" without express or implied warranty. - * - * ALAN HOURIHANE 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 - * 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: Alan Hourihane, alanh@fairlite.demon.co.uk - */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/trident_regs.h,v 1.22 2002/01/11 13:06:30 alanh Exp $ */ - -#ifndef MPLAYER_CYBERBLADE_REGS_H -#define MPLAYER_CYBERBLADE_REGS_H - -#define DEBUG 1 - -#define NTSC 14.31818 -#define PAL 17.73448 - -/* General Registers */ -#define SPR 0x1F /* Software Programming Register (videoram) */ - -/* 3C4 */ -#define RevisionID 0x09 -#define ConfPort1 0x0C -#define ConfPort2 0x0C -#define NewMode2 0x0D -#define OldMode2 0x00 /* Should be 0x0D - dealt with in trident_dac.c */ -#define OldMode1 0x0E -#define NewMode1 0x0E -#define Protection 0x11 -#define MCLKLow 0x16 -#define MCLKHigh 0x17 -#define ClockLow 0x18 -#define ClockHigh 0x19 -#define SSetup 0x20 -#define SKey 0x37 -#define SPKey 0x57 - -/* 3x4 */ -#define Offset 0x13 -#define Underline 0x14 -#define CRTCMode 0x17 -#define CRTCModuleTest 0x1E -#define FIFOControl 0x20 -#define LinearAddReg 0x21 -#define DRAMTiming 0x23 -#define New32 0x23 -#define RAMDACTiming 0x25 -#define CRTHiOrd 0x27 -#define AddColReg 0x29 -#define InterfaceSel 0x2A -#define HorizOverflow 0x2B -#define GETest 0x2D -#define Performance 0x2F -#define GraphEngReg 0x36 -#define I2C 0x37 -#define PixelBusReg 0x38 -#define PCIReg 0x39 -#define DRAMControl 0x3A -#define MiscContReg 0x3C -#define CursorXLow 0x40 -#define CursorXHigh 0x41 -#define CursorYLow 0x42 -#define CursorYHigh 0x43 -#define CursorLocLow 0x44 -#define CursorLocHigh 0x45 -#define CursorXOffset 0x46 -#define CursorYOffset 0x47 -#define CursorFG1 0x48 -#define CursorFG2 0x49 -#define CursorFG3 0x4A -#define CursorFG4 0x4B -#define CursorBG1 0x4C -#define CursorBG2 0x4D -#define CursorBG3 0x4E -#define CursorBG4 0x4F -#define CursorControl 0x50 -#define PCIRetry 0x55 -#define PreEndControl 0x56 -#define PreEndFetch 0x57 -#define PCIMaster 0x60 -#define Enhancement0 0x62 -#define NewEDO 0x64 - -/* --- Additions by AMR for Vidix support --- */ -#define VideoWin1_HScale 0x80 -#define VideoWin1_VScale 0x82 -#define VideoWin1_Start 0x86 -#define VideoWin1_Stop 0x8a -#define Video_Flags 0x8e -#define VideoWin1_Y_BPR 0x90 -#define VideoWin1_Y_Offset 0x92 -#define Video_LineBufferThreshold 0x95 -#define Video_LineBufferLevel 0x96 -#define Video_Flags2 0x97 -/* --- */ - -#define TVinterface 0xC0 -#define TVMode 0xC1 -#define ClockControl 0xCF - - -/* 3CE */ -#define MiscExtFunc 0x0F -#define MiscIntContReg 0x2F -#define CyberControl 0x30 -#define CyberEnhance 0x31 -#define FPConfig 0x33 -#define VertStretch 0x52 -#define HorStretch 0x53 -#define BiosMode 0x5c -#define BiosNewMode1 0x5a -#define BiosNewMode2 0x5c -#define BiosReg 0x5d - -/* --- IO Macros by AMR --- */ - -#define CRINB(reg) (OUTPORT8(0x3d4,reg), INPORT8(0x3d5)) -#define SRINB(reg) (OUTPORT8(0x3c4,reg), INPORT8(0x3c5)) -#define CROUTB(reg,val) (OUTPORT8(0x3d4,reg), OUTPORT8(0x3d5,val)) -#define SROUTB(reg,val) (OUTPORT8(0x3c4,reg), OUTPORT8(0x3c5,val)) - -/* --- */ - -#endif /* MPLAYER_CYBERBLADE_REGS_H */ diff --git a/vidix/cyberblade_vid.c b/vidix/cyberblade_vid.c deleted file mode 100644 index f46095a3da..0000000000 --- a/vidix/cyberblade_vid.c +++ /dev/null @@ -1,608 +0,0 @@ -/* - * VIDIX driver for VIA Cyberblade/i1 chipsets. - * Brightness/Contrast controls disabled for the time being - they were - * seriously degrading picture quality, especially with TV-Out. - * - * Copyright (C) 2002 Alastair M. Robinson - * http://www.blackfiveservices.co.uk/EPIAVidix.shtml - * based on Permedia 3 driver by Måns Rullgård - * thanks to Gilles Frattini for bugfixes - * - * This file is part of MPlayer. - * - * MPlayer is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * MPlayer is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with MPlayer; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -/* To Do: - * Implement Hue/Saturation controls - * Support / Test multiple frames - * Test colour-key code more extensively - */ - -#include <errno.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <inttypes.h> -#include <unistd.h> - -#include "config.h" -#include "vidix.h" -#include "fourcc.h" -#include "dha.h" -#include "pci_ids.h" -#include "pci_names.h" - -#include "cyberblade_regs.h" - -static pciinfo_t pci_info; - -static char save_colourkey[6]; -static char *cyberblade_mem; - -#ifdef DEBUG_LOGFILE -static FILE *logfile=0; -#define LOGWRITE(x) {if(logfile) fprintf(logfile,x);} -#else -#define LOGWRITE(x) -#endif - -/* Helper functions for reading registers. */ - -static void CROUTW(int reg,int val) -{ - CROUTB(reg,val&255); - CROUTB(reg+1,(val>>8)&255); -} - -static void SROUTW(int reg,int val) -{ - SROUTB(reg,val&255); - SROUTB(reg+1,(val>>8)&255); -} - -static vidix_capability_t cyberblade_cap = -{ - "Trident CyberBlade i1 driver", - "Alastair M. Robinson <blackfive@fakenhamweb.co.uk>", - TYPE_OUTPUT, - { 0, 0, 0, 0 }, - 1024, - 1024, - 4, - 4, - -1, - FLAG_UPSCALER|FLAG_DOWNSCALER, - VENDOR_TRIDENT, - -1, - { 0, 0, 0, 0 } -}; - -static unsigned short cyberblade_card_ids[] = -{ - DEVICE_TRIDENT_CYBERBLADE_I7, - DEVICE_TRIDENT_CYBERBLADE_I7D, - DEVICE_TRIDENT_CYBERBLADE_I1, - DEVICE_TRIDENT_CYBERBLADE_I12, - DEVICE_TRIDENT_CYBERBLADE_I13, - DEVICE_TRIDENT_CYBERBLADE_XPAI1 -}; - - -static int find_chip(unsigned chip_id) -{ - unsigned i; - for(i = 0;i < sizeof(cyberblade_card_ids)/sizeof(unsigned short);i++) - { - if(chip_id == cyberblade_card_ids[i]) return i; - } - return -1; -} - -static int cyberblade_probe(int verbose, int force) -{ - pciinfo_t lst[MAX_PCI_DEVICES]; - unsigned i,num_pci; - int err; - err = pci_scan(lst,&num_pci); - if(err) - { - printf("[cyberblade] Error occurred during pci scan: %s\n",strerror(err)); |