trident.h 3.2 KB

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