trident.h 3.2 KB

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