sisusb_struct.h 4.9 KB

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