From f783c0bfd6db056f6e5f40b73534aab1dd056190 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Tue, 20 Aug 2002 21:33:06 +0000 Subject: [PATCH] - just in case anyone want to use it - added Voodoo Banshee/3/4/5 support - release 14 Changed files: SVGATextMode-voodoo.patch -> 1.1 SVGATextMode.spec -> 1.36 --- SVGATextMode-voodoo.patch | 244 ++++++++++++++++++++++++++++++++++++++ SVGATextMode.spec | 4 +- 2 files changed, 247 insertions(+), 1 deletion(-) create mode 100644 SVGATextMode-voodoo.patch diff --git a/SVGATextMode-voodoo.patch b/SVGATextMode-voodoo.patch new file mode 100644 index 0000000..a57cf0c --- /dev/null +++ b/SVGATextMode-voodoo.patch @@ -0,0 +1,244 @@ +diff -Nur SVGATextMode-1.10.orig/XFREE/Makefile SVGATextMode-1.10/XFREE/Makefile +--- SVGATextMode-1.10.orig/XFREE/Makefile Sun Sep 3 00:50:02 2000 ++++ SVGATextMode-1.10/XFREE/Makefile Mon Jul 30 17:05:07 2001 +@@ -21,6 +21,7 @@ + mga_clock.o \ + mach64/mach64_mem_access.o mach64/mach64.o \ + riva128_clock.o \ ++ voodoo_clock.o \ + xfree_compat.o + + # mach64/mach64clockchips.o \ +diff -Nur SVGATextMode-1.10.orig/XFREE/voodoo_clock.c SVGATextMode-1.10/XFREE/voodoo_clock.c +--- SVGATextMode-1.10.orig/XFREE/voodoo_clock.c Thu Jan 1 01:00:00 1970 ++++ SVGATextMode-1.10/XFREE/voodoo_clock.c Mon Jul 30 17:04:22 2001 +@@ -0,0 +1,83 @@ ++/* Just in case anyone want use it... but I suggest using tdfxfb, it ++ allows using larger clocks. NO CHECKS, NO WARRANTY, BE CAREFUL!!! ++ This piece of code is based on riva128_clock.c, with parts taken ++ from svgalib Voodoo Banshee driver. ++ -- Jakub Bogusz */ ++ ++#define STM_XFREE ++#include ++#include "messages.h" ++#include "compiler.h" ++#include "include/Xmd.h" ++#include "vgaPCI.h" ++ ++#define PCI_VENDOR_ID_3DFX 0x121a ++#define PCI_DEVICE_ID_BANSHEE 0x0003 ++#define PCI_DEVICE_ID_VOODOO3 0x0005 ++#define PCI_DEVICE_ID_VOODOO4 0x0009 ++ ++static vgaPCIInformation *vgaPCIInfo; ++ ++/* function taken from svgalib (banshee.c) */ ++#define REFFREQ 14318.18 ++ ++static unsigned ++comp_lmn(int freq) ++{ ++ int m, n, k, best_m, best_n, best_k, f_cur, best_error; ++ ++ best_error=freq; ++ best_n=best_m=best_k=0; ++ for (n=1; n<256; n++) { ++ f_cur=REFFREQ*(n+2); ++ if (f_curAllCards) ++ for (i=0;(pcr=vgapciinfo->AllCards[i]);i++) ++ if (pcr->_vendor == PCI_VENDOR_ID_3DFX && ++ (pcr->_device == PCI_DEVICE_ID_BANSHEE || ++ pcr->_device == PCI_DEVICE_ID_VOODOO3 || ++ pcr->_device == PCI_DEVICE_ID_VOODOO4)) ++ break; ++ if(!pcr) { ++ PERROR(("No Voodoo Banshee/3+ found in PCI info!\n")); ++ return FALSE; ++ } ++ io_base=pcr->_base2 & 0xFFF8; ++ pll0=comp_lmn(clockspeed); ++ PDEBUG(("Voodoo ports base = %08x",io_base)); ++ outl(io_base+0x40,pll0); ++ return TRUE; ++} +diff -Nur SVGATextMode-1.10.orig/XFREE/xfree_compat.h SVGATextMode-1.10/XFREE/xfree_compat.h +--- SVGATextMode-1.10.orig/XFREE/xfree_compat.h Thu Jul 20 15:07:11 2000 ++++ SVGATextMode-1.10/XFREE/xfree_compat.h Mon Jul 30 15:23:14 2001 +@@ -110,5 +110,7 @@ + + Bool RIVA128ClockSelect( int clockspeed ); + ++Bool VoodooClockSelect( int clockspeed ); ++ + #endif + +diff -Nur SVGATextMode-1.10.orig/chipset.h SVGATextMode-1.10/chipset.h +--- SVGATextMode-1.10.orig/chipset.h Thu Jul 20 15:07:11 2000 ++++ SVGATextMode-1.10/chipset.h Mon Jul 30 15:07:59 2001 +@@ -90,6 +90,7 @@ + #define CS_MATROX 30 + #define CS_NEOMAGIC 31 + #define CS_RIVA128 32 ++#define CS_VOODOO 33 + + #define CLKCHIP_NONE -1 + +@@ -122,6 +123,7 @@ + #define CLKCHIP_LAGUNA 25 + #define CLKCHIP_RIVA128 26 + #define CLKCHIP_MGAG200 27 ++#define CLKCHIP_VOODOO 28 + + #define OPT_HIBIT_LOW 1<<0 + #define OPT_HIBIT_HIGH 1<<1 +@@ -199,6 +201,7 @@ + { "MATROX", CS_MATROX }, + { "NEOMAGIC", CS_NEOMAGIC }, + { "RIVA128", CS_RIVA128 }, ++ { "VOODOO", CS_VOODOO }, + { "", ENDREC } + }; + +@@ -406,6 +409,12 @@ + 80000 + }, + ++ { CS_VOODOO, ++ 1<= 0x400 */ + break; + case CS_ATIMACH64: diff --git a/SVGATextMode.spec b/SVGATextMode.spec index 9a053bf..8a9bfe4 100644 --- a/SVGATextMode.spec +++ b/SVGATextMode.spec @@ -6,7 +6,7 @@ Summary(ru): Summary(uk): õÔÉ̦ÔÁ ÄÌÑ ÐÏËÒÁÝÅÎÎÑ ÚÏ×ΦÛÎØÏÇÏ ×ÉÇÌÑÄÕ ÔÅËÓÔÏ×ÉÈ ËÏÎÓÏÌÅÊ Name: SVGATextMode Version: 1.10 -Release: 13 +Release: 14 License: GPL Group: Applications/System Source0: ftp://sunsite.unc.edu/pub/Linux/utils/console/%{name}-%{version}-src.tar.gz @@ -19,6 +19,7 @@ Patch5: %{name}-Makefile-gcc.patch Patch6: %{name}-cfgfile.y.patch Patch7: %{name}-GeForce.patch Patch8: %{name}-alpha.patch +Patch9: %{name}-voodoo.patch BuildRequires: bison BuildRequires: flex BuildRequires: util-linux @@ -98,6 +99,7 @@ SVGATextMode - %patch8 -p1 ln -sf ../../asm XFREE/include %endif +%patch9 -p1 %build %{__make} dep CC="%{__cc}" -- 2.44.0