sisusb_struct.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. /*
  2. * General structure definitions for universal mode switching modules
  3. *
  4. * Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria
  5. *
  6. * If distributed as part of the Linux kernel, the following license terms
  7. * apply:
  8. *
  9. * * This program is free software; you can redistribute it and/or modify
  10. * * it under the terms of the GNU General Public License as published by
  11. * * the Free Software Foundation; either version 2 of the named License,
  12. * * or any later version.
  13. * *
  14. * * This program is distributed in the hope that it will be useful,
  15. * * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * * GNU General Public License for more details.
  18. * *
  19. * * You should have received a copy of the GNU General Public License
  20. * * along with this program; if not, write to the Free Software
  21. * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
  22. *
  23. * Otherwise, the following license terms apply:
  24. *
  25. * * Redistribution and use in source and binary forms, with or without
  26. * * modification, are permitted provided that the following conditions
  27. * * are met:
  28. * * 1) Redistributions of source code must retain the above copyright
  29. * * notice, this list of conditions and the following disclaimer.
  30. * * 2) Redistributions in binary form must reproduce the above copyright
  31. * * notice, this list of conditions and the following disclaimer in the
  32. * * documentation and/or other materials provided with the distribution.
  33. * * 3) The name of the author may not be used to endorse or promote products
  34. * * derived from this software without specific prior written permission.
  35. * *
  36. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  37. * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  38. * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  39. * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  40. * * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  41. * * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  42. * * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  43. * * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  44. * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  45. * * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  46. *
  47. * Author: Thomas Winischhofer <thomas@winischhofer.net>
  48. *
  49. */
  50. #ifndef _SISUSB_STRUCT_H_
  51. #define _SISUSB_STRUCT_H_
  52. struct SiS_St {
  53. unsigned char St_ModeID;
  54. unsigned short St_ModeFlag;
  55. unsigned char St_StTableIndex;
  56. unsigned char St_CRT2CRTC;
  57. unsigned char St_ResInfo;
  58. unsigned char VB_StTVFlickerIndex;
  59. unsigned char VB_StTVEdgeIndex;
  60. unsigned char VB_StTVYFilterIndex;
  61. unsigned char St_PDC;
  62. };
  63. struct SiS_StandTable {
  64. unsigned char CRT_COLS;
  65. unsigned char ROWS;
  66. unsigned char CHAR_HEIGHT;
  67. unsigned short CRT_LEN;
  68. unsigned char SR[4];
  69. unsigned char MISC;
  70. unsigned char CRTC[0x19];
  71. unsigned char ATTR[0x14];
  72. unsigned char GRC[9];
  73. };
  74. struct SiS_StResInfo_S {
  75. unsigned short HTotal;
  76. unsigned short VTotal;
  77. };
  78. struct SiS_Ext {
  79. unsigned char Ext_ModeID;
  80. unsigned short Ext_ModeFlag;
  81. unsigned short Ext_VESAID;
  82. unsigned char Ext_RESINFO;
  83. unsigned char VB_ExtTVFlickerIndex;
  84. unsigned char VB_ExtTVEdgeIndex;
  85. unsigned char VB_ExtTVYFilterIndex;
  86. unsigned char VB_ExtTVYFilterIndexROM661;
  87. unsigned char REFindex;
  88. char ROMMODEIDX661;
  89. };
  90. struct SiS_Ext2 {
  91. unsigned short Ext_InfoFlag;
  92. unsigned char Ext_CRT1CRTC;
  93. unsigned char Ext_CRTVCLK;
  94. unsigned char Ext_CRT2CRTC;
  95. unsigned char Ext_CRT2CRTC_NS;
  96. unsigned char ModeID;
  97. unsigned short XRes;
  98. unsigned short YRes;
  99. unsigned char Ext_PDC;
  100. unsigned char Ext_FakeCRT2CRTC;
  101. unsigned char Ext_FakeCRT2Clk;
  102. };
  103. struct SiS_CRT1Table {
  104. unsigned char CR[17];
  105. };
  106. struct SiS_VCLKData {
  107. unsigned char SR2B, SR2C;
  108. unsigned short CLOCK;
  109. };
  110. struct SiS_ModeResInfo {
  111. unsigned short HTotal;
  112. unsigned short VTotal;
  113. unsigned char XChar;
  114. unsigned char YChar;
  115. };
  116. struct SiS_Private {
  117. void *sisusb;
  118. unsigned long IOAddress;
  119. unsigned long SiS_P3c4;
  120. unsigned long SiS_P3d4;
  121. unsigned long SiS_P3c0;
  122. unsigned long SiS_P3ce;
  123. unsigned long SiS_P3c2;
  124. unsigned long SiS_P3ca;
  125. unsigned long SiS_P3c6;
  126. unsigned long SiS_P3c7;
  127. unsigned long SiS_P3c8;
  128. unsigned long SiS_P3c9;
  129. unsigned long SiS_P3cb;
  130. unsigned long SiS_P3cc;
  131. unsigned long SiS_P3cd;
  132. unsigned long SiS_P3da;
  133. unsigned long SiS_Part1Port;
  134. unsigned char SiS_MyCR63;
  135. unsigned short SiS_CRT1Mode;
  136. unsigned short SiS_ModeType;
  137. unsigned short SiS_SetFlag;
  138. const struct SiS_StandTable *SiS_StandTable;
  139. const struct SiS_St *SiS_SModeIDTable;
  140. const struct SiS_Ext *SiS_EModeIDTable;
  141. const struct SiS_Ext2 *SiS_RefIndex;
  142. const struct SiS_CRT1Table *SiS_CRT1Table;
  143. const struct SiS_VCLKData *SiS_VCLKData;
  144. const struct SiS_ModeResInfo *SiS_ModeResInfo;
  145. };
  146. #endif