summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
9cbd310)
svn path=/trunk/; revision=20678
ULONG Pos;
int Result;
VBE_MODEINFO TempModeInfo;
ULONG Pos;
int Result;
VBE_MODEINFO TempModeInfo;
VBEDeviceExtension->ModeInfo =
VideoPortAllocatePool(HwDeviceExtension, VpPagedPool, ModeCount * sizeof(VBE_MODEINFO), TAG_VBE);
VBEDeviceExtension->ModeNumbers =
VBEDeviceExtension->ModeInfo =
VideoPortAllocatePool(HwDeviceExtension, VpPagedPool, ModeCount * sizeof(VBE_MODEINFO), TAG_VBE);
VBEDeviceExtension->ModeNumbers =
- VideoPortAllocatePool(HwDeviceExtension, VpPagedPool, ModeCount * sizeof(WORD), TAG_VBE);
+ VideoPortAllocatePool(HwDeviceExtension, VpPagedPool, ModeCount * sizeof(USHORT), TAG_VBE);
/*
* Get the actual mode infos.
/*
* Get the actual mode infos.
PVOID HwDeviceExtension,
PVIDEO_REQUEST_PACKET RequestPacket)
{
PVOID HwDeviceExtension,
PVIDEO_REQUEST_PACKET RequestPacket)
{
- RequestPacket->StatusBlock->Status = STATUS_UNSUCCESSFUL;
+ RequestPacket->StatusBlock->Status = ERROR_INVALID_FUNCTION;
switch (RequestPacket->IoControlCode)
{
switch (RequestPacket->IoControlCode)
{
- RequestPacket->StatusBlock->Status = STATUS_NOT_IMPLEMENTED;
+ RequestPacket->StatusBlock->Status = ERROR_INVALID_FUNCTION;
return FALSE;
}
if (Result)
return FALSE;
}
if (Result)
- RequestPacket->StatusBlock->Status = STATUS_SUCCESS;
+ RequestPacket->StatusBlock->Status = NO_ERROR;
&BiosRegisters);
if (BiosRegisters.Eax == VBE_NOT_SUPPORTED)
&BiosRegisters);
if (BiosRegisters.Eax == VBE_NOT_SUPPORTED)
- return ERROR_NOT_SUPPORTED;
+ return ERROR_DEV_NOT_EXIST;
if (BiosRegisters.Eax != VBE_SUCCESS)
return ERROR_INVALID_FUNCTION;
if (BiosRegisters.Eax != VBE_SUCCESS)
return ERROR_INVALID_FUNCTION;
- return ERROR_NOT_SUPPORTED;
+ return ERROR_DEV_NOT_EXIST;
&BiosRegisters);
if (BiosRegisters.Eax == VBE_NOT_SUPPORTED)
&BiosRegisters);
if (BiosRegisters.Eax == VBE_NOT_SUPPORTED)
- return ERROR_NOT_SUPPORTED;
+ return ERROR_DEV_NOT_EXIST;
if (BiosRegisters.Eax != VBE_SUCCESS)
return ERROR_INVALID_FUNCTION;
if (BiosRegisters.Eax != VBE_SUCCESS)
return ERROR_INVALID_FUNCTION;
* Sets the adapter to the specified operating mode.
*/
* Sets the adapter to the specified operating mode.
*/
VBESetCurrentMode(
PVBE_DEVICE_EXTENSION DeviceExtension,
PVIDEO_MODE RequestedMode,
VBESetCurrentMode(
PVBE_DEVICE_EXTENSION DeviceExtension,
PVIDEO_MODE RequestedMode,
VBEResetDevice(
PVBE_DEVICE_EXTENSION DeviceExtension,
PSTATUS_BLOCK StatusBlock)
VBEResetDevice(
PVBE_DEVICE_EXTENSION DeviceExtension,
PSTATUS_BLOCK StatusBlock)
* space of the requestor.
*/
* space of the requestor.
*/
VBEMapVideoMemory(
PVBE_DEVICE_EXTENSION DeviceExtension,
PVIDEO_MEMORY RequestedAddress,
VBEMapVideoMemory(
PVBE_DEVICE_EXTENSION DeviceExtension,
PVIDEO_MEMORY RequestedAddress,
* frame buffer and video RAM.
*/
* frame buffer and video RAM.
*/
VBEUnmapVideoMemory(
PVBE_DEVICE_EXTENSION DeviceExtension,
PVIDEO_MEMORY VideoMemory,
VBEUnmapVideoMemory(
PVBE_DEVICE_EXTENSION DeviceExtension,
PVIDEO_MEMORY VideoMemory,
* buffer for an IOCTL_VIDEO_QUERY_AVAIL_MODES request.
*/
* buffer for an IOCTL_VIDEO_QUERY_AVAIL_MODES request.
*/
VBEQueryNumAvailModes(
PVBE_DEVICE_EXTENSION DeviceExtension,
PVIDEO_NUM_MODES Modes,
VBEQueryNumAvailModes(
PVBE_DEVICE_EXTENSION DeviceExtension,
PVIDEO_NUM_MODES Modes,
* Returns information about each video mode supported by the adapter.
*/
* Returns information about each video mode supported by the adapter.
*/
VBEQueryAvailModes(
PVBE_DEVICE_EXTENSION DeviceExtension,
PVIDEO_MODE_INFORMATION ReturnedModes,
VBEQueryAvailModes(
PVBE_DEVICE_EXTENSION DeviceExtension,
PVIDEO_MODE_INFORMATION ReturnedModes,
* Returns information about current video mode.
*/
* Returns information about current video mode.
*/
VBEQueryCurrentMode(
PVBE_DEVICE_EXTENSION DeviceExtension,
PVIDEO_MODE_INFORMATION VideoModeInfo,
VBEQueryCurrentMode(
PVBE_DEVICE_EXTENSION DeviceExtension,
PVIDEO_MODE_INFORMATION VideoModeInfo,
VBESetColorRegisters(
PVBE_DEVICE_EXTENSION DeviceExtension,
PVIDEO_CLUT ColorLookUpTable,
VBESetColorRegisters(
PVBE_DEVICE_EXTENSION DeviceExtension,
PVIDEO_CLUT ColorLookUpTable,
/* INCLUDES *******************************************************************/
/* INCLUDES *******************************************************************/
+#ifdef _MSC_VER
+#include "dderror.h"
+#include "devioctl.h"
+#else
-#include <miniport.h>
-#include <video.h>
+#endif
+
+#include "miniport.h"
+#include "ntddvdeo.h"
+#include "video.h"
#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
#define TAG_VBE TAG('V', 'B', 'E', ' ')
#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
#define TAG_VBE TAG('V', 'B', 'E', ' ')
typedef struct
{
CHAR Signature[4];
typedef struct
{
CHAR Signature[4];
- WORD Version;
- DWORD OemStringPtr;
+ USHORT Version;
+ ULONG OemStringPtr;
- DWORD VideoModePtr;
- WORD TotalMemory;
- WORD OemSoftwareRevision;
- DWORD OemVendorNamePtr;
- DWORD OemProductNamePtr;
- DWORD OemProductRevPtr;
+ ULONG VideoModePtr;
+ USHORT TotalMemory;
+ USHORT OemSoftwareRevision;
+ ULONG OemVendorNamePtr;
+ ULONG OemProductNamePtr;
+ ULONG OemProductRevPtr;
CHAR Reserved[222];
CHAR OemData[256];
} VBE_INFO, *PVBE_INFO;
CHAR Reserved[222];
CHAR OemData[256];
} VBE_INFO, *PVBE_INFO;
typedef struct
{
/* Mandatory information for all VBE revisions */
typedef struct
{
/* Mandatory information for all VBE revisions */
- WORD ModeAttributes;
- BYTE WinAAttributes;
- BYTE WinBAttributes;
- WORD WinGranularity;
- WORD WinSize;
- WORD WinASegment;
- WORD WinBSegment;
- DWORD WinFuncPtr;
- WORD BytesPerScanLine;
+ USHORT ModeAttributes;
+ UCHAR WinAAttributes;
+ UCHAR WinBAttributes;
+ USHORT WinGranularity;
+ USHORT WinSize;
+ USHORT WinASegment;
+ USHORT WinBSegment;
+ ULONG WinFuncPtr;
+ USHORT BytesPerScanLine;
/* Mandatory information for VBE 1.2 and above */
/* Mandatory information for VBE 1.2 and above */
- WORD XResolution;
- WORD YResolution;
- BYTE XCharSize;
- BYTE YCharSize;
- BYTE NumberOfPlanes;
- BYTE BitsPerPixel;
- BYTE NumberOfBanks;
- BYTE MemoryModel;
- BYTE BankSize;
- BYTE NumberOfImagePages;
- BYTE Reserved1;
+ USHORT XResolution;
+ USHORT YResolution;
+ UCHAR XCharSize;
+ UCHAR YCharSize;
+ UCHAR NumberOfPlanes;
+ UCHAR BitsPerPixel;
+ UCHAR NumberOfBanks;
+ UCHAR MemoryModel;
+ UCHAR BankSize;
+ UCHAR NumberOfImagePages;
+ UCHAR Reserved1;
/* Direct Color fields (required for Direct/6 and YUV/7 memory models) */
/* Direct Color fields (required for Direct/6 and YUV/7 memory models) */
- BYTE RedMaskSize;
- BYTE RedFieldPosition;
- BYTE GreenMaskSize;
- BYTE GreenFieldPosition;
- BYTE BlueMaskSize;
- BYTE BlueFieldPosition;
- BYTE ReservedMaskSize;
- BYTE ReservedFieldPosition;
- BYTE DirectColorModeInfo;
+ UCHAR RedMaskSize;
+ UCHAR RedFieldPosition;
+ UCHAR GreenMaskSize;
+ UCHAR GreenFieldPosition;
+ UCHAR BlueMaskSize;
+ UCHAR BlueFieldPosition;
+ UCHAR ReservedMaskSize;
+ UCHAR ReservedFieldPosition;
+ UCHAR DirectColorModeInfo;
/* Mandatory information for VBE 2.0 and above */
/* Mandatory information for VBE 2.0 and above */
- DWORD PhysBasePtr;
- DWORD Reserved2;
- WORD Reserved3;
+ ULONG PhysBasePtr;
+ ULONG Reserved2;
+ USHORT Reserved3;
/* Mandatory information for VBE 3.0 and above */
/* Mandatory information for VBE 3.0 and above */
- WORD LinBytesPerScanLine;
- BYTE BnkNumberOfImagePages;
- BYTE LinNumberOfImagePages;
- BYTE LinRedMaskSize;
- BYTE LinRedFieldPosition;
- BYTE LinGreenMaskSize;
- BYTE LinGreenFieldPosition;
- BYTE LinBlueMaskSize;
- BYTE LinBlueFieldPosition;
- BYTE LinReservedMaskSize;
- BYTE LinReservedFieldPosition;
- DWORD MaxPixelClock;
+ USHORT LinBytesPerScanLine;
+ UCHAR BnkNumberOfImagePages;
+ UCHAR LinNumberOfImagePages;
+ UCHAR LinRedMaskSize;
+ UCHAR LinRedFieldPosition;
+ UCHAR LinGreenMaskSize;
+ UCHAR LinGreenFieldPosition;
+ UCHAR LinBlueMaskSize;
+ UCHAR LinBlueFieldPosition;
+ UCHAR LinReservedMaskSize;
+ UCHAR LinReservedFieldPosition;
+ ULONG MaxPixelClock;
CHAR Reserved4[189];
} VBE_MODEINFO, *PVBE_MODEINFO;
CHAR Reserved4[189];
} VBE_MODEINFO, *PVBE_MODEINFO;
/* Saved information about video modes */
ULONG ModeCount;
/* Saved information about video modes */
ULONG ModeCount;
} VBE_DEVICE_EXTENSION, *PVBE_DEVICE_EXTENSION;
VP_STATUS STDCALL
} VBE_DEVICE_EXTENSION, *PVBE_DEVICE_EXTENSION;
VP_STATUS STDCALL
ULONG HwId,
PVIDEO_POWER_MANAGEMENT VideoPowerControl);
ULONG HwId,
PVIDEO_POWER_MANAGEMENT VideoPowerControl);
VBESetCurrentMode(
PVBE_DEVICE_EXTENSION DeviceExtension,
PVIDEO_MODE RequestedMode,
PSTATUS_BLOCK StatusBlock);
VBESetCurrentMode(
PVBE_DEVICE_EXTENSION DeviceExtension,
PVIDEO_MODE RequestedMode,
PSTATUS_BLOCK StatusBlock);
VBEResetDevice(
PVBE_DEVICE_EXTENSION DeviceExtension,
PSTATUS_BLOCK StatusBlock);
VBEResetDevice(
PVBE_DEVICE_EXTENSION DeviceExtension,
PSTATUS_BLOCK StatusBlock);
VBEMapVideoMemory(
PVBE_DEVICE_EXTENSION DeviceExtension,
PVIDEO_MEMORY RequestedAddress,
PVIDEO_MEMORY_INFORMATION MapInformation,
PSTATUS_BLOCK StatusBlock);
VBEMapVideoMemory(
PVBE_DEVICE_EXTENSION DeviceExtension,
PVIDEO_MEMORY RequestedAddress,
PVIDEO_MEMORY_INFORMATION MapInformation,
PSTATUS_BLOCK StatusBlock);
VBEUnmapVideoMemory(
PVBE_DEVICE_EXTENSION DeviceExtension,
PVIDEO_MEMORY VideoMemory,
PSTATUS_BLOCK StatusBlock);
VBEUnmapVideoMemory(
PVBE_DEVICE_EXTENSION DeviceExtension,
PVIDEO_MEMORY VideoMemory,
PSTATUS_BLOCK StatusBlock);
VBEQueryNumAvailModes(
PVBE_DEVICE_EXTENSION DeviceExtension,
PVIDEO_NUM_MODES Modes,
PSTATUS_BLOCK StatusBlock);
VBEQueryNumAvailModes(
PVBE_DEVICE_EXTENSION DeviceExtension,
PVIDEO_NUM_MODES Modes,
PSTATUS_BLOCK StatusBlock);
VBEQueryAvailModes(
PVBE_DEVICE_EXTENSION DeviceExtension,
PVIDEO_MODE_INFORMATION ReturnedModes,
PSTATUS_BLOCK StatusBlock);
VBEQueryAvailModes(
PVBE_DEVICE_EXTENSION DeviceExtension,
PVIDEO_MODE_INFORMATION ReturnedModes,
PSTATUS_BLOCK StatusBlock);
VBEQueryCurrentMode(
PVBE_DEVICE_EXTENSION DeviceExtension,
PVIDEO_MODE_INFORMATION VideoModeInfo,
PSTATUS_BLOCK StatusBlock);
VBEQueryCurrentMode(
PVBE_DEVICE_EXTENSION DeviceExtension,
PVIDEO_MODE_INFORMATION VideoModeInfo,
PSTATUS_BLOCK StatusBlock);
VBESetColorRegisters(
PVBE_DEVICE_EXTENSION DeviceExtension,
PVIDEO_CLUT ColorLookUpTable,
VBESetColorRegisters(
PVBE_DEVICE_EXTENSION DeviceExtension,
PVIDEO_CLUT ColorLookUpTable,