init.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:15k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. #ifndef _INIT_
  2. #define _INIT_
  3. #include "osdef.h"
  4. #include "initdef.h"
  5. #include "vgatypes.h"
  6. #include "vstruct.h"
  7. #ifdef TC
  8. #include <stdio.h>
  9. #include <string.h>
  10. #include <conio.h>
  11. #include <dos.h>
  12. #include <stdlib.h>
  13. #endif
  14. #ifdef LINUX_XF86
  15. #include "xf86.h"
  16. #include "xf86Pci.h"
  17. #include "xf86PciInfo.h"
  18. #include "xf86_OSproc.h"
  19. #include "sis.h"
  20. #include "sis_regs.h"
  21. #endif
  22. #ifdef LINUX_KERNEL
  23. #include <linux/types.h>
  24. #include <asm/io.h>
  25. #include <linux/sisfb.h>
  26. #endif
  27. #ifdef WIN2000
  28. #include <stdio.h>
  29. #include <string.h>
  30. #include <miniport.h>
  31. #include "dderror.h"
  32. #include "devioctl.h"
  33. #include "miniport.h"
  34. #include "ntddvdeo.h"
  35. #include "video.h"
  36. #include "sisv.h"
  37. #include "tools.h"
  38. #endif
  39. const USHORT SiS_DRAMType[17][5]={
  40. {0x0C,0x0A,0x02,0x40,0x39},
  41. {0x0D,0x0A,0x01,0x40,0x48},
  42. {0x0C,0x09,0x02,0x20,0x35},
  43. {0x0D,0x09,0x01,0x20,0x44},
  44. {0x0C,0x08,0x02,0x10,0x31},
  45. {0x0D,0x08,0x01,0x10,0x40},
  46. {0x0C,0x0A,0x01,0x20,0x34},
  47. {0x0C,0x09,0x01,0x08,0x32},
  48. {0x0B,0x08,0x02,0x08,0x21},
  49. {0x0C,0x08,0x01,0x08,0x30},
  50. {0x0A,0x08,0x02,0x04,0x11},
  51. {0x0B,0x0A,0x01,0x10,0x28},
  52. {0x09,0x08,0x02,0x02,0x01},
  53. {0x0B,0x09,0x01,0x08,0x24},
  54. {0x0B,0x08,0x01,0x04,0x20},
  55. {0x0A,0x08,0x01,0x02,0x10},
  56. {0x09,0x08,0x01,0x01,0x00}
  57. };
  58. const USHORT SiS_SDRDRAM_TYPE[13][5] =
  59. {
  60. { 2,12, 9,64,0x35},
  61. { 1,13, 9,64,0x44},
  62. { 2,12, 8,32,0x31},
  63. { 2,11, 9,32,0x25},
  64. { 1,12, 9,32,0x34},
  65. { 1,13, 8,32,0x40},
  66. { 2,11, 8,16,0x21},
  67. { 1,12, 8,16,0x30},
  68. { 1,11, 9,16,0x24},
  69. { 1,11, 8, 8,0x20},
  70. { 2, 9, 8, 4,0x01},
  71. { 1,10, 8, 4,0x10},
  72. { 1, 9, 8, 2,0x00}
  73. };
  74. const USHORT SiS_DDRDRAM_TYPE[4][5] =
  75. {
  76. { 2,12, 9,64,0x35},
  77. { 2,12, 8,32,0x31},
  78. { 2,11, 8,16,0x21},
  79. { 2, 9, 8, 4,0x01}
  80. };
  81. const USHORT SiS_MDA_DAC[] =
  82. {
  83. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  84.         0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
  85.         0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
  86.         0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
  87.         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  88.         0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
  89.         0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
  90.         0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F
  91. };
  92. const USHORT SiS_CGA_DAC[] =
  93. {
  94.         0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15,
  95.         0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15,
  96.         0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F,
  97.         0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F,
  98.         0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15,
  99.         0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15,
  100.         0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F,
  101.         0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F
  102. };
  103. const USHORT SiS_EGA_DAC[] =
  104. {
  105.         0x00,0x10,0x04,0x14,0x01,0x11,0x05,0x15,
  106.         0x20,0x30,0x24,0x34,0x21,0x31,0x25,0x35,
  107.         0x08,0x18,0x0C,0x1C,0x09,0x19,0x0D,0x1D,
  108.         0x28,0x38,0x2C,0x3C,0x29,0x39,0x2D,0x3D,
  109.         0x02,0x12,0x06,0x16,0x03,0x13,0x07,0x17,
  110.         0x22,0x32,0x26,0x36,0x23,0x33,0x27,0x37,
  111.         0x0A,0x1A,0x0E,0x1E,0x0B,0x1B,0x0F,0x1F,
  112.         0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F
  113. };
  114. const USHORT SiS_VGA_DAC[] =
  115. {
  116. 0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15,
  117. 0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F,
  118. 0x00,0x05,0x08,0x0B,0x0E,0x11,0x14,0x18,
  119. 0x1C,0x20,0x24,0x28,0x2D,0x32,0x38,0x3F,
  120. 0x00,0x10,0x1F,0x2F,0x3F,0x1F,0x27,0x2F,
  121. 0x37,0x3F,0x2D,0x31,0x36,0x3A,0x3F,0x00,
  122. 0x07,0x0E,0x15,0x1C,0x0E,0x11,0x15,0x18,
  123. 0x1C,0x14,0x16,0x18,0x1A,0x1C,0x00,0x04,
  124. 0x08,0x0C,0x10,0x08,0x0A,0x0C,0x0E,0x10,
  125. 0x0B,0x0C,0x0D,0x0F,0x10
  126. };
  127. void     SiS_SetReg1(USHORT, USHORT, USHORT);
  128. void     SiS_SetReg2(SiS_Private *, USHORT, USHORT, USHORT);
  129. void     SiS_SetReg3(USHORT, USHORT);
  130. void     SiS_SetReg4(USHORT, ULONG);
  131. UCHAR    SiS_GetReg1(USHORT, USHORT);
  132. UCHAR    SiS_GetReg2(USHORT);
  133. ULONG    SiS_GetReg3(USHORT);
  134. void     SiS_ClearDAC(SiS_Private *SiS_Pr, ULONG);
  135. void     SiS_SetMemoryClock(SiS_Private *SiS_Pr, UCHAR *ROMAddr,PSIS_HW_DEVICE_INFO HwDeviceExtension);
  136. void     SiS_SetDRAMModeRegister(SiS_Private *SiS_Pr, UCHAR *ROMAddr,PSIS_HW_DEVICE_INFO HwDeviceExtension);
  137. BOOLEAN  SiS_SearchVBModeID(SiS_Private *SiS_Pr, UCHAR *ROMAddr, USHORT *ModeNo);
  138. void     SiS_IsLowResolution(SiS_Private *SiS_Pr, UCHAR *ROMAddr,USHORT ModeNo,USHORT ModeIdIndex);
  139. ULONG    GetDRAMSize(SiS_Private *SiS_Pr, PSIS_HW_DEVICE_INFO HwDeviceExtension);
  140. #ifdef SIS300
  141. void     InitTo300Pointer(SiS_Private *SiS_Pr, PSIS_HW_DEVICE_INFO HwDeviceExtension);
  142. void     SiS_SetDRAMSize_300(SiS_Private *SiS_Pr, PSIS_HW_DEVICE_INFO HwDeviceExtension);
  143. USHORT   SiS_ChkBUSWidth_300(SiS_Private *SiS_Pr, ULONG FBAddress);
  144. #endif
  145. #ifdef SIS315H
  146. void     InitTo310Pointer(SiS_Private *SiS_Pr, PSIS_HW_DEVICE_INFO HwDeviceExtension);
  147. UCHAR    SiS_Get310DRAMType(SiS_Private *SiS_Pr, UCHAR *ROMAddr,PSIS_HW_DEVICE_INFO HwDeviceExtension);
  148. void     SiS_DDR_MRS(SiS_Private *SiS_Pr);
  149. void     SiS_SDR_MRS(SiS_Private *SiS_Pr);
  150. void     SiS_DisableRefresh(SiS_Private *SiS_Pr);
  151. void     SiS_EnableRefresh(SiS_Private *SiS_Pr, UCHAR *ROMAddr);
  152. void     SiS_SetDRAMSize_310(SiS_Private *SiS_Pr, PSIS_HW_DEVICE_INFO);
  153. void     SiS_DisableChannelInterleaving(SiS_Private *SiS_Pr, int index,USHORT SiS_DDRDRAM_TYPE[][5]);
  154. void     SiS_SetDRAMSizingType(SiS_Private *SiS_Pr, int index,USHORT DRAMTYPE_TABLE[][5]);
  155. void     SiS_CheckBusWidth_310(SiS_Private *SiS_Pr, UCHAR *ROMAddress,ULONG FBAddress,
  156.                                PSIS_HW_DEVICE_INFO HwDeviceExtension);
  157. int      SiS_SetRank(SiS_Private *SiS_Pr, int index,UCHAR RankNo,USHORT DRAMTYPE_TABLE[][5]);
  158. int      SiS_SetDDRChannel(SiS_Private *SiS_Pr, int index,UCHAR ChannelNo,
  159.                            USHORT DRAMTYPE_TABLE[][5]);
  160. int      SiS_CheckColumn(SiS_Private *SiS_Pr, int index,USHORT DRAMTYPE_TABLE[][5],ULONG FBAddress);
  161. int      SiS_CheckBanks(SiS_Private *SiS_Pr, int index,USHORT DRAMTYPE_TABLE[][5],ULONG FBAddress);
  162. int      SiS_CheckRank(SiS_Private *SiS_Pr, int RankNo,int index,USHORT DRAMTYPE_TABLE[][5],ULONG FBAddress);
  163. int      SiS_CheckDDRRank(SiS_Private *SiS_Pr, int RankNo,int index,USHORT DRAMTYPE_TABLE[][5],ULONG FBAddress);
  164. int      SiS_CheckRanks(SiS_Private *SiS_Pr, int RankNo,int index,USHORT DRAMTYPE_TABLE[][5],ULONG FBAddress);
  165. int      SiS_CheckDDRRanks(SiS_Private *SiS_Pr, int RankNo,int index,USHORT DRAMTYPE_TABLE[][5],ULONG FBAddress);
  166. int      SiS_SDRSizing(SiS_Private *SiS_Pr, ULONG FBAddress);
  167. int      SiS_DDRSizing(SiS_Private *SiS_Pr, ULONG FBAddress);
  168. int      Is315E(SiS_Private *SiS_Pr);
  169. void     SiS_VerifyMclk(SiS_Private *SiS_Pr, ULONG FBAddr);
  170. #endif
  171. void     SiS_HandleCRT1(SiS_Private *SiS_Pr);
  172. void     SiS_Handle301B_1400x1050(SiS_Private *SiS_Pr, USHORT ModeNo);
  173. void     SetEnableDstn(SiS_Private *SiS_Pr);
  174. void     SiS_Delay15us(SiS_Private *SiS_Pr);
  175. BOOLEAN  SiS_SearchModeID(SiS_Private *SiS_Pr, UCHAR *ROMAddr, USHORT *ModeNo,USHORT *ModeIdIndex);
  176. BOOLEAN  SiS_CheckMemorySize(SiS_Private *SiS_Pr, UCHAR *ROMAddr,PSIS_HW_DEVICE_INFO HwDeviceExtension,
  177.                              USHORT ModeNo,USHORT ModeIdIndex);
  178. UCHAR    SiS_GetModePtr(SiS_Private *SiS_Pr, UCHAR *ROMAddr, USHORT ModeNo,USHORT ModeIdIndex);
  179. void     SiS_SetSeqRegs(SiS_Private *SiS_Pr, UCHAR *ROMAddr,USHORT StandTableIndex);
  180. void     SiS_SetMiscRegs(SiS_Private *SiS_Pr, UCHAR *ROMAddr,USHORT StandTableIndex);
  181. void     SiS_SetCRTCRegs(SiS_Private *SiS_Pr, UCHAR *ROMAddr,PSIS_HW_DEVICE_INFO HwDeviceExtension,
  182.                          USHORT StandTableIndex);
  183. void     SiS_SetATTRegs(SiS_Private *SiS_Pr, UCHAR *ROMAddr,USHORT StandTableIndex,USHORT ModeNo,
  184.                         PSIS_HW_DEVICE_INFO HwDeviceExtension);
  185. void     SiS_SetGRCRegs(SiS_Private *SiS_Pr, UCHAR *ROMAddr,USHORT StandTableIndex);
  186. void     SiS_ClearExt1Regs(SiS_Private *SiS_Pr, PSIS_HW_DEVICE_INFO HwDeviceExtension);
  187. void     SiS_SetSync(SiS_Private *SiS_Pr, UCHAR *ROMAddr,USHORT RefreshRateTableIndex);
  188. void     SiS_SetCRT1CRTC(SiS_Private *SiS_Pr, UCHAR *ROMAddr,USHORT ModeNo,USHORT ModeIdIndex,
  189.                          USHORT RefreshRateTableIndex,
  190.  PSIS_HW_DEVICE_INFO HwDeviceExtension);
  191. BOOLEAN  SiS_GetLCDACRT1Ptr(SiS_Private *SiS_Pr, UCHAR *ROMAddr,USHORT ModeNo,USHORT ModeIdIndex,
  192.                             USHORT RefreshRateTableIndex,USHORT *ResInfo,USHORT *DisplayType);
  193. void     SiS_ResetCRT1VCLK(SiS_Private *SiS_Pr, UCHAR *ROMAddr,PSIS_HW_DEVICE_INFO HwDeviceExtension);
  194. void     SiS_SetCRT1VCLK(SiS_Private *SiS_Pr, UCHAR *ROMAddr,USHORT ModeNo,USHORT ModeIdIndex,PSIS_HW_DEVICE_INFO,
  195.                          USHORT RefreshRateTableIndex);
  196. void     SiS_SetVCLKState(SiS_Private *SiS_Pr, UCHAR *ROMAddr,PSIS_HW_DEVICE_INFO, USHORT ModeNo,
  197.                           USHORT RefreshRateTableIndex, USHORT ModeIdIndex);
  198. void     SiS_LoadDAC(SiS_Private *SiS_Pr, PSIS_HW_DEVICE_INFO, UCHAR *ROMAddr,USHORT ModeNo,USHORT ModeIdIndex);
  199. void     SiS_WriteDAC(SiS_Private *SiS_Pr, USHORT, USHORT, USHORT, USHORT, USHORT, USHORT);
  200. void     SiS_DisplayOn(SiS_Private *SiS_Pr);
  201. void   SiS_DisplayOff(SiS_Private *SiS_Pr);
  202. void     SiS_SetCRT1ModeRegs(SiS_Private *SiS_Pr, UCHAR *ROMAddr,PSIS_HW_DEVICE_INFO,USHORT ModeNo,
  203.                              USHORT ModeIdIndex,USHORT RefreshRateTableIndex);
  204. void     SiS_GetVBType(SiS_Private *SiS_Pr, USHORT BaseAddr,PSIS_HW_DEVICE_INFO);
  205. USHORT   SiS_ChkBUSWidth(SiS_Private *SiS_Pr, UCHAR *ROMAddr);
  206. USHORT   SiS_GetModeIDLength(SiS_Private *SiS_Pr, UCHAR *ROMAddr, USHORT);
  207. USHORT   SiS_GetRefindexLength(SiS_Private *SiS_Pr, UCHAR *ROMAddr, USHORT);
  208. void     SiS_SetInterlace(SiS_Private *SiS_Pr, UCHAR *ROMAddr,USHORT ModeNo,USHORT RefreshRateTableIndex);
  209. void     SiS_Set_LVDS_TRUMPION(SiS_Private *SiS_Pr, PSIS_HW_DEVICE_INFO HwDeviceExtension);
  210. void     SiS_SetCRT1Offset(SiS_Private *SiS_Pr, UCHAR *ROMAddr,USHORT,USHORT,USHORT,PSIS_HW_DEVICE_INFO);
  211. #ifdef SIS315H
  212. void     SiS_SetCRT1FIFO_310(SiS_Private *SiS_Pr, UCHAR *ROMAddr,USHORT,USHORT,PSIS_HW_DEVICE_INFO);
  213. #endif
  214. #ifdef SIS300
  215. void     SiS_SetCRT1FIFO_300(SiS_Private *SiS_Pr, UCHAR *ROMAddr,USHORT ModeNo,PSIS_HW_DEVICE_INFO,
  216.                              USHORT RefreshRateTableIndex);
  217. void     SiS_SetCRT1FIFO_630(SiS_Private *SiS_Pr, UCHAR *ROMAddr,USHORT ModeNo,PSIS_HW_DEVICE_INFO,
  218.                              USHORT RefreshRateTableIndex);
  219. USHORT   SiS_CalcDelay(SiS_Private *SiS_Pr, UCHAR *ROMAddr, USHORT VCLK,
  220.                        USHORT colordepth, USHORT MCLK);
  221. USHORT   SiS_DoCalcDelay(SiS_Private *SiS_Pr, USHORT MCLK, USHORT VCLK, USHORT colordepth, USHORT key);
  222. USHORT   SiS_CalcDelay2(SiS_Private *SiS_Pr, UCHAR *ROMAddr, UCHAR);
  223. #endif
  224. void     SiS_ClearBuffer(SiS_Private *SiS_Pr, PSIS_HW_DEVICE_INFO,USHORT ModeNo);
  225. void     SiS_SetCRT1Group(SiS_Private *SiS_Pr, UCHAR *ROMAddr,PSIS_HW_DEVICE_INFO HwDeviceExtension,
  226.                           USHORT ModeNo,USHORT ModeIdIndex,USHORT BaseAddr);
  227. void     SiS_DetectMonitor(SiS_Private *SiS_Pr, PSIS_HW_DEVICE_INFO HwDeviceExtension,USHORT BaseAddr);
  228. void     SiS_GetSenseStatus(SiS_Private *SiS_Pr, PSIS_HW_DEVICE_INFO HwDeviceExtension,UCHAR *ROMAddr);
  229. USHORT   SiS_TestMonitorType(SiS_Private *SiS_Pr, UCHAR R_DAC,UCHAR G_DAC,UCHAR B_DAC);
  230. USHORT   SiS_SenseCHTV(SiS_Private *SiS_Pr);
  231. BOOLEAN  SiS_Sense(SiS_Private *SiS_Pr, USHORT tempbx,USHORT tempcx);
  232. BOOLEAN  SiS_GetPanelID(SiS_Private *SiS_Pr, PSIS_HW_DEVICE_INFO);
  233. BOOLEAN  SiS_GetLCDDDCInfo(SiS_Private *SiS_Pr, PSIS_HW_DEVICE_INFO);
  234. USHORT   SiS_SenseLCD(SiS_Private *SiS_Pr, PSIS_HW_DEVICE_INFO);
  235. void     SiSRegInit(SiS_Private *SiS_Pr, USHORT BaseAddr);
  236. void     SiSInitPtr(SiS_Private *SiS_Pr, PSIS_HW_DEVICE_INFO HwDeviceExtension);
  237. void     SiSSetLVDSetc(SiS_Private *SiS_Pr, PSIS_HW_DEVICE_INFO HwDeviceExtension,USHORT ModeNo);
  238. void     SiSInitPCIetc(SiS_Private *SiS_Pr, PSIS_HW_DEVICE_INFO HwDeviceExtension);
  239. void     SiSDetermineROMUsage(SiS_Private *SiS_Pr, PSIS_HW_DEVICE_INFO HwDeviceExtension, UCHAR *ROMAddr);
  240. #ifdef LINUX_XF86
  241. USHORT   SiS_CalcModeIndex(ScrnInfoPtr pScrn, DisplayModePtr mode);
  242. USHORT   SiS_CheckCalcModeIndex(ScrnInfoPtr pScrn, DisplayModePtr mode, int VBFlags);
  243. void     SiS_SetPitch(SiS_Private *SiS_Pr, ScrnInfoPtr pScrn, UShort BaseAddr);
  244. void     SiS_SetPitchCRT1(SiS_Private *SiS_Pr, ScrnInfoPtr pScrn, UShort BaseAddr);
  245. void     SiS_SetPitchCRT2(SiS_Private *SiS_Pr, ScrnInfoPtr pScrn, UShort BaseAddr);
  246. unsigned char  SiS_GetSetModeID(ScrnInfoPtr pScrn, unsigned char id);
  247. unsigned char  SiS_GetSetMMIOReg(ScrnInfoPtr pScrn, USHORT offset, unsigned char value);
  248. #endif
  249. extern USHORT    SiS_GetOffset(SiS_Private *SiS_Pr, UCHAR *ROMAddr,USHORT ModeNo,USHORT ModeIdIndex,
  250.                        USHORT RefreshRateTableIndex,PSIS_HW_DEVICE_INFO HwDeviceExtension);
  251. extern USHORT    SiS_GetColorDepth(SiS_Private *SiS_Pr, UCHAR *ROMAddr,USHORT ModeNo,USHORT ModeIdIndex);
  252. extern void      SiS_DisableBridge(SiS_Private *SiS_Pr, PSIS_HW_DEVICE_INFO HwDeviceExtension, USHORT BaseAddr);
  253. extern BOOLEAN   SiS_SetCRT2Group301(SiS_Private *SiS_Pr, USHORT BaseAddr,UCHAR *ROMAddr,USHORT ModeNo,
  254.                                      PSIS_HW_DEVICE_INFO HwDeviceExtension);
  255. extern void      SiS_PresetScratchregister(SiS_Private *SiS_Pr, USHORT SiS_P3d4,
  256.                                            PSIS_HW_DEVICE_INFO HwDeviceExtension);
  257. extern void      SiS_UnLockCRT2(SiS_Private *SiS_Pr, PSIS_HW_DEVICE_INFO HwDeviceExtension,USHORT BaseAddr);
  258. extern void      SiS_LockCRT2(SiS_Private *SiS_Pr, PSIS_HW_DEVICE_INFO HwDeviceExtension,USHORT BaseAddr);
  259. extern BOOLEAN   SiS_BridgeIsOn(SiS_Private *SiS_Pr, USHORT BaseAddr);
  260. extern BOOLEAN   SiS_BridgeIsEnable(SiS_Private *SiS_Pr, USHORT BaseAddr,PSIS_HW_DEVICE_INFO );
  261. extern void      SiS_GetVBInfo(SiS_Private *SiS_Pr, USHORT BaseAddr,UCHAR *ROMAddr,USHORT ModeNo,
  262.                                USHORT ModeIdIndex,PSIS_HW_DEVICE_INFO HwDeviceExtension);
  263. extern BOOLEAN   SiS_GetLCDResInfo(SiS_Private *SiS_Pr, UCHAR *ROMAddr,USHORT ModeNo,
  264.                                    USHORT ModeIdIndex, PSIS_HW_DEVICE_INFO HwDeviceExtension);
  265. extern void      SiS_SetHiVision(SiS_Private *SiS_Pr, USHORT BaseAddr,PSIS_HW_DEVICE_INFO HwDeviceExtension);
  266. extern USHORT    SiS_GetRatePtrCRT2(SiS_Private *SiS_Pr, UCHAR *ROMAddr, USHORT ModeNo,USHORT ModeIdIndex,
  267.                                     PSIS_HW_DEVICE_INFO HwDeviceExtension);
  268. extern void      SiS_LongWait(SiS_Private *SiS_Pr);
  269. extern void      SiS_SetRegOR(USHORT Port,USHORT Index,USHORT DataOR);
  270. extern void      SiS_SetRegAND(USHORT Port,USHORT Index,USHORT DataAND);
  271. extern void      SiS_SetRegANDOR(USHORT Port,USHORT Index,USHORT DataAND,USHORT DataOR);
  272. extern USHORT    SiS_GetResInfo(SiS_Private *SiS_Pr, UCHAR *ROMAddr,USHORT ModeNo,USHORT ModeIdIndex);
  273. extern void      SiS_SetCH700x(SiS_Private *SiS_Pr, USHORT tempax);
  274. extern USHORT    SiS_GetCH700x(SiS_Private *SiS_Pr, USHORT tempax);
  275. extern void      SiS_SetCH701x(SiS_Private *SiS_Pr, USHORT tempax);
  276. extern USHORT    SiS_GetCH701x(SiS_Private *SiS_Pr, USHORT tempax);
  277. extern void      SiS_SetCH70xx(SiS_Private *SiS_Pr, USHORT tempax);
  278. extern USHORT    SiS_GetCH70xx(SiS_Private *SiS_Pr, USHORT tempax);
  279. extern BOOLEAN   SiS_GetLVDSCRT1Ptr(SiS_Private *SiS_Pr, UCHAR *ROMAddr,USHORT ModeNo,USHORT ModeIdIndex,
  280.                                     USHORT RefreshRateTableIndex,
  281.                     USHORT *ResInfo,USHORT *DisplayType);
  282. extern USHORT    SiS_GetVCLK2Ptr(SiS_Private *SiS_Pr, UCHAR *ROMAddr,USHORT ModeNo,USHORT ModeIdIndex,
  283.                                  USHORT RefreshRateTableIndex,
  284.  PSIS_HW_DEVICE_INFO HwDeviceExtension);
  285. extern BOOLEAN   SiS_Is301B(SiS_Private *SiS_Pr, USHORT BaseAddr);
  286. extern BOOLEAN   SiS_IsM650(SiS_Private *SiS_Pr, PSIS_HW_DEVICE_INFO HwDeviceExtension, USHORT BaseAddr);
  287. extern BOOLEAN   SiS_LowModeStuff(SiS_Private *SiS_Pr, USHORT ModeNo,PSIS_HW_DEVICE_INFO HwDeviceExtension);
  288. #endif