TI.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. #include <xf86RamDac.h>
  2. extern _X_EXPORT unsigned long TIramdacCalculateMNPForClock(unsigned long
  3. RefClock,
  4. unsigned long
  5. ReqClock,
  6. char IsPixClock,
  7. unsigned long
  8. MinClock,
  9. unsigned long
  10. MaxClock,
  11. unsigned long *rM,
  12. unsigned long *rN,
  13. unsigned long *rP);
  14. extern _X_EXPORT RamDacHelperRecPtr TIramdacProbe(ScrnInfoPtr pScrn,
  15. RamDacSupportedInfoRecPtr
  16. ramdacs);
  17. extern _X_EXPORT void TIramdacSave(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec,
  18. RamDacRegRecPtr RamDacRegRec);
  19. extern _X_EXPORT void TIramdacRestore(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec,
  20. RamDacRegRecPtr RamDacRegRec);
  21. extern _X_EXPORT void TIramdac3026SetBpp(ScrnInfoPtr pScrn,
  22. RamDacRegRecPtr RamDacRegRec);
  23. extern _X_EXPORT void TIramdac3030SetBpp(ScrnInfoPtr pScrn,
  24. RamDacRegRecPtr RamDacRegRec);
  25. extern _X_EXPORT void TIramdacHWCursorInit(xf86CursorInfoPtr infoPtr);
  26. extern _X_EXPORT void TIramdacLoadPalette(ScrnInfoPtr pScrn, int numColors,
  27. int *indices, LOCO * colors,
  28. VisualPtr pVisual);
  29. typedef void TIramdacLoadPaletteProc(ScrnInfoPtr, int, int *, LOCO *,
  30. VisualPtr);
  31. extern _X_EXPORT TIramdacLoadPaletteProc *TIramdacLoadPaletteWeak(void);
  32. #define TI3030_RAMDAC (VENDOR_TI << 16) | 0x00
  33. #define TI3026_RAMDAC (VENDOR_TI << 16) | 0x01
  34. /*
  35. * TI Ramdac registers
  36. */
  37. #define TIDAC_rev 0x01
  38. #define TIDAC_ind_curs_ctrl 0x06
  39. #define TIDAC_byte_router_ctrl 0x07
  40. #define TIDAC_latch_ctrl 0x0f
  41. #define TIDAC_true_color_ctrl 0x18
  42. #define TIDAC_multiplex_ctrl 0x19
  43. #define TIDAC_clock_select 0x1a
  44. #define TIDAC_palette_page 0x1c
  45. #define TIDAC_general_ctrl 0x1d
  46. #define TIDAC_misc_ctrl 0x1e
  47. #define TIDAC_pll_addr 0x2c
  48. #define TIDAC_pll_pixel_data 0x2d
  49. #define TIDAC_pll_memory_data 0x2e
  50. #define TIDAC_pll_loop_data 0x2f
  51. #define TIDAC_key_over_low 0x30
  52. #define TIDAC_key_over_high 0x31
  53. #define TIDAC_key_red_low 0x32
  54. #define TIDAC_key_red_high 0x33
  55. #define TIDAC_key_green_low 0x34
  56. #define TIDAC_key_green_high 0x35
  57. #define TIDAC_key_blue_low 0x36
  58. #define TIDAC_key_blue_high 0x37
  59. #define TIDAC_key_ctrl 0x38
  60. #define TIDAC_clock_ctrl 0x39
  61. #define TIDAC_sense_test 0x3a
  62. #define TIDAC_test_mode_data 0x3b
  63. #define TIDAC_crc_remain_lsb 0x3c
  64. #define TIDAC_crc_remain_msb 0x3d
  65. #define TIDAC_crc_bit_select 0x3e
  66. #define TIDAC_id 0x3f
  67. /* These are pll values that are accessed via TIDAC_pll_pixel_data */
  68. #define TIDAC_PIXEL_N 0x80
  69. #define TIDAC_PIXEL_M 0x81
  70. #define TIDAC_PIXEL_P 0x82
  71. #define TIDAC_PIXEL_VALID 0x83
  72. /* These are pll values that are accessed via TIDAC_pll_loop_data */
  73. #define TIDAC_LOOP_N 0x90
  74. #define TIDAC_LOOP_M 0x91
  75. #define TIDAC_LOOP_P 0x92
  76. #define TIDAC_LOOP_VALID 0x93
  77. /* Direct mapping addresses */
  78. #define TIDAC_INDEX 0xa0
  79. #define TIDAC_PALETTE_DATA 0xa1
  80. #define TIDAC_READ_MASK 0xa2
  81. #define TIDAC_READ_ADDR 0xa3
  82. #define TIDAC_CURS_WRITE_ADDR 0xa4
  83. #define TIDAC_CURS_COLOR 0xa5
  84. #define TIDAC_CURS_READ_ADDR 0xa7
  85. #define TIDAC_CURS_CTL 0xa9
  86. #define TIDAC_INDEXED_DATA 0xaa
  87. #define TIDAC_CURS_RAM_DATA 0xab
  88. #define TIDAC_CURS_XLOW 0xac
  89. #define TIDAC_CURS_XHIGH 0xad
  90. #define TIDAC_CURS_YLOW 0xae
  91. #define TIDAC_CURS_YHIGH 0xaf
  92. #define TIDAC_sw_reset 0xff
  93. /* Constants */
  94. #define TIDAC_TVP_3026_ID 0x26
  95. #define TIDAC_TVP_3030_ID 0x30