From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sat, 16 Apr 2005 15:20:36 -0700 Subject: Linux-2.6.12-rc2 Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip! --- drivers/video/sstfb.c | 1722 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1722 insertions(+) create mode 100644 drivers/video/sstfb.c (limited to 'drivers/video/sstfb.c') diff --git a/drivers/video/sstfb.c b/drivers/video/sstfb.c new file mode 100644 index 00000000000..663d53657fa --- /dev/null +++ b/drivers/video/sstfb.c @@ -0,0 +1,1722 @@ +/* + * linux/drivers/video/sstfb.c -- voodoo graphics frame buffer + * + * Copyright (c) 2000-2002 Ghozlane Toumi + * + * Created 15 Jan 2000 by Ghozlane Toumi + * + * Contributions (and many thanks) : + * + * 03/2001 James Simmons + * 04/2001 Paul Mundt + * 05/2001 Urs Ganse + * (initial work on voodoo2 port, interlace) + * 09/2002 Helge Deller + * (enable driver on big-endian machines (hppa), ioctl fixes) + * 12/2002 Helge Deller + * (port driver to new frambuffer infrastructure) + * 01/2003 Helge Deller + * (initial work on fb hardware acceleration for voodoo2) + * + */ + +/* + * The voodoo1 has the following memory mapped address space: + * 0x000000 - 0x3fffff : registers (4MB) + * 0x400000 - 0x7fffff : linear frame buffer (4MB) + * 0x800000 - 0xffffff : texture memory (8MB) + */ + +/* + * misc notes, TODOs, toASKs, and deep thoughts + +-TODO: at one time or another test that the mode is acceptable by the monitor +-ASK: Can I choose different ordering for the color bitfields (rgba argb ...) + wich one should i use ? is there any preferred one ? It seems ARGB is + the one ... +-TODO: in set_var check the validity of timings (hsync vsync)... +-TODO: check and recheck the use of sst_wait_idle : we don't flush the fifo via + a nop command. so it's ok as long as the commands we pass don't go + through the fifo. warning: issuing a nop command seems to need pci_fifo +-FIXME: in case of failure in the init sequence, be sure we return to a safe + state. +-FIXME: 4MB boards have banked memory (FbiInit2 bits 1 & 20) + */ + +/* + * debug info + * SST_DEBUG : enable debugging + * SST_DEBUG_REG : debug registers + * 0 : no debug + * 1 : dac calls, [un]set_bits, FbiInit + * 2 : insane debug level (log every register read/write) + * SST_DEBUG_FUNC : functions + * 0 : no debug + * 1 : function call / debug ioctl + * 2 : variables + * 3 : flood . you don't want to do that. trust me. + * SST_DEBUG_VAR : debug display/var structs + * 0 : no debug + * 1 : dumps display, fb_var + * + * sstfb specific ioctls: + * toggle vga (0x46db) : toggle vga_pass_through + * fill fb (0x46dc) : fills fb + * test disp (0x46de) : draws a test image + */ + +#undef SST_DEBUG + +/* enable 24/32 bpp functions ? (completely untested!) */ +#undef EN_24_32_BPP + +/* + Default video mode . + 0 800x600@60 took from glide + 1 640x480@75 took from glide + 2 1024x768@76 std fb.mode + 3 640x480@60 glide default */ +#define DEFAULT_MODE 3 + +/* + * Includes + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include