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.

91 lines
3.2 KiB

  1. /************************************************************************/
  2. /* */
  3. /* CVTDDC.H */
  4. /* */
  5. /* November 10 1995 (c) 1995 ATI Technologies Incorporated. */
  6. /************************************************************************/
  7. /********************** PolyTron RCS Utilities
  8. $Revision: 1.0 $
  9. $Date: 21 Nov 1995 11:04:58 $
  10. $Author: RWolff $
  11. $Log: S:/source/wnt/ms11/miniport/archive/cvtddc.h_v $
  12. //
  13. // Rev 1.0 21 Nov 1995 11:04:58 RWolff
  14. //Initial revision.
  15. End of PolyTron RCS section *****************/
  16. /*
  17. * Prototypes for functions supplied by CVTVDIF.C
  18. */
  19. extern ULONG IsDDCSupported(void);
  20. extern VP_STATUS MergeEDIDTables(void);
  21. /*
  22. * Definitions used to identify the type of external mode
  23. * table source to be merged with the "canned" tables.
  24. */
  25. enum {
  26. MERGE_UNKNOWN = 0, /* Source not yet determined */
  27. MERGE_VDIF_FILE, /* Source is a VDIF file read from disk */
  28. MERGE_EDID_DDC, /* Source is an EDID structure transferred via DDC */
  29. MERGE_VDIF_DDC /* Source is a VDIF file transferred via DDC */
  30. };
  31. /*
  32. * Definitions and data structures used only within CVTDDC.C
  33. */
  34. /*
  35. * Detailed timing description from EDID structure
  36. */
  37. #pragma pack(1)
  38. struct EdidDetailTiming{
  39. USHORT PixClock; /* Pixel clock in units of 10 kHz */
  40. UCHAR HorActiveLowByte; /* Low byte of Horizontal Active */
  41. UCHAR HorBlankLowByte; /* Low byte of Horizontal Blank (total - active) */
  42. UCHAR HorHighNybbles; /* High nybbles of above 2 values */
  43. UCHAR VerActiveLowByte; /* Low byte of Vertical Active */
  44. UCHAR VerBlankLowByte; /* Low byte of Vertical Blank (total - active) */
  45. UCHAR VerHighNybbles; /* High nybbles of above 2 values */
  46. UCHAR HSyncOffsetLB; /* Low byte of hor. sync offset */
  47. UCHAR HSyncWidthLB; /* Low byte of hor. sync width */
  48. UCHAR VSyncOffWidLN; /* Low nybbles of ver. sync offset and width */
  49. UCHAR SyncHighBits; /* High bits of sync values */
  50. UCHAR HorSizeLowByte; /* Low byte of hor. size in mm */
  51. UCHAR VerSizeLowByte; /* Low byte of ver. size in mm */
  52. UCHAR SizeHighNybbles; /* High nybbles of above 2 values */
  53. UCHAR HorBorder; /* Size of horizontal overscan */
  54. UCHAR VerBorder; /* Size of vertical overscan */
  55. UCHAR Flags; /* Interlace and sync polarities */
  56. };
  57. #pragma pack()
  58. ULONG
  59. DDC2Query(
  60. PHW_DEVICE_EXTENSION phwDeviceExtension,
  61. PUCHAR QueryBuffer,
  62. USHORT BufferSize
  63. );
  64. BOOLEAN
  65. DDC2Query50(
  66. PHW_DEVICE_EXTENSION phwDeviceExtension,
  67. PUCHAR QueryBuffer,
  68. ULONG BufferSize
  69. );
  70. #define EDID_FLAGS_INTERLACE 0x80
  71. #define EDID_FLAGS_SYNC_TYPE_MASK 0x18
  72. #define EDID_FLAGS_SYNC_ANALOG_COMP 0x00
  73. #define EDID_FLAGS_SYNC_BIPOLAR_AN_COMP 0x08
  74. #define EDID_FLAGS_SYNC_DIGITAL_COMP 0x10
  75. #define EDID_FLAGS_SYNC_DIGITAL_SEP 0x18
  76. #define EDID_FLAGS_V_SYNC_POS 0x04
  77. #define EDID_FLAGS_H_SYNC_POS 0x02