matroxfb_DAC1064.h 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. #ifndef __MATROXFB_DAC1064_H__
  2. #define __MATROXFB_DAC1064_H__
  3. #include "matroxfb_base.h"
  4. #ifdef CONFIG_FB_MATROX_MYSTIQUE
  5. extern struct matrox_switch matrox_mystique;
  6. #endif
  7. #ifdef CONFIG_FB_MATROX_G
  8. extern struct matrox_switch matrox_G100;
  9. #endif
  10. #ifdef NEED_DAC1064
  11. void DAC1064_global_init(struct matrox_fb_info *minfo);
  12. void DAC1064_global_restore(struct matrox_fb_info *minfo);
  13. #endif
  14. #define M1064_INDEX 0x00
  15. #define M1064_PALWRADD 0x00
  16. #define M1064_PALDATA 0x01
  17. #define M1064_PIXRDMSK 0x02
  18. #define M1064_PALRDADD 0x03
  19. #define M1064_X_DATAREG 0x0A
  20. #define M1064_CURPOSXL 0x0C /* can be accessed as DWORD */
  21. #define M1064_CURPOSXH 0x0D
  22. #define M1064_CURPOSYL 0x0E
  23. #define M1064_CURPOSYH 0x0F
  24. #define M1064_XCURADDL 0x04
  25. #define M1064_XCURADDH 0x05
  26. #define M1064_XCURCTRL 0x06
  27. #define M1064_XCURCTRL_DIS 0x00 /* transparent, transparent, transparent, transparent */
  28. #define M1064_XCURCTRL_3COLOR 0x01 /* transparent, 0, 1, 2 */
  29. #define M1064_XCURCTRL_XGA 0x02 /* 0, 1, transparent, complement */
  30. #define M1064_XCURCTRL_XWIN 0x03 /* transparent, transparent, 0, 1 */
  31. /* drive DVI by standard(0)/DVI(1) PLL */
  32. /* if set(1), C?DVICLKEN and C?DVICLKSEL must be set(1) */
  33. #define M1064_XDVICLKCTRL_DVIDATAPATHSEL 0x01
  34. /* drive CRTC1 by standard(0)/DVI(1) PLL */
  35. #define M1064_XDVICLKCTRL_C1DVICLKSEL 0x02
  36. /* drive CRTC2 by standard(0)/DVI(1) PLL */
  37. #define M1064_XDVICLKCTRL_C2DVICLKSEL 0x04
  38. /* pixel clock allowed to(0)/blocked from(1) driving CRTC1 */
  39. #define M1064_XDVICLKCTRL_C1DVICLKEN 0x08
  40. /* DVI PLL loop filter bandwidth selection bits */
  41. #define M1064_XDVICLKCTRL_DVILOOPCTL 0x30
  42. /* CRTC2 pixel clock allowed to(0)/blocked from(1) driving CRTC2 */
  43. #define M1064_XDVICLKCTRL_C2DVICLKEN 0x40
  44. /* P1PLL loop filter bandwidth selection */
  45. #define M1064_XDVICLKCTRL_P1LOOPBWDTCTL 0x80
  46. #define M1064_XCURCOL0RED 0x08
  47. #define M1064_XCURCOL0GREEN 0x09
  48. #define M1064_XCURCOL0BLUE 0x0A
  49. #define M1064_XCURCOL1RED 0x0C
  50. #define M1064_XCURCOL1GREEN 0x0D
  51. #define M1064_XCURCOL1BLUE 0x0E
  52. #define M1064_XDVICLKCTRL 0x0F
  53. #define M1064_XCURCOL2RED 0x10
  54. #define M1064_XCURCOL2GREEN 0x11
  55. #define M1064_XCURCOL2BLUE 0x12
  56. #define DAC1064_XVREFCTRL 0x18
  57. #define DAC1064_XVREFCTRL_INTERNAL 0x3F
  58. #define DAC1064_XVREFCTRL_EXTERNAL 0x00
  59. #define DAC1064_XVREFCTRL_G100_DEFAULT 0x03
  60. #define M1064_XMULCTRL 0x19
  61. #define M1064_XMULCTRL_DEPTH_8BPP 0x00 /* 8 bpp paletized */
  62. #define M1064_XMULCTRL_DEPTH_15BPP_1BPP 0x01 /* 15 bpp paletized + 1 bpp overlay */
  63. #define M1064_XMULCTRL_DEPTH_16BPP 0x02 /* 16 bpp paletized */
  64. #define M1064_XMULCTRL_DEPTH_24BPP 0x03 /* 24 bpp paletized */
  65. #define M1064_XMULCTRL_DEPTH_24BPP_8BPP 0x04 /* 24 bpp direct + 8 bpp overlay paletized */
  66. #define M1064_XMULCTRL_2G8V16 0x05 /* 15 bpp video direct, half xres, 8bpp paletized */
  67. #define M1064_XMULCTRL_G16V16 0x06 /* 15 bpp video, 15bpp graphics, one of them paletized */
  68. #define M1064_XMULCTRL_DEPTH_32BPP 0x07 /* 24 bpp paletized + 8 bpp unused */
  69. #define M1064_XMULCTRL_GRAPHICS_PALETIZED 0x00
  70. #define M1064_XMULCTRL_VIDEO_PALETIZED 0x08
  71. #define M1064_XPIXCLKCTRL 0x1A
  72. #define M1064_XPIXCLKCTRL_SRC_PCI 0x00
  73. #define M1064_XPIXCLKCTRL_SRC_PLL 0x01
  74. #define M1064_XPIXCLKCTRL_SRC_EXT 0x02
  75. #define M1064_XPIXCLKCTRL_SRC_SYS 0x03 /* G200/G400 */
  76. #define M1064_XPIXCLKCTRL_SRC_PLL2 0x03 /* G450 */
  77. #define M1064_XPIXCLKCTRL_SRC_MASK 0x03
  78. #define M1064_XPIXCLKCTRL_EN 0x00
  79. #define M1064_XPIXCLKCTRL_DIS 0x04
  80. #define M1064_XPIXCLKCTRL_PLL_DOWN 0x00
  81. #define M1064_XPIXCLKCTRL_PLL_UP 0x08
  82. #define M1064_XGENCTRL 0x1D
  83. #define M1064_XGENCTRL_VS_0 0x00
  84. #define M1064_XGENCTRL_VS_1 0x01
  85. #define M1064_XGENCTRL_ALPHA_DIS 0x00
  86. #define M1064_XGENCTRL_ALPHA_EN 0x02
  87. #define M1064_XGENCTRL_BLACK_0IRE 0x00
  88. #define M1064_XGENCTRL_BLACK_75IRE 0x10
  89. #define M1064_XGENCTRL_SYNC_ON_GREEN 0x00
  90. #define M1064_XGENCTRL_NO_SYNC_ON_GREEN 0x20
  91. #define M1064_XGENCTRL_SYNC_ON_GREEN_MASK 0x20
  92. #define M1064_XMISCCTRL 0x1E
  93. #define M1064_XMISCCTRL_DAC_DIS 0x00
  94. #define M1064_XMISCCTRL_DAC_EN 0x01
  95. #define M1064_XMISCCTRL_MFC_VGA 0x00
  96. #define M1064_XMISCCTRL_MFC_MAFC 0x02
  97. #define M1064_XMISCCTRL_MFC_DIS 0x06
  98. #define GX00_XMISCCTRL_MFC_MAFC 0x02
  99. #define GX00_XMISCCTRL_MFC_PANELLINK 0x04
  100. #define GX00_XMISCCTRL_MFC_DIS 0x06
  101. #define GX00_XMISCCTRL_MFC_MASK 0x06
  102. #define M1064_XMISCCTRL_DAC_6BIT 0x00
  103. #define M1064_XMISCCTRL_DAC_8BIT 0x08
  104. #define M1064_XMISCCTRL_DAC_WIDTHMASK 0x08
  105. #define M1064_XMISCCTRL_LUT_DIS 0x00
  106. #define M1064_XMISCCTRL_LUT_EN 0x10
  107. #define G400_XMISCCTRL_VDO_MAFC12 0x00
  108. #define G400_XMISCCTRL_VDO_BYPASS656 0x40
  109. #define G400_XMISCCTRL_VDO_C2_MAFC12 0x80
  110. #define G400_XMISCCTRL_VDO_C2_BYPASS656 0xC0
  111. #define G400_XMISCCTRL_VDO_MASK 0xE0
  112. #define M1064_XGENIOCTRL 0x2A
  113. #define M1064_XGENIODATA 0x2B
  114. #define DAC1064_XSYSPLLM 0x2C
  115. #define DAC1064_XSYSPLLN 0x2D
  116. #define DAC1064_XSYSPLLP 0x2E
  117. #define DAC1064_XSYSPLLSTAT 0x2F
  118. #define M1064_XZOOMCTRL 0x38
  119. #define M1064_XZOOMCTRL_1 0x00
  120. #define M1064_XZOOMCTRL_2 0x01
  121. #define M1064_XZOOMCTRL_4 0x03
  122. #define M1064_XSENSETEST 0x3A
  123. #define M1064_XSENSETEST_BCOMP 0x01
  124. #define M1064_XSENSETEST_GCOMP 0x02
  125. #define M1064_XSENSETEST_RCOMP 0x04
  126. #define M1064_XSENSETEST_PDOWN 0x00
  127. #define M1064_XSENSETEST_PUP 0x80
  128. #define M1064_XCRCREML 0x3C
  129. #define M1064_XCRCREMH 0x3D
  130. #define M1064_XCRCBITSEL 0x3E
  131. #define M1064_XCOLKEYMASKL 0x40
  132. #define M1064_XCOLKEYMASKH 0x41
  133. #define M1064_XCOLKEYL 0x42
  134. #define M1064_XCOLKEYH 0x43
  135. #define M1064_XPIXPLLAM 0x44
  136. #define M1064_XPIXPLLAN 0x45
  137. #define M1064_XPIXPLLAP 0x46
  138. #define M1064_XPIXPLLBM 0x48
  139. #define M1064_XPIXPLLBN 0x49
  140. #define M1064_XPIXPLLBP 0x4A
  141. #define M1064_XPIXPLLCM 0x4C
  142. #define M1064_XPIXPLLCN 0x4D
  143. #define M1064_XPIXPLLCP 0x4E
  144. #define M1064_XPIXPLLSTAT 0x4F
  145. #define M1064_XTVO_IDX 0x87
  146. #define M1064_XTVO_DATA 0x88
  147. #define M1064_XOUTPUTCONN 0x8A
  148. #define M1064_XSYNCCTRL 0x8B
  149. #define M1064_XVIDPLLSTAT 0x8C
  150. #define M1064_XVIDPLLP 0x8D
  151. #define M1064_XVIDPLLM 0x8E
  152. #define M1064_XVIDPLLN 0x8F
  153. #define M1064_XPWRCTRL 0xA0
  154. #define M1064_XPWRCTRL_PANELPDN 0x04
  155. #define M1064_XPANMODE 0xA2
  156. enum POS1064 {
  157. POS1064_XCURADDL=0, POS1064_XCURADDH, POS1064_XCURCTRL,
  158. POS1064_XCURCOL0RED, POS1064_XCURCOL0GREEN, POS1064_XCURCOL0BLUE,
  159. POS1064_XCURCOL1RED, POS1064_XCURCOL1GREEN, POS1064_XCURCOL1BLUE,
  160. POS1064_XCURCOL2RED, POS1064_XCURCOL2GREEN, POS1064_XCURCOL2BLUE,
  161. POS1064_XVREFCTRL, POS1064_XMULCTRL, POS1064_XPIXCLKCTRL, POS1064_XGENCTRL,
  162. POS1064_XMISCCTRL,
  163. POS1064_XGENIOCTRL, POS1064_XGENIODATA, POS1064_XZOOMCTRL, POS1064_XSENSETEST,
  164. POS1064_XCRCBITSEL,
  165. POS1064_XCOLKEYMASKL, POS1064_XCOLKEYMASKH, POS1064_XCOLKEYL, POS1064_XCOLKEYH,
  166. POS1064_XOUTPUTCONN, POS1064_XPANMODE, POS1064_XPWRCTRL };
  167. #endif /* __MATROXFB_DAC1064_H__ */