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.

101 lines
3.8 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. // jl01 : 02-24-97 Implement Feature Connector's functions
  19. //---------------------------------------------------------------------------
  20. //
  21. // The following macro(CTL_CODE) is defined in WINIOCTL.H. That file states
  22. // that functions 2048-4095 are reserved for "customers". So I picked an
  23. // arbitrary value of 0x900=2304.
  24. //
  25. #define IOCTL_CIRRUS_GET_CAPABILITIES \
  26. CTL_CODE(FILE_DEVICE_VIDEO, 0x901, METHOD_BUFFERED, FILE_ANY_ACCESS)
  27. #define IOCTL_CIRRUS_SET_DISPLAY_PITCH \
  28. CTL_CODE(FILE_DEVICE_VIDEO, 0x902, METHOD_BUFFERED, FILE_ANY_ACCESS)
  29. //
  30. // chu01 : GAMMACORRECT
  31. //
  32. #define IOCTL_CIRRUS_GET_GAMMA_FACTOR \
  33. CTL_CODE(FILE_DEVICE_VIDEO, 0x908, METHOD_BUFFERED, FILE_ANY_ACCESS)
  34. #define IOCTL_CIRRUS_GET_CONTRAST_FACTOR \
  35. CTL_CODE(FILE_DEVICE_VIDEO, 0x909, METHOD_BUFFERED, FILE_ANY_ACCESS)
  36. //myf28
  37. #define IOCTL_CIRRUS_GET_755x_GAMMA_FACTOR \
  38. CTL_CODE(FILE_DEVICE_VIDEO, 0x90A, METHOD_BUFFERED, FILE_ANY_ACCESS)
  39. //---------------------------------------------------------------------------
  40. // Structure for miniport to indicate to display driver the capabilities
  41. // of the chip. The flag currently indicates HW Cursor and BLT Engine
  42. // support.
  43. //
  44. // Also included is the size of memory, and the top of available offscreen
  45. // memory. (Actually it's top+1).
  46. //
  47. typedef struct {
  48. ULONG size; // size of this structure
  49. ULONG fl; // see bit description below
  50. ULONG ulChipId; // Chip ID read from CR27[7:2] - e.g CL5434 = 0x2A
  51. ULONG ulMemSize; // Size of memory in bytes=end of HW cursor buffers
  52. ULONG ulOffscreenMemTop; // Offset of 1st byte of unusable video memory
  53. // [1st byte of cursor buffers on all but 754x]
  54. // [1st byte of split screen buffer on 754x]
  55. } CIRRUS_CAPABILITIES, *PCIRRUS_CAPABILITIES;
  56. //#define CL_ALLOW_HW_CURSOR 0x01 // Flag to enable HW Cursor in
  57. //capabilities
  58. //#define CL_BLT_SUPPORT 0x02 // Flag set if chip has BLT Engine
  59. //support
  60. //#define CL_ALLOW_OPAQUE_TEXT 0x04 // Flag to enable HW Cursor in
  61. //capabilities
  62. //#define CL_LINEAR_MODE 0x08 // Flag set if addressing mode is linear
  63. //#define CL_CURSOR_VERT_EXP 0x10 // Flag set if 8x6 panel, 6x4 resolution
  64. //#define CL_DSTN_PANEL 0x20 // Flag set if DSTN panel connect
  65. //---------------------------------------------------------------------------
  66. //
  67. // this is the structure used to pass arguments to the CIRRUS_PRIVATE_ESCAPE
  68. // call done in DrvEscape(). The size of this struct limits the size of the
  69. // returned arguments also. See the DrvEscape() function in enable.c (in the
  70. // display driver DLL) for more information.
  71. //
  72. // NOTE: to enable the definition of these parameters, the following sequence
  73. // is recommended!
  74. //
  75. // #define ENABLE_BIOS_ARGUMENTS // put this before the include
  76. // #include "clioctl.h"
  77. #ifdef ENABLE_BIOS_ARGUMENTS
  78. typedef struct _VIDEO_X86_BIOS_ARGUMENTS {
  79. ULONG Eax;
  80. ULONG Ebx;
  81. ULONG Ecx;
  82. ULONG Edx;
  83. ULONG Esi;
  84. ULONG Edi;
  85. ULONG Ebp;
  86. } VIDEO_X86_BIOS_ARGUMENTS, *PVIDEO_X86_BIOS_ARGUMENTS;
  87. #endif
  88. //---------------------------------------------------------------------------
  89.