viamode.h 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  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_VX800_ModeXregs ARRAY_SIZE(VX800_ModeXregs)
  50. #define NUM_TOTAL_CLE266_ModeXregs ARRAY_SIZE(CLE266_ModeXregs)
  51. #define NUM_TOTAL_PATCH_MODE ARRAY_SIZE(res_patch_table)
  52. #define NUM_TOTAL_MODETABLE ARRAY_SIZE(CLE266Modes)
  53. /********************/
  54. /* Mode Table */
  55. /********************/
  56. /* 480x640 */
  57. extern struct crt_mode_table CRTM480x640[1];
  58. /* 640x480*/
  59. extern struct crt_mode_table CRTM640x480[5];
  60. /*720x480 (GTF)*/
  61. extern struct crt_mode_table CRTM720x480[1];
  62. /*720x576 (GTF)*/
  63. extern struct crt_mode_table CRTM720x576[1];
  64. /* 800x480 (CVT) */
  65. extern struct crt_mode_table CRTM800x480[1];
  66. /* 800x600*/
  67. extern struct crt_mode_table CRTM800x600[5];
  68. /* 848x480 (CVT) */
  69. extern struct crt_mode_table CRTM848x480[1];
  70. /*856x480 (GTF) convert to 852x480*/
  71. extern struct crt_mode_table CRTM852x480[1];
  72. /*1024x512 (GTF)*/
  73. extern struct crt_mode_table CRTM1024x512[1];
  74. /* 1024x600*/
  75. extern struct crt_mode_table CRTM1024x600[1];
  76. /* 1024x768*/
  77. extern struct crt_mode_table CRTM1024x768[4];
  78. /* 1152x864*/
  79. extern struct crt_mode_table CRTM1152x864[1];
  80. /* 1280x720 (HDMI 720P)*/
  81. extern struct crt_mode_table CRTM1280x720[2];
  82. /*1280x768 (GTF)*/
  83. extern struct crt_mode_table CRTM1280x768[2];
  84. /* 1280x800 (CVT) */
  85. extern struct crt_mode_table CRTM1280x800[1];
  86. /*1280x960*/
  87. extern struct crt_mode_table CRTM1280x960[1];
  88. /* 1280x1024*/
  89. extern struct crt_mode_table CRTM1280x1024[3];
  90. /* 1368x768 (GTF) */
  91. extern struct crt_mode_table CRTM1368x768[1];
  92. /*1440x1050 (GTF)*/
  93. extern struct crt_mode_table CRTM1440x1050[1];
  94. /* 1600x1200*/
  95. extern struct crt_mode_table CRTM1600x1200[2];
  96. /* 1680x1050 (CVT) */
  97. extern struct crt_mode_table CRTM1680x1050[2];
  98. /* 1680x1050 (CVT Reduce Blanking) */
  99. extern struct crt_mode_table CRTM1680x1050_RB[1];
  100. /* 1920x1080 (CVT)*/
  101. extern struct crt_mode_table CRTM1920x1080[1];
  102. /* 1920x1080 (CVT with Reduce Blanking) */
  103. extern struct crt_mode_table CRTM1920x1080_RB[1];
  104. /* 1920x1440*/
  105. extern struct crt_mode_table CRTM1920x1440[2];
  106. /* 1400x1050 (CVT) */
  107. extern struct crt_mode_table CRTM1400x1050[2];
  108. /* 1400x1050 (CVT Reduce Blanking) */
  109. extern struct crt_mode_table CRTM1400x1050_RB[1];
  110. /* 960x600 (CVT) */
  111. extern struct crt_mode_table CRTM960x600[1];
  112. /* 1000x600 (GTF) */
  113. extern struct crt_mode_table CRTM1000x600[1];
  114. /* 1024x576 (GTF) */
  115. extern struct crt_mode_table CRTM1024x576[1];
  116. /* 1088x612 (CVT) */
  117. extern struct crt_mode_table CRTM1088x612[1];
  118. /* 1152x720 (CVT) */
  119. extern struct crt_mode_table CRTM1152x720[1];
  120. /* 1200x720 (GTF) */
  121. extern struct crt_mode_table CRTM1200x720[1];
  122. /* 1280x600 (GTF) */
  123. extern struct crt_mode_table CRTM1280x600[1];
  124. /* 1360x768 (CVT) */
  125. extern struct crt_mode_table CRTM1360x768[1];
  126. /* 1360x768 (CVT Reduce Blanking) */
  127. extern struct crt_mode_table CRTM1360x768_RB[1];
  128. /* 1366x768 (GTF) */
  129. extern struct crt_mode_table CRTM1366x768[2];
  130. /* 1440x900 (CVT) */
  131. extern struct crt_mode_table CRTM1440x900[2];
  132. /* 1440x900 (CVT Reduce Blanking) */
  133. extern struct crt_mode_table CRTM1440x900_RB[1];
  134. /* 1600x900 (CVT) */
  135. extern struct crt_mode_table CRTM1600x900[1];
  136. /* 1600x900 (CVT Reduce Blanking) */
  137. extern struct crt_mode_table CRTM1600x900_RB[1];
  138. /* 1600x1024 (GTF) */
  139. extern struct crt_mode_table CRTM1600x1024[1];
  140. /* 1792x1344 (DMT) */
  141. extern struct crt_mode_table CRTM1792x1344[1];
  142. /* 1856x1392 (DMT) */
  143. extern struct crt_mode_table CRTM1856x1392[1];
  144. /* 1920x1200 (CVT) */
  145. extern struct crt_mode_table CRTM1920x1200[1];
  146. /* 1920x1200 (CVT with Reduce Blanking) */
  147. extern struct crt_mode_table CRTM1920x1200_RB[1];
  148. /* 2048x1536 (CVT) */
  149. extern struct crt_mode_table CRTM2048x1536[1];
  150. extern struct VideoModeTable CLE266Modes[47];
  151. extern struct crt_mode_table CEAM1280x720[1];
  152. extern struct crt_mode_table CEAM1920x1080[1];
  153. extern struct VideoModeTable CEA_HDMI_Modes[2];
  154. extern struct res_map_refresh res_map_refresh_tbl[61];
  155. extern struct io_reg CN400_ModeXregs[52];
  156. extern struct io_reg CN700_ModeXregs[66];
  157. extern struct io_reg KM400_ModeXregs[55];
  158. extern struct io_reg CX700_ModeXregs[58];
  159. extern struct io_reg VX800_ModeXregs[58];
  160. extern struct io_reg CLE266_ModeXregs[32];
  161. extern struct io_reg PM1024x768[2];
  162. extern struct patch_table res_patch_table[1];
  163. extern struct VPITTable VPIT;
  164. #endif /* __VIAMODE_H__ */