summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile34
-rw-r--r--drivers/3dfx.h374
-rw-r--r--drivers/README.Ati121
-rw-r--r--drivers/README.Matrox46
-rw-r--r--drivers/generic_math.h272
-rw-r--r--drivers/hacking.ati313
-rw-r--r--drivers/mga_vid.c1778
-rw-r--r--drivers/mga_vid.h74
-rw-r--r--drivers/mga_vid_test.c235
-rw-r--r--drivers/radeon.h2058
-rw-r--r--drivers/radeon_vid.c1549
-rw-r--r--drivers/radeon_vid.h126
-rw-r--r--drivers/tdfx_vid.c1049
-rw-r--r--drivers/tdfx_vid.h128
-rw-r--r--drivers/tdfx_vid_test.c120
15 files changed, 0 insertions, 8277 deletions
diff --git a/Makefile b/Makefile
index 055e7d2c39..58bef81b85 100644
--- a/Makefile
+++ b/Makefile
@@ -792,40 +792,6 @@ realcodecs: CFLAGS += -g
ld -shared -o $@ $< -ldl -lc
-
-###### drivers #######
-
-KERNEL_INC = /lib/modules/`uname -r`/build/include
-KERNEL_VERSION = $(shell grep RELEASE $(KERNEL_INC)/linux/version.h | cut -d'"' -f2)
-KERNEL_CFLAGS = -O2 -D__KERNEL__ -DMODULE -Wall -I$(KERNEL_INC) -include $(KERNEL_INC)/linux/modversions.h
-KERNEL_OBJS = $(addprefix drivers/, mga_vid.o tdfx_vid.o radeon_vid.o rage128_vid.o)
-MODULES_DIR = /lib/modules/$(KERNEL_VERSION)/misc
-DRIVER_OBJS = $(KERNEL_OBJS) drivers/mga_vid_test drivers/tdfx_vid_test
-
-drivers: $(DRIVER_OBJS)
-
-$(DRIVER_OBJS): CFLAGS = $(KERNEL_CFLAGS)
-drivers/mga_vid.o: drivers/mga_vid.c drivers/mga_vid.h
-drivers/tdfx_vid.o: drivers/tdfx_vid.c drivers/3dfx.h
-drivers/radeon_vid.o drivers/rage128_vid.o: CFLAGS += -fomit-frame-pointer -fno-strict-aliasing -fno-common -ffast-math
-drivers/radeon_vid.o: drivers/radeon_vid.c drivers/radeon.h drivers/radeon_vid.h
-drivers/rage128_vid.o: drivers/radeon_vid.c drivers/radeon.h drivers/radeon_vid.h
- $(CC) $(CFLAGS) -DRAGE128 -c $< -o $@
-
-install-drivers: $(DRIVER_OBJS)
- -mkdir -p $(MODULES_DIR)
- install -m 644 $(KERNEL_OBJS) $(MODULES_DIR)
- depmod -a
- -mknod /dev/mga_vid c 178 0
- -mknod /dev/tdfx_vid c 178 0
- -mknod /dev/radeon_vid c 178 0
- -ln -s /dev/radeon_vid /dev/rage128_vid
-
-driversclean:
- -$(RM) $(DRIVER_OBJS) drivers/*~
-
-
-
-include $(DEP_FILES)
.PHONY: all doxygen locales *install* *tools drivers
diff --git a/drivers/3dfx.h b/drivers/3dfx.h
deleted file mode 100644
index 159327d482..0000000000
--- a/drivers/3dfx.h
+++ /dev/null
@@ -1,374 +0,0 @@
-/*
- * Copyright (C) Colin Cross Apr 2000
- * changed by zsteva Aug/Sep 2001, see vo_3dfx.c
- *
- * 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.
- */
-
-#ifndef MPLAYER_3DFX_H
-#define MPLAYER_3DFX_H
-
-#define VOODOO_IO_REG_OFFSET ((unsigned long int)0x0000000)
-#define VOODOO_YUV_REG_OFFSET ((unsigned long int)0x0080100)
-#define VOODOO_AGP_REG_OFFSET ((unsigned long int)0x0080000)
-#define VOODOO_2D_REG_OFFSET ((unsigned long int)0x0100000)
-#define VOODOO_YUV_PLANE_OFFSET ((unsigned long int)0x0C00000)
-
-#define VOODOO_BLT_FORMAT_YUYV (8<<16)
-#define VOODOO_BLT_FORMAT_UYVY (9<<16)
-#define VOODOO_BLT_FORMAT_16 (3<<16)
-#define VOODOO_BLT_FORMAT_24 (4<<16)
-#define VOODOO_BLT_FORMAT_32 (5<<16)
-
-#define VOODOO_YUV_STRIDE (1024>>2)
-
-struct voodoo_yuv_fb_t {
- uint32_t Y[0x0040000];
- uint32_t U[0x0040000];
- uint32_t V[0x0040000];
-};
-
-struct voodoo_yuv_reg_t {
- uint32_t yuvBaseAddr;
- uint32_t yuvStride;
-};
-
-struct voodoo_2d_reg_t {
- uint32_t status;
- uint32_t intCtrl;
- uint32_t clip0Min;
- uint32_t clip0Max;
- uint32_t dstBaseAddr;
- uint32_t dstFormat;
- uint32_t srcColorkeyMin;
- uint32_t srcColorkeyMax;
- uint32_t dstColorkeyMin;
- uint32_t dstColorkeyMax;
- signed long bresError0;
- signed long bresError1;
- uint32_t rop;
- uint32_t srcBaseAddr;
- uint32_t commandExtra;
- uint32_t lineStipple;
- uint32_t lineStyle;
- uint32_t pattern0Alias;
- uint32_t pattern1Alias;
- uint32_t clip1Min;
- uint32_t clip1Max;
- uint32_t srcFormat;
- uint32_t srcSize;
- uint32_t srcXY;
- uint32_t colorBack;
- uint32_t colorFore;
- uint32_t dstSize;
- uint32_t dstXY;
- uint32_t command;
- uint32_t RESERVED1;
- uint32_t RESERVED2;
- uint32_t RESERVED3;
- uint8_t launchArea[128];
-};
-
-
-struct voodoo_io_reg_t {
- uint32_t status;
- uint32_t pciInit0;
- uint32_t sipMonitor;
- uint32_t lfbMemoryConfig;
- uint32_t miscInit0;
- uint32_t miscInit1;
- uint32_t dramInit0;
- uint32_t dramInit1;
- uint32_t agpInit;
- uint32_t tmuGbeInit;
- uint32_t vgaInit0;
- uint32_t vgaInit1;
- uint32_t dramCommand;
- uint32_t dramData;
- uint32_t RESERVED1;
- uint32_t RESERVED2;
-
- uint32_t pllCtrl0;
- uint32_t pllCtrl1;
- uint32_t pllCtrl2;
- uint32_t dacMode;
- uint32_t dacAddr;
- uint32_t dacData;
-
- uint32_t rgbMaxDelta;
- uint32_t vidProcCfg;
- uint32_t hwCurPatAddr;
- uint32_t hwCurLoc;
- uint32_t hwCurC0;
- uint32_t hwCurC1;
- uint32_t vidInFormat;
- uint32_t vidInStatus;
- uint32_t vidSerialParallelPort;
- uint32_t vidInXDecimDeltas;
- uint32_t vidInDecimInitErrs;
- uint32_t vidInYDecimDeltas;
- uint32_t vidPixelBufThold;
- uint32_t vidChromaMin;
- uint32_t vidChromaMax;
- uint32_t vidCurrentLine;
- uint32_t vidScreenSize;
- uint32_t vidOverlayStartCoords;
- uint32_t vidOverlayEndScreenCoord;
- uint32_t vidOverlayDudx;
- uint32_t vidOverlayDudxOffsetSrcWidth;
- uint32_t vidOverlayDvdy;
-
- uint32_t vga_registers_not_mem_mapped[12];
- uint32_t vidOverlayDvdyOffset;
- uint32_t vidDesktopStartAddr;
- uint32_t vidDesktopOverlayStride;
- uint32_t vidInAddr0;
- uint32_t vidInAddr1;
- uint32_t vidInAddr2;
- uint32_t vidInStride;
- uint32_t vidCurrOverlayStartAddr;
-};
-
-
-struct pioData_t {
- short port;
- short size;
- int device;
- void *value;
-};
-
-typedef struct pioData_t pioData;
-typedef struct voodoo_2d_reg_t voodoo_2d_reg;
-typedef struct voodoo_io_reg_t voodoo_io_reg;
-typedef struct voodoo_yuv_reg_t voodoo_yuv_reg;
-typedef struct voodoo_yuv_fb_t voodoo_yuv_fb;
-
-
-/* from linux/driver/video/tdfxfb.c, definition for 3dfx registers.
- *
- * author: Hannu Mallat <hmallat@cc.hut.fi>
- */
-
-#ifndef PCI_DEVICE_ID_3DFX_VOODOO5
-#define PCI_DEVICE_ID_3DFX_VOODOO5 0x0009
-#endif
-
-/* membase0 register offsets */
-#define STATUS 0x00
-#define PCIINIT0 0x04
-#define SIPMONITOR 0x08
-#define LFBMEMORYCONFIG 0x0c
-#define MISCINIT0 0x10
-#define MISCINIT1 0x14
-#define DRAMINIT0 0x18
-#define DRAMINIT1 0x1c
-#define AGPINIT 0x20
-#define TMUGBEINIT 0x24
-#define VGAINIT0 0x28
-#define VGAINIT1 0x2c
-#define DRAMCOMMAND 0x30
-#define DRAMDATA 0x34
-/* reserved 0x38 */
-/* reserved 0x3c */
-#define PLLCTRL0 0x40
-#define PLLCTRL1 0x44
-#define PLLCTRL2 0x48
-#define DACMODE 0x4c
-#define DACADDR 0x50
-#define DACDATA 0x54
-#define RGBMAXDELTA 0x58
-#define VIDPROCCFG 0x5c
-#define HWCURPATADDR 0x60
-#define HWCURLOC 0x64
-#define HWCURC0 0x68
-#define HWCURC1 0x6c
-#define VIDINFORMAT 0x70
-#define VIDINSTATUS 0x74
-#define VIDSERPARPORT 0x78
-#define VIDINXDELTA 0x7c
-#define VIDININITERR 0x80
-#define VIDINYDELTA 0x84
-#define VIDPIXBUFTHOLD 0x88
-#define VIDCHRMIN 0x8c
-#define VIDCHRMAX 0x90
-#define VIDCURLIN 0x94
-#define VIDSCREENSIZE 0x98
-#define VIDOVRSTARTCRD 0x9c
-#define VIDOVRENDCRD 0xa0
-#define VIDOVRDUDX 0xa4
-#define VIDOVRDUDXOFF 0xa8
-#define VIDOVRDVDY 0xac
-/* ... */
-#define VIDOVRDVDYOFF 0xe0
-#define VIDDESKSTART 0xe4
-#define VIDDESKSTRIDE 0xe8
-#define VIDINADDR0 0xec
-#define VIDINADDR1 0xf0
-#define VIDINADDR2 0xf4
-#define VIDINSTRIDE 0xf8
-#define VIDCUROVRSTART 0xfc
-
-#define INTCTRL (0x00100000 + 0x04)
-#define CLIP0MIN (0x00100000 + 0x08)
-#define CLIP0MAX (0x00100000 + 0x0c)
-#define DSTBASE (0x00100000 + 0x10)
-#define DSTFORMAT (0x00100000 + 0x14)
-#define SRCCOLORKEYMIN (0x00100000 + 0x18)
-#define SRCCOLORKEYMAX (0x00100000 + 0x1c)
-#define DSTCOLORKEYMIN (0x00100000 + 0x20)
-#define DSTCOLORKEYMAX (0x00100000 + 0x24)
-#define ROP123 (0x00100000 + 0x30)
-#define SRCBASE (0x00100000 + 0x34)
-#define COMMANDEXTRA_2D (0x00100000 + 0x38)
-#define CLIP1MIN (0x00100000 + 0x4c)
-#define CLIP1MAX (0x00100000 + 0x50)
-#define SRCFORMAT (0x00100000 + 0x54)
-#define SRCSIZE (0x00100000 + 0x58)
-#define SRCXY (0x00100000 + 0x5c)
-#define COLORBACK (0x00100000 + 0x60)
-#define COLORFORE (0x00100000 + 0x64)
-#define DSTSIZE (0x00100000 + 0x68)
-#define DSTXY (0x00100000 + 0x6c)
-#define COMMAND_2D (0x00100000 + 0x70)
-#define LAUNCH_2D (0x00100000 + 0x80)
-
-#define COMMAND_3D (0x00200000 + 0x120)
-
-#define SWAPBUFCMD (0x00200000 + 0x128)
-#define SWAPPENDING (0x00200000 + 0x24C)
-#define LEFTOVBUF (0x00200000 + 0x250)
-#define RIGHTOVBUF (0x00200000 + 0x254)
-#define FBISWAPBUFHIST (0x00200000 + 0x258)
-
-/* register bitfields (not all, only as needed) */
-
-#define BIT(x) (1UL << (x))
-
-/* COMMAND_2D reg. values */
-#define TDFXFB_ROP_COPY 0xcc // src
-#define TDFXFB_ROP_INVERT 0x55 // NOT dst
-#define TDFXFB_ROP_XOR 0x66 // src XOR dst
-#define TDFXFB_ROP_OR 0xee // src | dst
-
-#define AUTOINC_DSTX BIT(10)
-#define AUTOINC_DSTY BIT(11)
-
-
-#define COMMAND_2D_S2S_BITBLT 0x01 // screen to screen
-#define COMMAND_2D_S2S_STRECH_BLT 0x02 // BLT + Strech
-#define COMMAND_2D_H2S_BITBLT 0x03 // host to screen
-#define COMMAND_2D_FILLRECT 0x05
-
-#define COMMAND_2D_DO_IMMED BIT(8) // Do it immediatly
-
-
-
-#define COMMAND_3D_NOP 0x00
-#define STATUS_RETRACE BIT(6)
-#define STATUS_BUSY BIT(9)
-#define MISCINIT1_CLUT_INV BIT(0)
-#define MISCINIT1_2DBLOCK_DIS BIT(15)
-#define DRAMINIT0_SGRAM_NUM BIT(26)
-#define DRAMINIT0_SGRAM_TYPE BIT(27)
-#define DRAMINIT1_MEM_SDRAM BIT(30)
-#define VGAINIT0_VGA_DISABLE BIT(0)
-#define VGAINIT0_EXT_TIMING BIT(1)
-#define VGAINIT0_8BIT_DAC BIT(2)
-#define VGAINIT0_EXT_ENABLE BIT(6)
-#define VGAINIT0_WAKEUP_3C3 BIT(8)
-#define VGAINIT0_LEGACY_DISABLE BIT(9)
-#define VGAINIT0_ALT_READBACK BIT(10)
-#define VGAINIT0_FAST_BLINK BIT(11)
-#define VGAINIT0_EXTSHIFTOUT BIT(12)
-#define VGAINIT0_DECODE_3C6 BIT(13)
-#define VGAINIT0_SGRAM_HBLANK_DISABLE BIT(22)
-#define VGAINIT1_MASK 0x1fffff
-#define VIDCFG_VIDPROC_ENABLE BIT(0)
-#define VIDCFG_CURS_X11 BIT(1)
-#define VIDCFG_HALF_MODE BIT(4)
-#define VIDCFG_DESK_ENABLE BIT(7)
-#define VIDCFG_CLUT_BYPASS BIT(10)
-#define VIDCFG_2X BIT(26)
-#define VIDCFG_HWCURSOR_ENABLE BIT(27)
-#define VIDCFG_PIXFMT_SHIFT 18
-#define DACMODE_2X BIT(0)
-
-/* AGP registers */
-#define AGPREQSIZE (0x0080000 + 0x00)
-#define AGPHOSTADDRESSLOW (0x0080000 + 0x04)
-#define AGPHOSTADDRESSHIGH (0x0080000 + 0x08)
-#define AGPGRAPHICSADDRESS (0x0080000 + 0x0C)
-#define AGPGRAPHICSSTRIDE (0x0080000 + 0x10)
-#define AGPMOVECMD (0x0080000 + 0x14)
-
-/* FIFO registers */
-#define CMDBASEADDR0 (0x0080000 + 0x20)
-#define CMDBASESIZE0 (0x0080000 + 0x24)
-#define CMDBUMP0 (0x0080000 + 0x28)
-#define CMDRDPTRL0 (0x0080000 + 0x2C)
-#define CMDRDPTRH0 (0x0080000 + 0x30)
-#define CMDAMIN0 (0x0080000 + 0x34)
-#define CMDAMAX0 (0x0080000 + 0x38)
-#define CMDFIFODEPTH0 (0x0080000 + 0x44)
-#define CMDHOLECNT0 (0x0080000 + 0x48)
-
-
-/* YUV reisters */
-#define YUVBASEADDRESS (0x0080000 + 0x100)
-#define YUVSTRIDE (0x0080000 + 0x104)
-
-/* VGA rubbish, need to change this for multihead support */
-#define MISC_W 0x3c2
-#define MISC_R 0x3cc
-#define SEQ_I 0x3c4
-#define SEQ_D 0x3c5
-#define CRT_I 0x3d4
-#define CRT_D 0x3d5
-#define ATT_IW 0x3c0
-#define RAMDAC_R 0x3c7
-#define RAMDAC_W 0x3c8
-#define RAMDAC_D 0x3c9
-#define IS1_R 0x3da
-#define GRA_I 0x3ce
-#define GRA_D 0x3cf
-
-#ifndef FB_ACCEL_3DFX_BANSHEE
-#define FB_ACCEL_3DFX_BANSHEE 31
-#endif
-
-#define TDFXF_HSYNC_ACT_HIGH 0x01
-#define TDFXF_HSYNC_ACT_LOW 0x02
-#define TDFXF_VSYNC_ACT_HIGH 0x04
-#define TDFXF_VSYNC_ACT_LOW 0x08
-#define TDFXF_LINE_DOUBLE 0x10
-#define TDFXF_VIDEO_ENABLE 0x20
-
-#define TDFXF_HSYNC_MASK 0x03
-#define TDFXF_VSYNC_MASK 0x0c
-
-#define XYREG(x,y) (((((unsigned long)y) & 0x1FFF) << 16) | (((unsigned long)x) & 0x1FFF))
-
-//#define TDFXFB_DEBUG
-#ifdef TDFXFB_DEBUG
-#define DPRINTK(a,b...) printk(KERN_DEBUG "fb: %s: " a, __FUNCTION__ , ## b)
-#else
-#define DPRINTK(a,b...)
-#endif
-
-/* ------------------------------------------------------------------------- */
-
-#endif /* MPLAYER_3DFX_H */
diff --git a/drivers/README.Ati b/drivers/README.Ati
deleted file mode 100644
index 077b6ffff2..0000000000
--- a/drivers/README.Ati
+++ /dev/null
@@ -1,121 +0,0 @@
- framebuffer driver for ATI Radeon chipset video boards
- ======================================================
-
-These files are replacement for linux-2.4.x-ac.y drivers.
-To use this driver you should have at least linux-2.4.5-ac.1
-then simply replace linux/drivers/video/radeon* with files
-from this directory.
-Note: since linux-2.4.10 this driver was moved from -ac to
-Linus distribution.
-
-Alternative way:
-~~~~~~~~~~~~~~~~
-Simply type two commands in this directory:
-make
-make install
-
-Anyway you should have 'framebuffer support' compiled into linux-kernel
-and at least '8bpp packed pixel support' compiled and installed as module.
-(But if you plan to use this module with MPlayer you also should have
-16bpp, 24bpp and 32bpp pixel support compiled as modules).
-
-
- Radeon video overlay
- ====================
-
-It was designed for MPlayer and currently can be used only by MPlayer.
-It's RGB-YUV BES for Radeon cards (althrough there is experimental
-support for Rage128 / Rage128pro chips).
-
-rage128_vid is contained within radeon_vid.c. As for a Rage128 framebuffer -
-use the one from your Linux distribution.
-
-Installation:
-~~~~~~~~~~~~~
-
-Simply type two commands in this directory:
-make
-make install
-
-Using with MPlayer:
-~~~~~~~~~~~~~~~~~~~
-
-Currently there is only one way to use ATI's drivers:
-mplayer -vo vesa:lvo:/dev/radeon_vid -<your vesa's options> filename
-or
-mplayer -vo vesa:lvo:/dev/rage128_vid -<your vesa's options> filename
-
-For YV12 formats you can use also:
-mplayer -vo mga:/dev/radeon_vid -<your mga's option> filename
-
-but in this case you should load at least radeonfb driver from
-this package.
-
-Configuring:
-~~~~~~~~~~~~
-
-You can tune some parameters with the following trick:
-echo "parameter=value" > /dev/radeon_vid
-Example (disables adaptive deinterlacing):
-echo "deinterlace=off" > /dev/radeon_vid
-
-To know more about these parameters - try reading the /dev/radeon_vid file ;)
-For example:
-cat /dev/radeon_vid
-
-List of parameters:
-~~~~~~~~~~~~~~~~~~~
-If you have Rage128 chip:
-brightness=decval (-64:+63) changes brightness
-saturation=decval (0:+31) changes saturation 0 == grayscale mode
-else - if you have Radeon:
-brightness=decval (-1000:+1000) -1000 == black screen
-saturation=decval (-1000:+1000) -1000 == grayscaled mode
-contrast=decval (-1000:+1000) -1000 == black screen
-hue=decval (-1000:+1000) -1000 == +1000 (full circle)
- all other values are within this range
-Note: 0 is the default value for every parameter on Radeons.
-WARNING: This driver violates the rule: "no float in the kernel".
-So if you have problems then don't use color correction.
-
-double_buff=on/off enables/disables double buffering
-deinterlace=on/off enables/disables adaptive deinterlacing
-deinterlace_pattern=hexval defines deinterlacing pattern
-
-Driver parameters:
-~~~~~~~~~~~~~~~~~~
-
-You can use some additional parameters during module loading:
-Example:
-modprobe radeon_vid swap_fourcc=1
-
-List of driver parameters:
-~~~~~~~~~~~~~~~~~~~~~~~~~~
-mtrr=1/0 Configures MTRR (if available), default = 1.
-swap_fourcc=1/0 Performs byte swapping of passed fourcc.
- (It's required for compatibility with -vo mga.)
-
-To know more about driver parameters execute:
-modinfo radeon_vid
-or
-modinfo rage128_vid
-
-Note:
-~~~~~
-For command line of MPlayer:
-You can pass only options with can be recognized by vo_vesa driver.
-(Indeed radeon_vid and rage128_vid are stupid things and can only create
-video overlay. Mode switching and other adjustments are performed by the
-vo_vesa driver. This mean that they use the VESA BIOS as graphics server.)
-
-Conclusion:
-~~~~~~~~~~~
-This stuff (radeon(rage128)_vid) currently doesn't support any standards.
-
-Full example:
-~~~~~~~~~~~~~
-modprobe radeon_vid mtrr=1
-echo "deinterlace_pattern=F0055555" > /dev/radeon_vid
-mplayer -vo vesa:lvo:/dev/radeon_vid -fs -zoom -bpp 32 filename
-
-Enjoy!
diff --git a/drivers/README.Matrox b/drivers/README.Matrox
deleted file mode 100644
index 48a37ed057..0000000000
--- a/drivers/README.Matrox
+++ /dev/null
@@ -1,46 +0,0 @@
-The code in this directory is the old mga_vid driver for Linux kernels
-prior to 2.6. It does _not_ compile for version 2.6.x.
-
-For Linux kernel 2.6.x please get the newest version of the 2.6 port from
-http://attila.kinali.ch/mga/
-
-
-mga_vid - MGA G200/G400 YUV Overlay kernel module
-
- Author:
- Aaron Holtzman <aholtzma@ess.engr.uvic.ca>, Oct 1999
-
- Contributions by:
- Fredrik Vraalsen <vraalsen@cs.uiuc.edu>
- Alan Cox <alan@lxorguk.ukuu.org.uk>
-
- WARNING ----- WARNING
-
-This code messes with your video card and your X server. It will probably
-lock up your box, format your hard drive, and cause your brand new G400
-MAX to spout 6 inch flames. You have been warned.
-
- WARNING ----- WARNING
-
-What does this code do?
-
- mga_vid is a kernel module that utilitizes the Matrox G200/G400/G550
- video scaler/overlay unit to perform YUV->RGB colorspace conversion
- and arbitrary video scaling.
-
- mga_vid is also a monster hack.
-
-How does mga_vid work?
-
- This kernel module sets up the BES (backend scaler) with appropriate
- values based on parameters supplied via ioctl. It also maps a chunk of
- video memory into userspace via mmap. This memory is stolen from X
- (which may decide to write to it later). The application can then write
- image data directly to the framebuffer (if it knows the right padding,
- etc).
-
-
-How do I know if mga_vid works on my system?
-
- There is a test application called mga_vid_test. This test code should
- draw some nice 256x256 images for you if all is working well.
diff --git a/drivers/generic_math.h b/drivers/generic_math.h
deleted file mode 100644
index 00a0e976f8..0000000000
--- a/drivers/generic_math.h
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * generic implementation of sin(x) and cos(x) functions specially for Linux
- * Copyright (C) 2002 Nick Kurshev
- *
- * 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.
- */
-
-#ifndef MPLAYER_GENERIC_MATH_H
-#define MPLAYER_GENERIC_MATH_H
-
-typedef struct gen_sincos
-{
- double x;
- double sinx;
- double cosx;
-}gen_sincos_t;
-
-static gen_sincos_t g_sincos[201] = {
-{ -3.141600e+00, 7.346410e-06, -1.000000e-00 },
-{ -3.110184e+00, -3.140349e-02, -9.995068e-01 },
-{ -3.078768e+00, -6.278333e-02, -9.980272e-01 },
-{ -3.047352e+00, -9.410122e-02, -9.955626e-01 },
-{ -3.015936e+00, -1.253262e-01, -9.921156e-01 },
-{ -2.984520e+00, -1.564276e-01, -9.876894e-01 },
-{ -2.953104e+00, -1.873745e-01, -9.822885e-01 },
-{ -2.921688e+00, -2.181366e-01, -9.759183e-01 },
-{ -2.890272e+00, -2.486833e-01, -9.685848e-01 },
-{ -2.858856e+00, -2.789847e-01, -9.602956e-01 },
-{ -2.827440e+00, -3.090107e-01, -9.510586e-01 },
-{ -2.796024e+00, -3.387318e-01, -9.408830e-01 },
-{ -2.764608e+00, -3.681185e-01, -9.297789e-01 },
-{ -2.733192e+00, -3.971420e-01, -9.177572e-01 },
-{ -2.701776e+00, -4.257736e-01, -9.048297e-01 },
-{ -2.670360e+00, -4.539849e-01, -8.910094e-01 },
-{ -2.638944e+00, -4.817483e-01, -8.763097e-01 },
-{ -2.607528e+00, -5.090362e-01, -8.607451e-01 },
-{ -2.576112e+00, -5.358217e-01, -8.443312e-01 },
-{ -2.544696e+00, -5.620785e-01, -8.270839e-01 },
-{ -2.513280e+00, -5.877805e-01, -8.090204e-01 },
-{ -2.481864e+00, -6.129025e-01, -7.901586e-01 },
-{ -2.450448e+00, -6.374196e-01, -7.705169e-01 },
-{ -2.419032e+00, -6.613076e-01, -7.501148e-01 },
-{ -2.387616e+00, -6.845430e-01, -7.289724e-01 },
-{ -2.356200e+00, -7.071029e-01, -7.071107e-01 },
-{ -2.324784e+00, -7.289649e-01, -6.845511e-01 },
-{ -2.293368e+00, -7.501075e-01, -6.613159e-01 },
-{ -2.261952e+00, -7.705099e-01, -6.374281e-01 },
-{ -2.230536e+00, -7.901518e-01, -6.129112e-01 },
-{ -2.199120e+00, -8.090140e-01, -5.877894e-01 },
-{ -2.167704e+00, -8.270777e-01, -5.620876e-01 },
-{ -2.136288e+00, -8.443252e-01, -5.358310e-01 },
-{ -2.104872e+00, -8.607395e-01, -5.090457e-01 },
-{ -2.073456e+00, -8.763043e-01, -4.817579e-01 },
-{ -2.042040e+00, -8.910044e-01, -4.539948e-01 },
-{ -2.010624e+00, -9.048251e-01, -4.257835e-01 },
-{ -1.979208e+00, -9.177528e-01, -3.971521e-01 },
-{ -1.947792e+00, -9.297748e-01, -3.681288e-01 },
-{ -1.916376e+00, -9.408793e-01, -3.387421e-01 },
-{ -1.884960e+00, -9.510552e-01, -3.090212e-01 },
-{ -1.853544e+00, -9.602925e-01, -2.789953e-01 },
-{ -1.822128e+00, -9.685821e-01, -2.486940e-01 },
-{ -1.790712e+00, -9.759158e-01, -2.181473e-01 },
-{ -1.759296e+00, -9.822865e-01, -1.873854e-01 },
-{ -1.727880e+00, -9.876877e-01, -1.564385e-01 },
-{ -1.696464e+00, -9.921142e-01, -1.253372e-01 },
-{ -1.665048e+00, -9.955616e-01, -9.411219e-02 },
-{ -1.633632e+00, -9.980265e-01, -6.279433e-02 },
-{ -1.602216e+00, -9.995064e-01, -3.141450e-02 },
-{ -1.570800e+00, -1.000000e-00, -3.673205e-06 },
-{ -1.539384e+00, -9.995067e-01, 3.140716e-02 },
-{ -1.507968e+00, -9.980269e-01, 6.278700e-02 },
-{ -1.476552e+00, -9.955623e-01, 9.410488e-02 },
-{ -1.445136e+00, -9.921151e-01, 1.253299e-01 },
-{ -1.413720e+00, -9.876889e-01, 1.564312e-01 },
-{ -1.382304e+00, -9.822879e-01, 1.873781e-01 },
-{ -1.350888e+00, -9.759175e-01, 2.181402e-01 },
-{ -1.319472e+00, -9.685839e-01, 2.486869e-01 },
-{ -1.288056e+00, -9.602945e-01, 2.789882e-01 },
-{ -1.256640e+00, -9.510574e-01, 3.090142e-01 },
-{ -1.225224e+00, -9.408817e-01, 3.387352e-01 },
-{ -1.193808e+00, -9.297775e-01, 3.681220e-01 },
-{ -1.162392e+00, -9.177557e-01, 3.971454e-01 },
-{ -1.130976e+00, -9.048282e-01, 4.257769e-01 },
-{ -1.099560e+00, -8.910077e-01, 4.539882e-01 },
-{ -1.068144e+00, -8.763079e-01, 4.817515e-01 },
-{ -1.036728e+00, -8.607433e-01, 5.090393e-01 },
-{ -1.005312e+00, -8.443292e-01, 5.358248e-01 },
-{ -9.738960e-01, -8.270819e-01, 5.620815e-01 },
-{ -9.424800e-01, -8.090183e-01, 5.877835e-01 },
-{ -9.110640e-01, -7.901563e-01, 6.129054e-01 },
-{ -8.796480e-01, -7.705146e-01, 6.374224e-01 },
-{ -8.482320e-01, -7.501124e-01, 6.613104e-01 },
-{ -8.168160e-01, -7.289699e-01, 6.845457e-01 },
-{ -7.854000e-01, -7.071081e-01, 7.071055e-01 },
-{ -7.539840e-01, -6.845484e-01, 7.289674e-01 },
-{ -7.225680e-01, -6.613131e-01, 7.501100e-01 },
-{ -6.911520e-01, -6.374252e-01, 7.705122e-01 },
-{ -6.597360e-01, -6.129083e-01, 7.901541e-01 },
-{ -6.283200e-01, -5.877864e-01, 8.090161e-01 },
-{ -5.969040e-01, -5.620845e-01, 8.270798e-01 },
-{ -5.654880e-01, -5.358279e-01, 8.443272e-01 },
-{ -5.340720e-01, -5.090425e-01, 8.607414e-01 },
-{ -5.026560e-01, -4.817547e-01, 8.763061e-01 },
-{ -4.712400e-01, -4.539915e-01, 8.910060e-01 },
-{ -4.398240e-01, -4.257802e-01, 9.048266e-01 },
-{ -4.084080e-01, -3.971488e-01, 9.177542e-01 },
-{ -3.769920e-01, -3.681254e-01, 9.297762e-01 },
-{ -3.455760e-01, -3.387387e-01, 9.408805e-01 },
-{ -3.141600e-01, -3.090177e-01, 9.510563e-01 },
-{ -2.827440e-01, -2.789917e-01, 9.602935e-01 },
-{ -2.513280e-01, -2.486905e-01, 9.685830e-01 },
-{ -2.199120e-01, -2.181437e-01, 9.759166e-01 },
-{ -1.884960e-01, -1.873817e-01, 9.822872e-01 },
-{ -1.570800e-01, -1.564348e-01, 9.876883e-01 },
-{ -1.256640e-01, -1.253335e-01, 9.921147e-01 },
-{ -9.424800e-02, -9.410853e-02, 9.955619e-01 },
-{ -6.283200e-02, -6.279067e-02, 9.980267e-01 },
-{ -3.141600e-02, -3.141083e-02, 9.995066e-01 },
-{ 0.000000e+00, 0.000000e+00, 1.000000e+00 },
-{ 3.141600e-02, 3.141083e-02, 9.995066e-01 },
-{ 6.283200e-02, 6.279067e-02, 9.980267e-01 },
-{ 9.424800e-02, 9.410853e-02, 9.955619e-01 },
-{ 1.256640e-01, 1.253335e-01, 9.921147e-01 },
-{ 1.570800e-01, 1.564348e-01, 9.876883e-01 },
-{ 1.884960e-01, 1.873817e-01, 9.822872e-01 },
-{ 2.199120e-01, 2.181437e-01, 9.759166e-01 },
-{ 2.513280e-01, 2.486905e-01, 9.685830e-01 },
-{ 2.827440e-01, 2.789917e-01, 9.602935e-01 },
-{ 3.141600e-01, 3.090177e-01, 9.510563e-01 },
-{ 3.455760e-01, 3.387387e-01, 9.408805e-01 },
-{ 3.769920e-01, 3.681254e-01, 9.297762e-01 },
-{ 4.084080e-01, 3.971488e-01, 9.177542e-01 },
-{ 4.398240e-01, 4.257802e-01, 9.048266e-01 },
-{ 4.712400e-01, 4.539915e-01, 8.910060e-01 },
-{ 5.026560e-01, 4.817547e-01, 8.763061e-01 },
-{ 5.340720e-01, 5.090425e-01, 8.607414e-01 },
-{ 5.654880e-01, 5.358279e-01, 8.443272e-01 },
-{ 5.969040e-01, 5.620845e-01, 8.270798e-01 },
-{ 6.283200e-01, 5.877864e-01, 8.090161e-01 },
-{ 6.597360e-01, 6.129083e-01, 7.901541e-01 },
-{ 6.911520e-01, 6.374252e-01, 7.705122e-01 },
-{ 7.225680e-01, 6.613131e-01, 7.501100e-01 },
-{ 7.539840e-01, 6.845484e-01, 7.289674e-01 },
-{ 7.854000e-01, 7.071081e-01, 7.071055e-01 },
-{ 8.168160e-01, 7.289699e-01, 6.845457e-01 },
-{ 8.482320e-01, 7.501124e-01, 6.613104e-01 },
-{ 8.796480e-01, 7.705146e-01, 6.374224e-01 },
-{ 9.110640e-01, 7.901563e-01, 6.129054e-01 },
-{ 9.424800e-01, 8.090183e-01, 5.877835e-01 },
-{ 9.738960e-01, 8.270819e-01, 5.620815e-01 },
-{ 1.005312e+00, 8.443292e-01, 5.358248e-01 },
-{ 1.036728e+00, 8.607433e-01, 5.090393e-01 },
-{ 1.068144e+00, 8.763079e-01, 4.817515e-01 },
-{ 1.099560e+00, 8.910077e-01, 4.539882e-01 },
-{ 1.130976e+00, 9.048282e-01, 4.257769e-01 },
-{ 1.162392e+00, 9.177557e-01, 3.971454e-01 },
-{ 1.193808e+00, 9.297775e-01, 3.681220e-01 },
-{ 1.225224e+00, 9.408817e-01, 3.387352e-01 },
-{ 1.256640e+00, 9.510574e-01, 3.090142e-01 },
-{ 1.288056e+00, 9.602945e-01, 2.789882e-01 },
-{ 1.319472e+00, 9.685839e-01, 2.486869e-01 },
-{ 1.350888e+00, 9.759175e-01, 2.181402e-01 },
-{ 1.382304e+00, 9.822879e-01, 1.873781e-01 },
-{ 1.413720e+00, 9.876889e-01, 1.564312e-01 },
-{ 1.445136e+00, 9.921151e-01, 1.253299e-01 },
-{ 1.476552e+00, 9.955623e-01, 9.410488e-02 },
-{ 1.507968e+00, 9.980269e-01, 6.278700e-02 },
-{ 1.539384e+00, 9.995067e-01, 3.140716e-02 },
-{ 1.570800e+00, 1.000000e-00, -3.673205e-06 },
-{ 1.602216e+00, 9.995064e-01, -3.141450e-02 },
-{ 1.633632e+00, 9.980265e-01, -6.279433e-02 },
-{ 1.665048e+00, 9.955616e-01, -9.411219e-02 },
-{ 1.696464e+00, 9.921142e-01, -1.253372e-01 },
-{ 1.727880e+00, 9.876877e-01, -1.564385e-01 },
-{ 1.759296e+00, 9.822865e-01, -1.873854e-01 },
-{ 1.790712e+00, 9.759158e-01, -2.181473e-01 },
-{ 1.822128e+00, 9.685821e-01, -2.486940e-01 },
-{ 1.853544e+00, 9.602925e-01, -2.789953e-01 },
-{ 1.884960e+00, 9.510552e-01, -3.090212e-01 },
-{ 1.916376e+00, 9.408793e-01, -3.387421e-01 },
-{ 1.947792e+00, 9.297748e-01, -3.681288e-01 },
-{ 1.979208e+00, 9.177528e-01, -3.971521e-01 },
-{ 2.010624e+00, 9.048251e-01, -4.257835e-01 },
-{ 2.042040e+00, 8.910044e-01, -4.539948e-01 },
-{ 2.073456e+00, 8.763043e-01, -4.817579e-01 },
-{ 2.104872e+00, 8.607395e-01, -5.090457e-01 },
-{ 2.136288e+00, 8.443252e-01, -5.358310e-01 },
-{ 2.167704e+00, 8.270777e-01, -5.620876e-01 },
-{ 2.199120e+00, 8.090140e-01, -5.877894e-01 },
-{ 2.230536e+00, 7.901518e-01, -6.129112e-01 },
-{ 2.261952e+00, 7.705099e-01, -6.374281e-01 },
-{ 2.293368e+00, 7.501075e-01, -6.613159e-01 },
-{ 2.324784e+00, 7.289649e-01, -6.845511e-01 },
-{ 2.356200e+00, 7.071029e-01, -7.071107e-01 },
-{ 2.387616e+00, 6.845430e-01, -7.289724e-01 },
-{ 2.419032e+00, 6.613076e-01, -7.501148e-01 },
-{ 2.450448e+00, 6.374196e-01, -7.705169e-01 },
-{ 2.481864e+00, 6.129025e-01, -7.901586e-01 },
-{ 2.513280e+00, 5.877805e-01, -8.090204e-01 },
-{ 2.544696e+00, 5.620785e-01, -8.270839e-01 },
-{ 2.576112e+00, 5.358217e-01, -8.443312e-01 },
-{ 2.607528e+00, 5.090362e-01, -8.607451e-01 },
-{ 2.638944e+00, 4.817483e-01, -8.763097e-01 },
-{ 2.670360e+00, 4.539849e-01, -8.910094e-01 },
-{ 2.701776e+00, 4.257736e-01, -9.048297e-01 },
-{ 2.733192e+00, 3.971420e-01, -9.177572e-01 },
-{ 2.764608e+00, 3.681185e-01, -9.297789e-01 },
-{ 2.796024e+00, 3.387318e-01, -9.408830e-01 },
-{ 2.827440e+00, 3.090107e-01, -9.510586e-01 },
-{ 2.858856e+00, 2.789847e-01, -9.602956e-01 },
-{ 2.890272e+00, 2.486833e-01, -9.685848e-01 },
-{ 2.921688e+00, 2.181366e-01, -9.759183e-01 },
-{ 2.953104e+00, 1.873745e-01, -9.822885e-01 },
-{ 2.984520e+00, 1.564276e-01, -9.876894e-01 },
-{ 3.015936e+00, 1.253262e-01, -9.921156e-01 },
-{ 3.047352e+00, 9.410122e-02, -9.955626e-01 },
-{ 3.078768e+00, 6.278333e-02, -9.980272e-01 },
-{ 3.110184e+00, 3.140349e-02, -9.995068e-01 },
-{ 3.141600e+00, -7.346410e-06, -1.000000e-00 }
-};
-
-#define M_PI 3.14159265358979323846 /* pi */
-
-static double inline gen_sin(double x)
-{
- int i;
- if(x < 0) while(x < -M_PI) x+= M_PI;
- else while(x > M_PI) x-= M_PI;
- for(i=0;i<sizeof(g_sincos)/sizeof(gen_sincos_t)-1;i++)
- {
- if(x>=g_sincos[i].x && x <= g_sincos[i+1].x)
- {
- return (g_sincos[i+1].sinx-g_sincos[i].sinx)*(x-g_sincos[i].x)/(g_sincos[i+1].x-g_sincos[i].x)+g_sincos[i].sinx;
- }
- }
- return x<0?1:-1;
-}
-#undef sin
-#define sin(x) gen_sin(x)
-
-static double inline gen_cos(double x)
-{
- int i;
- if(x < 0) while(x < -M_PI) x+= M_PI;
- else while(x > M_PI) x-= M_PI;
- for(i=0;i<sizeof(g_sincos)/sizeof(gen_sincos_t)-1;i++)
- {
- if(x>=g_sincos[i].x && x <= g_sincos[i+1].x)
- {
- return (g_sincos[i+1].cosx-g_sincos[i].cosx)*(x-g_sincos[i].x)/(g_sincos[i+1].x-g_sincos[i].x)+g_sincos[i].cosx;
- }
- }
- return x<0?1:-1;
-}
-#undef cos
-#define cos(x) gen_cos(x)
-
-#endif /* MPLAYER_GENERIC_MATH_H */
diff --git a/drivers/hacking.ati b/drivers/hacking.ati
deleted file mode 100644
index 20c9bfa8ea..0000000000
--- a/drivers/hacking.ati
+++ /dev/null
@@ -1,313 +0,0 @@
- ATI chips hacking
- =================
- Dedicated to ATI's hackers.
-
-Preface
-~~~~~~