Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

189 lines
6.1 KiB

  1. //
  2. // Module: DYNAINIT.H
  3. // Date: Feb 10, 1997
  4. //
  5. // Copyright (c) 1997 by ATI Technologies Inc.
  6. //
  7. /********************** PolyTron RCS Utilities
  8. $Revision: 1.4 $
  9. $Date: 13 Jul 1997 21:34:14 $
  10. $Author: MACIESOW $
  11. $Log: V:\source\wnt\ms11\miniport\archive\dynainit.h_v $
  12. *
  13. * Rev 1.4 13 Jul 1997 21:34:14 MACIESOW
  14. * Flat panel and TV support.
  15. *
  16. * Rev 1.3 02 Jun 1997 14:18:14 MACIESOW
  17. * Clean up.
  18. *
  19. * Rev 1.2 02 May 1997 15:00:14 MACIESOW
  20. * Registry mode filters. Mode lookup table.
  21. *
  22. * Rev 1.1 25 Apr 1997 12:53:06 MACIESOW
  23. * No globals.
  24. *
  25. * Rev 1.0 15 Mar 1997 10:16:16 MACIESOW
  26. * Initial revision.
  27. End of PolyTron RCS section *****************/
  28. #ifndef _DYNAINIT_H_
  29. #define _DYNAINIT_H_
  30. //
  31. // Flags used by hardware change detection
  32. //
  33. #define HC_CARD 0x0001
  34. #define HC_MONITOR 0x0002
  35. #define HC_MONITOR_OFF 0x0004
  36. #define HC_MONITOR_UNKNOWN 0x8000
  37. //
  38. // Defines used in CARD_INFO structure
  39. //
  40. #define CARD_CHIP_TYPE_SIZE 128
  41. #define CARD_DAC_TYPE_SIZE 128
  42. #define CARD_ADAPTER_STRING_SIZE 128
  43. #define CARD_BIOS_STRING_SIZE 128
  44. //
  45. // Defines used in MONITOR_INFO structure
  46. //
  47. #define MONITOR_GENERIC L"Generic"
  48. #define MONITOR_DATA_GENERIC 0
  49. #define MONITOR_DATA_ASCII_VDIF 1
  50. #define MONITOR_DATA_BIN_VDIF 2
  51. #define MONITOR_DATA_EDID 3
  52. #define MONITOR_DATE_SIZE 11
  53. #define MONITOR_REVISION_SIZE 16
  54. #define MONITOR_MANUFACTURER_SIZE 16
  55. #define MONITOR_MODEL_NUMBER_SIZE 16
  56. #define MONITOR_MIN_VDIF_INDEX_SIZE 16
  57. #define MONITOR_VERSION_SIZE 16
  58. #define MONITOR_SERIAL_NUMBER_SIZE 16
  59. #define MONITOR_TYPE_SIZE 16
  60. #define MONITOR_GENERIC_SIZE sizeof(MONITOR_GENERIC)
  61. #define MONITOR_BIN_VDIF_SIZE 38
  62. #define MONITOR_EDID_SIZE 10
  63. //
  64. // Define the maximum TV resolutions and refresh rate.
  65. //
  66. #define TV_MAX_HOR_RESOLUTION 800
  67. #define TV_MAX_VER_RESOLUTION 600
  68. #define TV_MAX_REFRESH 60
  69. //
  70. // Define default values in case if ATI ROM cannot be read.
  71. //
  72. #define LT_MAX_HOR_RESOLUTION 1600
  73. #define LT_MAX_VER_RESOLUTION 1200
  74. #define LT_DEFAULT_REFRESH_FLAGS 0xFFFF
  75. //
  76. // Define refresh LT rate flags.
  77. //
  78. #define LT_REFRESH_FLAG_43 0x0001
  79. #define LT_REFRESH_FLAG_47 0x0002
  80. #define LT_REFRESH_FLAG_60 0x0004
  81. #define LT_REFRESH_FLAG_67 0x0008
  82. #define LT_REFRESH_FLAG_70 0x0010
  83. #define LT_REFRESH_FLAG_72 0x0020
  84. #define LT_REFRESH_FLAG_75 0x0040
  85. #define LT_REFRESH_FLAG_76 0x0080
  86. #define LT_REFRESH_FLAG_85 0x0100
  87. #define LT_REFRESH_FLAG_90 0x0200
  88. #define LT_REFRESH_FLAG_100 0x0400
  89. #define LT_REFRESH_FLAG_120 0x0800
  90. #define LT_REFRESH_FLAG_140 0x1000
  91. #define LT_REFRESH_FLAG_150 0x2000
  92. #define LT_REFRESH_FLAG_160 0x4000
  93. #define LT_REFRESH_FLAG_200 0x8000
  94. //
  95. // Structure containing information about the current LCD display (BIOS al = 0x83).
  96. //
  97. #pragma pack(1)
  98. typedef struct _FLAT_PANEL_INFO
  99. {
  100. BYTE byteId; // Panel identification
  101. BYTE byteIdString[24]; // Panel identification string
  102. WORD wHorSize; // Horizontal size in pixels
  103. WORD wVerSize; // Vertical size in lines
  104. WORD wType; // Flat panel type
  105. // bit 0 0 = monochrome
  106. // 1 = color
  107. // bit 1 0 = single panel construction
  108. // 1 = dual (split) panel construction
  109. // bits 7-2 0 = STN (passive matrix)
  110. // 1 = TFT (active matrix)
  111. // 2 = active addressed STN
  112. // 3 = EL
  113. // 4 = plasma
  114. // bits 15-18 reserved
  115. BYTE byteRedBits; // Red bits per primary
  116. BYTE byteGreenBits; // Green bits per primary
  117. BYTE byteBlueBits; // Blue bits per primary
  118. BYTE byteReserved1; // Reserved bits per primary
  119. DWORD dwOffScreenMem; // Size in KB of off screen memory required for frame buffer
  120. DWORD dwPointerMem; // Pointer to reserved off screen memory for frame buffer
  121. BYTE byteReserved2[14]; // Reserved
  122. } FLAT_PANEL_INFO, *PFLAT_PANEL_INFO;
  123. #pragma pack()
  124. typedef struct _CARD_INFO
  125. {
  126. UCHAR ucaChipType[CARD_CHIP_TYPE_SIZE];
  127. UCHAR ucaDacType[CARD_DAC_TYPE_SIZE];
  128. UCHAR ucaAdapterString[CARD_ADAPTER_STRING_SIZE];
  129. UCHAR ucaBiosString[CARD_BIOS_STRING_SIZE];
  130. ULONG ulMemorySize;
  131. } CARD_INFO, *PCARD_INFO;
  132. typedef struct _MONITOR_INFO
  133. {
  134. BOOL bDDC2Used;
  135. short nDataSource;
  136. union
  137. {
  138. struct
  139. {
  140. UCHAR ucaDate[MONITOR_DATE_SIZE];
  141. UCHAR ucaRevision[MONITOR_REVISION_SIZE];
  142. UCHAR ucaManufacturer[MONITOR_MANUFACTURER_SIZE];
  143. UCHAR ucaModelNumber[MONITOR_MODEL_NUMBER_SIZE];
  144. UCHAR ucaMinVDIFIndex[MONITOR_MIN_VDIF_INDEX_SIZE];
  145. UCHAR ucaVersion[MONITOR_VERSION_SIZE];
  146. UCHAR ucaSerialNumber[MONITOR_SERIAL_NUMBER_SIZE];
  147. UCHAR ucaDateManufactured[MONITOR_DATE_SIZE];
  148. UCHAR ucaMonitorType[MONITOR_TYPE_SIZE];
  149. short nCRTSize;
  150. } AsciiVdif;
  151. UCHAR ucaGeneric[MONITOR_GENERIC_SIZE];
  152. UCHAR ucaBinVdif[MONITOR_BIN_VDIF_SIZE];
  153. UCHAR ucaEdid[MONITOR_EDID_SIZE];
  154. } ProductID;
  155. } MONITOR_INFO, *PMONITOR_INFO;
  156. //
  157. // Prototypes for functions supplied by DYNAINIT.C
  158. //
  159. BOOL
  160. FinishModeTableCreation( // To be removed
  161. PHW_DEVICE_EXTENSION phwDeviceExtension
  162. );
  163. VOID
  164. GetRegistryCardInfo(
  165. PHW_DEVICE_EXTENSION phwDeviceExtension,
  166. PCARD_INFO pCardInfo
  167. );
  168. VOID
  169. GetRegistryMonitorInfo(
  170. PHW_DEVICE_EXTENSION phwDeviceExtension,
  171. PMONITOR_INFO pMonitorInfo
  172. );
  173. #endif // _DYNAINIT_H_