Leaked source code of windows server 2003
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.

122 lines
4.6 KiB

  1. /************************************************************************/
  2. /* */
  3. /* INIT_CX.H */
  4. /* */
  5. /* Nov 15 1993 (c) 1993, ATI Technologies Incorporated. */
  6. /************************************************************************/
  7. /********************** PolyTron RCS Utilities
  8. $Revision: 1.6 $
  9. $Date: 15 May 1996 16:35:10 $
  10. $Author: RWolff $
  11. $Log: S:/source/wnt/ms11/miniport/archive/init_cx.h_v $
  12. *
  13. * Rev 1.6 15 May 1996 16:35:10 RWolff
  14. * Updated prototype for SetCurrentMode_cx() to allow reporting
  15. * of failure on mode set.
  16. *
  17. * Rev 1.5 03 Feb 1995 15:16:24 RWOLFF
  18. * Added prototypes for functions used in DCI support.
  19. *
  20. * Rev 1.4 11 Jan 1995 14:02:48 RWOLFF
  21. * Added prototype for RestoreMemSize_cx().
  22. *
  23. * Rev 1.3 12 May 1994 11:14:36 RWOLFF
  24. * Definitions and data structures used by new routine SetModeFromTable_cx()
  25. *
  26. * Rev 1.2 31 Mar 1994 15:05:38 RWOLFF
  27. * Added prototype for SetPowerManagement_cx().
  28. *
  29. * Rev 1.1 03 Mar 1994 12:37:20 ASHANMUG
  30. *
  31. * Rev 1.0 31 Jan 1994 11:41:50 RWOLFF
  32. * Initial revision.
  33. *
  34. * Rev 1.0 30 Nov 1993 18:32:58 RWOLFF
  35. * Initial revision.
  36. End of PolyTron RCS section *****************/
  37. #ifdef DOC
  38. INIT_CX.H - Header file for INIT_CX.C
  39. #endif
  40. /*
  41. * Prototypes for functions supplied by INIT_CX.C
  42. */
  43. extern void Initialize_cx(void);
  44. extern VP_STATUS MapVideoMemory_cx(PVIDEO_REQUEST_PACKET RequestPacket, struct query_structure *QueryPtr);
  45. extern VP_STATUS QueryPublicAccessRanges_cx(PVIDEO_REQUEST_PACKET RequestPacket);
  46. extern VP_STATUS QueryCurrentMode_cx(PVIDEO_REQUEST_PACKET RequestPacket, struct query_structure *QueryPtr);
  47. extern VP_STATUS QueryAvailModes_cx(PVIDEO_REQUEST_PACKET RequestPacket, struct query_structure *QueryPtr);
  48. extern VP_STATUS SetCurrentMode_cx(struct query_structure *QueryPtr, struct st_mode_table *CrtTable);
  49. extern void SetPalette_cx(PULONG lpPalette, USHORT StartIndex, USHORT Count);
  50. extern void IdentityMapPalette_cx(void);
  51. extern void ResetDevice_cx(void);
  52. extern VP_STATUS SetPowerManagement_cx(ULONG DpmsState);
  53. DWORD GetPowerManagement_cx(
  54. PHW_DEVICE_EXTENSION phwDeviceExtension
  55. );
  56. extern void RestoreMemSize_cx(void);
  57. extern VP_STATUS ShareVideoMemory_cx(PVIDEO_REQUEST_PACKET RequestPacket, struct query_structure *QueryPtr);
  58. extern void BankMap_cx(ULONG BankRead, ULONG BankWrite, PVOID Context);
  59. #ifdef INCLUDE_INIT_CX
  60. /*
  61. * Private definitions used in INIT_CX.C
  62. */
  63. /*
  64. * Value to put in low byte of cx_bios_set_from_table.cx_bs_mode_select
  65. * to indicate that this is an accelerator mode.
  66. */
  67. #define CX_BS_MODE_SELECT_ACC 0x0080
  68. /*
  69. * Bit fields in cx_bios_set_from_table.cx_bs_flags
  70. */
  71. #define CX_BS_FLAGS_MUX 0x0400
  72. #define CX_BS_FLAGS_INTERLACED 0x0200
  73. #define CX_BS_FLAGS_ALL_PARMS 0x0010
  74. /*
  75. * Value to put in high byte of cx_bios_set_from_table.cx_bs_v_sync_wid
  76. * to force use of the pixel clock frequency in the cx_bs_dot_clock
  77. * field rather than a divisor/selector pair.
  78. */
  79. #define CX_BS_V_SYNC_WID_CLK 0xFF00
  80. /*
  81. * Mode table structure used in setting the video mode using CH=0x81
  82. * AX=??00 BIOS call.
  83. *
  84. * The alignment of fields within the table expected by the BIOS
  85. * does not match the default structure alignment of the Windows NT
  86. * C compiler, so we must force byte alignment.
  87. */
  88. #pragma pack(1)
  89. struct cx_bios_set_from_table{
  90. WORD cx_bs_reserved_1; /* Reserved */
  91. WORD cx_bs_mode_select; /* Resolution to use */
  92. WORD cx_bs_flags; /* Flags to indicate various conditions */
  93. WORD cx_bs_h_tot_disp; /* Horizontal total and displayed values */
  94. WORD cx_bs_h_sync_strt_wid; /* Horizontal sync start and width */
  95. WORD cx_bs_v_total; /* Vertical total */
  96. WORD cx_bs_v_disp; /* Vertical displayed */
  97. WORD cx_bs_v_sync_strt; /* Vertical sync start */
  98. WORD cx_bs_v_sync_wid; /* Vertical sync width */
  99. WORD cx_bs_dot_clock; /* Pixel clock frequency to use */
  100. WORD cx_bs_h_overscan; /* Horizontal overscan information */
  101. WORD cx_bs_v_overscan; /* Vertical overscan information */
  102. WORD cx_bs_overscan_8b; /* 8BPP and blue overscan colour */
  103. WORD cx_bs_overscan_gr; /* Green and red overscan colour */
  104. WORD cx_bs_reserved_2; /* Reserved */
  105. };
  106. #pragma pack()
  107. #endif