ReactOS  0.4.15-dev-1018-g0695ecb
video.h File Reference
#include "ntddvdeo.h"
#include "videoagp.h"
Include dependency graph for video.h:

Go to the source code of this file.

Classes

struct  _VIDEO_PORT_CONFIG_INFO
 
struct  _VIDEO_ACCESS_RANGE
 
struct  _VP_SCATTER_GATHER_ELEMENT
 
struct  _VP_SCATTER_GATHER_LIST
 
struct  _VIDEO_CHILD_ENUM_INFO
 
struct  _QUERY_INTERFACE
 
struct  _STATUS_BLOCK
 
struct  _VIDEO_REQUEST_PACKET
 
struct  _I2C_CALLBACKS
 
struct  _VIDEO_I2C_CONTROL
 
struct  _INT10_BIOS_ARGUMENTS
 
struct  _VIDEO_HARDWARE_CONFIGURATION_DATA
 
struct  _VIDEO_X86_BIOS_ARGUMENTS
 
struct  __VRB_SG
 
struct  _VP_DEVICE_DESCRIPTION
 
struct  _VIDEO_CHILD_STATE
 
struct  _VIDEO_CHILD_STATE_CONFIGURATION
 
struct  _VIDEO_HW_INITIALIZATION_DATA
 
struct  _I2C_FNC_TABLE
 
struct  _DDC_CONTROL
 
struct  _VIDEO_PORT_AGP_INTERFACE
 
struct  _VIDEO_PORT_AGP_INTERFACE_2
 
struct  _VIDEO_PORT_I2C_INTERFACE
 
struct  _VIDEO_PORT_I2C_INTERFACE_2
 
struct  _VIDEO_PORT_INT10_INTERFACE
 
struct  _VIDEO_PORT_WCMEMORYPROTECTION_INTERFACE
 
struct  _VPOSVERSIONINFO
 
struct  _VIDEO_PORT_DEBUG_REPORT_INTERFACE
 

Macros

#define __VIDEO_H__
 
#define VPAPI   DECLSPEC_IMPORT
 
#define PAGED_CODE()
 
#define VideoDebugPrint(x)
 
#define GET_VIDEO_PHYSICAL_ADDRESS(scatterList, VirtualAddress, InputBuffer, pLength, Address)
 
#define GET_VIDEO_SCATTERGATHER(ppDma)   (**(PVRB_SG **)ppDma)
 
#define VIDEO_RANGE_PASSIVE_DECODE   1
 
#define VIDEO_RANGE_10_BIT_DECODE   2
 
#define SIZE_OF_NT4_VIDEO_PORT_CONFIG_INFO   FIELD_OFFSET(VIDEO_PORT_CONFIG_INFO, Master)
 
#define SIZE_OF_WXP_VIDEO_PORT_CONFIG_INFO   sizeof(VIDEO_PORT_CONFIG_INFO)
 
#define SET_USER_EVENT   0x01
 
#define SET_DISPLAY_EVENT   0x02
 
#define EVENT_TYPE_MASK   1
 
#define SYNCHRONIZATION_EVENT   0
 
#define NOTIFICATION_EVENT   1
 
#define INITIAL_EVENT_STATE_MASK   2
 
#define INITIAL_EVENT_NOT_SIGNALED   0
 
#define INITIAL_EVENT_SIGNALED   2
 
#define DISPLAY_ADAPTER_HW_ID   0xFFFFFFFF
 
#define VIDEO_INVALID_CHILD_ID   0xFFFFFFFF
 
#define SIZE_OF_NT4_VIDEO_HW_INITIALIZATION_DATA   FIELD_OFFSET(VIDEO_HW_INITIALIZATION_DATA, HwStartDma)
 
#define SIZE_OF_W2K_VIDEO_HW_INITIALIZATION_DATA   FIELD_OFFSET(VIDEO_HW_INITIALIZATION_DATA, Reserved)
 
#define SIZE_OF_WXP_VIDEO_HW_INITIALIZATION_DATA   (SIZE_OF_W2K_VIDEO_HW_INITIALIZATION_DATA + sizeof(ULONG))
 
#define VIDEO_PORT_AGP_INTERFACE_VERSION_1   1
 
#define VIDEO_PORT_AGP_INTERFACE_VERSION_2   2
 
#define VIDEO_PORT_I2C_INTERFACE_VERSION_1   1
 
#define VIDEO_PORT_I2C_INTERFACE_VERSION_2   2
 
#define VIDEO_PORT_INT10_INTERFACE_VERSION_1   1
 
#define VIDEO_PORT_WCMEMORYPROTECTION_INTERFACE_VERSION_1   1
 
#define VIDEO_PORT_DEBUG_REPORT_INTERFACE_VERSION_1   1
 
#define VIDEO_MEMORY_SPACE_MEMORY   0x00
 
#define VIDEO_MEMORY_SPACE_IO   0x01
 
#define VIDEO_MEMORY_SPACE_USER_MODE   0x02
 
#define VIDEO_MEMORY_SPACE_DENSE   0x04
 
#define VIDEO_MEMORY_SPACE_P6CACHE   0x08
 
#define VIDEO_ENUM_MORE_DEVICES   ERROR_CONTINUE
 
#define VIDEO_ENUM_NO_MORE_DEVICES   ERROR_NO_MORE_DEVICES
 
#define VIDEO_ENUM_INVALID_DEVICE   ERROR_INVALID_NAME
 
#define DEVICE_VGA_ENABLED   1
 
#define CDE_USE_SUBSYSTEM_IDS   0x00000001
 
#define CDE_USE_REVISION   0x00000002
 
#define BUGCHECK_DATA_SIZE_RESERVED   48
 
#define VIDEO_DEBUG_REPORT_MAX_SIZE   0x8000
 

Typedefs

typedef LONG VP_STATUS
 
typedef LONGPVP_STATUS
 
typedef ULONG DMA_EVENT_FLAGS
 
typedef struct _VIDEO_PORT_SPIN_LOCK * PSPIN_LOCK
 
typedef struct _VIDEO_DEBUG_REPORT * PVIDEO_DEBUG_REPORT
 
typedef struct __DMA_PARAMETERS * PDMA
 
typedef struct __VP_DMA_ADAPTER * PVP_DMA_ADAPTER
 
typedef PVOID(NTAPIPVIDEO_PORT_GET_PROC_ADDRESS) (IN PVOID HwDeviceExtension, IN PUCHAR FunctionName)
 
typedef struct _VIDEO_PORT_CONFIG_INFO VIDEO_PORT_CONFIG_INFO
 
typedef struct _VIDEO_PORT_CONFIG_INFOPVIDEO_PORT_CONFIG_INFO
 
typedef VP_STATUS(NTAPIPVIDEO_HW_FIND_ADAPTER) (IN PVOID HwDeviceExtension, IN PVOID HwContext, IN PWSTR ArgumentString, IN OUT PVIDEO_PORT_CONFIG_INFO ConfigInfo, OUT PUCHAR Again)
 
typedef BOOLEAN(NTAPIPVIDEO_HW_INITIALIZE) (IN PVOID HwDeviceExtension)
 
typedef BOOLEAN(NTAPIPVIDEO_HW_INTERRUPT) (IN PVOID HwDeviceExtension)
 
typedef struct _VIDEO_ACCESS_RANGE VIDEO_ACCESS_RANGE
 
typedef struct _VIDEO_ACCESS_RANGEPVIDEO_ACCESS_RANGE
 
typedef VOID(NTAPIPVIDEO_HW_LEGACYRESOURCES) (IN ULONG VendorId, IN ULONG DeviceId, IN OUT PVIDEO_ACCESS_RANGE *LegacyResourceList, IN OUT PULONG LegacyResourceCount)
 
typedef enum _HW_DMA_RETURN HW_DMA_RETURN
 
typedef enum _HW_DMA_RETURNPHW_DMA_RETURN
 
typedef HW_DMA_RETURN(NTAPIPVIDEO_HW_START_DMA) (PVOID HwDeviceExtension, PDMA pDma)
 
typedef struct _VP_SCATTER_GATHER_ELEMENT VP_SCATTER_GATHER_ELEMENT
 
typedef struct _VP_SCATTER_GATHER_ELEMENTPVP_SCATTER_GATHER_ELEMENT
 
typedef struct _VP_SCATTER_GATHER_LIST VP_SCATTER_GATHER_LIST
 
typedef struct _VP_SCATTER_GATHER_LISTPVP_SCATTER_GATHER_LIST
 
typedef VOID(NTAPIPEXECUTE_DMA) (IN PVOID HwDeviceExtension, IN PVP_DMA_ADAPTER VpDmaAdapter, IN PVP_SCATTER_GATHER_LIST SGList, IN PVOID Context)
 
typedef struct _VIDEO_CHILD_ENUM_INFO VIDEO_CHILD_ENUM_INFO
 
typedef struct _VIDEO_CHILD_ENUM_INFOPVIDEO_CHILD_ENUM_INFO
 
typedef enum _VIDEO_CHILD_TYPE VIDEO_CHILD_TYPE
 
typedef enum _VIDEO_CHILD_TYPEPVIDEO_CHILD_TYPE
 
typedef VP_STATUS(NTAPIPVIDEO_HW_GET_CHILD_DESCRIPTOR) (IN PVOID HwDeviceExtension, IN PVIDEO_CHILD_ENUM_INFO ChildEnumInfo, OUT PVIDEO_CHILD_TYPE VideoChildType, OUT PUCHAR pChildDescriptor, OUT PULONG UId, OUT PULONG pUnused)
 
typedef VP_STATUS(NTAPIPVIDEO_HW_POWER_SET) (IN PVOID HwDeviceExtension, IN ULONG HwId, IN PVIDEO_POWER_MANAGEMENT VideoPowerControl)
 
typedef VP_STATUS(NTAPIPVIDEO_HW_POWER_GET) (IN PVOID HwDeviceExtension, IN ULONG HwId, IN OUT PVIDEO_POWER_MANAGEMENT VideoPowerControl)
 
typedef struct _QUERY_INTERFACE QUERY_INTERFACE
 
typedef struct _QUERY_INTERFACEPQUERY_INTERFACE
 
typedef VP_STATUS(NTAPIPVIDEO_HW_QUERY_INTERFACE) (IN PVOID HwDeviceExtension, IN OUT PQUERY_INTERFACE QueryInterface)
 
typedef VP_STATUS(NTAPIPVIDEO_HW_CHILD_CALLBACK) (PVOID HwDeviceExtension, PVOID ChildDeviceExtension)
 
typedef BOOLEAN(NTAPIPVIDEO_HW_RESET_HW) (IN PVOID HwDeviceExtension, IN ULONG Columns, IN ULONG Rows)
 
typedef struct _STATUS_BLOCK STATUS_BLOCK
 
typedef struct _STATUS_BLOCKPSTATUS_BLOCK
 
typedef struct _VIDEO_REQUEST_PACKET VIDEO_REQUEST_PACKET
 
typedef struct _VIDEO_REQUEST_PACKETPVIDEO_REQUEST_PACKET
 
typedef BOOLEAN(NTAPIPVIDEO_HW_START_IO) (IN PVOID HwDeviceExtension, IN PVIDEO_REQUEST_PACKET RequestPacket)
 
typedef VOID(NTAPIPVIDEO_HW_TIMER) (IN PVOID HwDeviceExtension)
 
typedef VOID(NTAPIPVIDEO_WRITE_CLOCK_LINE) (PVOID HwDeviceExtension, UCHAR Data)
 
typedef VOID(NTAPIPVIDEO_WRITE_DATA_LINE) (PVOID HwDeviceExtension, UCHAR Data)
 
typedef BOOLEAN(NTAPIPVIDEO_READ_CLOCK_LINE) (PVOID HwDeviceExtension)
 
typedef BOOLEAN(NTAPIPVIDEO_READ_DATA_LINE) (PVOID HwDeviceExtension)
 
typedef VOID(NTAPIPVIDEO_WAIT_VSYNC_ACTIVE) (PVOID HwDeviceExtension)
 
typedef struct _I2C_CALLBACKS I2C_CALLBACKS
 
typedef struct _I2C_CALLBACKSPI2C_CALLBACKS
 
typedef BOOLEAN(NTAPIPI2C_START) (IN PVOID HwDeviceExtension, IN PI2C_CALLBACKS I2CCallbacks)
 
typedef BOOLEAN(NTAPIPI2C_STOP) (IN PVOID HwDeviceExtension, IN PI2C_CALLBACKS I2CCallbacks)
 
typedef BOOLEAN(NTAPIPI2C_WRITE) (IN PVOID HwDeviceExtension, IN PI2C_CALLBACKS I2CCallbacks, IN PUCHAR Buffer, IN ULONG Length)
 
typedef BOOLEAN(NTAPIPI2C_READ) (IN PVOID HwDeviceExtension, IN PI2C_CALLBACKS I2CCallbacks, OUT PUCHAR Buffer, IN ULONG Length)
 
typedef struct _VIDEO_I2C_CONTROL VIDEO_I2C_CONTROL
 
typedef struct _VIDEO_I2C_CONTROLPVIDEO_I2C_CONTROL
 
typedef BOOLEAN(NTAPIPI2C_START_2) (IN PVOID HwDeviceExtension, IN PVIDEO_I2C_CONTROL I2CControl)
 
typedef BOOLEAN(NTAPIPI2C_STOP_2) (IN PVOID HwDeviceExtension, IN PVIDEO_I2C_CONTROL I2CControl)
 
typedef BOOLEAN(NTAPIPI2C_WRITE_2) (IN PVOID HwDeviceExtension, IN PVIDEO_I2C_CONTROL I2CControl, IN PUCHAR Buffer, IN ULONG Length)
 
typedef BOOLEAN(NTAPIPI2C_READ_2) (IN PVOID HwDeviceExtension, IN PVIDEO_I2C_CONTROL I2CControl, OUT PUCHAR Buffer, IN ULONG Length, IN BOOLEAN EndOfRead)
 
typedef struct _INT10_BIOS_ARGUMENTS INT10_BIOS_ARGUMENTS
 
typedef struct _INT10_BIOS_ARGUMENTSPINT10_BIOS_ARGUMENTS
 
typedef VP_STATUS(NTAPIPINT10_CALL_BIOS) (IN PVOID Context, IN OUT PINT10_BIOS_ARGUMENTS BiosArguments)
 
typedef VP_STATUS(NTAPIPINT10_ALLOCATE_BUFFER) (IN PVOID Context, OUT PUSHORT Seg, OUT PUSHORT Off, IN OUT PULONG Length)
 
typedef VP_STATUS(NTAPIPINT10_FREE_BUFFER) (IN PVOID Context, IN USHORT Seg, IN USHORT Off)
 
typedef VP_STATUS(NTAPIPINT10_READ_MEMORY) (IN PVOID Context, IN USHORT Seg, IN USHORT Off, OUT PVOID Buffer, IN ULONG Length)
 
typedef VP_STATUS(NTAPIPINT10_WRITE_MEMORY) (IN PVOID Context, IN USHORT Seg, IN USHORT Off, IN PVOID Buffer, IN ULONG Length)
 
typedef VP_STATUS(NTAPIPROTECT_WC_MEMORY) (IN PVOID Context, IN PVOID HwDeviceExtension)
 
typedef VP_STATUS(NTAPIRESTORE_WC_MEMORY) (IN PVOID Context, IN PVOID HwDeviceExtension)
 
typedef enum _VIDEO_DEVICE_DATA_TYPE VIDEO_DEVICE_DATA_TYPE
 
typedef enum _VIDEO_DEVICE_DATA_TYPEPVIDEO_DEVICE_DATA_TYPE
 
typedef VP_STATUS(NTAPIPMINIPORT_QUERY_DEVICE_ROUTINE) (IN PVOID HwDeviceExtension, IN PVOID Context, IN VIDEO_DEVICE_DATA_TYPE DeviceDataType, IN PVOID Identifier, IN ULONG IdentifierLength, IN PVOID ConfigurationData, IN ULONG ConfigurationDataLength, IN OUT PVOID ComponentInformation, IN ULONG ComponentInformationLength)
 
typedef VP_STATUS(NTAPIPMINIPORT_GET_REGISTRY_ROUTINE) (IN PVOID HwDeviceExtension, IN PVOID Context, IN OUT PWSTR ValueName, IN OUT PVOID ValueData, IN ULONG ValueLength)
 
typedef VOID(NTAPIPMINIPORT_DPC_ROUTINE) (IN PVOID HwDeviceExtension, IN PVOID Context)
 
typedef BOOLEAN(NTAPIPMINIPORT_SYNCHRONIZE_ROUTINE) (IN PVOID Context)
 
typedef VOID(NTAPIPVIDEO_BUGCHECK_CALLBACK) (IN PVOID HwDeviceExtension, IN ULONG BugcheckCode, IN PUCHAR Buffer, IN ULONG BufferSize)
 
typedef enum VIDEO_SYNCHRONIZE_PRIORITY VIDEO_SYNCHRONIZE_PRIORITY
 
typedef enum VIDEO_SYNCHRONIZE_PRIORITYPVIDEO_SYNCHRONIZE_PRIORITY
 
typedef enum _VP_POOL_TYPE VP_POOL_TYPE
 
typedef enum _VP_POOL_TYPEPVP_POOL_TYPE
 
typedef enum _DMA_FLAGS DMA_FLAGS
 
typedef struct _VIDEO_HARDWARE_CONFIGURATION_DATA VIDEO_HARDWARE_CONFIGURATION_DATA
 
typedef struct _VIDEO_HARDWARE_CONFIGURATION_DATAPVIDEO_HARDWARE_CONFIGURATION_DATA
 
typedef struct _VIDEO_X86_BIOS_ARGUMENTS VIDEO_X86_BIOS_ARGUMENTS
 
typedef struct _VIDEO_X86_BIOS_ARGUMENTSPVIDEO_X86_BIOS_ARGUMENTS
 
typedef enum VIDEO_DEBUG_LEVEL VIDEO_DEBUG_LEVEL
 
typedef enum VIDEO_DEBUG_LEVELPVIDEO_DEBUG_LEVEL
 
typedef VP_STATUS(NTAPIPDRIVER_IO_PORT_UCHAR) (IN ULONG_PTR Context, IN ULONG Port, IN UCHAR AccessMode, IN PUCHAR Data)
 
typedef VP_STATUS(NTAPIPDRIVER_IO_PORT_UCHAR_STRING) (IN ULONG_PTR Context, IN ULONG Port, IN UCHAR AccessMode, IN PUCHAR Data, IN ULONG DataLength)
 
typedef VP_STATUS(NTAPIPDRIVER_IO_PORT_ULONG) (IN ULONG_PTR Context, IN ULONG Port, IN UCHAR AccessMode, IN PULONG Data)
 
typedef VP_STATUS(NTAPIPDRIVER_IO_PORT_ULONG_STRING) (IN ULONG_PTR Context, IN ULONG Port, IN UCHAR AccessMode, IN PULONG Data, IN ULONG DataLength)
 
typedef VP_STATUS(NTAPIPDRIVER_IO_PORT_USHORT) (IN ULONG_PTR Context, IN ULONG Port, IN UCHAR AccessMode, IN PUSHORT Data)
 
typedef VP_STATUS(NTAPIPDRIVER_IO_PORT_USHORT_STRING) (IN ULONG_PTR Context, IN ULONG Port, IN UCHAR AccessMode, IN PUSHORT Data, IN ULONG DataLength)
 
typedef struct __VRB_SG VRB_SG
 
typedef struct __VRB_SGPVRB_SG
 
typedef enum _VP_LOCK_OPERATION VP_LOCK_OPERATION
 
typedef struct _VP_DEVICE_DESCRIPTION VP_DEVICE_DESCRIPTION
 
typedef struct _VP_DEVICE_DESCRIPTIONPVP_DEVICE_DESCRIPTION
 
typedef struct _VIDEO_CHILD_STATE VIDEO_CHILD_STATE
 
typedef struct _VIDEO_CHILD_STATEPVIDEO_CHILD_STATE
 
typedef struct _VIDEO_CHILD_STATE_CONFIGURATION VIDEO_CHILD_STATE_CONFIGURATION
 
typedef struct _VIDEO_CHILD_STATE_CONFIGURATIONPVIDEO_CHILD_STATE_CONFIGURATION
 
typedef struct _VIDEO_HW_INITIALIZATION_DATA VIDEO_HW_INITIALIZATION_DATA
 
typedef struct _VIDEO_HW_INITIALIZATION_DATAPVIDEO_HW_INITIALIZATION_DATA
 
typedef struct _I2C_FNC_TABLE I2C_FNC_TABLE
 
typedef struct _I2C_FNC_TABLEPI2C_FNC_TABLE
 
typedef struct _DDC_CONTROL DDC_CONTROL
 
typedef struct _DDC_CONTROLPDDC_CONTROL
 
typedef enum _VIDEO_PORT_SERVICES VIDEO_PORT_SERVICES
 
typedef struct _VIDEO_PORT_AGP_INTERFACE VIDEO_PORT_AGP_INTERFACE
 
typedef struct _VIDEO_PORT_AGP_INTERFACEPVIDEO_PORT_AGP_INTERFACE
 
typedef struct _VIDEO_PORT_AGP_INTERFACE_2 VIDEO_PORT_AGP_INTERFACE_2
 
typedef struct _VIDEO_PORT_AGP_INTERFACE_2PVIDEO_PORT_AGP_INTERFACE_2
 
typedef struct _VIDEO_PORT_I2C_INTERFACE VIDEO_PORT_I2C_INTERFACE
 
typedef struct _VIDEO_PORT_I2C_INTERFACEPVIDEO_PORT_I2C_INTERFACE
 
typedef struct _VIDEO_PORT_I2C_INTERFACE_2 VIDEO_PORT_I2C_INTERFACE_2
 
typedef struct _VIDEO_PORT_I2C_INTERFACE_2PVIDEO_PORT_I2C_INTERFACE_2
 
typedef struct _VIDEO_PORT_INT10_INTERFACE VIDEO_PORT_INT10_INTERFACE
 
typedef struct _VIDEO_PORT_INT10_INTERFACEPVIDEO_PORT_INT10_INTERFACE
 
typedef struct _VIDEO_PORT_WCMEMORYPROTECTION_INTERFACE VIDEO_PORT_WCMEMORYPROTECTION_INTERFACE
 
typedef struct _VIDEO_PORT_WCMEMORYPROTECTION_INTERFACEPVIDEO_PORT_WCMEMORYPROTECTION_INTERFACE
 
typedef struct _VPOSVERSIONINFO VPOSVERSIONINFO
 
typedef struct _VPOSVERSIONINFOPVPOSVERSIONINFO
 
typedef struct _VIDEO_PORT_DEBUG_REPORT_INTERFACE VIDEO_PORT_DEBUG_REPORT_INTERFACE
 
typedef struct _VIDEO_PORT_DEBUG_REPORT_INTERFACEPVIDEO_PORT_DEBUG_REPORT_INTERFACE
 

Enumerations

enum  _HW_DMA_RETURN { DmaAsyncReturn, DmaSyncReturn }
 
enum  _VIDEO_CHILD_TYPE { Monitor = 1, NonPrimaryChip, VideoChip, Other }
 
enum  _VIDEO_DEVICE_DATA_TYPE {
  VpMachineData = 0, VpCmosData, VpBusData, VpControllerData,
  VpMonitorData
}
 
enum  VIDEO_SYNCHRONIZE_PRIORITY { VpLowPriority = 0, VpMediumPriority, VpHighPriority }
 
enum  _VP_POOL_TYPE { VpNonPagedPool = 0, VpPagedPool, VpNonPagedPoolCacheAligned = 4, VpPagedPoolCacheAligned }
 
enum  _DMA_FLAGS { VideoPortUnlockAfterDma = 1, VideoPortKeepPagesLocked, VideoPortDmaInitOnly }
 
enum  VIDEO_DEBUG_LEVEL { Error = 0, Warn, Trace, Info }
 
enum  _VP_LOCK_OPERATION { VpReadAccess = 0, VpWriteAccess, VpModifyAccess }
 
enum  _VIDEO_PORT_SERVICES {
  VideoPortServicesAGP = 1, VideoPortServicesI2C, VideoPortServicesHeadless, VideoPortServicesInt10,
  VideoPortServicesDebugReport, VideoPortServicesWCMemoryProtection
}
 

Functions

ULONG NTAPI DriverEntry (PVOID Context1, PVOID Context2)
 
VPAPI VP_STATUS NTAPI VideoPortAllocateBuffer (IN PVOID HwDeviceExtension, IN ULONG Size, OUT PVOID *Buffer)
 
VPAPI VOID NTAPI VideoPortAcquireDeviceLock (IN PVOID HwDeviceExtension)
 
VPAPI ULONG NTAPI VideoPortCompareMemory (IN PVOID Source1, IN PVOID Source2, IN SIZE_T Length)
 
VPAPI BOOLEAN NTAPI VideoPortDDCMonitorHelper (IN PVOID HwDeviceExtension, IN PVOID DDCControl, IN OUT PUCHAR EdidBuffer, IN ULONG EdidBufferSize)
 
VPAPI VOID __cdecl VideoPortDebugPrint (IN VIDEO_DEBUG_LEVEL DebugPrintLevel, IN PSTR DebugMessage, IN ...)
 
VPAPI VP_STATUS NTAPI VideoPortDisableInterrupt (IN PVOID HwDeviceExtension)
 
VPAPI VP_STATUS NTAPI VideoPortEnableInterrupt (IN PVOID HwDeviceExtension)
 
VPAPI VP_STATUS NTAPI VideoPortEnumerateChildren (IN PVOID HwDeviceExtension, IN PVOID Reserved)
 
VPAPI VOID NTAPI VideoPortFreeDeviceBase (IN PVOID HwDeviceExtension, IN PVOID MappedAddress)
 
VPAPI VP_STATUS NTAPI VideoPortGetAccessRanges (IN PVOID HwDeviceExtension, IN ULONG NumRequestedResources, IN PIO_RESOURCE_DESCRIPTOR RequestedResources OPTIONAL, IN ULONG NumAccessRanges, OUT PVIDEO_ACCESS_RANGE AccessRanges, IN PVOID VendorId, IN PVOID DeviceId, OUT PULONG Slot)
 
VPAPI PVOID NTAPI VideoPortGetAssociatedDeviceExtension (IN PVOID DeviceObject)
 
VPAPI ULONG NTAPI VideoPortGetBusData (IN PVOID HwDeviceExtension, IN BUS_DATA_TYPE BusDataType, IN ULONG SlotNumber, IN OUT PVOID Buffer, IN ULONG Offset, IN ULONG Length)
 
VPAPI UCHAR NTAPI VideoPortGetCurrentIrql (VOID)
 
VPAPI PVOID NTAPI VideoPortGetDeviceBase (IN PVOID HwDeviceExtension, IN PHYSICAL_ADDRESS IoAddress, IN ULONG NumberOfUchars, IN UCHAR InIoSpace)
 
VPAPI VP_STATUS NTAPI VideoPortGetDeviceData (IN PVOID HwDeviceExtension, IN VIDEO_DEVICE_DATA_TYPE DeviceDataType, IN PMINIPORT_QUERY_DEVICE_ROUTINE CallbackRoutine, IN PVOID Context)
 
VPAPI VP_STATUS NTAPI VideoPortGetRegistryParameters (IN PVOID HwDeviceExtension, IN PWSTR ParameterName, IN UCHAR IsParameterFileName, IN PMINIPORT_GET_REGISTRY_ROUTINE CallbackRoutine, IN PVOID Context)
 
VPAPI PVOID NTAPI VideoPortGetRomImage (IN PVOID HwDeviceExtension, IN PVOID Unused1, IN ULONG Unused2, IN ULONG Length)
 
VPAPI VP_STATUS NTAPI VideoPortGetVgaStatus (IN PVOID HwDeviceExtension, OUT PULONG VgaStatus)
 
VPAPI LONG FASTCALL VideoPortInterlockedDecrement (IN PLONG Addend)
 
VPAPI LONG FASTCALL VideoPortInterlockedExchange (IN OUT PLONG Target, IN LONG Value)
 
VPAPI LONG FASTCALL VideoPortInterlockedIncrement (IN PLONG Addend)
 
VPAPI ULONG NTAPI VideoPortInitialize (IN PVOID Argument1, IN PVOID Argument2, IN PVIDEO_HW_INITIALIZATION_DATA HwInitializationData, IN PVOID HwContext)
 
VPAPI VP_STATUS NTAPI VideoPortInt10 (IN PVOID HwDeviceExtension, IN PVIDEO_X86_BIOS_ARGUMENTS BiosArguments)
 
VPAPI VOID NTAPI VideoPortLogError (IN PVOID HwDeviceExtension, IN PVIDEO_REQUEST_PACKET Vrp OPTIONAL, IN VP_STATUS ErrorCode, IN ULONG UniqueId)
 
VPAPI VP_STATUS NTAPI VideoPortMapBankedMemory (IN PVOID HwDeviceExtension, IN PHYSICAL_ADDRESS PhysicalAddress, IN OUT PULONG Length, PULONG InIoSpace, PVOID *VirtualAddress, ULONG BankLength, UCHAR ReadWriteBank, PBANKED_SECTION_ROUTINE BankRoutine, PVOID Context)
 
VPAPI VP_STATUS NTAPI VideoPortMapMemory (IN PVOID HwDeviceExtension, IN PHYSICAL_ADDRESS PhysicalAddress, IN OUT PULONG Length, IN PULONG InIoSpace, IN OUT PVOID *VirtualAddress)
 
VPAPI VOID NTAPI VideoPortMoveMemory (IN PVOID Destination, IN PVOID Source, IN ULONG Length)
 
VPAPI LONGLONG NTAPI VideoPortQueryPerformanceCounter (IN PVOID HwDeviceExtension, OUT PLONGLONG PerformanceFrequency OPTIONAL)
 
VPAPI VP_STATUS NTAPI VideoPortQueryServices (IN PVOID HwDeviceExtension, IN VIDEO_PORT_SERVICES ServicesType, IN OUT PINTERFACE Interface)
 
VPAPI BOOLEAN NTAPI VideoPortQueueDpc (IN PVOID HwDeviceExtension, IN PMINIPORT_DPC_ROUTINE CallbackRoutine, IN PVOID Context)
 
VPAPI VOID NTAPI VideoPortReadPortBufferUchar (IN PUCHAR Port, OUT PUCHAR Buffer, IN ULONG Count)
 
VPAPI VOID NTAPI VideoPortReadPortBufferUlong (IN PULONG Port, OUT PULONG Buffer, IN ULONG Count)
 
VPAPI VOID NTAPI VideoPortReadPortBufferUshort (IN PUSHORT Port, OUT PUSHORT Buffer, IN ULONG Count)
 
VPAPI UCHAR NTAPI VideoPortReadPortUchar (IN PUCHAR Port)
 
VPAPI ULONG NTAPI VideoPortReadPortUlong (IN PULONG Port)
 
VPAPI USHORT NTAPI VideoPortReadPortUshort (IN PUSHORT Port)
 
VPAPI VOID NTAPI VideoPortReadRegisterBufferUchar (IN PUCHAR Register, OUT PUCHAR Buffer, IN ULONG Count)
 
VPAPI VOID NTAPI VideoPortReadRegisterBufferUlong (IN PULONG Register, OUT PULONG Buffer, IN ULONG Count)
 
VPAPI VOID NTAPI VideoPortReadRegisterBufferUshort (IN PUSHORT Register, OUT PUSHORT Buffer, IN ULONG Count)
 
VPAPI UCHAR NTAPI VideoPortReadRegisterUchar (IN PUCHAR Register)
 
VPAPI ULONG NTAPI VideoPortReadRegisterUlong (IN PULONG Register)
 
VPAPI USHORT NTAPI VideoPortReadRegisterUshort (IN PUSHORT Register)
 
VPAPI VOID NTAPI VideoPortReleaseBuffer (IN PVOID HwDeviceExtension, IN PVOID Buffer)
 
VPAPI VOID NTAPI VideoPortReleaseDeviceLock (IN PVOID HwDeviceExtension)
 
VPAPI BOOLEAN NTAPI VideoPortScanRom (PVOID HwDeviceExtension, PUCHAR RomBase, ULONG RomLength, PUCHAR String)
 
VPAPI ULONG NTAPI VideoPortSetBusData (IN PVOID HwDeviceExtension, IN BUS_DATA_TYPE BusDataType, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Offset, IN ULONG Length)
 
VPAPI VP_STATUS NTAPI VideoPortSetRegistryParameters (IN PVOID HwDeviceExtension, IN PWSTR ValueName, IN PVOID ValueData, IN ULONG ValueLength)
 
VPAPI VP_STATUS NTAPI VideoPortSetTrappedEmulatorPorts (IN PVOID HwDeviceExtension, IN ULONG NumAccessRanges, IN PVIDEO_ACCESS_RANGE AccessRange)
 
VPAPI VOID NTAPI VideoPortStallExecution (IN ULONG Microseconds)
 
VPAPI VOID NTAPI VideoPortStartTimer (IN PVOID HwDeviceExtension)
 
VPAPI VOID NTAPI VideoPortStopTimer (IN PVOID HwDeviceExtension)
 
VPAPI BOOLEAN NTAPI VideoPortSynchronizeExecution (IN PVOID HwDeviceExtension, IN VIDEO_SYNCHRONIZE_PRIORITY Priority, IN PMINIPORT_SYNCHRONIZE_ROUTINE SynchronizeRoutine, IN PVOID Context)
 
VPAPI VP_STATUS NTAPI VideoPortUnmapMemory (IN PVOID HwDeviceExtension, IN OUT PVOID VirtualAddress, IN HANDLE ProcessHandle)
 
VPAPI VP_STATUS NTAPI VideoPortVerifyAccessRanges (IN PVOID HwDeviceExtension, IN ULONG NumAccessRanges, IN PVIDEO_ACCESS_RANGE AccessRanges)
 
VPAPI VOID NTAPI VideoPortWritePortBufferUchar (IN PUCHAR Port, IN PUCHAR Buffer, IN ULONG Count)
 
VPAPI VOID NTAPI VideoPortWritePortBufferUlong (IN PULONG Port, IN PULONG Buffer, IN ULONG Count)
 
VPAPI VOID NTAPI VideoPortWritePortBufferUshort (IN PUSHORT Port, IN PUSHORT Buffer, IN ULONG Count)
 
VPAPI VOID NTAPI VideoPortWritePortUchar (IN PUCHAR Port, IN UCHAR Value)
 
VPAPI VOID NTAPI VideoPortWritePortUlong (IN PULONG Port, IN ULONG Value)
 
VPAPI VOID NTAPI VideoPortWritePortUshort (IN PUSHORT Port, IN USHORT Value)
 
VPAPI VOID NTAPI VideoPortWriteRegisterBufferUchar (IN PUCHAR Register, IN PUCHAR Buffer, IN ULONG Count)
 
VPAPI VOID NTAPI VideoPortWriteRegisterBufferUlong (IN PULONG Register, IN PULONG Buffer, IN ULONG Count)
 
VPAPI VOID NTAPI VideoPortWriteRegisterBufferUshort (IN PUSHORT Register, IN PUSHORT Buffer, IN ULONG Count)
 
VPAPI VOID NTAPI VideoPortWriteRegisterUchar (IN PUCHAR Register, IN UCHAR Value)
 
VPAPI VOID NTAPI VideoPortWriteRegisterUlong (IN PULONG Register, IN ULONG Value)
 
VPAPI VOID NTAPI VideoPortWriteRegisterUshort (IN PUSHORT Register, IN USHORT Value)
 
VPAPI VOID NTAPI VideoPortZeroDeviceMemory (IN PVOID Destination, IN ULONG Length)
 
VPAPI VOID NTAPI VideoPortZeroMemory (IN PVOID Destination, IN ULONG Length)
 
VPAPI PVOID NTAPI VideoPortAllocateContiguousMemory (IN PVOID HwDeviceExtension, IN ULONG NumberOfBytes, IN PHYSICAL_ADDRESS HighestAcceptableAddress)
 
VPAPI PVOID NTAPI VideoPortGetCommonBuffer (IN PVOID HwDeviceExtension, IN ULONG DesiredLength, IN ULONG Alignment, OUT PPHYSICAL_ADDRESS LogicalAddress, OUT PULONG pActualLength, IN BOOLEAN CacheEnabled)
 
VPAPI VOID NTAPI VideoPortFreeCommonBuffer (IN PVOID HwDeviceExtension, IN ULONG Length, IN PVOID VirtualAddress, IN PHYSICAL_ADDRESS LogicalAddress, IN BOOLEAN CacheEnabled)
 
VPAPI PDMA NTAPI VideoPortDoDma (IN PVOID HwDeviceExtension, IN PDMA pDma, IN DMA_FLAGS DmaFlags)
 
VPAPI BOOLEAN NTAPI VideoPortLockPages (IN PVOID HwDeviceExtension, IN OUT PVIDEO_REQUEST_PACKET pVrp, IN OUT PEVENT pUEvent, IN PEVENT pDisplayEvent, IN DMA_FLAGS DmaFlags)
 
VPAPI BOOLEAN NTAPI VideoPortUnlockPages (IN PVOID hwDeviceExtension, IN OUT PDMA pDma)
 
VPAPI BOOLEAN NTAPI VideoPortSignalDmaComplete (IN PVOID HwDeviceExtension, IN PDMA pDmaHandle)
 
VPAPI PVOID NTAPI VideoPortGetMdl (IN PVOID HwDeviceExtension, IN PDMA pDma)
 
VPAPI PVOID NTAPI VideoPortGetDmaContext (IN PVOID HwDeviceExtension, IN PDMA pDma)
 
VPAPI VOID NTAPI VideoPortSetDmaContext (IN PVOID HwDeviceExtension, OUT PDMA pDma, IN PVOID InstanceContext)
 
VPAPI ULONG NTAPI VideoPortGetBytesUsed (IN PVOID HwDeviceExtension, IN PDMA pDma)
 
VPAPI VOID NTAPI VideoPortSetBytesUsed (IN PVOID HwDeviceExtension, IN OUT PDMA pDma, IN ULONG BytesUsed)
 
VPAPI PDMA NTAPI VideoPortAssociateEventsWithDmaHandle (IN PVOID HwDeviceExtension, IN OUT PVIDEO_REQUEST_PACKET pVrp, IN PVOID MappedUserEvent, IN PVOID DisplayDriverEvent)
 
VPAPI PDMA NTAPI VideoPortMapDmaMemory (IN PVOID HwDeviceExtension, IN PVIDEO_REQUEST_PACKET pVrp, IN PHYSICAL_ADDRESS BoardAddress, IN PULONG Length, IN PULONG InIoSpace, IN PVOID MappedUserEvent, IN PVOID DisplayDriverEvent, IN OUT PVOID *VirtualAddress)
 
VPAPI BOOLEAN NTAPI VideoPortUnmapDmaMemory (IN PVOID HwDeviceExtension, IN PVOID VirtualAddress, IN HANDLE ProcessHandle, IN PDMA BoardMemoryHandle)
 
VPAPI VP_STATUS NTAPI VideoPortCreateSecondaryDisplay (IN PVOID HwDeviceExtension, IN OUT PVOID *SecondaryDeviceExtension, IN ULONG ulFlag)
 
VPAPI PVP_DMA_ADAPTER NTAPI VideoPortGetDmaAdapter (IN PVOID HwDeviceExtension, IN PVP_DEVICE_DESCRIPTION VpDeviceDescription)
 
VPAPI VOID NTAPI VideoPortPutDmaAdapter (IN PVOID HwDeviceExtension, IN PVP_DMA_ADAPTER VpDmaAdapter)
 
VPAPI PVOID NTAPI VideoPortAllocateCommonBuffer (IN PVOID HwDeviceExtension, IN PVP_DMA_ADAPTER VpDmaAdapter, IN ULONG DesiredLength, OUT PPHYSICAL_ADDRESS LogicalAddress, IN BOOLEAN CacheEnabled, PVOID Reserved)
 
VPAPI VOID NTAPI VideoPortReleaseCommonBuffer (IN PVOID HwDeviceExtension, IN PVP_DMA_ADAPTER VpDmaAdapter, IN ULONG Length, IN PHYSICAL_ADDRESS LogicalAddress, IN PVOID VirtualAddress, IN BOOLEAN CacheEnabled)
 
VPAPI PVOID NTAPI VideoPortLockBuffer (IN PVOID HwDeviceExtension, IN PVOID BaseAddress, IN ULONG Length, IN VP_LOCK_OPERATION Operation)
 
VPAPI VOID NTAPI VideoPortUnlockBuffer (IN PVOID HwDeviceExtension, IN PVOID Mdl)
 
VPAPI VP_STATUS NTAPI VideoPortStartDma (IN PVOID HwDeviceExtension, IN PVP_DMA_ADAPTER VpDmaAdapter, IN PVOID Mdl, IN ULONG Offset, IN OUT PULONG pLength, IN PEXECUTE_DMA ExecuteDmaRoutine, IN PVOID Context, IN BOOLEAN WriteToDevice)
 
VPAPI VP_STATUS NTAPI VideoPortCompleteDma (IN PVOID HwDeviceExtension, IN PVP_DMA_ADAPTER VpDmaAdapter, IN PVP_SCATTER_GATHER_LIST VpScatterGather, IN BOOLEAN WriteToDevice)
 
VPAPI VP_STATUS NTAPI VideoPortCreateEvent (IN PVOID HwDeviceExtension, IN ULONG EventFlag, IN PVOID Unused, OUT PEVENT *ppEvent)
 
VPAPI VP_STATUS NTAPI VideoPortDeleteEvent (IN PVOID HwDeviceExtension, IN PEVENT pEvent)
 
VPAPI LONG NTAPI VideoPortSetEvent (IN PVOID HwDeviceExtension, IN PEVENT pEvent)
 
VPAPI VOID NTAPI VideoPortClearEvent (IN PVOID HwDeviceExtension, IN PEVENT pEvent)
 
VPAPI LONG NTAPI VideoPortReadStateEvent (IN PVOID HwDeviceExtension, IN PEVENT pEvent)
 
VPAPI VP_STATUS NTAPI VideoPortWaitForSingleObject (IN PVOID HwDeviceExtension, IN PVOID Object, IN PLARGE_INTEGER Timeout OPTIONAL)
 
VPAPI PVOID NTAPI VideoPortAllocatePool (IN PVOID HwDeviceExtension, IN VP_POOL_TYPE PoolType, IN SIZE_T NumberOfBytes, IN ULONG Tag)
 
VPAPI VOID NTAPI VideoPortFreePool (IN PVOID HwDeviceExtension, IN PVOID Ptr)
 
VPAPI VP_STATUS NTAPI VideoPortCreateSpinLock (IN PVOID HwDeviceExtension, OUT PSPIN_LOCK *SpinLock)
 
VPAPI VP_STATUS NTAPI VideoPortDeleteSpinLock (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock)
 
VPAPI VOID NTAPI VideoPortAcquireSpinLock (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock, OUT PUCHAR OldIrql)
 
VPAPI VOID NTAPI VideoPortAcquireSpinLockAtDpcLevel (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock)
 
VPAPI VOID NTAPI VideoPortReleaseSpinLock (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock, IN UCHAR NewIrql)
 
VPAPI VOID NTAPI VideoPortReleaseSpinLockFromDpcLevel (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock)
 
VPAPI VOID NTAPI VideoPortQuerySystemTime (OUT PLARGE_INTEGER CurrentTime)
 
VPAPI BOOLEAN NTAPI VideoPortCheckForDeviceExistence (IN PVOID HwDeviceExtension, IN USHORT VendorId, IN USHORT DeviceId, IN UCHAR RevisionId, IN USHORT SubVendorId, IN USHORT SubSystemId, IN ULONG Flags)
 
VPAPI ULONG NTAPI VideoPortGetAssociatedDeviceID (IN PVOID DeviceObject)
 
VPAPI VP_STATUS NTAPI VideoPortFlushRegistry (PVOID HwDeviceExtension)
 
VPAPI VP_STATUS NTAPI VideoPortGetVersion (IN PVOID HwDeviceExtension, IN OUT PVPOSVERSIONINFO pVpOsVersionInfo)
 
VPAPI BOOLEAN NTAPI VideoPortIsNoVesa (VOID)
 
VPAPI VP_STATUS NTAPI VideoPortRegisterBugcheckCallback (IN PVOID HwDeviceExtension, IN ULONG BugcheckCode, IN PVIDEO_BUGCHECK_CALLBACK Callback, IN ULONG BugcheckDataSize)
 
VPAPI PVIDEO_DEBUG_REPORT NTAPI VideoPortDbgReportCreate (IN PVOID HwDeviceExtension, IN ULONG ulCode, IN ULONG_PTR ulpArg1, IN ULONG_PTR ulpArg2, IN ULONG_PTR ulpArg3, IN ULONG_PTR ulpArg4)
 
VPAPI BOOLEAN NTAPI VideoPortDbgReportSecondaryData (IN OUT PVIDEO_DEBUG_REPORT pReport, IN PVOID pvData, IN ULONG ulDataSize)
 
VPAPI VOID NTAPI VideoPortDbgReportComplete (IN OUT PVIDEO_DEBUG_REPORT pReport)
 

Macro Definition Documentation

◆ __VIDEO_H__

#define __VIDEO_H__

Definition at line 25 of file video.h.

◆ BUGCHECK_DATA_SIZE_RESERVED

#define BUGCHECK_DATA_SIZE_RESERVED   48

Definition at line 149 of file video.h.

◆ CDE_USE_REVISION

#define CDE_USE_REVISION   0x00000002

Definition at line 147 of file video.h.

◆ CDE_USE_SUBSYSTEM_IDS

#define CDE_USE_SUBSYSTEM_IDS   0x00000001

Definition at line 146 of file video.h.

◆ DEVICE_VGA_ENABLED

#define DEVICE_VGA_ENABLED   1

Definition at line 143 of file video.h.

◆ DISPLAY_ADAPTER_HW_ID

#define DISPLAY_ADAPTER_HW_ID   0xFFFFFFFF

Definition at line 115 of file video.h.

◆ EVENT_TYPE_MASK

#define EVENT_TYPE_MASK   1

Definition at line 107 of file video.h.

◆ GET_VIDEO_PHYSICAL_ADDRESS

#define GET_VIDEO_PHYSICAL_ADDRESS (   scatterList,
  VirtualAddress,
  InputBuffer,
  pLength,
  Address 
)
Value:
do { \
ULONG_PTR byteOffset; \
\
byteOffset = (PCHAR) VirtualAddress - (PCHAR)InputBuffer; \
while (byteOffset >= scatterList->Length) { \
byteOffset -= scatterList->Length; \
scatterList++; \
} \
*pLength = scatterList->Length - byteOffset; \
Address = (ULONG_PTR) (scatterList->PhysicalAddress + byteOffset); \
} while (0)
signed char * PCHAR
Definition: retypes.h:7
CHAR InputBuffer[80]
Definition: conmgr.c:33
#define PCHAR
Definition: match.c:90
_In_ ULONG _In_ BOOLEAN _Must_inspect_result_ PVOID * VirtualAddress
Definition: ndis.h:3791
#define ULONG_PTR
Definition: config.h:101

Definition at line 78 of file video.h.

◆ GET_VIDEO_SCATTERGATHER

#define GET_VIDEO_SCATTERGATHER (   ppDma)    (**(PVRB_SG **)ppDma)

Definition at line 95 of file video.h.

◆ INITIAL_EVENT_NOT_SIGNALED

#define INITIAL_EVENT_NOT_SIGNALED   0

Definition at line 112 of file video.h.

◆ INITIAL_EVENT_SIGNALED

#define INITIAL_EVENT_SIGNALED   2

Definition at line 113 of file video.h.

◆ INITIAL_EVENT_STATE_MASK

#define INITIAL_EVENT_STATE_MASK   2

Definition at line 111 of file video.h.

◆ NOTIFICATION_EVENT

#define NOTIFICATION_EVENT   1

Definition at line 109 of file video.h.

◆ PAGED_CODE

#define PAGED_CODE ( )

Definition at line 57 of file video.h.

◆ SET_DISPLAY_EVENT

#define SET_DISPLAY_EVENT   0x02

Definition at line 105 of file video.h.

◆ SET_USER_EVENT

#define SET_USER_EVENT   0x01

Definition at line 104 of file video.h.

◆ SIZE_OF_NT4_VIDEO_HW_INITIALIZATION_DATA

#define SIZE_OF_NT4_VIDEO_HW_INITIALIZATION_DATA   FIELD_OFFSET(VIDEO_HW_INITIALIZATION_DATA, HwStartDma)

Definition at line 119 of file video.h.

◆ SIZE_OF_NT4_VIDEO_PORT_CONFIG_INFO

#define SIZE_OF_NT4_VIDEO_PORT_CONFIG_INFO   FIELD_OFFSET(VIDEO_PORT_CONFIG_INFO, Master)

Definition at line 101 of file video.h.

◆ SIZE_OF_W2K_VIDEO_HW_INITIALIZATION_DATA

#define SIZE_OF_W2K_VIDEO_HW_INITIALIZATION_DATA   FIELD_OFFSET(VIDEO_HW_INITIALIZATION_DATA, Reserved)

Definition at line 120 of file video.h.

◆ SIZE_OF_WXP_VIDEO_HW_INITIALIZATION_DATA

#define SIZE_OF_WXP_VIDEO_HW_INITIALIZATION_DATA   (SIZE_OF_W2K_VIDEO_HW_INITIALIZATION_DATA + sizeof(ULONG))

Definition at line 121 of file video.h.

◆ SIZE_OF_WXP_VIDEO_PORT_CONFIG_INFO

#define SIZE_OF_WXP_VIDEO_PORT_CONFIG_INFO   sizeof(VIDEO_PORT_CONFIG_INFO)

Definition at line 102 of file video.h.

◆ SYNCHRONIZATION_EVENT

#define SYNCHRONIZATION_EVENT   0

Definition at line 108 of file video.h.

◆ VIDEO_DEBUG_REPORT_MAX_SIZE

#define VIDEO_DEBUG_REPORT_MAX_SIZE   0x8000

Definition at line 151 of file video.h.

◆ VIDEO_ENUM_INVALID_DEVICE

#define VIDEO_ENUM_INVALID_DEVICE   ERROR_INVALID_NAME

Definition at line 141 of file video.h.

◆ VIDEO_ENUM_MORE_DEVICES

#define VIDEO_ENUM_MORE_DEVICES   ERROR_CONTINUE

Definition at line 139 of file video.h.

◆ VIDEO_ENUM_NO_MORE_DEVICES

#define VIDEO_ENUM_NO_MORE_DEVICES   ERROR_NO_MORE_DEVICES

Definition at line 140 of file video.h.

◆ VIDEO_INVALID_CHILD_ID

#define VIDEO_INVALID_CHILD_ID   0xFFFFFFFF

Definition at line 117 of file video.h.

◆ VIDEO_MEMORY_SPACE_DENSE

#define VIDEO_MEMORY_SPACE_DENSE   0x04

Definition at line 135 of file video.h.

◆ VIDEO_MEMORY_SPACE_IO

#define VIDEO_MEMORY_SPACE_IO   0x01

Definition at line 133 of file video.h.

◆ VIDEO_MEMORY_SPACE_MEMORY

#define VIDEO_MEMORY_SPACE_MEMORY   0x00

Definition at line 132 of file video.h.

◆ VIDEO_MEMORY_SPACE_P6CACHE

#define VIDEO_MEMORY_SPACE_P6CACHE   0x08

Definition at line 136 of file video.h.

◆ VIDEO_MEMORY_SPACE_USER_MODE

#define VIDEO_MEMORY_SPACE_USER_MODE   0x02

Definition at line 134 of file video.h.

◆ VIDEO_PORT_AGP_INTERFACE_VERSION_1

#define VIDEO_PORT_AGP_INTERFACE_VERSION_1   1

Definition at line 123 of file video.h.

◆ VIDEO_PORT_AGP_INTERFACE_VERSION_2

#define VIDEO_PORT_AGP_INTERFACE_VERSION_2   2

Definition at line 124 of file video.h.

◆ VIDEO_PORT_DEBUG_REPORT_INTERFACE_VERSION_1

#define VIDEO_PORT_DEBUG_REPORT_INTERFACE_VERSION_1   1

Definition at line 129 of file video.h.

◆ VIDEO_PORT_I2C_INTERFACE_VERSION_1

#define VIDEO_PORT_I2C_INTERFACE_VERSION_1   1

Definition at line 125 of file video.h.

◆ VIDEO_PORT_I2C_INTERFACE_VERSION_2

#define VIDEO_PORT_I2C_INTERFACE_VERSION_2   2

Definition at line 126 of file video.h.

◆ VIDEO_PORT_INT10_INTERFACE_VERSION_1

#define VIDEO_PORT_INT10_INTERFACE_VERSION_1   1

Definition at line 127 of file video.h.

◆ VIDEO_PORT_WCMEMORYPROTECTION_INTERFACE_VERSION_1

#define VIDEO_PORT_WCMEMORYPROTECTION_INTERFACE_VERSION_1   1

Definition at line 128 of file video.h.

◆ VIDEO_RANGE_10_BIT_DECODE

#define VIDEO_RANGE_10_BIT_DECODE   2

Definition at line 99 of file video.h.

◆ VIDEO_RANGE_PASSIVE_DECODE

#define VIDEO_RANGE_PASSIVE_DECODE   1

Definition at line 98 of file video.h.

◆ VideoDebugPrint

#define VideoDebugPrint (   x)

Definition at line 75 of file video.h.

◆ VPAPI

#define VPAPI   DECLSPEC_IMPORT

Definition at line 47 of file video.h.

Typedef Documentation

◆ DDC_CONTROL

◆ DMA_EVENT_FLAGS

Definition at line 154 of file video.h.

◆ DMA_FLAGS

◆ HW_DMA_RETURN

◆ I2C_CALLBACKS

◆ I2C_FNC_TABLE

◆ INT10_BIOS_ARGUMENTS

◆ PDDC_CONTROL

◆ PDMA

typedef struct __DMA_PARAMETERS* PDMA

Definition at line 158 of file video.h.

◆ PDRIVER_IO_PORT_UCHAR

typedef VP_STATUS(NTAPI * PDRIVER_IO_PORT_UCHAR) (IN ULONG_PTR Context, IN ULONG Port, IN UCHAR AccessMode, IN PUCHAR Data)

Definition at line 589 of file video.h.

◆ PDRIVER_IO_PORT_UCHAR_STRING

typedef VP_STATUS(NTAPI * PDRIVER_IO_PORT_UCHAR_STRING) (IN ULONG_PTR Context, IN ULONG Port, IN UCHAR AccessMode, IN PUCHAR Data, IN ULONG DataLength)

Definition at line 596 of file video.h.

◆ PDRIVER_IO_PORT_ULONG

typedef VP_STATUS(NTAPI * PDRIVER_IO_PORT_ULONG) (IN ULONG_PTR Context, IN ULONG Port, IN UCHAR AccessMode, IN PULONG Data)

Definition at line 604 of file video.h.

◆ PDRIVER_IO_PORT_ULONG_STRING

typedef VP_STATUS(NTAPI * PDRIVER_IO_PORT_ULONG_STRING) (IN ULONG_PTR Context, IN ULONG Port, IN UCHAR AccessMode, IN PULONG Data, IN ULONG DataLength)

Definition at line 611 of file video.h.

◆ PDRIVER_IO_PORT_USHORT

typedef VP_STATUS(NTAPI * PDRIVER_IO_PORT_USHORT) (IN ULONG_PTR Context, IN ULONG Port, IN UCHAR AccessMode, IN PUSHORT Data)

Definition at line 619 of file video.h.

◆ PDRIVER_IO_PORT_USHORT_STRING

typedef VP_STATUS(NTAPI * PDRIVER_IO_PORT_USHORT_STRING) (IN ULONG_PTR Context, IN ULONG Port, IN UCHAR AccessMode, IN PUSHORT Data, IN ULONG DataLength)

Definition at line 626 of file video.h.

◆ PEXECUTE_DMA

typedef VOID(NTAPI * PEXECUTE_DMA) (IN PVOID HwDeviceExtension, IN PVP_DMA_ADAPTER VpDmaAdapter, IN PVP_SCATTER_GATHER_LIST SGList, IN PVOID Context)

Definition at line 253 of file video.h.

◆ PHW_DMA_RETURN

◆ PI2C_CALLBACKS

◆ PI2C_FNC_TABLE

◆ PI2C_READ

typedef BOOLEAN(NTAPI * PI2C_READ) (IN PVOID HwDeviceExtension, IN PI2C_CALLBACKS I2CCallbacks, OUT PUCHAR Buffer, IN ULONG Length)

Definition at line 394 of file video.h.

◆ PI2C_READ_2

typedef BOOLEAN(NTAPI * PI2C_READ_2) (IN PVOID HwDeviceExtension, IN PVIDEO_I2C_CONTROL I2CControl, OUT PUCHAR Buffer, IN ULONG Length, IN BOOLEAN EndOfRead)

Definition at line 426 of file video.h.

◆ PI2C_START

typedef BOOLEAN(NTAPI * PI2C_START) (IN PVOID HwDeviceExtension, IN PI2C_CALLBACKS I2CCallbacks)

Definition at line 377 of file video.h.

◆ PI2C_START_2

typedef BOOLEAN(NTAPI * PI2C_START_2) (IN PVOID HwDeviceExtension, IN PVIDEO_I2C_CONTROL I2CControl)

Definition at line 409 of file video.h.

◆ PI2C_STOP

typedef BOOLEAN(NTAPI * PI2C_STOP) (IN PVOID HwDeviceExtension, IN PI2C_CALLBACKS I2CCallbacks)

Definition at line 382 of file video.h.

◆ PI2C_STOP_2

typedef BOOLEAN(NTAPI * PI2C_STOP_2) (IN PVOID HwDeviceExtension, IN PVIDEO_I2C_CONTROL I2CControl)

Definition at line 414 of file video.h.

◆ PI2C_WRITE

typedef BOOLEAN(NTAPI * PI2C_WRITE) (IN PVOID HwDeviceExtension, IN PI2C_CALLBACKS I2CCallbacks, IN PUCHAR Buffer, IN ULONG Length)

Definition at line 387 of file video.h.

◆ PI2C_WRITE_2

typedef BOOLEAN(NTAPI * PI2C_WRITE_2) (IN PVOID HwDeviceExtension, IN PVIDEO_I2C_CONTROL I2CControl, IN PUCHAR Buffer, IN ULONG Length)

Definition at line 419 of file video.h.

◆ PINT10_ALLOCATE_BUFFER

typedef VP_STATUS(NTAPI * PINT10_ALLOCATE_BUFFER) (IN PVOID Context, OUT PUSHORT Seg, OUT PUSHORT Off, IN OUT PULONG Length)

Definition at line 451 of file video.h.

◆ PINT10_BIOS_ARGUMENTS

◆ PINT10_CALL_BIOS

typedef VP_STATUS(NTAPI * PINT10_CALL_BIOS) (IN PVOID Context, IN OUT PINT10_BIOS_ARGUMENTS BiosArguments)

Definition at line 446 of file video.h.

◆ PINT10_FREE_BUFFER

typedef VP_STATUS(NTAPI * PINT10_FREE_BUFFER) (IN PVOID Context, IN USHORT Seg, IN USHORT Off)

Definition at line 458 of file video.h.

◆ PINT10_READ_MEMORY

typedef VP_STATUS(NTAPI * PINT10_READ_MEMORY) (IN PVOID Context, IN USHORT Seg, IN USHORT Off, OUT PVOID Buffer, IN ULONG Length)

Definition at line 464 of file video.h.

◆ PINT10_WRITE_MEMORY

typedef VP_STATUS(NTAPI * PINT10_WRITE_MEMORY) (IN PVOID Context, IN USHORT Seg, IN USHORT Off, IN PVOID Buffer, IN ULONG Length)

Definition at line 472 of file video.h.

◆ PMINIPORT_DPC_ROUTINE

typedef VOID(NTAPI * PMINIPORT_DPC_ROUTINE) (IN PVOID HwDeviceExtension, IN PVOID Context)

Definition at line 518 of file video.h.

◆ PMINIPORT_GET_REGISTRY_ROUTINE

typedef VP_STATUS(NTAPI * PMINIPORT_GET_REGISTRY_ROUTINE) (IN PVOID HwDeviceExtension, IN PVOID Context, IN OUT PWSTR ValueName, IN OUT PVOID ValueData, IN ULONG ValueLength)

Definition at line 510 of file video.h.

◆ PMINIPORT_QUERY_DEVICE_ROUTINE

typedef VP_STATUS(NTAPI * PMINIPORT_QUERY_DEVICE_ROUTINE) (IN PVOID HwDeviceExtension, IN PVOID Context, IN VIDEO_DEVICE_DATA_TYPE DeviceDataType, IN PVOID Identifier, IN ULONG IdentifierLength, IN PVOID ConfigurationData, IN ULONG ConfigurationDataLength, IN OUT PVOID ComponentInformation, IN ULONG ComponentInformationLength)

Definition at line 498 of file video.h.

◆ PMINIPORT_SYNCHRONIZE_ROUTINE

typedef BOOLEAN(NTAPI * PMINIPORT_SYNCHRONIZE_ROUTINE) (IN PVOID Context)

Definition at line 523 of file video.h.

◆ PQUERY_INTERFACE

◆ PROTECT_WC_MEMORY

typedef VP_STATUS(NTAPI * PROTECT_WC_MEMORY) (IN PVOID Context, IN PVOID HwDeviceExtension)

Definition at line 480 of file video.h.

◆ PSPIN_LOCK

typedef struct _VIDEO_PORT_SPIN_LOCK* PSPIN_LOCK

Definition at line 156 of file video.h.

◆ PSTATUS_BLOCK

◆ PVIDEO_ACCESS_RANGE

◆ PVIDEO_BUGCHECK_CALLBACK

typedef VOID(NTAPI * PVIDEO_BUGCHECK_CALLBACK) (IN PVOID HwDeviceExtension, IN ULONG BugcheckCode, IN PUCHAR Buffer, IN ULONG BufferSize)

Definition at line 527 of file video.h.

◆ PVIDEO_CHILD_ENUM_INFO

◆ PVIDEO_CHILD_STATE

◆ PVIDEO_CHILD_STATE_CONFIGURATION

◆ PVIDEO_CHILD_TYPE

◆ PVIDEO_DEBUG_LEVEL

◆ PVIDEO_DEBUG_REPORT

typedef struct _VIDEO_DEBUG_REPORT* PVIDEO_DEBUG_REPORT

Definition at line 157 of file video.h.

◆ PVIDEO_DEVICE_DATA_TYPE

◆ PVIDEO_HARDWARE_CONFIGURATION_DATA

◆ PVIDEO_HW_CHILD_CALLBACK

typedef VP_STATUS(NTAPI * PVIDEO_HW_CHILD_CALLBACK) (PVOID HwDeviceExtension, PVOID ChildDeviceExtension)

Definition at line 311 of file video.h.

◆ PVIDEO_HW_FIND_ADAPTER

typedef VP_STATUS(NTAPI * PVIDEO_HW_FIND_ADAPTER) (IN PVOID HwDeviceExtension, IN PVOID HwContext, IN PWSTR ArgumentString, IN OUT PVIDEO_PORT_CONFIG_INFO ConfigInfo, OUT PUCHAR Again)

Definition at line 199 of file video.h.

◆ PVIDEO_HW_GET_CHILD_DESCRIPTOR

typedef VP_STATUS(NTAPI * PVIDEO_HW_GET_CHILD_DESCRIPTOR) (IN PVOID HwDeviceExtension, IN PVIDEO_CHILD_ENUM_INFO ChildEnumInfo, OUT PVIDEO_CHILD_TYPE VideoChildType, OUT PUCHAR pChildDescriptor, OUT PULONG UId, OUT PULONG pUnused)

Definition at line 277 of file video.h.

◆ PVIDEO_HW_INITIALIZATION_DATA

◆ PVIDEO_HW_INITIALIZE

typedef BOOLEAN(NTAPI * PVIDEO_HW_INITIALIZE) (IN PVOID HwDeviceExtension)

Definition at line 207 of file video.h.

◆ PVIDEO_HW_INTERRUPT

typedef BOOLEAN(NTAPI * PVIDEO_HW_INTERRUPT) (IN PVOID HwDeviceExtension)

Definition at line 211 of file video.h.

◆ PVIDEO_HW_LEGACYRESOURCES

typedef VOID(NTAPI * PVIDEO_HW_LEGACYRESOURCES) (IN ULONG VendorId, IN ULONG DeviceId, IN OUT PVIDEO_ACCESS_RANGE *LegacyResourceList, IN OUT PULONG LegacyResourceCount)

Definition at line 224 of file video.h.

◆ PVIDEO_HW_POWER_GET

typedef VP_STATUS(NTAPI * PVIDEO_HW_POWER_GET) (IN PVOID HwDeviceExtension, IN ULONG HwId, IN OUT PVIDEO_POWER_MANAGEMENT VideoPowerControl)

Definition at line 292 of file video.h.

◆ PVIDEO_HW_POWER_SET

typedef VP_STATUS(NTAPI * PVIDEO_HW_POWER_SET) (IN PVOID HwDeviceExtension, IN ULONG HwId, IN PVIDEO_POWER_MANAGEMENT VideoPowerControl)

Definition at line 286 of file video.h.

◆ PVIDEO_HW_QUERY_INTERFACE

typedef VP_STATUS(NTAPI * PVIDEO_HW_QUERY_INTERFACE) (IN PVOID HwDeviceExtension, IN OUT PQUERY_INTERFACE QueryInterface)

Definition at line 306 of file video.h.

◆ PVIDEO_HW_RESET_HW

typedef BOOLEAN(NTAPI * PVIDEO_HW_RESET_HW) (IN PVOID HwDeviceExtension, IN ULONG Columns, IN ULONG Rows)

Definition at line 316 of file video.h.

◆ PVIDEO_HW_START_DMA

typedef HW_DMA_RETURN(NTAPI * PVIDEO_HW_START_DMA) (PVOID HwDeviceExtension, PDMA pDma)

Definition at line 236 of file video.h.

◆ PVIDEO_HW_START_IO

typedef BOOLEAN(NTAPI * PVIDEO_HW_START_IO) (IN PVOID HwDeviceExtension, IN PVIDEO_REQUEST_PACKET RequestPacket)

Definition at line 339 of file video.h.

◆ PVIDEO_HW_TIMER

typedef VOID(NTAPI * PVIDEO_HW_TIMER) (IN PVOID HwDeviceExtension)

Definition at line 344 of file video.h.

◆ PVIDEO_I2C_CONTROL

◆ PVIDEO_PORT_AGP_INTERFACE

◆ PVIDEO_PORT_AGP_INTERFACE_2

◆ PVIDEO_PORT_CONFIG_INFO

◆ PVIDEO_PORT_DEBUG_REPORT_INTERFACE

◆ PVIDEO_PORT_GET_PROC_ADDRESS

typedef PVOID(NTAPI * PVIDEO_PORT_GET_PROC_ADDRESS) (IN PVOID HwDeviceExtension, IN PUCHAR FunctionName)

Definition at line 162 of file video.h.

◆ PVIDEO_PORT_I2C_INTERFACE

◆ PVIDEO_PORT_I2C_INTERFACE_2

◆ PVIDEO_PORT_INT10_INTERFACE

◆ PVIDEO_PORT_WCMEMORYPROTECTION_INTERFACE

◆ PVIDEO_READ_CLOCK_LINE

typedef BOOLEAN(NTAPI * PVIDEO_READ_CLOCK_LINE) (PVOID HwDeviceExtension)

Definition at line 358 of file video.h.

◆ PVIDEO_READ_DATA_LINE

typedef BOOLEAN(NTAPI * PVIDEO_READ_DATA_LINE) (PVOID HwDeviceExtension)

Definition at line 362 of file video.h.

◆ PVIDEO_REQUEST_PACKET

◆ PVIDEO_SYNCHRONIZE_PRIORITY

◆ PVIDEO_WAIT_VSYNC_ACTIVE

typedef VOID(NTAPI * PVIDEO_WAIT_VSYNC_ACTIVE) (PVOID HwDeviceExtension)

Definition at line 366 of file video.h.

◆ PVIDEO_WRITE_CLOCK_LINE

typedef VOID(NTAPI * PVIDEO_WRITE_CLOCK_LINE) (PVOID HwDeviceExtension, UCHAR Data)

Definition at line 348 of file video.h.

◆ PVIDEO_WRITE_DATA_LINE

typedef VOID(NTAPI * PVIDEO_WRITE_DATA_LINE) (PVOID HwDeviceExtension, UCHAR Data)

Definition at line 353 of file video.h.

◆ PVIDEO_X86_BIOS_ARGUMENTS

◆ PVP_DEVICE_DESCRIPTION

◆ PVP_DMA_ADAPTER

typedef struct __VP_DMA_ADAPTER* PVP_DMA_ADAPTER

Definition at line 159 of file video.h.

◆ PVP_POOL_TYPE

◆ PVP_SCATTER_GATHER_ELEMENT

◆ PVP_SCATTER_GATHER_LIST

◆ PVP_STATUS

typedef LONG * PVP_STATUS

Definition at line 153 of file video.h.

◆ PVPOSVERSIONINFO

◆ PVRB_SG

typedef struct __VRB_SG * PVRB_SG

◆ QUERY_INTERFACE

◆ RESTORE_WC_MEMORY

typedef VP_STATUS(NTAPI * RESTORE_WC_MEMORY) (IN PVOID Context, IN PVOID HwDeviceExtension)

Definition at line 485 of file video.h.

◆ STATUS_BLOCK

◆ VIDEO_ACCESS_RANGE

◆ VIDEO_CHILD_ENUM_INFO

◆ VIDEO_CHILD_STATE

◆ VIDEO_CHILD_STATE_CONFIGURATION

◆ VIDEO_CHILD_TYPE

◆ VIDEO_DEBUG_LEVEL

◆ VIDEO_DEVICE_DATA_TYPE

◆ VIDEO_HARDWARE_CONFIGURATION_DATA

◆ VIDEO_HW_INITIALIZATION_DATA

◆ VIDEO_I2C_CONTROL

◆ VIDEO_PORT_AGP_INTERFACE

◆ VIDEO_PORT_AGP_INTERFACE_2

◆ VIDEO_PORT_CONFIG_INFO

◆ VIDEO_PORT_DEBUG_REPORT_INTERFACE

◆ VIDEO_PORT_I2C_INTERFACE

◆ VIDEO_PORT_I2C_INTERFACE_2

◆ VIDEO_PORT_INT10_INTERFACE

◆ VIDEO_PORT_SERVICES

◆ VIDEO_PORT_WCMEMORYPROTECTION_INTERFACE

◆ VIDEO_REQUEST_PACKET

◆ VIDEO_SYNCHRONIZE_PRIORITY

◆ VIDEO_X86_BIOS_ARGUMENTS

◆ VP_DEVICE_DESCRIPTION

◆ VP_LOCK_OPERATION

◆ VP_POOL_TYPE

◆ VP_SCATTER_GATHER_ELEMENT

◆ VP_SCATTER_GATHER_LIST

◆ VP_STATUS

typedef LONG VP_STATUS

Definition at line 153 of file video.h.

◆ VPOSVERSIONINFO

◆ VRB_SG

Enumeration Type Documentation

◆ _DMA_FLAGS

Enumerator
VideoPortUnlockAfterDma 
VideoPortKeepPagesLocked 
VideoPortDmaInitOnly 

Definition at line 548 of file video.h.

◆ _HW_DMA_RETURN

Enumerator
DmaAsyncReturn 
DmaSyncReturn 

Definition at line 230 of file video.h.

230  {
enum _HW_DMA_RETURN HW_DMA_RETURN
enum _HW_DMA_RETURN * PHW_DMA_RETURN

◆ _VIDEO_CHILD_TYPE

Enumerator
Monitor 
NonPrimaryChip 
VideoChip 
Other 

Definition at line 269 of file video.h.

269  {
270  Monitor = 1,
272  VideoChip,
273  Other
Definition: video.h:273
enum _VIDEO_CHILD_TYPE VIDEO_CHILD_TYPE
Definition: video.h:270
enum _VIDEO_CHILD_TYPE * PVIDEO_CHILD_TYPE

◆ _VIDEO_DEVICE_DATA_TYPE

Enumerator
VpMachineData 
VpCmosData 
VpBusData 
VpControllerData 
VpMonitorData 

Definition at line 489 of file video.h.

489  {
490  VpMachineData = 0,
491  VpCmosData,
492  VpBusData,
enum _VIDEO_DEVICE_DATA_TYPE * PVIDEO_DEVICE_DATA_TYPE
enum _VIDEO_DEVICE_DATA_TYPE VIDEO_DEVICE_DATA_TYPE

◆ _VIDEO_PORT_SERVICES

Enumerator
VideoPortServicesAGP 
VideoPortServicesI2C 
VideoPortServicesHeadless 
VideoPortServicesInt10 
VideoPortServicesDebugReport 
VideoPortServicesWCMemoryProtection 

Definition at line 704 of file video.h.

◆ _VP_LOCK_OPERATION

Enumerator
VpReadAccess 
VpWriteAccess 
VpModifyAccess 

Definition at line 640 of file video.h.

640  {
641  VpReadAccess = 0,
enum _VP_LOCK_OPERATION VP_LOCK_OPERATION

◆ _VP_POOL_TYPE

Enumerator
VpNonPagedPool 
VpPagedPool 
VpNonPagedPoolCacheAligned 
VpPagedPoolCacheAligned 

Definition at line 541 of file video.h.

541  {
542  VpNonPagedPool = 0,
543  VpPagedPool,
enum _VP_POOL_TYPE * PVP_POOL_TYPE
enum _VP_POOL_TYPE VP_POOL_TYPE

◆ VIDEO_DEBUG_LEVEL

Enumerator
Error 
Warn 
Trace 
Info 

Definition at line 579 of file video.h.

579  {
580  Error = 0,
581  Warn,
582  Trace,
583  Info
enum VIDEO_DEBUG_LEVEL * PVIDEO_DEBUG_LEVEL
Definition: video.h:583
Definition: video.h:581
Definition: video.h:582
VIDEO_DEBUG_LEVEL
Definition: video.h:579
Definition: video.h:580

◆ VIDEO_SYNCHRONIZE_PRIORITY

Enumerator
VpLowPriority 
VpMediumPriority 
VpHighPriority 

Definition at line 534 of file video.h.

534  {
535  VpLowPriority = 0,
enum VIDEO_SYNCHRONIZE_PRIORITY * PVIDEO_SYNCHRONIZE_PRIORITY
VIDEO_SYNCHRONIZE_PRIORITY
Definition: video.h:534

Function Documentation

◆ DriverEntry()

ULONG NTAPI DriverEntry ( PVOID  Context1,
PVOID  Context2 
)

Definition at line 383 of file ParaNdis5-Driver.c.

384 {
388 
390 
391  DEBUG_ENTRY(0);
392  _LogOutString(0, __DATE__ " " __TIME__);
393 
395  DriverObject,
396  RegistryPath,
397  NULL
398  );
399 
400  if (DriverHandle)
401  {
402  NdisZeroMemory(&chars, sizeof(chars));
403  //NDIS version of the miniport
404  chars.MajorNdisVersion = NDIS_MINIPORT_MAJOR_VERSION;
405  chars.MinorNdisVersion = NDIS_MINIPORT_MINOR_VERSION;
406  //Init and destruction
407  chars.InitializeHandler = ParaNdis5_Initialize;
408  chars.HaltHandler = ParaNdis5_Halt;
409 
410  //Interrupt and DPC handling
411  chars.HandleInterruptHandler = ParaNdis5_HandleDPC;
412  chars.ISRHandler = ParaNdis5_MiniportISR;
413 
414  //Packet transfer - send path and notification on the send packet
415  chars.SendPacketsHandler = ParaNdis5_SendPackets;
416  chars.ReturnPacketHandler = ParaNdis5_ReturnPacket;
417 
418  //OID set\get
419  chars.SetInformationHandler = ParaNdis5_SetOID;
420  chars.QueryInformationHandler = ParaNdis5_QueryOID;
421 
422  //Reset
423  chars.ResetHandler = ParaNdis5_Reset;
424  chars.CheckForHangHandler = ParaNdis5_CheckForHang; //optional
425 
426  chars.CancelSendPacketsHandler = ParaNdis5_CancelSendPackets;
427  chars.PnPEventNotifyHandler = ParaNdis5_PnPEventNotify;
428  chars.AdapterShutdownHandler = ParaNdis5_Shutdown;
429 
431  DriverHandle,
432  &chars,
433  sizeof(chars));
434  }
435 
437  {
439  }
440  else if (DriverHandle)
441  {
442  DPrintf(0, ("NdisMRegisterMiniport failed"));
444  }
445  else
446  {
447  DPrintf(0, ("NdisMInitializeWrapper failed"));
448  }
449 
450  DEBUG_EXIT_STATUS(status ? 0 : 4, status);
451  return status;
452 }
void _LogOutString(int level, const char *s)
#define DEBUG_EXIT_STATUS(level, status)
Definition: kdebugprint.h:50
static NDIS_STATUS NTAPI ParaNdis5_Reset(OUT PBOOLEAN AddressingReset, IN NDIS_HANDLE MiniportAdapterContext)
#define DEBUG_ENTRY(level)
Definition: kdebugprint.h:49
VOID EXPORT NdisMRegisterUnloadHandler(IN NDIS_HANDLE NdisWrapperHandle, IN PDRIVER_UNLOAD UnloadHandler)
Definition: miniport.c:3151
int NDIS_STATUS
Definition: ntddndis.h:471
#define DPrintf(Level, Fmt)
Definition: kdebugprint.h:61
smooth NULL
Definition: ftsmooth.c:416
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
static NDIS_HANDLE DriverHandle
static VOID NTAPI ParaNdis5_Shutdown(IN NDIS_HANDLE MiniportAdapterContext)
VOID NTAPI ParaNdis5_HandleDPC(IN NDIS_HANDLE MiniportAdapterContext)
_In_z_ PWSTR RegistryPath
Definition: classp.h:1930
VOID EXPORT NdisTerminateWrapper(IN NDIS_HANDLE NdisWrapperHandle, IN PVOID SystemSpecific)
Definition: miniport.c:3012
VOID NTAPI ParaNdis5_PnPEventNotify(IN NDIS_HANDLE MiniportAdapterContext, IN NDIS_DEVICE_PNP_EVENT PnPEvent, IN PVOID InformationBuffer, IN ULONG InformationBufferLength)
NDIS_STATUS NTAPI ParaNdis5_QueryOID(IN NDIS_HANDLE MiniportAdapterContext, IN NDIS_OID Oid, IN PVOID InformationBuffer, IN ULONG InformationBufferLength, OUT PULONG BytesWritten, OUT PULONG BytesNeeded)
NDIS_STATUS NTAPI ParaNdis5_SetOID(IN NDIS_HANDLE MiniportAdapterContext, IN NDIS_OID Oid, IN PVOID InformationBuffer, IN ULONG InformationBufferLength, OUT PULONG BytesRead, OUT PULONG BytesNeeded)
#define NDIS_STATUS_SUCCESS
Definition: ndis.h:346
VOID NTAPI ParaNdis5_ReturnPacket(IN NDIS_HANDLE MiniportAdapterContext, IN PNDIS_PACKET Packet)
static NDIS_STATUS NTAPI ParaNdis5_Initialize(OUT PNDIS_STATUS OpenErrorStatus, OUT PUINT SelectedMediumIndex, IN PNDIS_MEDIUM MediumArray, IN UINT MediumArraySize, IN NDIS_HANDLE MiniportAdapterHandle, IN NDIS_HANDLE WrapperConfigurationContext)
static VOID NTAPI ParaNdis5_MiniportISR(OUT PBOOLEAN InterruptRecognized, OUT PBOOLEAN QueueMiniportHandleInterrupt, IN NDIS_HANDLE MiniportAdapterContext)
static BOOLEAN NTAPI ParaNdis5_CheckForHang(IN NDIS_HANDLE MiniportAdapterContext)
static VOID NTAPI ParaNdis5_Halt(IN NDIS_HANDLE MiniportAdapterContext)
VOID NTAPI ParaNdis5_CancelSendPackets(IN NDIS_HANDLE MiniportAdapterContext, IN PVOID CancelId)
void ParaNdis_DebugInitialize(PVOID DriverObject, PVOID RegistryPath)
#define NdisZeroMemory(Destination, Length)
Definition: ndis.h:3926
static VOID NTAPI ParaVirtualNICUnload(IN PDRIVER_OBJECT pDriverObject)
#define NdisMInitializeWrapper(NdisWrapperHandle, SystemSpecific1, SystemSpecific2, SystemSpecific3)
Definition: ndis.h:5592
NDIS_STATUS EXPORT NdisMRegisterMiniport(IN NDIS_HANDLE NdisWrapperHandle, IN PNDIS_MINIPORT_CHARACTERISTICS MiniportCharacteristics, IN UINT CharacteristicsLength)
Definition: miniport.c:2637
static SERVICE_STATUS status
Definition: service.c:31
#define NDIS_STATUS_FAILURE
Definition: ndis.h:465
VOID NTAPI ParaNdis5_SendPackets(IN NDIS_HANDLE MiniportAdapterContext, IN PPNDIS_PACKET PacketArray, IN UINT NumberOfPackets)
Definition: ps.c:97

◆ VideoPortAcquireDeviceLock()

VPAPI VOID NTAPI VideoPortAcquireDeviceLock ( IN PVOID  HwDeviceExtension)

Definition at line 1476 of file videoprt.c.

1478 {
1479  PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
1480  NTSTATUS Status;
1481 
1483 
1484  TRACE_(VIDEOPRT, "VideoPortAcquireDeviceLock\n");
1485  DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
1486  Status = KeWaitForMutexObject(&DeviceExtension->DeviceLock, Executive,
1487  KernelMode, FALSE, NULL);
1488  // ASSERT(Status == STATUS_SUCCESS);
1489 }
#define KeWaitForMutexObject
Definition: kefuncs.h:555
LONG NTSTATUS
Definition: precomp.h:26
#define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension)
Definition: videoprt.h:137
#define UNREFERENCED_LOCAL_VARIABLE(L)
Definition: ntbasedef.h:324
#define FALSE
Definition: types.h:117
smooth NULL
Definition: ftsmooth.c:416
#define TRACE_(x)
Definition: compat.h:76
Status
Definition: gdiplustypes.h:24

◆ VideoPortAcquireSpinLock()

VPAPI VOID NTAPI VideoPortAcquireSpinLock ( IN PVOID  HwDeviceExtension,
IN PSPIN_LOCK  SpinLock,
OUT PUCHAR  OldIrql 
)

Definition at line 63 of file spinlock.c.

67 {
68  TRACE_(VIDEOPRT, "VideoPortAcquireSpinLock\n");
70 }
VOID NTAPI KeAcquireSpinLock(PKSPIN_LOCK SpinLock, PKIRQL OldIrql)
Definition: spinlock.c:50
KSPIN_LOCK * PKSPIN_LOCK
Definition: env_spec_w32.h:73
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK SpinLock
Definition: iofuncs.h:798
#define TRACE_(x)
Definition: compat.h:76
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:790

◆ VideoPortAcquireSpinLockAtDpcLevel()

VPAPI VOID NTAPI VideoPortAcquireSpinLockAtDpcLevel ( IN PVOID  HwDeviceExtension,
IN PSPIN_LOCK  SpinLock 
)

Definition at line 77 of file spinlock.c.

80 {
81  TRACE_(VIDEOPRT, "VideoPortAcquireSpinLockAtDpcLevel\n");
83 }
VOID NTAPI KeAcquireSpinLockAtDpcLevel(IN PKSPIN_LOCK SpinLock)
Definition: spinlock.c:192
KSPIN_LOCK * PKSPIN_LOCK
Definition: env_spec_w32.h:73
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK SpinLock
Definition: iofuncs.h:798
#define TRACE_(x)
Definition: compat.h:76

◆ VideoPortAllocateBuffer()

VPAPI VP_STATUS NTAPI VideoPortAllocateBuffer ( IN PVOID  HwDeviceExtension,
IN ULONG  Size,
OUT PVOID Buffer 
)

Definition at line 945 of file resource.c.

949 {
950  TRACE_(VIDEOPRT, "VideoPortAllocateBuffer\n");
953 }
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
#define NO_ERROR
Definition: dderror.h:5
#define TAG_VIDEO_PORT_BUFFER
Definition: videoprt.h:39
smooth NULL
Definition: ftsmooth.c:416
Definition: bufpool.h:45
#define TRACE_(x)
Definition: compat.h:76
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:361

◆ VideoPortAllocateCommonBuffer()

VPAPI PVOID NTAPI VideoPortAllocateCommonBuffer ( IN PVOID  HwDeviceExtension,
IN PVP_DMA_ADAPTER  VpDmaAdapter,
IN ULONG  DesiredLength,
OUT PPHYSICAL_ADDRESS  LogicalAddress,
IN BOOLEAN  CacheEnabled,
PVOID  Reserved 
)

Definition at line 43 of file dma.c.

49 {
50  PVIP_DMA_ADAPTER Adapter = (PVIP_DMA_ADAPTER)VpDmaAdapter;
51 
52  /* check for valid arguments */
53  if (!Adapter || !Adapter->Adapter)
54  {
55  /* invalid parameter */
56  return NULL;
57  }
58 
59  /* allocate common buffer */
60  return Adapter->Adapter->DmaOperations->AllocateCommonBuffer(Adapter->Adapter, DesiredLength, LogicalAddress, CacheEnabled);
61 }
struct _DMA_OPERATIONS * DmaOperations
Definition: iotypes.h:2194
smooth NULL
Definition: ftsmooth.c:416
struct VIP_DMA_ADAPTER * PVIP_DMA_ADAPTER
PDMA_ADAPTER Adapter
Definition: dma.c:19

Referenced by VideoPortGetCommonBuffer().

◆ VideoPortAllocateContiguousMemory()

VPAPI PVOID NTAPI VideoPortAllocateContiguousMemory ( IN PVOID  HwDeviceExtension,
IN ULONG  NumberOfBytes,
IN PHYSICAL_ADDRESS  HighestAcceptableAddress 
)

Definition at line 1527 of file videoprt.c.

1532 {
1534 }
_Out_ PNDIS_HANDLE _Out_ PUINT _In_ PNDIS_STRING _In_ NDIS_PHYSICAL_ADDRESS HighestAcceptableAddress
Definition: ndis.h:3227
PVOID NTAPI MmAllocateContiguousMemory(IN SIZE_T NumberOfBytes, IN PHYSICAL_ADDRESS HighestAcceptableAddress)
Definition: contmem.c:626
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
Definition: iotypes.h:1002

◆ VideoPortAllocatePool()

VPAPI PVOID NTAPI VideoPortAllocatePool ( IN PVOID  HwDeviceExtension,
IN VP_POOL_TYPE  PoolType,
IN SIZE_T  NumberOfBytes,
IN ULONG  Tag 
)

Definition at line 918 of file resource.c.

923 {
924  TRACE_(VIDEOPRT, "VideoPortAllocatePool\n");
926 }
#define TRACE_(x)
Definition: compat.h:76
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
IN ULONG IN ULONG Tag
Definition: evtlib.h:159
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
Definition: iotypes.h:1002
_Must_inspect_result_ _In_ FLT_CONTEXT_TYPE _In_ SIZE_T _In_ POOL_TYPE PoolType
Definition: fltkernel.h:1444

Referenced by InitializeModeTable(), VbeGetVideoMemoryBaseAddress(), VBEInitialize(), and VbeSetColorLookup().

◆ VideoPortAssociateEventsWithDmaHandle()

VPAPI PDMA NTAPI VideoPortAssociateEventsWithDmaHandle ( IN PVOID  HwDeviceExtension,
IN OUT PVIDEO_REQUEST_PACKET  pVrp,
IN PVOID  MappedUserEvent,
IN PVOID  DisplayDriverEvent 
)

Definition at line 439 of file dma.c.

443 {
444  /* Deprecated */
445  return NULL;
446 }
smooth NULL
Definition: ftsmooth.c:416

◆ VideoPortCheckForDeviceExistence()

VPAPI BOOLEAN NTAPI VideoPortCheckForDeviceExistence ( IN PVOID  HwDeviceExtension,
IN USHORT  VendorId,
IN USHORT  DeviceId,
IN UCHAR  RevisionId,
IN USHORT  SubVendorId,
IN USHORT  SubSystemId,
IN ULONG  Flags 
)

Definition at line 1384 of file videoprt.c.

1392 {
1393  PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
1396  IO_STACK_LOCATION IoStack;
1397  ULONG PciFlags = 0;
1398  NTSTATUS Status;
1399  BOOL DevicePresent;
1400 
1401  TRACE_(VIDEOPRT, "VideoPortCheckForDeviceExistence\n");
1402 
1404  {
1405  WARN_(VIDEOPRT, "VideoPortCheckForDeviceExistence: Unknown flags 0x%lx\n", Flags & ~(CDE_USE_REVISION | CDE_USE_SUBSYSTEM_IDS));
1406  return FALSE;
1407  }
1408 
1409  DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
1410 
1412  PciDevicePresentInterface.Version = 1;
1414  IoStack.Parameters.QueryInterface.Version = PciDevicePresentInterface.Version;
1416  IoStack.Parameters.QueryInterface.InterfaceType =
1417  &GUID_PCI_DEVICE_PRESENT_INTERFACE;
1418  Status = IopInitiatePnpIrp(DeviceExtension->NextDeviceObject,
1420  if (!NT_SUCCESS(Status))
1421  {
1422  WARN_(VIDEOPRT, "IopInitiatePnpIrp() failed! (Status 0x%lx)\n", Status);
1423  return FALSE;
1424  }
1425 
1426  if (Flags & CDE_USE_REVISION)
1427  PciFlags |= PCI_USE_REVISION;
1429  PciFlags |= PCI_USE_SUBSYSTEM_IDS;
1430 
1431  DevicePresent = PciDevicePresentInterface.IsDevicePresent(
1432  VendorId, DeviceId, RevisionId,
1433  SubVendorId, SubSystemId, PciFlags);
1434 
1435  PciDevicePresentInterface.InterfaceDereference(PciDevicePresentInterface.Context);
1436 
1437  return DevicePresent;
1438 }
LONG NTSTATUS
Definition: precomp.h:26
#define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension)
Definition: videoprt.h:137
struct _PCI_DEVICE_PRESENT_INTERFACE PCI_DEVICE_PRESENT_INTERFACE
#define PCI_USE_REVISION
Definition: iotypes.h:839
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
#define FALSE
Definition: types.h:117
#define CDE_USE_REVISION
Definition: video.h:147
unsigned int BOOL
Definition: ntddk_ex.h:94
struct _INTERFACE * PINTERFACE
#define TRACE_(x)
Definition: compat.h:76
#define CDE_USE_SUBSYSTEM_IDS
Definition: video.h:146
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define IRP_MN_QUERY_INTERFACE
Status
Definition: gdiplustypes.h:24
PDEVICE_OBJECT NextDeviceObject
Definition: videoprt.h:89
static OUT PIO_STATUS_BLOCK IoStatusBlock
Definition: pipe.c:75
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
unsigned int ULONG
Definition: retypes.h:1
PCI_INTERFACE PciDevicePresentInterface
Definition: devhere.c:18
struct _NAMED_PIPE_CREATE_PARAMETERS * Parameters
Definition: iotypes.h:2779
NTSTATUS NTAPI IopInitiatePnpIrp(IN PDEVICE_OBJECT DeviceObject, IN PIO_STATUS_BLOCK IoStatusBlock, IN UCHAR MinorFunction, IN PIO_STACK_LOCATION Stack)
#define WARN_(ch,...)
Definition: debug.h:157
#define PCI_USE_SUBSYSTEM_IDS
Definition: iotypes.h:838

◆ VideoPortClearEvent()

VPAPI VOID NTAPI VideoPortClearEvent ( IN PVOID  HwDeviceExtension,
IN PEVENT  pEvent 
)

◆ VideoPortCompareMemory()

VPAPI ULONG NTAPI VideoPortCompareMemory ( IN PVOID  Source1,
IN PVOID  Source2,
IN SIZE_T  Length 
)

Referenced by VBEInitialize().

◆ VideoPortCompleteDma()

VPAPI VP_STATUS NTAPI VideoPortCompleteDma ( IN PVOID  HwDeviceExtension,
IN PVP_DMA_ADAPTER  VpDmaAdapter,
IN PVP_SCATTER_GATHER_LIST  VpScatterGather,
IN BOOLEAN  WriteToDevice 
)

Definition at line 453 of file dma.c.

457 {
458  KIRQL OldIrql;
459  PVIP_DMA_ADAPTER Adapter = (PVIP_DMA_ADAPTER)VpDmaAdapter;
460 
462  Adapter->Adapter->DmaOperations->PutScatterGatherList(Adapter->Adapter, (PSCATTER_GATHER_LIST)VpScatterGather, WriteToDevice);
464 
465  return NO_ERROR;
466 }
#define KeRaiseIrql(irql, oldIrql)
Definition: env_spec_w32.h:597
#define KeLowerIrql(oldIrql)
Definition: env_spec_w32.h:602
#define NO_ERROR
Definition: dderror.h:5
struct _DMA_OPERATIONS * DmaOperations
Definition: iotypes.h:2194
UCHAR KIRQL
Definition: env_spec_w32.h:591
struct VIP_DMA_ADAPTER * PVIP_DMA_ADAPTER
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:790
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
PDMA_ADAPTER Adapter
Definition: dma.c:19
struct _SCATTER_GATHER_LIST * PSCATTER_GATHER_LIST
Definition: iotypes.h:2103

◆ VideoPortCreateEvent()

VPAPI VP_STATUS NTAPI VideoPortCreateEvent ( IN PVOID  HwDeviceExtension,
IN ULONG  EventFlag,
IN PVOID  Unused,
OUT PEVENT ppEvent 
)

Referenced by VmxFindAdapter().

◆ VideoPortCreateSecondaryDisplay()

VPAPI VP_STATUS NTAPI VideoPortCreateSecondaryDisplay ( IN PVOID  HwDeviceExtension,
IN OUT PVOID SecondaryDeviceExtension,
IN ULONG  ulFlag 
)

Definition at line 1299 of file videoprt.c.

1303 {
1304  UNIMPLEMENTED;
1305  return ERROR_DEV_NOT_EXIST;
1306 }
#define UNIMPLEMENTED
Definition: debug.h:115
#define ERROR_DEV_NOT_EXIST
Definition: dderror.h:8

◆ VideoPortCreateSpinLock()

VPAPI VP_STATUS NTAPI VideoPortCreateSpinLock ( IN PVOID  HwDeviceExtension,
OUT PSPIN_LOCK SpinLock 
)

Definition at line 32 of file spinlock.c.

35 {
36  TRACE_(VIDEOPRT, "VideoPortCreateSpinLock\n");
38  if (*SpinLock == NULL)
41  return NO_ERROR;
42 }
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
KSPIN_LOCK * PKSPIN_LOCK
Definition: env_spec_w32.h:73
#define NO_ERROR
Definition: dderror.h:5
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK SpinLock
Definition: iofuncs.h:798
FORCEINLINE VOID KeInitializeSpinLock(_Out_ PKSPIN_LOCK SpinLock)
Definition: kefuncs.h:238
smooth NULL
Definition: ftsmooth.c:416
#define TRACE_(x)
Definition: compat.h:76
#define ExAllocatePool(type, size)
Definition: fbtusb.h:44
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72

◆ VideoPortDbgReportComplete()

VPAPI VOID NTAPI VideoPortDbgReportComplete ( IN OUT PVIDEO_DEBUG_REPORT  pReport)

◆ VideoPortDbgReportCreate()

VPAPI PVIDEO_DEBUG_REPORT NTAPI VideoPortDbgReportCreate ( IN PVOID  HwDeviceExtension,
IN ULONG  ulCode,
IN ULONG_PTR  ulpArg1,
IN ULONG_PTR  ulpArg2,
IN ULONG_PTR  ulpArg3,
IN ULONG_PTR  ulpArg4 
)

◆ VideoPortDbgReportSecondaryData()

VPAPI BOOLEAN NTAPI VideoPortDbgReportSecondaryData ( IN OUT PVIDEO_DEBUG_REPORT  pReport,
IN PVOID  pvData,
IN ULONG  ulDataSize 
)

◆ VideoPortDDCMonitorHelper()

VPAPI BOOLEAN NTAPI VideoPortDDCMonitorHelper ( IN PVOID  HwDeviceExtension,
IN PVOID  DDCControl,
IN OUT PUCHAR  EdidBuffer,
IN ULONG  EdidBufferSize 
)

Referenced by VBEReadEdidUsingSCI().

◆ VideoPortDebugPrint()

◆ VideoPortDeleteEvent()

VPAPI VP_STATUS NTAPI VideoPortDeleteEvent ( IN PVOID  HwDeviceExtension,
IN PEVENT  pEvent 
)

◆ VideoPortDeleteSpinLock()

VPAPI VP_STATUS NTAPI VideoPortDeleteSpinLock ( IN PVOID  HwDeviceExtension,
IN PSPIN_LOCK  SpinLock 
)

Definition at line 49 of file spinlock.c.

52 {
53  TRACE_(VIDEOPRT, "VideoPortDeleteSpinLock\n");
55  return NO_ERROR;
56 }
#define NO_ERROR
Definition: dderror.h:5
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK SpinLock
Definition: iofuncs.h:798
#define TRACE_(x)
Definition: compat.h:76
#define ExFreePool(addr)
Definition: env_spec_w32.h:352

◆ VideoPortDisableInterrupt()

VPAPI VP_STATUS NTAPI VideoPortDisableInterrupt ( IN PVOID  HwDeviceExtension)

Definition at line 154 of file interrupt.c.

155 {
156 #ifndef _M_AMD64
157  PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
158 
159  /* Get the device extension */
160  DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
161 
162  /* Fail if the driver didn't register an ISR */
163  if (!DeviceExtension->DriverExtension->InitializationData.HwInterrupt)
164  {
165  /* No ISR, no interrupts */
166  return ERROR_INVALID_FUNCTION;
167  }
168 
169  /* Disable the interrupt and return */
170  HalDisableSystemInterrupt(DeviceExtension->InterruptVector, 0);
171  return NO_ERROR;
172 #else
173  /* FIXME: Function still present? If so what to use instead of HalDisableSystemInterrupt? */
175  return ERROR_INVALID_FUNCTION;
176 #endif
177 }
VIDEO_PORT_DRIVER_EXTENSION * DriverExtension
Definition: videoprt.h:103
#define ERROR_INVALID_FUNCTION
Definition: dderror.h:6
VIDEO_HW_INITIALIZATION_DATA InitializationData
Definition: videoprt.h:72
#define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension)
Definition: videoprt.h:137
#define NO_ERROR
Definition: dderror.h:5
VOID NTAPI HalDisableSystemInterrupt(IN ULONG Vector, IN KIRQL Irql)
Definition: pic.c:309
PVIDEO_HW_INTERRUPT HwInterrupt
Definition: video.h:668
#define UNIMPLEMENTED
Definition: debug.h:115

◆ VideoPortDoDma()

VPAPI PDMA NTAPI VideoPortDoDma ( IN PVOID  HwDeviceExtension,
IN PDMA  pDma,
IN DMA_FLAGS  DmaFlags 
)

Definition at line 426 of file dma.c.

429 {
430  /* Deprecated */
431  return NULL;
432 }
smooth NULL
Definition: ftsmooth.c:416

◆ VideoPortEnableInterrupt()

VPAPI VP_STATUS NTAPI VideoPortEnableInterrupt ( IN PVOID  HwDeviceExtension)

Definition at line 116 of file interrupt.c.

117 {
118 #ifndef _M_AMD64
119  PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
120  BOOLEAN InterruptValid;
121 
122  /* Get the device extension */
123  DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
124 
125  /* Fail if the driver didn't register an ISR */
126  if (!DeviceExtension->DriverExtension->InitializationData.HwInterrupt)
127  {
128  /* No ISR, no interrupts */
129  return ERROR_INVALID_FUNCTION;
130  }
131 
132  /* Re-enable the interrupt and return */
133  InterruptValid = HalEnableSystemInterrupt(DeviceExtension->InterruptVector,
134  0,
135  DeviceExtension->InterruptLevel);
136 
137  /* Make sure the interrupt was valid */
138  ASSERT(InterruptValid == TRUE);
139 
140  /* Return to caller */
141  return NO_ERROR;
142 #else
143  /* FIXME: Function still present? If so what to use instead of HalEnableSystemInterrupt? */
145  return ERROR_INVALID_FUNCTION;
146 #endif
147 }
BOOLEAN NTAPI HalEnableSystemInterrupt(IN ULONG Vector, IN KIRQL Irql, IN KINTERRUPT_MODE InterruptMode)
Definition: pic.c:295
VIDEO_PORT_DRIVER_EXTENSION * DriverExtension
Definition: videoprt.h:103
#define ERROR_INVALID_FUNCTION
Definition: dderror.h:6
#define TRUE
Definition: types.h:120
VIDEO_HW_INITIALIZATION_DATA InitializationData
Definition: videoprt.h:72
#define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension)
Definition: videoprt.h:137
#define NO_ERROR
Definition: dderror.h:5
unsigned char BOOLEAN
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
PVIDEO_HW_INTERRUPT HwInterrupt
Definition: video.h:668
#define UNIMPLEMENTED
Definition: debug.h:115

◆ VideoPortEnumerateChildren()

VPAPI VP_STATUS NTAPI VideoPortEnumerateChildren ( IN PVOID  HwDeviceExtension,
IN PVOID  Reserved 
)

Definition at line 1125 of file videoprt.c.

1128 {
1129  PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
1130  ULONG Status;
1131  VIDEO_CHILD_ENUM_INFO ChildEnumInfo;
1132  BOOLEAN bHaveLastMonitorID = FALSE;
1133  UCHAR LastMonitorID[10];
1134  ULONG Unused;
1135  UINT i;
1136  PDEVICE_OBJECT ChildDeviceObject;
1137  PVIDEO_PORT_CHILD_EXTENSION ChildExtension;
1138 
1139  INFO_(VIDEOPRT, "Starting child device probe\n");
1140  DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
1142  {
1143  WARN_(VIDEOPRT, "Miniport's HwGetVideoChildDescriptor is NULL!\n");
1144  return NO_ERROR;
1145  }
1146 
1147  if (!IsListEmpty(&DeviceExtension->ChildDeviceList))
1148  {
1149  ERR_(VIDEOPRT, "FIXME: Support calling VideoPortEnumerateChildren again!\n");
1150  return NO_ERROR;
1151  }
1152 
1153  /* Enumerate the children */
1154  for (i = 1; ; i++)
1155  {
1156  Status = IoCreateDevice(DeviceExtension->DriverObject,
1157  sizeof(VIDEO_PORT_CHILD_EXTENSION) +
1159  NULL,
1162  FALSE,
1163  &ChildDeviceObject);
1164  if (!NT_SUCCESS(Status))
1165  return Status;
1166 
1167  ChildExtension = ChildDeviceObject->DeviceExtension;
1168 
1169  RtlZeroMemory(ChildExtension,
1170  sizeof(VIDEO_PORT_CHILD_EXTENSION) +
1172 
1173  ChildExtension->Common.Fdo = FALSE;
1174  ChildExtension->ChildId = i;
1175  ChildExtension->PhysicalDeviceObject = ChildDeviceObject;
1176  ChildExtension->DriverObject = DeviceExtension->DriverObject;
1177 
1178  /* Setup the ChildEnumInfo */
1179  ChildEnumInfo.Size = sizeof(ChildEnumInfo);
1180  ChildEnumInfo.ChildDescriptorSize = sizeof(ChildExtension->ChildDescriptor);
1181  ChildEnumInfo.ACPIHwId = 0;
1182 
1184  ChildEnumInfo.ChildHwDeviceExtension = VIDEO_PORT_GET_CHILD_EXTENSION(ChildExtension);
1185  else
1186  ChildEnumInfo.ChildHwDeviceExtension = NULL;
1187 
1188  ChildEnumInfo.ChildIndex = ChildExtension->ChildId;
1189 
1190  INFO_(VIDEOPRT, "Probing child: %d\n", ChildEnumInfo.ChildIndex);
1192  HwDeviceExtension,
1193  &ChildEnumInfo,
1194  &ChildExtension->ChildType,
1195  ChildExtension->ChildDescriptor,
1196  &ChildExtension->ChildId,
1197  &Unused);
1199  {
1200  if (ChildExtension->ChildType == Monitor)
1201  {
1202  // Check if the EDID is valid
1203  if (ChildExtension->ChildDescriptor[0] == 0x00 &&
1204  ChildExtension->ChildDescriptor[1] == 0xFF &&
1205  ChildExtension->ChildDescriptor[2] == 0xFF &&
1206  ChildExtension->ChildDescriptor[3] == 0xFF &&
1207  ChildExtension->ChildDescriptor[4] == 0xFF &&
1208  ChildExtension->ChildDescriptor[5] == 0xFF &&
1209  ChildExtension->ChildDescriptor[6] == 0xFF &&
1210  ChildExtension->ChildDescriptor[7] == 0x00)
1211  {
1212  if (bHaveLastMonitorID)
1213  {
1214  // Compare the previous monitor ID with the current one, break the loop if they are identical
1215  if (RtlCompareMemory(LastMonitorID, &ChildExtension->ChildDescriptor[8], sizeof(LastMonitorID)) == sizeof(LastMonitorID))
1216  {
1217  INFO_(VIDEOPRT, "Found identical Monitor ID two times, stopping enumeration\n");
1218  IoDeleteDevice(ChildDeviceObject);
1219  break;
1220  }
1221  }
1222 
1223  // Copy 10 bytes from the EDID, which can be used to uniquely identify the monitor
1224  RtlCopyMemory(LastMonitorID, &ChildExtension->ChildDescriptor[8], sizeof(LastMonitorID));
1225  bHaveLastMonitorID = TRUE;
1226 
1227  /* Mark it valid */
1228  ChildExtension->EdidValid = TRUE;
1229  }
1230  else
1231  {
1232  /* Mark it invalid */
1233  ChildExtension->EdidValid = FALSE;
1234  // FIXME: the following break workarounds CORE-16695
1235  // but prevents graphic cards to return an invalid
1236  // EDID as first child, and a valid one as second child.
1237  break;
1238  }
1239  }
1240  }
1241  else if (Status == VIDEO_ENUM_INVALID_DEVICE)
1242  {
1243  WARN_(VIDEOPRT, "Child device %d is invalid!\n", ChildEnumInfo.ChildIndex);
1244  IoDeleteDevice(ChildDeviceObject);
1245  continue;
1246  }
1247  else if (Status == VIDEO_ENUM_NO_MORE_DEVICES)
1248  {
1249  INFO_(VIDEOPRT, "End of child enumeration! (%d children enumerated)\n", i - 1);
1250  IoDeleteDevice(ChildDeviceObject);
1251  break;
1252  }
1253  else
1254  {
1255  WARN_(VIDEOPRT, "HwGetVideoChildDescriptor returned unknown status code 0x%x!\n", Status);
1256  IoDeleteDevice(ChildDeviceObject);
1257  break;
1258  }
1259 
1260  if (ChildExtension->ChildType == Monitor)
1261  {
1262  UINT j;
1263  PUCHAR p = ChildExtension->ChildDescriptor;
1264  INFO_(VIDEOPRT, "Monitor device enumerated! (ChildId = 0x%x)\n", ChildExtension->ChildId);
1265  for (j = 0; j < sizeof (ChildExtension->ChildDescriptor); j += 8)
1266  {
1267  INFO_(VIDEOPRT, "%02x %02x %02x %02x %02x %02x %02x %02x\n",
1268  p[j + 0], p[j + 1], p[j + 2], p[j + 3],
1269  p[j + 4], p[j + 5], p[j + 6], p[j + 7]);
1270  }
1271  }
1272  else if (ChildExtension->ChildType == Other)
1273  {
1274  INFO_(VIDEOPRT, "\"Other\" device enumerated: DeviceId = %S\n", (PWSTR)ChildExtension->ChildDescriptor);
1275  }
1276  else
1277  {
1278  ERR_(VIDEOPRT, "HwGetVideoChildDescriptor returned unsupported type: %d\n", ChildExtension->ChildType);
1279  }
1280 
1281  /* Clear the init flag */
1282  ChildDeviceObject->Flags &= ~DO_DEVICE_INITIALIZING;
1283 
1284  InsertTailList(&DeviceExtension->ChildDeviceList,
1285  &ChildExtension->ListEntry);
1286  }
1287 
1288  /* Trigger reenumeration by the PnP manager */
1290 
1291  return NO_ERROR;
1292 }
#define DO_DEVICE_INITIALIZING
Definition: env_spec_w32.h:399
_Must_inspect_result_ typedef _In_ PVOID Unused
Definition: iotypes.h:1133
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
VIDEO_CHILD_TYPE ChildType
Definition: videoprt.h:118
#define INFO_(ch,...)
Definition: debug.h:159
PVIDEO_HW_GET_CHILD_DESCRIPTOR HwGetVideoChildDescriptor
Definition: video.h:677
VIDEO_PORT_DRIVER_EXTENSION * DriverExtension
Definition: videoprt.h:103
#define TRUE
Definition: types.h:120
uint16_t * PWSTR
Definition: typedefs.h:56
VIDEO_HW_INITIALIZATION_DATA InitializationData
Definition: videoprt.h:72
unsigned char * PUCHAR
Definition: retypes.h:3
#define ERR_(ch,...)
Definition: debug.h:156
ULONG ChildDescriptorSize
Definition: video.h:262
#define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension)
Definition: videoprt.h:137
#define InsertTailList(ListHead, Entry)
#define NO_ERROR
Definition: dderror.h:5
_Must_inspect_result_ FORCEINLINE BOOLEAN IsListEmpty(_In_ const LIST_ENTRY *ListHead)
Definition: rtlfuncs.h:57
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define FILE_DEVICE_CONTROLLER
Definition: winioctl.h:109
#define FALSE
Definition: types.h:117
PDEVICE_OBJECT PhysicalDeviceObject
Definition: videoprt.h:87
#define VIDEO_PORT_GET_CHILD_EXTENSION(MiniportExtension)
Definition: videoprt.h:131
VIDEO_PORT_COMMON_EXTENSION Common
Definition: videoprt.h:115
PVOID DeviceExtension
Definition: env_spec_w32.h:418
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
#define VIDEO_ENUM_MORE_DEVICES
Definition: video.h:139
PDRIVER_OBJECT DriverObject
Definition: videoprt.h:123
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
Definition: video.h:273
unsigned char UCHAR
Definition: xmlstorage.h:181
Status
Definition: gdiplustypes.h:24
PDRIVER_OBJECT DriverObject
Definition: videoprt.h:86
VOID NTAPI IoDeleteDevice(IN PDEVICE_OBJECT DeviceObject)
Definition: device.c:1251
VOID NTAPI IoInvalidateDeviceRelations(IN PDEVICE_OBJECT DeviceObject, IN DEVICE_RELATION_TYPE Type)
Definition: pnpmgr.c:2478
Definition: video.h:270
unsigned int UINT
Definition: ndis.h:50
PDEVICE_OBJECT PhysicalDeviceObject
Definition: videoprt.h:124
unsigned int ULONG
Definition: retypes.h:1
NTSTATUS NTAPI IoCreateDevice(IN PDRIVER_OBJECT DriverObject, IN ULONG DeviceExtensionSize, IN PUNICODE_STRING DeviceName, IN DEVICE_TYPE DeviceType, IN ULONG DeviceCharacteristics, IN BOOLEAN Exclusive, OUT PDEVICE_OBJECT *DeviceObject)
Definition: device.c:1031
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
PVOID ChildHwDeviceExtension
Definition: video.h:265
#define FILE_DEVICE_SECURE_OPEN
Definition: cdrw_usr.h:46
GLfloat GLfloat p
Definition: glext.h:8902
#define VIDEO_ENUM_NO_MORE_DEVICES
Definition: video.h:140
#define WARN_(ch,...)
Definition: debug.h:157
#define RtlCompareMemory(s1, s2, l)
Definition: env_spec_w32.h:465
#define VIDEO_ENUM_INVALID_DEVICE
Definition: video.h:141

Referenced by IntVideoPortFindAdapter(), and VBEInitialize().

◆ VideoPortFlushRegistry()

VPAPI VP_STATUS NTAPI VideoPortFlushRegistry ( PVOID  HwDeviceExtension)

Definition at line 29 of file stubs.c.

31 {
33  return 0;
34 }
#define UNIMPLEMENTED
Definition: stubs.c:20

◆ VideoPortFreeCommonBuffer()

VPAPI VOID NTAPI VideoPortFreeCommonBuffer ( IN PVOID  HwDeviceExtension,
IN ULONG  Length,
IN PVOID  VirtualAddress,
IN PHYSICAL_ADDRESS  LogicalAddress,
IN BOOLEAN  CacheEnabled 
)

Definition at line 187 of file dma.c.

192 {
193  PVIP_DMA_ADAPTER VpDmaAdapter;
194  PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
195 
196  /* sanity check */
197  ASSERT(!IsListEmpty(&DeviceExtension->DmaAdapterList));
198 
199  /* grab first dma adapter */
200  VpDmaAdapter = (PVIP_DMA_ADAPTER)CONTAINING_RECORD(DeviceExtension->DmaAdapterList.Flink, VIP_DMA_ADAPTER, Entry);
201 
202  /* sanity checks */
203  ASSERT(VpDmaAdapter->HwDeviceExtension == HwDeviceExtension);
204  ASSERT(VpDmaAdapter->Adapter != NULL);
205  ASSERT(VpDmaAdapter->MapRegisters != 0);
206 
207  VideoPortReleaseCommonBuffer(HwDeviceExtension, (PVP_DMA_ADAPTER)VpDmaAdapter, Length, LogicalAddress, VirtualAddress, CacheEnabled);
208 }
PVOID HwDeviceExtension
Definition: dma.c:21
#define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension)
Definition: videoprt.h:137
_Must_inspect_result_ FORCEINLINE BOOLEAN IsListEmpty(_In_ const LIST_ENTRY *ListHead)
Definition: rtlfuncs.h:57
smooth NULL
Definition: ftsmooth.c:416
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
struct __VP_DMA_ADAPTER * PVP_DMA_ADAPTER
Definition: video.h:159
struct VIP_DMA_ADAPTER * PVIP_DMA_ADAPTER
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
_In_ ULONG _In_ BOOLEAN _Must_inspect_result_ PVOID * VirtualAddress
Definition: ndis.h:3791
ULONG MapRegisters
Definition: dma.c:20
VOID NTAPI VideoPortReleaseCommonBuffer(IN PVOID HwDeviceExtension, IN PVP_DMA_ADAPTER VpDmaAdapter, IN ULONG Length, IN PHYSICAL_ADDRESS LogicalAddress, IN PVOID VirtualAddress, IN BOOLEAN CacheEnabled)
Definition: dma.c:68
PDMA_ADAPTER Adapter
Definition: dma.c:19
base of all file and directory entries
Definition: entries.h:82

◆ VideoPortFreeDeviceBase()

VPAPI VOID NTAPI VideoPortFreeDeviceBase ( IN PVOID  HwDeviceExtension,
IN PVOID  MappedAddress 
)

Definition at line 471 of file resource.c.

474 {
475  TRACE_(VIDEOPRT, "VideoPortFreeDeviceBase\n");
477  VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension),
478  MappedAddress);
479 }
#define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension)
Definition: videoprt.h:137
#define TRACE_(x)
Definition: compat.h:76
VOID NTAPI IntVideoPortUnmapMemory(IN PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension, IN PVOID MappedAddress)
Definition: resource.c:398

Referenced by InitializeModeTable().

◆ VideoPortFreePool()

VPAPI VOID NTAPI VideoPortFreePool ( IN PVOID  HwDeviceExtension,
IN PVOID  Ptr 
)

Definition at line 933 of file resource.c.

936 {
937  ExFreePool(Ptr);
938 }
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
Definition: fsrtlfuncs.h:898
#define ExFreePool(addr)
Definition: env_spec_w32.h:352

Referenced by InitializeModeTable(), VbeGetVideoMemoryBaseAddress(), and VbeSetColorLookup().

◆ VideoPortGetAccessRanges()

VPAPI VP_STATUS NTAPI VideoPortGetAccessRanges ( IN PVOID  HwDeviceExtension,
IN ULONG  NumRequestedResources,
IN PIO_RESOURCE_DESCRIPTOR RequestedResources  OPTIONAL,
IN ULONG  NumAccessRanges,
OUT PVIDEO_ACCESS_RANGE  AccessRanges,
IN PVOID  VendorId,
IN PVOID  DeviceId,
OUT PULONG  Slot 
)

Referenced by XboxVmpFindAdapter().

◆ VideoPortGetAssociatedDeviceExtension()

VPAPI PVOID NTAPI VideoPortGetAssociatedDeviceExtension ( IN PVOID  DeviceObject)

Definition at line 1329 of file videoprt.c.

1331 {
1332  PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
1333 
1334  TRACE_(VIDEOPRT, "VideoPortGetAssociatedDeviceExtension\n");
1335  DeviceExtension = ((PDEVICE_OBJECT)DeviceObject)->DeviceExtension;
1336  if (!DeviceExtension)
1337  return NULL;
1338  return DeviceExtension->MiniPortDeviceExtension;
1339 }
struct _DEVICE_OBJECT * PDEVICE_OBJECT
smooth NULL
Definition: ftsmooth.c:416
#define TRACE_(x)
Definition: compat.h:76
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1569

◆ VideoPortGetAssociatedDeviceID()

VPAPI ULONG NTAPI VideoPortGetAssociatedDeviceID ( IN PVOID  DeviceObject)

Definition at line 38 of file stubs.c.

40 {
42  return 0;
43 }
#define UNIMPLEMENTED
Definition: stubs.c:20

◆ VideoPortGetBusData()

VPAPI ULONG NTAPI VideoPortGetBusData ( IN PVOID  HwDeviceExtension,
IN BUS_DATA_TYPE  BusDataType,
IN ULONG  SlotNumber,
IN OUT PVOID  Buffer,
IN ULONG  Offset,
IN ULONG  Length 
)

◆ VideoPortGetBytesUsed()

VPAPI ULONG NTAPI VideoPortGetBytesUsed ( IN PVOID  HwDeviceExtension,
IN PDMA  pDma 
)

Definition at line 48 of file stubs.c.

51 {
53  return 0;
54 }
#define UNIMPLEMENTED
Definition: stubs.c:20

◆ VideoPortGetCommonBuffer()

VPAPI PVOID NTAPI VideoPortGetCommonBuffer ( IN PVOID  HwDeviceExtension,
IN ULONG  DesiredLength,
IN ULONG  Alignment,
OUT PPHYSICAL_ADDRESS  LogicalAddress,
OUT PULONG  pActualLength,
IN BOOLEAN  CacheEnabled 
)

Definition at line 215 of file dma.c.

221 {
222  PVOID Result;
223  PVIP_DMA_ADAPTER VpDmaAdapter;
224  PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
225 
226  /* maximum palette size */
227  if (DesiredLength > 262144)
228  {
229  /* size exceeded */
230  return NULL;
231  }
232 
233  if (IsListEmpty(&DeviceExtension->DmaAdapterList))
234  {
235  /* no adapter available */
236  return NULL;
237  }
238 
239  /* grab first dma adapter */
240  VpDmaAdapter = (PVIP_DMA_ADAPTER)CONTAINING_RECORD(DeviceExtension->DmaAdapterList.Flink, VIP_DMA_ADAPTER, Entry);
241 
242  /* sanity checks */
243  ASSERT(VpDmaAdapter->HwDeviceExtension == HwDeviceExtension);
244  ASSERT(VpDmaAdapter->Adapter != NULL);
245  ASSERT(VpDmaAdapter->MapRegisters != 0);
246 
247  /* allocate common buffer */
248  Result = VideoPortAllocateCommonBuffer(HwDeviceExtension, (PVP_DMA_ADAPTER)VpDmaAdapter, DesiredLength, LogicalAddress, CacheEnabled, NULL);
249 
250  if (Result)
251  {
252  /* store length */
253  *pActualLength = DesiredLength;
254  }
255  else
256  {
257  /* failed to allocate common buffer */
258  *pActualLength = 0;
259  }
260 
261  return Result;
262 }
PVOID HwDeviceExtension
Definition: dma.c:21
#define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension)
Definition: videoprt.h:137
_Must_inspect_result_ FORCEINLINE BOOLEAN IsListEmpty(_In_ const LIST_ENTRY *ListHead)
Definition: rtlfuncs.h:57
smooth NULL
Definition: ftsmooth.c:416
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:426
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
PVOID NTAPI VideoPortAllocateCommonBuffer(IN PVOID HwDeviceExtension, IN PVP_DMA_ADAPTER VpDmaAdapter, IN ULONG DesiredLength, OUT PPHYSICAL_ADDRESS LogicalAddress, IN BOOLEAN CacheEnabled, PVOID Reserved)
Definition: dma.c:43
struct __VP_DMA_ADAPTER * PVP_DMA_ADAPTER
Definition: video.h:159
struct VIP_DMA_ADAPTER * PVIP_DMA_ADAPTER
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
ULONG MapRegisters
Definition: dma.c:20
PDMA_ADAPTER Adapter
Definition: dma.c:19
base of all file and directory entries
Definition: entries.h:82

◆ VideoPortGetCurrentIrql()

VPAPI UCHAR NTAPI VideoPortGetCurrentIrql ( VOID  )

Definition at line 833 of file videoprt.c.

834 {
835  return KeGetCurrentIrql();
836 }
#define KeGetCurrentIrql()
Definition: env_spec_w32.h:706

◆ VideoPortGetDeviceBase()

VPAPI PVOID NTAPI VideoPortGetDeviceBase ( IN PVOID  HwDeviceExtension,
IN PHYSICAL_ADDRESS  IoAddress,
IN ULONG  NumberOfUchars,
IN UCHAR  InIoSpace 
)

Definition at line 450 of file resource.c.

455 {
456  TRACE_(VIDEOPRT, "VideoPortGetDeviceBase\n");
457  return IntVideoPortMapMemory(
458  VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension),
459  IoAddress,
460  NumberOfUchars,
461  InIoSpace,
462  NULL,
463  NULL);
464 }
#define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension)
Definition: videoprt.h:137
smooth NULL
Definition: ftsmooth.c:416
#define TRACE_(x)
Definition: compat.h:76
PVOID NTAPI IntVideoPortMapMemory(IN PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension, IN PHYSICAL_ADDRESS IoAddress, IN ULONG NumberOfUchars, IN ULONG InIoSpace, IN HANDLE ProcessHandle, OUT VP_STATUS *Status)
Definition: resource.c:243

Referenced by InitializeModeTable(), and VgaFindAdapter().

◆ VideoPortGetDeviceData()

VPAPI VP_STATUS NTAPI VideoPortGetDeviceData ( IN PVOID  HwDeviceExtension,
IN VIDEO_DEVICE_DATA_TYPE  DeviceDataType,
IN PMINIPORT_QUERY_DEVICE_ROUTINE  CallbackRoutine,
IN PVOID  Context 
)

Definition at line 902 of file resource.c.

907 {
908  TRACE_(VIDEOPRT, "VideoPortGetDeviceData\n");
910  return ERROR_INVALID_FUNCTION;
911 }
#define ERROR_INVALID_FUNCTION
Definition: dderror.h:6
#define TRACE_(x)
Definition: compat.h:76
#define UNIMPLEMENTED
Definition: debug.h:115

Referenced by VgaFindAdapter().

◆ VideoPortGetDmaAdapter()

VPAPI PVP_DMA_ADAPTER NTAPI VideoPortGetDmaAdapter ( IN PVOID  HwDeviceExtension,
IN PVP_DEVICE_DESCRIPTION  VpDeviceDescription 
)

Definition at line 120 of file dma.c.

122 {
124  PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
126  PVIP_DMA_ADAPTER Adapter;
127  PDMA_ADAPTER DmaAdapter;
128 
129  /* allocate private adapter structure */
130  Adapter = ExAllocatePool(NonPagedPool, sizeof(VIP_DMA_ADAPTER));
131  if (!Adapter)
132  {
133  /* failed to allocate adapter structure */
134  return NULL;
135  }
136 
137  /* Zero the structure */
139  sizeof(DEVICE_DESCRIPTION));
140 
141  /* Initialize the structure */
146 
147  /* Copy data from caller's device extension */
148  DeviceDescription.ScatterGather = VpDeviceExtension->ScatterGather;
149  DeviceDescription.Dma32BitAddresses = VpDeviceExtension->Dma32BitAddresses;
150  DeviceDescription.Dma64BitAddresses = VpDeviceExtension->Dma64BitAddresses;
151  DeviceDescription.MaximumLength = VpDeviceExtension->MaximumLength;
152 
153  /* Copy data from the internal device extension */
154  DeviceDescription.BusNumber = DeviceExtension->SystemIoBusNumber;
156 
157  /* acquire dma adapter */
159  if (!DmaAdapter)
160  {
161  /* failed to acquire dma */
162  ExFreePool(Adapter);
163  return NULL;
164  }
165 
166  /* store dma adapter */
167  Adapter->Adapter = DmaAdapter;
168 
169  /* store map register count */
171 
172  /* store hw device extension */
173  Adapter->HwDeviceExtension = HwDeviceExtension;
174 
175  /* store in dma adapter list */
176  InsertTailList(&DeviceExtension->DmaAdapterList, &Adapter->Entry);
177 
178  /* return result */
179  return (PVP_DMA_ADAPTER)Adapter;
180 }
_Out_ PULONG NumberOfMapRegisters
Definition: halfuncs.h:209
PDMA_ADAPTER NTAPI IoGetDmaAdapter(IN PDEVICE_OBJECT PhysicalDeviceObject, IN PDEVICE_DESCRIPTION DeviceDescription, IN OUT PULONG NumberOfMapRegisters)
Definition: pnpdma.c:23
#define TRUE
Definition: types.h:120
PVOID HwDeviceExtension
Definition: dma.c:21
DMA_SPEED DmaSpeed
Definition: iotypes.h:2045
LIST_ENTRY Entry
Definition: dma.c:18
#define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension)
Definition: videoprt.h:137
#define InsertTailList(ListHead, Entry)
#define DEVICE_DESCRIPTION_VERSION
Definition: iotypes.h:2027
PDEVICE_OBJECT PhysicalDeviceObject
Definition: videoprt.h:87
smooth NULL
Definition: ftsmooth.c:416
BOOLEAN Dma32BitAddresses
Definition: iotypes.h:2037
BOOLEAN Dma64BitAddresses
Definition: iotypes.h:2040
_Must_inspect_result_ _In_ PDEVICE_DESCRIPTION DeviceDescription
Definition: iofuncs.h:1015
struct __VP_DMA_ADAPTER * PVP_DMA_ADAPTER
Definition: video.h:159
BOOLEAN ScatterGather
Definition: iotypes.h:2034
DMA_WIDTH DmaWidth
Definition: iotypes.h:2044
#define ExAllocatePool(type, size)
Definition: fbtusb.h:44
ULONG MapRegisters
Definition: dma.c:20
PDMA_ADAPTER Adapter
Definition: dma.c:19
INTERFACE_TYPE InterfaceType
Definition: iotypes.h:2043
unsigned int ULONG
Definition: retypes.h:1
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
INTERFACE_TYPE AdapterInterfaceType
Definition: videoprt.h:98
#define ExFreePool(addr)
Definition: env_spec_w32.h:352

◆ VideoPortGetDmaContext()

VPAPI PVOID NTAPI VideoPortGetDmaContext ( IN PVOID  HwDeviceExtension,
IN PDMA  pDma 
)

Definition at line 414 of file dma.c.

416 {
417  /* Deprecated */
418  return NULL;
419 }
smooth NULL
Definition: ftsmooth.c:416

◆ VideoPortGetMdl()

VPAPI PVOID NTAPI VideoPortGetMdl ( IN PVOID  HwDeviceExtension,
IN PDMA  pDma 
)

Definition at line 58 of file stubs.c.

61 {
63  return 0;
64 }
#define UNIMPLEMENTED
Definition: stubs.c:20

◆ VideoPortGetRegistryParameters()

VPAPI VP_STATUS NTAPI VideoPortGetRegistryParameters ( IN PVOID  HwDeviceExtension,
IN PWSTR  ParameterName,
IN UCHAR  IsParameterFileName,
IN PMINIPORT_GET_REGISTRY_ROUTINE  CallbackRoutine,
IN PVOID  Context 
)

Definition at line 874 of file videoprt.c.

880 {
883  PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
885 
886  DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
887 
888  TRACE_(VIDEOPRT, "VideoPortGetRegistryParameters ParameterName %S, RegPath: %wZ\n",
889  ParameterName, &DeviceExtension->RegistryPath);
890 
891  Context.HwDeviceExtension = HwDeviceExtension;
892  Context.HwContext = HwContext;
893  Context.HwGetRegistryRoutine = GetRegistryRoutine;
894 
898 
900  DeviceExtension->RegistryPath.Buffer,
901  QueryTable,
902  &Context,
903  NULL);
904  if (!NT_SUCCESS(Status))
905  {
906  WARN_(VIDEOPRT, "VideoPortGetRegistryParameters could not find the "
907  "requested parameter\n");
909  }
910 
911  if (IsParameterFileName)
912  {
913  /* FIXME: need to read the contents of the file */
915  }
916 
917  return NO_ERROR;
918 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
_In_ PCWSTR _Inout_ _At_ QueryTable _Pre_unknown_ PRTL_QUERY_REGISTRY_TABLE QueryTable
Definition: rtlfuncs.h:4142
NTSYSAPI NTSTATUS WINAPI RtlQueryRegistryValues(ULONG, PCWSTR, PRTL_QUERY_REGISTRY_TABLE, PVOID, PVOID)
LONG NTSTATUS
Definition: precomp.h:26
_Must_inspect_result_ _In_ PVOID _In_ struct _HW_INITIALIZATION_DATA _In_ PVOID HwContext
Definition: srb.h:897
#define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension)
Definition: videoprt.h:137
#define NO_ERROR
Definition: dderror.h:5
PRTL_QUERY_REGISTRY_ROUTINE QueryRoutine
Definition: nt_native.h:109
smooth NULL
Definition: ftsmooth.c:416
static NTSTATUS NTAPI QueryRegistryCallback(IN PWSTR ValueName, IN ULONG ValueType, IN PVOID ValueData, IN ULONG ValueLength, IN PVOID Context, IN PVOID EntryContext)
Definition: videoprt.c:848
#define TRACE_(x)
Definition: compat.h:76
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
Status
Definition: gdiplustypes.h:24
#define RTL_REGISTRY_ABSOLUTE
Definition: nt_native.h:161
_In_opt_ PWSTR _In_ PWSTR ParameterName
Definition: classpnp.h:1402
struct tagContext Context
Definition: acpixf.h:1034
#define UNIMPLEMENTED
Definition: debug.h:115
UNICODE_STRING RegistryPath
Definition: videoprt.h:90
#define RTL_QUERY_REGISTRY_REQUIRED
Definition: nt_native.h:132
#define WARN_(ch,...)
Definition: debug.h:157

◆ VideoPortGetRomImage()

VPAPI PVOID NTAPI VideoPortGetRomImage ( IN PVOID  HwDeviceExtension,
IN PVOID  Unused1,
IN ULONG  Unused2,
IN ULONG  Length 
)

Definition at line 984 of file videoprt.c.

989 {
990  static PVOID RomImageBuffer = NULL;
991  PKPROCESS CallingProcess;
993 
994  TRACE_(VIDEOPRT, "VideoPortGetRomImage(HwDeviceExtension 0x%X Length 0x%X)\n",
995  HwDeviceExtension, Length);
996 
997  /* If the length is zero then free the existing buffer. */
998  if (Length == 0)
999  {
1000  if (RomImageBuffer != NULL)
1001  {
1002  ExFreePool(RomImageBuffer);
1003  RomImageBuffer = NULL;
1004  }
1005  return NULL;
1006  }
1007  else
1008  {
1009  /*
1010  * The DDK says we shouldn't use the legacy C0000 method but get the
1011  * rom base address from the corresponding pci or acpi register but
1012  * lets ignore that and use C0000 anyway. We have already mapped the
1013  * bios area into memory so we'll copy from there.
1014  */
1015 
1016  /* Copy the bios. */
1017  Length = min(Length, 0x10000);
1018  if (RomImageBuffer != NULL)
1019  {
1020  ExFreePool(RomImageBuffer);
1021  }
1022 
1023  RomImageBuffer = ExAllocatePool(PagedPool, Length);
1024  if (RomImageBuffer == NULL)
1025  {
1026  return NULL;
1027  }
1028 
1029  IntAttachToCSRSS(&CallingProcess, &ApcState);
1030  RtlCopyMemory(RomImageBuffer, (PUCHAR)0xC0000, Length);
1031  IntDetachFromCSRSS(&CallingProcess, &ApcState);
1032 
1033  return RomImageBuffer;
1034  }
1035 }
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
KAPC_STATE
Definition: ketypes.h:1273
unsigned char * PUCHAR
Definition: retypes.h:3
smooth NULL
Definition: ftsmooth.c:416
#define TRACE_(x)
Definition: compat.h:76
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
#define ExAllocatePool(type, size)
Definition: fbtusb.h:44
VOID FASTCALL IntAttachToCSRSS(PKPROCESS *CallingProcess, PKAPC_STATE ApcState)
Definition: videoprt.c:443
_Out_ PKAPC_STATE ApcState
Definition: mm.h:1492
#define min(a, b)
Definition: monoChain.cc:55
VOID FASTCALL IntDetachFromCSRSS(PKPROCESS *CallingProcess, PKAPC_STATE ApcState)
Definition: videoprt.c:456
#define ExFreePool(addr)
Definition: env_spec_w32.h:352

◆ VideoPortGetVersion()

VPAPI VP_STATUS NTAPI VideoPortGetVersion ( IN PVOID  HwDeviceExtension,
IN OUT PVPOSVERSIONINFO  pVpOsVersionInfo 
)

Definition at line 1346 of file videoprt.c.

1349 {
1351 
1352  Version.dwOSVersionInfoSize = sizeof(RTL_OSVERSIONINFOEXW);
1353  if (VpOsVersionInfo->Size >= sizeof(VPOSVERSIONINFO))
1354  {
1355 #if 1
1357  {
1358  VpOsVersionInfo->MajorVersion = Version.dwMajorVersion;
1359  VpOsVersionInfo->MinorVersion = Version.dwMinorVersion;
1360  VpOsVersionInfo->BuildNumber = Version.dwBuildNumber;
1361  VpOsVersionInfo->ServicePackMajor = Version.wServicePackMajor;
1362  VpOsVersionInfo->ServicePackMinor = Version.wServicePackMinor;
1363  return NO_ERROR;
1364  }
1365  return ERROR_INVALID_PARAMETER;
1366 #else
1367  VpOsVersionInfo->MajorVersion = 5;
1368  VpOsVersionInfo->MinorVersion = 0;
1369  VpOsVersionInfo->BuildNumber = 2195;
1370  VpOsVersionInfo->ServicePackMajor = 4;
1371  VpOsVersionInfo->ServicePackMinor = 0;
1372  return NO_ERROR;
1373 #endif
1374  }
1375 
1376  return ERROR_INVALID_PARAMETER;
1377 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
IN PVOID IN PVOID IN USHORT Version
Definition: pci.h:361
NTSTATUS NTAPI RtlGetVersion(IN OUT PRTL_OSVERSIONINFOW lpVersionInformation)
Definition: version.c:158
#define NO_ERROR
Definition: dderror.h:5
struct _OSVERSIONINFOEXW RTL_OSVERSIONINFOEXW
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32

◆ VideoPortGetVgaStatus()

VPAPI VP_STATUS NTAPI VideoPortGetVgaStatus ( IN PVOID  HwDeviceExtension,
OUT PULONG  VgaStatus 
)

Definition at line 956 of file videoprt.c.

959 {
960  PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
961 
962  TRACE_(VIDEOPRT, "VideoPortGetVgaStatus\n");
963 
964  DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
966  {
967  if (DeviceExtension->AdapterInterfaceType == PCIBus)
968  {
969  /* VgaStatus: 0 == VGA not enabled, 1 == VGA enabled. */
970  /* Assumed for now */
971  *VgaStatus = 1;
972  return NO_ERROR;
973  }
974  }
975 
976  return ERROR_INVALID_FUNCTION;
977 }
#define KeGetCurrentIrql()
Definition: env_spec_w32.h:706
#define ERROR_INVALID_FUNCTION
Definition: dderror.h:6
#define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension)
Definition: videoprt.h:137
#define NO_ERROR
Definition: dderror.h:5
#define TRACE_(x)
Definition: compat.h:76
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
INTERFACE_TYPE AdapterInterfaceType
Definition: videoprt.h:98

◆ VideoPortInitialize()

VPAPI ULONG NTAPI VideoPortInitialize ( IN PVOID  Argument1,
IN PVOID  Argument2,
IN PVIDEO_HW_INITIALIZATION_DATA  HwInitializationData,
IN PVOID  HwContext 
)

Definition at line 592 of file videoprt.c.

597 {
602  BOOLEAN PnpDriver = FALSE, LegacyDetection = FALSE;
603  static BOOLEAN FirstInitialization;
604 
605  TRACE_(VIDEOPRT, "VideoPortInitialize\n");
606 
607  if (!FirstInitialization)
608  {
609  FirstInitialization = TRUE;
613  }
614 
615  /* As a first thing do parameter checks. */
616  if (HwInitializationData->HwInitDataSize > sizeof(VIDEO_HW_INITIALIZATION_DATA))
617  {
618  ERR_(VIDEOPRT, "Invalid HwInitializationData\n");
620  }
621 
622  if ((HwInitializationData->HwFindAdapter == NULL) ||
623  (HwInitializationData->HwInitialize == NULL) ||
624  (HwInitializationData->HwStartIO == NULL))
625  {
626  ERR_(VIDEOPRT, "Invalid HwInitializationData\n");
628  }
629 
630  switch (HwInitializationData->HwInitDataSize)
631  {
632  /*
633  * NT4 drivers are special case, because we must use legacy method
634  * of detection instead of the Plug & Play one.
635  */
637  INFO_(VIDEOPRT, "We were loaded by a Windows NT miniport driver.\n");
638  break;
639 
641  INFO_(VIDEOPRT, "We were loaded by a Windows 2000 miniport driver.\n");
642  break;
643 
644  case sizeof(VIDEO_HW_INITIALIZATION_DATA):
645  INFO_(VIDEOPRT, "We were loaded by a Windows XP or later miniport driver.\n");
646  break;
647 
648  default:
649  ERR_(VIDEOPRT, "Invalid HwInitializationData size.\n");
650  return STATUS_UNSUCCESSFUL;
651  }
652 
653  /* Set dispatching routines */
661 
662  /* Determine type of the miniport driver */
663  if ((HwInitializationData->HwInitDataSize >=
664  FIELD_OFFSET(VIDEO_HW_INITIALIZATION_DATA, HwQueryInterface)) &&
665  (HwInitializationData->HwSetPowerState != NULL) &&
666  (HwInitializationData->HwGetPowerState != NULL) &&
667  (HwInitializationData->HwGetVideoChildDescriptor != NULL))
668  {
669  INFO_(VIDEOPRT, "The miniport is a PnP miniport driver\n");
670  PnpDriver = TRUE;
671  }
672 
673  /* Check if legacy detection should be applied */
674  if (!PnpDriver || HwContext)
675  {
676  INFO_(VIDEOPRT, "Legacy detection for adapter interface %d\n",
677  HwInitializationData->AdapterInterfaceType);
678 
679  /* FIXME: Move the code for legacy detection
680  to another function and call it here */
681  LegacyDetection = TRUE;
682  }
683 
684  /*
685  * NOTE:
686  * The driver extension can be already allocated in case that we were
687  * called by legacy driver and failed detecting device. Some miniport
688  * drivers in that case adjust parameters and call VideoPortInitialize
689  * again.
690  */
692  if (DriverExtension == NULL)
693  {
695  DriverObject,
697  (PVOID *)&DriverExtension);
698  if (!NT_SUCCESS(Status))
699  {
700  ERR_(VIDEOPRT, "IoAllocateDriverObjectExtension failed 0x%x\n", Status);
701  return Status;
702  }
703 
704  /*
705  * Save the registry path. This should be done only once even if
706  * VideoPortInitialize is called multiple times.
707  */
708  if (RegistryPath->Length != 0)
709  {
710  DriverExtension->RegistryPath.Length = 0;
711  DriverExtension->RegistryPath.MaximumLength =
712  RegistryPath->Length + sizeof(UNICODE_NULL);
713  DriverExtension->RegistryPath.Buffer =
715  PagedPool,
716  DriverExtension->RegistryPath.MaximumLength,
717  'RTSU');
718  if (DriverExtension->RegistryPath.Buffer == NULL)
719  {
720  RtlInitUnicodeString(&DriverExtension->RegistryPath, NULL);
722  }
723 
725  INFO_(VIDEOPRT, "RegistryPath: %wZ\n", &DriverExtension->RegistryPath);
726  }
727  else
728  {
729  RtlInitUnicodeString(&DriverExtension->RegistryPath, NULL);
730  }
731  }
732 
733  /* Copy the correct miniport initialization data to the device extension. */
734  RtlCopyMemory(&DriverExtension->InitializationData,
736  HwInitializationData->HwInitDataSize);
737  if (HwInitializationData->HwInitDataSize <
739  {
740  RtlZeroMemory((PVOID)((ULONG_PTR)&DriverExtension->InitializationData +
741  HwInitializationData->HwInitDataSize),
743  HwInitializationData->HwInitDataSize);
744  }
745  DriverExtension->HwContext = HwContext;
746 
747  /*
748  * Plug & Play drivers registers the device in AddDevice routine.
749  * For legacy drivers we must do it now.
750  */
751  if (LegacyDetection)
752  {
754 
756  {
757  /* Power management */
759  }
760 
763  NULL,
764  &DeviceObject);
765  if (!NT_SUCCESS(Status))
766  {
767  ERR_(VIDEOPRT, "IntVideoPortCreateAdapterDeviceObject returned 0x%x\n", Status);
768  return Status;
769  }
770 
772  if (NT_SUCCESS(Status))
774  else
775  ERR_(VIDEOPRT, "IntVideoPortFindAdapter returned 0x%x\n", Status);
776 
777  return Status;
778  }
779  else
780  {
785 
786  return STATUS_SUCCESS;
787  }
788 }
VOID FASTCALL IntLoadRegistryParameters(VOID)
Definition: videoprt.c:468
NTSTATUS NTAPI IntVideoPortFindAdapter(IN PDRIVER_OBJECT DriverObject, IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension, IN PDEVICE_OBJECT DeviceObject)
Definition: videoprt.c:254
#define STATUS_REVISION_MISMATCH
Definition: ntstatus.h:325
NTSTATUS NTAPI IntVideoPortDispatchPower(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: dispatch.c:1115
NTSTATUS NTAPI IntVideoPortCreateAdapterDeviceObject(_In_ PDRIVER_OBJECT DriverObject, _In_ PVIDEO_PORT_DRIVER_EXTENSION DriverExtension, _In_opt_ PDEVICE_OBJECT PhysicalDeviceObject, _Out_opt_ PDEVICE_OBJECT *DeviceObject)
Definition: videoprt.c:94
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
#define IRP_MJ_CREATE
Definition: rdpdr.c:44
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
#define INFO_(ch,...)
Definition: debug.h:159
NTSTATUS NTAPI IoAllocateDriverObjectExtension(IN PDRIVER_OBJECT DriverObject, IN PVOID ClientIdentificationAddress, IN ULONG DriverObjectExtensionSize, OUT PVOID *DriverObjectExtension)
Definition: driver.c:1791
#define IRP_MJ_SHUTDOWN
#define TRUE
Definition: types.h:120
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
#define IRP_MJ_PNP
Definition: cdrw_usr.h:52
#define ERR_(ch,...)
Definition: debug.h:156
LONG NTSTATUS
Definition: precomp.h:26
_Must_inspect_result_ _In_ PVOID _In_ struct _HW_INITIALIZATION_DATA _In_ PVOID HwContext
Definition: srb.h:897
KMUTEX VideoPortInt10Mutex
Definition: videoprt.c:41
NTSTATUS NTAPI IntVideoPortDispatchDeviceControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: dispatch.c:714
NTSYSAPI VOID NTAPI RtlCopyUnicodeString(PUNICODE_STRING DestinationString, PUNICODE_STRING SourceString)
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define FALSE
Definition: types.h:117
#define UNICODE_NULL
PDRIVER_EXTENSION DriverExtension
Definition: iotypes.h:2181
VOID NTAPI IntVideoPortUnload(PDRIVER_OBJECT DriverObject)
Definition: dispatch.c:1171
FORCEINLINE VOID KeInitializeSpinLock(_Out_ PKSPIN_LOCK SpinLock)
Definition: kefuncs.h:238
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
struct _VIDEO_HW_INITIALIZATION_DATA VIDEO_HW_INITIALIZATION_DATA
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
KSPIN_LOCK HwResetAdaptersLock
Definition: videoprt.c:42
NTSTATUS NTAPI IntVideoPortDispatchClose(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: dispatch.c:429
#define TRACE_(x)
Definition: compat.h:76
_In_z_ PWSTR RegistryPath
Definition: classp.h:1930
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define SIZE_OF_NT4_VIDEO_HW_INITIALIZATION_DATA
Definition: video.h:119
NTSTATUS NTAPI IntVideoPortDispatchSystemControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: dispatch.c:1149
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
VOID NTAPI KeInitializeMutex(IN PKMUTEX Mutex, IN ULONG Level)
Definition: mutex.c:67
#define IRP_MJ_POWER
#define IRP_MJ_CLOSE
Definition: rdpdr.c:45
Status
Definition: gdiplustypes.h:24
NTSTATUS NTAPI IntVideoPortAddDevice(IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT PhysicalDeviceObject)
Definition: dispatch.c:334
PDRIVER_UNLOAD DriverUnload
Definition: iotypes.h:2187
PVOID NTAPI IoGetDriverObjectExtension(IN PDRIVER_OBJECT DriverObject, IN PVOID ClientIdentificationAddress)
Definition: driver.c:1869
PPCI_DRIVER_EXTENSION DriverExtension
Definition: pci.c:41
#define IRP_MJ_SYSTEM_CONTROL
_In_ PNET_PNP_EVENT _In_ PTDI_PNP_CONTEXT _In_ PTDI_PNP_CONTEXT Context2
Definition: tdikrnl.h:1094
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1569
PDRIVER_ADD_DEVICE AddDevice
Definition: iotypes.h:2119
ULONG VideoPortDeviceNumber
Definition: videoprt.c:40
_In_ PNET_PNP_EVENT _In_ PTDI_PNP_CONTEXT Context1
Definition: tdikrnl.h:1094
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
NTSTATUS NTAPI IntVideoPortDispatchPnp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: dispatch.c:1083
NTSTATUS NTAPI IntVideoPortDispatchOpen(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: dispatch.c:366
PDRIVER_DISPATCH MajorFunction[IRP_MJ_MAXIMUM_FUNCTION+1]
Definition: iotypes.h:2188
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define SIZE_OF_W2K_VIDEO_HW_INITIALIZATION_DATA
Definition: video.h:120
return STATUS_SUCCESS
Definition: btrfs.c:3014
_Must_inspect_result_ _In_ PVOID _In_ struct _HW_INITIALIZATION_DATA * HwInitializationData
Definition: srb.h:897
#define IRP_MJ_DEVICE_CONTROL
Definition: rdpdr.c:52

Referenced by DriverEntry().

◆ VideoPortInt10()

VPAPI VP_STATUS NTAPI VideoPortInt10 ( IN PVOID  HwDeviceExtension,
IN PVIDEO_X86_BIOS_ARGUMENTS  BiosArguments 
)

Definition at line 389 of file int10.c.

392 {
393  INT10_BIOS_ARGUMENTS Int10BiosArguments;
395 
396  if (!CsrProcess)
397  {
399  }
400 
401  /* Copy arguments to other format */
402  RtlCopyMemory(&Int10BiosArguments, BiosArguments, sizeof(*BiosArguments));
403  Int10BiosArguments.SegDs = 0;
404  Int10BiosArguments.SegEs = 0;
405 
406  /* Do the BIOS call */
407  Status = IntInt10CallBios(NULL, &Int10BiosArguments);
408 
409  /* Copy results back */
410  RtlCopyMemory(BiosArguments, &Int10BiosArguments, sizeof(*BiosArguments));
411 
412  return Status;
413 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
PKPROCESS CsrProcess
Definition: videoprt.c:39
smooth NULL
Definition: ftsmooth.c:416
VP_STATUS NTAPI IntInt10CallBios(IN PVOID Context, IN OUT PINT10_BIOS_ARGUMENTS BiosArguments)
Definition: int10.c:315
Status
Definition: gdiplustypes.h:24
LONG VP_STATUS
Definition: video.h:153

Referenced by VbeSetMode().

◆ VideoPortInterlockedDecrement()

VPAPI LONG FASTCALL VideoPortInterlockedDecrement ( IN PLONG  Addend)

Definition at line 100 of file stubs.c.

102 {
104 }
IN OUT PLONG Addend
Definition: CrNtStubs.h:22
long __cdecl _InterlockedDecrement(_Interlocked_operand_ long volatile *_Addend)

◆ VideoPortInterlockedExchange()

VPAPI LONG FASTCALL VideoPortInterlockedExchange ( IN OUT PLONG  Target,
IN LONG  Value 
)

Definition at line 116 of file stubs.c.

119 {
121 }
IN UCHAR Value
Definition: halp.h:394
_Must_inspect_result_ typedef _In_ ULONG _In_ BOOLEAN Target
Definition: iotypes.h:1072
#define InterlockedExchange
Definition: armddk.h:54

◆ VideoPortInterlockedIncrement()

VPAPI LONG FASTCALL VideoPortInterlockedIncrement ( IN PLONG  Addend)

Definition at line 108 of file stubs.c.

110 {
112 }
IN OUT PLONG Addend
Definition: CrNtStubs.h:22
long __cdecl _InterlockedIncrement(_Interlocked_operand_ long volatile *_Addend)

◆ VideoPortIsNoVesa()