Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | |
| 2 | #ifndef TRIDENTFB_DEBUG |
| 3 | #define TRIDENTFB_DEBUG 0 |
| 4 | #endif |
| 5 | |
| 6 | #if TRIDENTFB_DEBUG |
| 7 | #define debug(f,a...) printk("%s:" f, __FUNCTION__ , ## a);mdelay(1000); |
| 8 | #else |
| 9 | #define debug(f,a...) |
| 10 | #endif |
| 11 | |
| 12 | #define output(f, a...) pr_info("tridentfb: " f, ## a) |
| 13 | |
| 14 | #define Kb (1024) |
| 15 | #define Mb (Kb*Kb) |
| 16 | |
| 17 | /* PCI IDS of supported cards temporarily here */ |
| 18 | |
| 19 | #define CYBER9320 0x9320 |
| 20 | #define CYBER9388 0x9388 |
| 21 | #define CYBER9382 0x9382 /* the real PCI id for this is 9660 */ |
| 22 | #define CYBER9385 0x9385 /* ditto */ |
| 23 | #define CYBER9397 0x9397 |
| 24 | #define CYBER9397DVD 0x939A |
| 25 | #define CYBER9520 0x9520 |
| 26 | #define CYBER9525DVD 0x9525 |
| 27 | #define TGUI9660 0x9660 |
| 28 | #define IMAGE975 0x9750 |
| 29 | #define IMAGE985 0x9850 |
| 30 | #define BLADE3D 0x9880 |
| 31 | #define CYBERBLADEE4 0x9540 |
| 32 | #define CYBERBLADEi7 0x8400 |
| 33 | #define CYBERBLADEi7D 0x8420 |
| 34 | #define CYBERBLADEi1 0x8500 |
| 35 | #define CYBERBLADEi1D 0x8520 |
| 36 | #define CYBERBLADEAi1 0x8600 |
| 37 | #define CYBERBLADEAi1D 0x8620 |
| 38 | #define CYBERBLADEXPAi1 0x8820 |
| 39 | #define CYBERBLADEXPm8 0x9910 |
| 40 | #define CYBERBLADEXPm16 0x9930 |
| 41 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 42 | /* these defines are for 'lcd' variable */ |
| 43 | #define LCD_STRETCH 0 |
| 44 | #define LCD_CENTER 1 |
| 45 | #define LCD_BIOS 2 |
| 46 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 47 | /* General Registers */ |
| 48 | #define SPR 0x1F /* Software Programming Register (videoram) */ |
| 49 | |
| 50 | /* 3C4 */ |
| 51 | #define RevisionID 0x09 |
| 52 | #define OldOrNew 0x0B |
| 53 | #define ConfPort1 0x0C |
| 54 | #define ConfPort2 0x0C |
| 55 | #define NewMode2 0x0D |
| 56 | #define NewMode1 0x0E |
| 57 | #define Protection 0x11 |
| 58 | #define MCLKLow 0x16 |
| 59 | #define MCLKHigh 0x17 |
| 60 | #define ClockLow 0x18 |
| 61 | #define ClockHigh 0x19 |
| 62 | #define SSetup 0x20 |
| 63 | #define SKey 0x37 |
| 64 | #define SPKey 0x57 |
| 65 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 66 | /* 3x4 */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 67 | #define CRTCModuleTest 0x1E |
| 68 | #define FIFOControl 0x20 |
| 69 | #define LinearAddReg 0x21 |
| 70 | #define DRAMTiming 0x23 |
| 71 | #define New32 0x23 |
| 72 | #define RAMDACTiming 0x25 |
| 73 | #define CRTHiOrd 0x27 |
| 74 | #define AddColReg 0x29 |
| 75 | #define InterfaceSel 0x2A |
| 76 | #define HorizOverflow 0x2B |
| 77 | #define GETest 0x2D |
| 78 | #define Performance 0x2F |
| 79 | #define GraphEngReg 0x36 |
| 80 | #define I2C 0x37 |
| 81 | #define PixelBusReg 0x38 |
| 82 | #define PCIReg 0x39 |
| 83 | #define DRAMControl 0x3A |
| 84 | #define MiscContReg 0x3C |
| 85 | #define CursorXLow 0x40 |
| 86 | #define CursorXHigh 0x41 |
| 87 | #define CursorYLow 0x42 |
| 88 | #define CursorYHigh 0x43 |
| 89 | #define CursorLocLow 0x44 |
| 90 | #define CursorLocHigh 0x45 |
| 91 | #define CursorXOffset 0x46 |
| 92 | #define CursorYOffset 0x47 |
| 93 | #define CursorFG1 0x48 |
| 94 | #define CursorFG2 0x49 |
| 95 | #define CursorFG3 0x4A |
| 96 | #define CursorFG4 0x4B |
| 97 | #define CursorBG1 0x4C |
| 98 | #define CursorBG2 0x4D |
| 99 | #define CursorBG3 0x4E |
| 100 | #define CursorBG4 0x4F |
| 101 | #define CursorControl 0x50 |
| 102 | #define PCIRetry 0x55 |
| 103 | #define PreEndControl 0x56 |
| 104 | #define PreEndFetch 0x57 |
| 105 | #define PCIMaster 0x60 |
| 106 | #define Enhancement0 0x62 |
| 107 | #define NewEDO 0x64 |
| 108 | #define TVinterface 0xC0 |
| 109 | #define TVMode 0xC1 |
| 110 | #define ClockControl 0xCF |
| 111 | |
| 112 | |
| 113 | /* 3CE */ |
| 114 | #define MiscExtFunc 0x0F |
| 115 | #define PowerStatus 0x23 |
| 116 | #define MiscIntContReg 0x2F |
| 117 | #define CyberControl 0x30 |
| 118 | #define CyberEnhance 0x31 |
| 119 | #define FPConfig 0x33 |
| 120 | #define VertStretch 0x52 |
| 121 | #define HorStretch 0x53 |
| 122 | #define BiosMode 0x5c |
| 123 | #define BiosReg 0x5d |
| 124 | |