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.

118 lines
4.2 KiB

  1. //---------------------------------------------------------------------------
  2. //
  3. // file: CLIOCTL.H
  4. //
  5. // (c) Copyright 1993, Cirrus Logic, Inc.
  6. // Copyright (c) 1996-1997 Microsoft Corporation
  7. // Copyright (c) 1996-1997 Cirrus Logic, Inc.,
  8. // All rights reserved.
  9. //
  10. // date: 1 July 1993
  11. //---------------------------------------------------------------------------
  12. // The maximum GDI ESCAPE value defined in WINGDI.H is 4110(decimal). So here
  13. // we pick an arbitrary value of...
  14. //
  15. // *chu01 : 12-16-96 Enable color correction
  16. // *myf17 : 10-29-96 supported special Escape call
  17. // *myf28 : 01-23-96 supported 755x gamma correction
  18. // *
  19. #define CIRRUS_PRIVATE_ESCAPE 0x5000
  20. //myf17 begin
  21. #define CLESCAPE_CRT_CONNECTION 0x5001
  22. #define CLESCAPE_SET_VGA_OUTPUT 0x5002
  23. #define CLESCAPE_GET_VGA_OUTPUT 0x5003
  24. #define CLESCAPE_GET_PANEL_SIZE 0x5004
  25. #define CLESCAPE_PANEL_MODE 0x5005
  26. //myf17 end
  27. //
  28. // chu01 : GAMMACORRECT
  29. //
  30. #define CLESCAPE_GAMMA_CORRECT 0x2328 // 9000
  31. #define CLESCAPE_GET_CHIPID 0x2329 // 9001
  32. //myf28 : 755x gamma correction
  33. #define CLESCAPE_WRITE_VIDEOLUT 0x2332 //myf28, 9010
  34. //---------------------------------------------------------------------------
  35. //
  36. // The following macro(CTL_CODE) is defined in WINIOCTL.H. That file states
  37. // that functions 2048-4095 are reserved for "customers". So I picked an
  38. // arbitrary value of 0x900=2304.
  39. //
  40. #define IOCTL_CIRRUS_GET_CAPABILITIES \
  41. CTL_CODE(FILE_DEVICE_VIDEO, 0x901, METHOD_BUFFERED, FILE_ANY_ACCESS)
  42. #define IOCTL_CIRRUS_SET_DISPLAY_PITCH \
  43. CTL_CODE(FILE_DEVICE_VIDEO, 0x902, METHOD_BUFFERED, FILE_ANY_ACCESS)
  44. //
  45. // chu01 : GAMMACORRECT
  46. //
  47. #define IOCTL_CIRRUS_GET_GAMMA_FACTOR \
  48. CTL_CODE(FILE_DEVICE_VIDEO, 0x908, METHOD_BUFFERED, FILE_ANY_ACCESS)
  49. #define IOCTL_CIRRUS_GET_CONTRAST_FACTOR \
  50. CTL_CODE(FILE_DEVICE_VIDEO, 0x909, METHOD_BUFFERED, FILE_ANY_ACCESS)
  51. //myf28
  52. #define IOCTL_CIRRUS_GET_755x_GAMMA_FACTOR \
  53. CTL_CODE(FILE_DEVICE_VIDEO, 0x90A, METHOD_BUFFERED, FILE_ANY_ACCESS)
  54. //---------------------------------------------------------------------------
  55. // Structure for miniport to indicate to display driver the capabilities
  56. // of the chip. The flag currently indicates HW Cursor and BLT Engine
  57. // support.
  58. //
  59. // Also included is the size of memory, and the top of available offscreen
  60. // memory. (Actually it's top+1).
  61. //
  62. typedef struct {
  63. ULONG size; // size of this structure
  64. ULONG fl; // see bit description below
  65. ULONG ulChipId; // Chip ID read from CR27[7:2] - e.g CL5434 = 0x2A
  66. ULONG ulMemSize; // Size of memory in bytes=end of HW cursor buffers
  67. ULONG ulOffscreenMemTop; // Offset of 1st byte of unusable video memory
  68. // [1st byte of cursor buffers on all but 754x]
  69. // [1st byte of split screen buffer on 754x]
  70. } CIRRUS_CAPABILITIES, *PCIRRUS_CAPABILITIES;
  71. //#define CL_ALLOW_HW_CURSOR 0x01 // Flag to enable HW Cursor in
  72. //capabilities
  73. //#define CL_BLT_SUPPORT 0x02 // Flag set if chip has BLT Engine
  74. //support
  75. //#define CL_ALLOW_OPAQUE_TEXT 0x04 // Flag to enable HW Cursor in
  76. //capabilities
  77. //#define CL_LINEAR_MODE 0x08 // Flag set if addressing mode is linear
  78. //#define CL_CURSOR_VERT_EXP 0x10 // Flag set if 8x6 panel, 6x4 resolution
  79. //#define CL_DSTN_PANEL 0x20 // Flag set if DSTN panel connect
  80. //---------------------------------------------------------------------------
  81. //
  82. // this is the structure used to pass arguments to the CIRRUS_PRIVATE_ESCAPE
  83. // call done in DrvEscape(). The size of this struct limits the size of the
  84. // returned arguments also. See the DrvEscape() function in enable.c (in the
  85. // display driver DLL) for more information.
  86. //
  87. // NOTE: to enable the definition of these parameters, the following sequence
  88. // is recommended!
  89. //
  90. // #define ENABLE_BIOS_ARGUMENTS // put this before the include
  91. // #include "clioctl.h"
  92. #ifdef ENABLE_BIOS_ARGUMENTS
  93. typedef struct _VIDEO_X86_BIOS_ARGUMENTS {
  94. ULONG Eax;
  95. ULONG Ebx;
  96. ULONG Ecx;
  97. ULONG Edx;
  98. ULONG Esi;
  99. ULONG Edi;
  100. ULONG Ebp;
  101. } VIDEO_X86_BIOS_ARGUMENTS, *PVIDEO_X86_BIOS_ARGUMENTS;
  102. #endif
  103. //---------------------------------------------------------------------------