1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 21da177e4SLinus Torvalds 31da177e4SLinus Torvalds #ifndef TRIDENTFB_DEBUG 41da177e4SLinus Torvalds #define TRIDENTFB_DEBUG 0 51da177e4SLinus Torvalds #endif 61da177e4SLinus Torvalds 71da177e4SLinus Torvalds #if TRIDENTFB_DEBUG 85cf13845SKrzysztof Helt #define debug(f, a...) printk("%s:" f, __func__ , ## a); 91da177e4SLinus Torvalds #else 101da177e4SLinus Torvalds #define debug(f, a...) 111da177e4SLinus Torvalds #endif 121da177e4SLinus Torvalds 131da177e4SLinus Torvalds #define output(f, a...) pr_info("tridentfb: " f, ## a) 141da177e4SLinus Torvalds 151da177e4SLinus Torvalds #define Kb (1024) 161da177e4SLinus Torvalds #define Mb (Kb*Kb) 171da177e4SLinus Torvalds 181da177e4SLinus Torvalds /* PCI IDS of supported cards temporarily here */ 191da177e4SLinus Torvalds 201da177e4SLinus Torvalds #define CYBER9320 0x9320 211da177e4SLinus Torvalds #define CYBER9388 0x9388 221da177e4SLinus Torvalds #define CYBER9382 0x9382 /* the real PCI id for this is 9660 */ 231da177e4SLinus Torvalds #define CYBER9385 0x9385 /* ditto */ 241da177e4SLinus Torvalds #define CYBER9397 0x9397 251da177e4SLinus Torvalds #define CYBER9397DVD 0x939A 261da177e4SLinus Torvalds #define CYBER9520 0x9520 271da177e4SLinus Torvalds #define CYBER9525DVD 0x9525 28a0d92256SKrzysztof Helt #define TGUI9440 0x9440 291da177e4SLinus Torvalds #define TGUI9660 0x9660 300e73a47fSKrzysztof Helt #define PROVIDIA9685 0x9685 311da177e4SLinus Torvalds #define IMAGE975 0x9750 321da177e4SLinus Torvalds #define IMAGE985 0x9850 331da177e4SLinus Torvalds #define BLADE3D 0x9880 341da177e4SLinus Torvalds #define CYBERBLADEE4 0x9540 351da177e4SLinus Torvalds #define CYBERBLADEi7 0x8400 361da177e4SLinus Torvalds #define CYBERBLADEi7D 0x8420 371da177e4SLinus Torvalds #define CYBERBLADEi1 0x8500 381da177e4SLinus Torvalds #define CYBERBLADEi1D 0x8520 391da177e4SLinus Torvalds #define CYBERBLADEAi1 0x8600 401da177e4SLinus Torvalds #define CYBERBLADEAi1D 0x8620 411da177e4SLinus Torvalds #define CYBERBLADEXPAi1 0x8820 421da177e4SLinus Torvalds #define CYBERBLADEXPm8 0x9910 431da177e4SLinus Torvalds #define CYBERBLADEXPm16 0x9930 441da177e4SLinus Torvalds 451da177e4SLinus Torvalds /* these defines are for 'lcd' variable */ 461da177e4SLinus Torvalds #define LCD_STRETCH 0 471da177e4SLinus Torvalds #define LCD_CENTER 1 481da177e4SLinus Torvalds #define LCD_BIOS 2 491da177e4SLinus Torvalds 501da177e4SLinus Torvalds /* General Registers */ 511da177e4SLinus Torvalds #define SPR 0x1F /* Software Programming Register (videoram) */ 521da177e4SLinus Torvalds 531da177e4SLinus Torvalds /* 3C4 */ 541da177e4SLinus Torvalds #define RevisionID 0x09 551da177e4SLinus Torvalds #define OldOrNew 0x0B 561da177e4SLinus Torvalds #define ConfPort1 0x0C 571da177e4SLinus Torvalds #define ConfPort2 0x0C 581da177e4SLinus Torvalds #define NewMode2 0x0D 591da177e4SLinus Torvalds #define NewMode1 0x0E 601da177e4SLinus Torvalds #define Protection 0x11 611da177e4SLinus Torvalds #define MCLKLow 0x16 621da177e4SLinus Torvalds #define MCLKHigh 0x17 631da177e4SLinus Torvalds #define ClockLow 0x18 641da177e4SLinus Torvalds #define ClockHigh 0x19 651da177e4SLinus Torvalds #define SSetup 0x20 661da177e4SLinus Torvalds #define SKey 0x37 671da177e4SLinus Torvalds #define SPKey 0x57 681da177e4SLinus Torvalds 691da177e4SLinus Torvalds /* 3x4 */ 701da177e4SLinus Torvalds #define CRTCModuleTest 0x1E 711da177e4SLinus Torvalds #define FIFOControl 0x20 721da177e4SLinus Torvalds #define LinearAddReg 0x21 731da177e4SLinus Torvalds #define DRAMTiming 0x23 741da177e4SLinus Torvalds #define New32 0x23 751da177e4SLinus Torvalds #define RAMDACTiming 0x25 761da177e4SLinus Torvalds #define CRTHiOrd 0x27 771da177e4SLinus Torvalds #define AddColReg 0x29 781da177e4SLinus Torvalds #define InterfaceSel 0x2A 791da177e4SLinus Torvalds #define HorizOverflow 0x2B 801da177e4SLinus Torvalds #define GETest 0x2D 811da177e4SLinus Torvalds #define Performance 0x2F 821da177e4SLinus Torvalds #define GraphEngReg 0x36 831da177e4SLinus Torvalds #define I2C 0x37 841da177e4SLinus Torvalds #define PixelBusReg 0x38 851da177e4SLinus Torvalds #define PCIReg 0x39 861da177e4SLinus Torvalds #define DRAMControl 0x3A 871da177e4SLinus Torvalds #define MiscContReg 0x3C 881da177e4SLinus Torvalds #define CursorXLow 0x40 891da177e4SLinus Torvalds #define CursorXHigh 0x41 901da177e4SLinus Torvalds #define CursorYLow 0x42 911da177e4SLinus Torvalds #define CursorYHigh 0x43 921da177e4SLinus Torvalds #define CursorLocLow 0x44 931da177e4SLinus Torvalds #define CursorLocHigh 0x45 941da177e4SLinus Torvalds #define CursorXOffset 0x46 951da177e4SLinus Torvalds #define CursorYOffset 0x47 961da177e4SLinus Torvalds #define CursorFG1 0x48 971da177e4SLinus Torvalds #define CursorFG2 0x49 981da177e4SLinus Torvalds #define CursorFG3 0x4A 991da177e4SLinus Torvalds #define CursorFG4 0x4B 1001da177e4SLinus Torvalds #define CursorBG1 0x4C 1011da177e4SLinus Torvalds #define CursorBG2 0x4D 1021da177e4SLinus Torvalds #define CursorBG3 0x4E 1031da177e4SLinus Torvalds #define CursorBG4 0x4F 1041da177e4SLinus Torvalds #define CursorControl 0x50 1051da177e4SLinus Torvalds #define PCIRetry 0x55 1061da177e4SLinus Torvalds #define PreEndControl 0x56 1071da177e4SLinus Torvalds #define PreEndFetch 0x57 1081da177e4SLinus Torvalds #define PCIMaster 0x60 1091da177e4SLinus Torvalds #define Enhancement0 0x62 1101da177e4SLinus Torvalds #define NewEDO 0x64 1111da177e4SLinus Torvalds #define TVinterface 0xC0 1121da177e4SLinus Torvalds #define TVMode 0xC1 1131da177e4SLinus Torvalds #define ClockControl 0xCF 1141da177e4SLinus Torvalds 1151da177e4SLinus Torvalds 1161da177e4SLinus Torvalds /* 3CE */ 1171da177e4SLinus Torvalds #define MiscExtFunc 0x0F 1181da177e4SLinus Torvalds #define PowerStatus 0x23 1191da177e4SLinus Torvalds #define MiscIntContReg 0x2F 1201da177e4SLinus Torvalds #define CyberControl 0x30 1211da177e4SLinus Torvalds #define CyberEnhance 0x31 1221da177e4SLinus Torvalds #define FPConfig 0x33 1231da177e4SLinus Torvalds #define VertStretch 0x52 1241da177e4SLinus Torvalds #define HorStretch 0x53 1251da177e4SLinus Torvalds #define BiosMode 0x5c 1261da177e4SLinus Torvalds #define BiosReg 0x5d 1271da177e4SLinus Torvalds 12849b1f4b4SKrzysztof Helt /* Graphics Engine */ 12949b1f4b4SKrzysztof Helt #define STATUS 0x2120 13049b1f4b4SKrzysztof Helt #define OLDCMD 0x2124 13149b1f4b4SKrzysztof Helt #define DRAWFL 0x2128 13249b1f4b4SKrzysztof Helt #define OLDCLR 0x212C 13349b1f4b4SKrzysztof Helt #define OLDDST 0x2138 13449b1f4b4SKrzysztof Helt #define OLDSRC 0x213C 13549b1f4b4SKrzysztof Helt #define OLDDIM 0x2140 13649b1f4b4SKrzysztof Helt #define CMD 0x2144 13749b1f4b4SKrzysztof Helt #define ROP 0x2148 13849b1f4b4SKrzysztof Helt #define COLOR 0x2160 1390292be4aSKrzysztof Helt #define BGCOLOR 0x2164 14049b1f4b4SKrzysztof Helt #define SRC1 0x2100 14149b1f4b4SKrzysztof Helt #define SRC2 0x2104 14249b1f4b4SKrzysztof Helt #define DST1 0x2108 14349b1f4b4SKrzysztof Helt #define DST2 0x210C 14449b1f4b4SKrzysztof Helt 14549b1f4b4SKrzysztof Helt #define ROP_S 0xCC 14649b1f4b4SKrzysztof Helt #define ROP_P 0xF0 14749b1f4b4SKrzysztof Helt #define ROP_X 0x66 148