viamode.h 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. /*
  2. * Copyright 1998-2008 VIA Technologies, Inc. All Rights Reserved.
  3. * Copyright 2001-2008 S3 Graphics, Inc. All Rights Reserved.
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public
  6. * License as published by the Free Software Foundation;
  7. * either version 2, or (at your option) any later version.
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTIES OR REPRESENTATIONS; without even
  10. * the implied warranty of MERCHANTABILITY or FITNESS FOR
  11. * A PARTICULAR PURPOSE.See the GNU General Public License
  12. * for more details.
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program; if not, write to the Free Software
  15. * Foundation, Inc.,
  16. * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17. */
  18. #ifndef __VIAMODE_H__
  19. #define __VIAMODE_H__
  20. #include "global.h"
  21. struct VPITTable {
  22. unsigned char Misc;
  23. unsigned char SR[StdSR];
  24. unsigned char GR[StdGR];
  25. unsigned char AR[StdAR];
  26. };
  27. struct VideoModeTable {
  28. int ModeIndex;
  29. struct crt_mode_table *crtc;
  30. int mode_array;
  31. };
  32. struct patch_table {
  33. int mode_index;
  34. int table_length;
  35. struct io_reg *io_reg_table;
  36. };
  37. struct res_map_refresh {
  38. int hres;
  39. int vres;
  40. int pixclock;
  41. int vmode_refresh;
  42. };
  43. #define NUM_TOTAL_RES_MAP_REFRESH ARRAY_SIZE(res_map_refresh_tbl)
  44. #define NUM_TOTAL_CEA_MODES ARRAY_SIZE(CEA_HDMI_Modes)
  45. #define NUM_TOTAL_CN400_ModeXregs ARRAY_SIZE(CN400_ModeXregs)
  46. #define NUM_TOTAL_CN700_ModeXregs ARRAY_SIZE(CN700_ModeXregs)
  47. #define NUM_TOTAL_KM400_ModeXregs ARRAY_SIZE(KM400_ModeXregs)
  48. #define NUM_TOTAL_CX700_ModeXregs ARRAY_SIZE(CX700_ModeXregs)
  49. #define NUM_TOTAL_CLE266_ModeXregs ARRAY_SIZE(CLE266_ModeXregs)
  50. #define NUM_TOTAL_PATCH_MODE ARRAY_SIZE(res_patch_table)
  51. #define NUM_TOTAL_MODETABLE ARRAY_SIZE(CLE266Modes)
  52. /********************/
  53. /* Mode Table */
  54. /********************/
  55. /* 480x640 */
  56. extern struct crt_mode_table CRTM480x640[1];
  57. /* 640x480*/
  58. extern struct crt_mode_table CRTM640x480[5];
  59. /*720x480 (GTF)*/
  60. extern struct crt_mode_table CRTM720x480[1];
  61. /*720x576 (GTF)*/
  62. extern struct crt_mode_table CRTM720x576[1];
  63. /* 800x480 (CVT) */
  64. extern struct crt_mode_table CRTM800x480[1];
  65. /* 800x600*/
  66. extern struct crt_mode_table CRTM800x600[5];
  67. /* 848x480 (CVT) */
  68. extern struct crt_mode_table CRTM848x480[1];
  69. /*856x480 (GTF) convert to 852x480*/
  70. extern struct crt_mode_table CRTM852x480[1];
  71. /*1024x512 (GTF)*/
  72. extern struct crt_mode_table CRTM1024x512[1];
  73. /* 1024x600*/
  74. extern struct crt_mode_table CRTM1024x600[1];
  75. /* 1024x768*/
  76. extern struct crt_mode_table CRTM1024x768[4];
  77. /* 1152x864*/
  78. extern struct crt_mode_table CRTM1152x864[1];
  79. /* 1280x720 (HDMI 720P)*/
  80. extern struct crt_mode_table CRTM1280x720[2];
  81. /*1280x768 (GTF)*/
  82. extern struct crt_mode_table CRTM1280x768[2];
  83. /* 1280x800 (CVT) */
  84. extern struct crt_mode_table CRTM1280x800[1];
  85. /*1280x960*/
  86. extern struct crt_mode_table CRTM1280x960[1];
  87. /* 1280x1024*/
  88. extern struct crt_mode_table CRTM1280x1024[3];
  89. /* 1368x768 (GTF) */
  90. extern struct crt_mode_table CRTM1368x768[1];
  91. /*1440x1050 (GTF)*/
  92. extern struct crt_mode_table CRTM1440x1050[1];
  93. /* 1600x1200*/
  94. extern struct crt_mode_table CRTM1600x1200[2];
  95. /* 1680x1050 (CVT) */
  96. extern struct crt_mode_table CRTM1680x1050[2];
  97. /* 1680x1050 (CVT Reduce Blanking) */
  98. extern struct crt_mode_table CRTM1680x1050_RB[1];
  99. /* 1920x1080 (CVT)*/
  100. extern struct crt_mode_table CRTM1920x1080[1];
  101. /* 1920x1080 (CVT with Reduce Blanking) */
  102. extern struct crt_mode_table CRTM1920x1080_RB[1];
  103. /* 1920x1440*/
  104. extern struct crt_mode_table CRTM1920x1440[2];
  105. /* 1400x1050 (CVT) */
  106. extern struct crt_mode_table CRTM1400x1050[2];
  107. /* 1400x1050 (CVT Reduce Blanking) */
  108. extern struct crt_mode_table CRTM1400x1050_RB[1];
  109. /* 960x600 (CVT) */
  110. extern struct crt_mode_table CRTM960x600[1];
  111. /* 1000x600 (GTF) */
  112. extern struct crt_mode_table CRTM1000x600[1];
  113. /* 1024x576 (GTF) */
  114. extern struct crt_mode_table CRTM1024x576[1];
  115. /* 1088x612 (CVT) */
  116. extern struct crt_mode_table CRTM1088x612[1];
  117. /* 1152x720 (CVT) */
  118. extern struct crt_mode_table CRTM1152x720[1];
  119. /* 1200x720 (GTF) */
  120. extern struct crt_mode_table CRTM1200x720[1];
  121. /* 1280x600 (GTF) */
  122. extern struct crt_mode_table CRTM1280x600[1];
  123. /* 1360x768 (CVT) */
  124. extern struct crt_mode_table CRTM1360x768[1];
  125. /* 1360x768 (CVT Reduce Blanking) */
  126. extern struct crt_mode_table CRTM1360x768_RB[1];
  127. /* 1366x768 (GTF) */
  128. extern struct crt_mode_table CRTM1366x768[2];
  129. /* 1440x900 (CVT) */
  130. extern struct crt_mode_table CRTM1440x900[2];
  131. /* 1440x900 (CVT Reduce Blanking) */
  132. extern struct crt_mode_table CRTM1440x900_RB[1];
  133. /* 1600x900 (CVT) */
  134. extern struct crt_mode_table CRTM1600x900[1];
  135. /* 1600x900 (CVT Reduce Blanking) */
  136. extern struct crt_mode_table CRTM1600x900_RB[1];
  137. /* 1600x1024 (GTF) */
  138. extern struct crt_mode_table CRTM1600x1024[1];
  139. /* 1792x1344 (DMT) */
  140. extern struct crt_mode_table CRTM1792x1344[1];
  141. /* 1856x1392 (DMT) */
  142. extern struct crt_mode_table CRTM1856x1392[1];
  143. /* 1920x1200 (CVT) */
  144. extern struct crt_mode_table CRTM1920x1200[1];
  145. /* 1920x1200 (CVT with Reduce Blanking) */
  146. extern struct crt_mode_table CRTM1920x1200_RB[1];
  147. /* 2048x1536 (CVT) */
  148. extern struct crt_mode_table CRTM2048x1536[1];
  149. extern struct VideoModeTable CLE266Modes[47];
  150. extern struct crt_mode_table CEAM1280x720[1];
  151. extern struct crt_mode_table CEAM1920x1080[1];
  152. extern struct VideoModeTable CEA_HDMI_Modes[2];
  153. extern struct res_map_refresh res_map_refresh_tbl[61];
  154. extern struct io_reg CN400_ModeXregs[52];
  155. extern struct io_reg CN700_ModeXregs[66];
  156. extern struct io_reg KM400_ModeXregs[55];
  157. extern struct io_reg CX700_ModeXregs[58];
  158. extern struct io_reg VX800_ModeXregs[58];
  159. extern struct io_reg CLE266_ModeXregs[32];
  160. extern struct io_reg PM1024x768[2];
  161. extern struct patch_table res_patch_table[1];
  162. extern struct VPITTable VPIT;
  163. #endif /* __VIAMODE_H__ */