source: Daodan/MinGW/include/ddk/video.h@ 1098

Last change on this file since 1098 was 1046, checked in by alloc, 8 years ago

Daodan: Added Windows MinGW and build batch file

File size: 32.7 KB
RevLine 
[1046]1/*
2 * video.h
3 *
4 * Video port and miniport driver interface
5 *
6 * This file is part of the w32api package.
7 *
8 * Contributors:
9 * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
10 *
11 * THIS SOFTWARE IS NOT COPYRIGHTED
12 *
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
15 *
16 * This code is distributed in the hope that it will be useful but
17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18 * DISCLAIMED. This includes but is not limited to warranties of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 *
21 */
22
23#ifndef __VIDEO_H
24#define __VIDEO_H
25
26
27#if __GNUC__ >=3
28#pragma GCC system_header
29#endif
30
31#ifdef __WINDDI_H
32#error winddi.h cannot be included with video.h
33#else
34
35#ifdef __cplusplus
36extern "C" {
37#endif
38
39#include "ntddk.h"
40
41#if defined(_VIDEOPORT_)
42 #define VPAPI DECLSPEC_EXPORT
43#else
44 #define VPAPI DECLSPEC_IMPORT
45#endif
46
47#include "videoagp.h"
48#include "ntddvdeo.h"
49
50
51typedef LONG VP_STATUS;
52typedef VP_STATUS *PVP_STATUS;
53typedef struct __DMA_PARAMETERS * PDMA;
54typedef struct _VIDEO_PORT_EVENT *PEVENT;
55typedef struct _VIDEO_PORT_SPIN_LOCK *PSPIN_LOCK;
56typedef struct __VP_DMA_ADAPTER *PVP_DMA_ADAPTER;
57
58#define DISPLAY_ADAPTER_HW_ID 0xFFFFFFFF
59
60#define EVENT_TYPE_MASK 1
61#define SYNCHRONIZATION_EVENT 0
62#define NOTIFICATION_EVENT 1
63
64#define INITIAL_EVENT_STATE_MASK 2
65#define INITIAL_EVENT_NOT_SIGNALED 0
66#define INITIAL_EVENT_SIGNALED 2
67
68typedef enum VIDEO_DEBUG_LEVEL {
69 Error = 0,
70 Warn,
71 Trace,
72 Info
73} VIDEO_DEBUG_LEVEL, *PVIDEO_DEBUG_LEVEL;
74
75typedef enum {
76 VideoPortUnlockAfterDma = 1,
77 VideoPortKeepPagesLocked,
78 VideoPortDmaInitOnly
79} DMA_FLAGS;
80
81typedef enum _HW_DMA_RETURN {
82 DmaAsyncReturn,
83 DmaSyncReturn
84} HW_DMA_RETURN, *PHW_DMA_RETURN;
85
86typedef HW_DMA_RETURN
87(*PVIDEO_HW_START_DMA)(
88 PVOID HwDeviceExtension,
89 PDMA pDma);
90
91
92#ifdef DBG
93
94#define PAGED_CODE() \
95 if (VideoPortGetCurrentIrql() > 1 /* APC_LEVEL */) \
96 { \
97 VideoPortDebugPrint(Error, "Video: Pageable code called at IRQL %d\n", VideoPortGetCurrentIrql() ); \
98 ASSERT(FALSE); \
99 }
100
101#else
102
103#define PAGED_CODE()
104
105#endif
106
107typedef struct _VIDEO_HARDWARE_CONFIGURATION_DATA {
108 INTERFACE_TYPE InterfaceType;
109 ULONG BusNumber;
110 USHORT Version;
111 USHORT Revision;
112 USHORT Irql;
113 USHORT Vector;
114 ULONG ControlBase;
115 ULONG ControlSize;
116 ULONG CursorBase;
117 ULONG CursorSize;
118 ULONG FrameBase;
119 ULONG FrameSize;
120} VIDEO_HARDWARE_CONFIGURATION_DATA, *PVIDEO_HARDWARE_CONFIGURATION_DATA;
121
122#define SIZE_OF_NT4_VIDEO_PORT_CONFIG_INFO 0x42
123#define SIZE_OF_NT4_VIDEO_HW_INITIALIZATION_DATA 0x28
124#define SIZE_OF_W2K_VIDEO_HW_INITIALIZATION_DATA 0x50
125
126typedef enum _VIDEO_DEVICE_DATA_TYPE {
127 VpMachineData = 0,
128 VpCmosData,
129 VpBusData,
130 VpControllerData,
131 VpMonitorData
132} VIDEO_DEVICE_DATA_TYPE, *PVIDEO_DEVICE_DATA_TYPE;
133
134
135
136/* Video miniport driver functions */
137
138typedef struct _VP_SCATTER_GATHER_ELEMENT {
139 PHYSICAL_ADDRESS Address;
140 ULONG Length;
141 ULONG_PTR Reserved;
142} VP_SCATTER_GATHER_ELEMENT, *PVP_SCATTER_GATHER_ELEMENT;
143
144typedef struct _VP_SCATTER_GATHER_LIST {
145 ULONG NumberOfElements;
146 ULONG_PTR Reserved;
147 VP_SCATTER_GATHER_ELEMENT Elements[0];
148} VP_SCATTER_GATHER_LIST, *PVP_SCATTER_GATHER_LIST;
149
150typedef VOID DDKAPI
151(*PEXECUTE_DMA)(
152 /*IN*/ PVOID HwDeviceExtension,
153 /*IN*/ PVP_DMA_ADAPTER VpDmaAdapter,
154 /*IN*/ PVP_SCATTER_GATHER_LIST SGList,
155 /*IN*/ PVOID Context);
156
157typedef PVOID DDKAPI
158(*PVIDEO_PORT_GET_PROC_ADDRESS)(
159/*IN*/ PVOID HwDeviceExtension,
160/*IN*/ PUCHAR FunctionName);
161
162typedef struct _VIDEO_PORT_CONFIG_INFO {
163 ULONG Length;
164 ULONG SystemIoBusNumber;
165 INTERFACE_TYPE AdapterInterfaceType;
166 ULONG BusInterruptLevel;
167 ULONG BusInterruptVector;
168 KINTERRUPT_MODE InterruptMode;
169 ULONG NumEmulatorAccessEntries;
170 PEMULATOR_ACCESS_ENTRY EmulatorAccessEntries;
171 ULONG_PTR EmulatorAccessEntriesContext;
172 PHYSICAL_ADDRESS VdmPhysicalVideoMemoryAddress;
173 ULONG VdmPhysicalVideoMemoryLength;
174 ULONG HardwareStateSize;
175 ULONG DmaChannel;
176 ULONG DmaPort;
177 UCHAR DmaShareable;
178 UCHAR InterruptShareable;
179 BOOLEAN Master;
180 DMA_WIDTH DmaWidth;
181 DMA_SPEED DmaSpeed;
182 BOOLEAN bMapBuffers;
183 BOOLEAN NeedPhysicalAddresses;
184 BOOLEAN DemandMode;
185 ULONG MaximumTransferLength;
186 ULONG NumberOfPhysicalBreaks;
187 BOOLEAN ScatterGather;
188 ULONG MaximumScatterGatherChunkSize;
189 PVIDEO_PORT_GET_PROC_ADDRESS VideoPortGetProcAddress;
190 PWSTR DriverRegistryPath;
191 ULONGLONG SystemMemorySize;
192} VIDEO_PORT_CONFIG_INFO, *PVIDEO_PORT_CONFIG_INFO;
193
194typedef VP_STATUS DDKAPI
195(*PVIDEO_HW_FIND_ADAPTER)(
196 /*IN*/ PVOID HwDeviceExtension,
197 /*IN*/ PVOID HwContext,
198 /*IN*/ PWSTR ArgumentString,
199 /*IN OUT*/ PVIDEO_PORT_CONFIG_INFO ConfigInfo,
200 /*OUT*/ PUCHAR Again);
201
202typedef VP_STATUS DDKAPI
203(*PVIDEO_HW_POWER_GET)(
204 /*IN*/ PVOID HwDeviceExtension,
205 /*IN*/ ULONG HwId,
206 /*IN OUT*/ PVIDEO_POWER_MANAGEMENT VideoPowerControl);
207
208/* PVIDEO_HW_GET_CHILD_DESCRIPTOR return values */
209#define VIDEO_ENUM_MORE_DEVICES ERROR_CONTINUE
210#define VIDEO_ENUM_NO_MORE_DEVICES ERROR_NO_MORE_DEVICES
211#define VIDEO_ENUM_INVALID_DEVICE ERROR_INVALID_NAME
212
213/* PVIDEO_HW_GET_CHILD_DESCRIPTOR.ChildEnumInfo constants */
214typedef struct _VIDEO_CHILD_ENUM_INFO {
215 ULONG Size;
216 ULONG ChildDescriptorSize;
217 ULONG ChildIndex;
218 ULONG ACPIHwId;
219 PVOID ChildHwDeviceExtension;
220} VIDEO_CHILD_ENUM_INFO, *PVIDEO_CHILD_ENUM_INFO;
221
222/* PVIDEO_HW_GET_CHILD_DESCRIPTOR.VideoChildType constants */
223typedef enum _VIDEO_CHILD_TYPE {
224 Monitor = 1,
225 NonPrimaryChip,
226 VideoChip,
227 Other
228} VIDEO_CHILD_TYPE, *PVIDEO_CHILD_TYPE;
229
230typedef VP_STATUS DDKAPI
231(*PVIDEO_HW_GET_CHILD_DESCRIPTOR)(
232 /*IN*/ PVOID HwDeviceExtension,
233 /*IN*/ PVIDEO_CHILD_ENUM_INFO ChildEnumInfo,
234 /*OUT*/ PVIDEO_CHILD_TYPE VideoChildType,
235 /*OUT*/ PUCHAR pChildDescriptor,
236 /*OUT*/ PULONG UId,
237 /*OUT*/ PULONG pUnused);
238
239typedef BOOLEAN DDKAPI
240(*PVIDEO_HW_INITIALIZE)(
241 /*IN*/ PVOID HwDeviceExtension);
242
243typedef BOOLEAN DDKAPI
244(*PVIDEO_HW_INTERRUPT)(
245 /*IN*/ PVOID HwDeviceExtension);
246
247/* VIDEO_ACCESS_RANGE.RangePassive */
248#define VIDEO_RANGE_PASSIVE_DECODE 1
249#define VIDEO_RANGE_10_BIT_DECODE 2
250
251#ifndef VIDEO_ACCESS_RANGE_DEFINED /* also in miniport.h */
252#define VIDEO_ACCESS_RANGE_DEFINED
253typedef struct _VIDEO_ACCESS_RANGE {
254 PHYSICAL_ADDRESS RangeStart;
255 ULONG RangeLength;
256 UCHAR RangeInIoSpace;
257 UCHAR RangeVisible;
258 UCHAR RangeShareable;
259 UCHAR RangePassive;
260} VIDEO_ACCESS_RANGE, *PVIDEO_ACCESS_RANGE;
261#endif
262
263typedef VOID DDKAPI
264(*PVIDEO_HW_LEGACYRESOURCES)(
265 /*IN*/ ULONG VendorId,
266 /*IN*/ ULONG DeviceId,
267 /*IN OUT*/ PVIDEO_ACCESS_RANGE *LegacyResourceList,
268 /*IN OUT*/ PULONG LegacyResourceCount);
269
270typedef VP_STATUS DDKAPI
271(*PMINIPORT_QUERY_DEVICE_ROUTINE)(
272 /*IN*/ PVOID HwDeviceExtension,
273 /*IN*/ PVOID Context,
274 /*IN*/ VIDEO_DEVICE_DATA_TYPE DeviceDataType,
275 /*IN*/ PVOID Identifier,
276 /*IN*/ ULONG IdentifierLength,
277 /*IN*/ PVOID ConfigurationData,
278 /*IN*/ ULONG ConfigurationDataLength,
279 /*IN OUT*/ PVOID ComponentInformation,
280 /*IN*/ ULONG ComponentInformationLength);
281
282typedef struct _QUERY_INTERFACE {
283 CONST GUID *InterfaceType;
284 USHORT Size;
285 USHORT Version;
286 PINTERFACE Interface;
287 PVOID InterfaceSpecificData;
288} QUERY_INTERFACE, *PQUERY_INTERFACE;
289
290typedef VP_STATUS DDKAPI
291(*PVIDEO_HW_QUERY_INTERFACE)(
292 /*IN*/ PVOID HwDeviceExtension,
293 /*IN OUT*/ PQUERY_INTERFACE QueryInterface);
294
295typedef VP_STATUS DDKAPI
296(*PMINIPORT_GET_REGISTRY_ROUTINE)(
297 /*IN*/ PVOID HwDeviceExtension,
298 /*IN*/ PVOID Context,
299 /*IN OUT*/ PWSTR ValueName,
300 /*IN OUT*/ PVOID ValueData,
301 /*IN*/ ULONG ValueLength);
302
303typedef BOOLEAN DDKAPI
304(*PVIDEO_HW_RESET_HW)(
305 /*IN*/ PVOID HwDeviceExtension,
306 /*IN*/ ULONG Columns,
307 /*IN*/ ULONG Rows);
308
309typedef VP_STATUS DDKAPI
310(*PVIDEO_HW_POWER_SET)(
311 /*IN*/ PVOID HwDeviceExtension,
312 /*IN*/ ULONG HwId,
313 /*IN*/ PVIDEO_POWER_MANAGEMENT VideoPowerControl);
314
315typedef struct _STATUS_BLOCK {
316 _ANONYMOUS_UNION union {
317 VP_STATUS Status;
318 PVOID Pointer;
319 } DUMMYUNIONNAME;
320 ULONG_PTR Information;
321} STATUS_BLOCK, *PSTATUS_BLOCK;
322
323typedef struct _VIDEO_REQUEST_PACKET {
324 ULONG IoControlCode;
325 PSTATUS_BLOCK StatusBlock;
326 PVOID InputBuffer;
327 ULONG InputBufferLength;
328 PVOID OutputBuffer;
329 ULONG OutputBufferLength;
330} VIDEO_REQUEST_PACKET, *PVIDEO_REQUEST_PACKET;
331
332typedef BOOLEAN DDKAPI
333(*PVIDEO_HW_START_IO)(
334 /*IN*/ PVOID HwDeviceExtension,
335 /*IN*/ PVIDEO_REQUEST_PACKET RequestPacket);
336
337typedef BOOLEAN DDKAPI
338(*PMINIPORT_SYNCHRONIZE_ROUTINE)(
339 /*IN*/ PVOID Context);
340
341typedef VOID DDKAPI
342(*PVIDEO_HW_TIMER)(
343 /*IN*/ PVOID HwDeviceExtension);
344
345typedef VOID DDKAPI
346(*PMINIPORT_DPC_ROUTINE)(
347 /*IN*/ PVOID HwDeviceExtension,
348 /*IN*/ PVOID Context);
349
350typedef VP_STATUS DDKAPI
351(*PDRIVER_IO_PORT_UCHAR)(
352 /*IN*/ ULONG_PTR Context,
353 /*IN*/ ULONG Port,
354 /*IN*/ UCHAR AccessMode,
355 /*IN*/ PUCHAR Data);
356
357typedef VP_STATUS DDKAPI
358(*PDRIVER_IO_PORT_UCHAR_STRING)(
359 /*IN*/ ULONG_PTR Context,
360 /*IN*/ ULONG Port,
361 /*IN*/ UCHAR AccessMode,
362 /*IN*/ PUCHAR Data,
363 /*IN*/ ULONG DataLength);
364
365typedef VP_STATUS DDKAPI
366(*PDRIVER_IO_PORT_ULONG)(
367 /*IN*/ ULONG_PTR Context,
368 /*IN*/ ULONG Port,
369 /*IN*/ UCHAR AccessMode,
370 /*IN*/ PULONG Data);
371
372typedef VP_STATUS DDKAPI
373(*PDRIVER_IO_PORT_ULONG_STRING)(
374 /*IN*/ ULONG_PTR Context,
375 /*IN*/ ULONG Port,
376 /*IN*/ UCHAR AccessMode,
377 /*IN*/ PULONG Data,
378 /*IN*/ ULONG DataLength);
379
380typedef VP_STATUS DDKAPI
381(*PDRIVER_IO_PORT_USHORT)(
382 /*IN*/ ULONG_PTR Context,
383 /*IN*/ ULONG Port,
384 /*IN*/ UCHAR AccessMode,
385 /*IN*/ PUSHORT Data);
386
387typedef VP_STATUS DDKAPI
388(*PDRIVER_IO_PORT_USHORT_STRING)(
389 /*IN*/ ULONG_PTR Context,
390 /*IN*/ ULONG Port,
391 /*IN*/ UCHAR AccessMode,
392 /*IN*/ PUSHORT Data,
393 /*IN*/ ULONG DataLength);
394
395
396
397typedef struct _INT10_BIOS_ARGUMENTS {
398 ULONG Eax;
399 ULONG Ebx;
400 ULONG Ecx;
401 ULONG Edx;
402 ULONG Esi;
403 ULONG Edi;
404 ULONG Ebp;
405 USHORT SegDs;
406 USHORT SegEs;
407} INT10_BIOS_ARGUMENTS, *PINT10_BIOS_ARGUMENTS;
408
409typedef struct _VIDEO_CHILD_STATE {
410 ULONG Id;
411 ULONG State;
412} VIDEO_CHILD_STATE, *PVIDEO_CHILD_STATE;
413
414typedef struct _VIDEO_CHILD_STATE_CONFIGURATION {
415 ULONG Count;
416 VIDEO_CHILD_STATE ChildStateArray[ANYSIZE_ARRAY];
417} VIDEO_CHILD_STATE_CONFIGURATION, *PVIDEO_CHILD_STATE_CONFIGURATION;
418
419typedef struct _VIDEO_HW_INITIALIZATION_DATA {
420 ULONG HwInitDataSize;
421 INTERFACE_TYPE AdapterInterfaceType;
422 PVIDEO_HW_FIND_ADAPTER HwFindAdapter;
423 PVIDEO_HW_INITIALIZE HwInitialize;
424 PVIDEO_HW_INTERRUPT HwInterrupt;
425 PVIDEO_HW_START_IO HwStartIO;
426 ULONG HwDeviceExtensionSize;
427 ULONG StartingDeviceNumber;
428 PVIDEO_HW_RESET_HW HwResetHw;
429 PVIDEO_HW_TIMER HwTimer;
430 PVIDEO_HW_START_DMA HwStartDma;
431 PVIDEO_HW_POWER_SET HwSetPowerState;
432 PVIDEO_HW_POWER_GET HwGetPowerState;
433 PVIDEO_HW_GET_CHILD_DESCRIPTOR HwGetVideoChildDescriptor;
434 PVIDEO_HW_QUERY_INTERFACE HwQueryInterface;
435 ULONG HwChildDeviceExtensionSize;
436 PVIDEO_ACCESS_RANGE HwLegacyResourceList;
437 ULONG HwLegacyResourceCount;
438 PVIDEO_HW_LEGACYRESOURCES HwGetLegacyResources;
439 BOOLEAN AllowEarlyEnumeration;
440 ULONG Reserved;
441} VIDEO_HW_INITIALIZATION_DATA, *PVIDEO_HW_INITIALIZATION_DATA;
442
443 /* VIDEO_PORT_AGP_INTERFACE.Version contants */
444#define VIDEO_PORT_AGP_INTERFACE_VERSION_1 1
445
446typedef struct _VIDEO_PORT_AGP_INTERFACE {
447 SHORT Size;
448 SHORT Version;
449 PVOID Context;
450 PINTERFACE_REFERENCE InterfaceReference;
451 PINTERFACE_DEREFERENCE InterfaceDereference;
452 PAGP_RESERVE_PHYSICAL AgpReservePhysical;
453 PAGP_RELEASE_PHYSICAL AgpReleasePhysical;
454 PAGP_COMMIT_PHYSICAL AgpCommitPhysical;
455 PAGP_FREE_PHYSICAL AgpFreePhysical;
456 PAGP_RESERVE_VIRTUAL AgpReserveVirtual;
457 PAGP_RELEASE_VIRTUAL AgpReleaseVirtual;
458 PAGP_COMMIT_VIRTUAL AgpCommitVirtual;
459 PAGP_FREE_VIRTUAL AgpFreeVirtual;
460 ULONGLONG AgpAllocationLimit;
461} VIDEO_PORT_AGP_INTERFACE, *PVIDEO_PORT_AGP_INTERFACE;
462
463 /* VIDEO_PORT_AGP_INTERFACE_2.Version constants */
464#define VIDEO_PORT_AGP_INTERFACE_VERSION_2 2
465
466typedef struct _VIDEO_PORT_AGP_INTERFACE_2 {
467 /*IN*/ USHORT Size;
468 /*IN*/ USHORT Version;
469 /*OUT*/ PVOID Context;
470 /*OUT*/ PINTERFACE_REFERENCE InterfaceReference;
471 /*OUT*/ PINTERFACE_DEREFERENCE InterfaceDereference;
472 /*OUT*/ PAGP_RESERVE_PHYSICAL AgpReservePhysical;
473 /*OUT*/ PAGP_RELEASE_PHYSICAL AgpReleasePhysical;
474 /*OUT*/ PAGP_COMMIT_PHYSICAL AgpCommitPhysical;
475 /*OUT*/ PAGP_FREE_PHYSICAL AgpFreePhysical;
476 /*OUT*/ PAGP_RESERVE_VIRTUAL AgpReserveVirtual;
477 /*OUT*/ PAGP_RELEASE_VIRTUAL AgpReleaseVirtual;
478 /*OUT*/ PAGP_COMMIT_VIRTUAL AgpCommitVirtual;
479 /*OUT*/ PAGP_FREE_VIRTUAL AgpFreeVirtual;
480 /*OUT*/ ULONGLONG AgpAllocationLimit;
481 /*OUT*/ PAGP_SET_RATE AgpSetRate;
482} VIDEO_PORT_AGP_INTERFACE_2, *PVIDEO_PORT_AGP_INTERFACE_2;
483
484#define VIDEO_PORT_I2C_INTERFACE_VERSION_1 1
485
486typedef VOID DDKAPI
487(*PVIDEO_WRITE_CLOCK_LINE)(
488 PVOID HwDeviceExtension,
489 UCHAR Data);
490
491typedef VOID DDKAPI
492(*PVIDEO_WRITE_DATA_LINE)(
493 PVOID HwDeviceExtension,
494 UCHAR Data);
495
496typedef BOOLEAN DDKAPI
497(*PVIDEO_READ_CLOCK_LINE)(
498 PVOID HwDeviceExtension);
499
500typedef BOOLEAN DDKAPI
501(*PVIDEO_READ_DATA_LINE)(
502 PVOID HwDeviceExtension);
503
504typedef struct _I2C_CALLBACKS
505{
506 /*IN*/ PVIDEO_WRITE_CLOCK_LINE WriteClockLine;
507 /*IN*/ PVIDEO_WRITE_DATA_LINE WriteDataLine;
508 /*IN*/ PVIDEO_READ_CLOCK_LINE ReadClockLine;
509 /*IN*/ PVIDEO_READ_DATA_LINE ReadDataLine;
510} I2C_CALLBACKS, *PI2C_CALLBACKS;
511
512typedef BOOLEAN DDKAPI
513(*PI2C_START)(
514 /*IN*/ PVOID HwDeviceExtension,
515 /*IN*/ PI2C_CALLBACKS I2CCallbacks);
516
517typedef BOOLEAN DDKAPI
518(*PI2C_STOP)(
519 /*IN*/ PVOID HwDeviceExtension,
520 /*IN*/ PI2C_CALLBACKS I2CCallbacks);
521
522typedef BOOLEAN DDKAPI
523(*PI2C_WRITE)(
524 /*IN*/ PVOID HwDeviceExtension,
525 /*IN*/ PI2C_CALLBACKS I2CCallbacks,
526 /*IN*/ PUCHAR Buffer,
527 /*IN*/ ULONG Length);
528
529typedef BOOLEAN DDKAPI
530(*PI2C_READ)(
531 /*IN*/ PVOID HwDeviceExtension,
532 /*IN*/ PI2C_CALLBACKS I2CCallbacks,
533 /*OUT*/ PUCHAR Buffer,
534 /*IN*/ ULONG Length);
535
536typedef struct _VIDEO_PORT_I2C_INTERFACE {
537 USHORT Size;
538 USHORT Version;
539 PVOID Context;
540 PINTERFACE_REFERENCE InterfaceReference;
541 PINTERFACE_DEREFERENCE InterfaceDereference;
542 PI2C_START I2CStart;
543 PI2C_STOP I2CStop;
544 PI2C_WRITE I2CWrite;
545 PI2C_READ I2CRead;
546} VIDEO_PORT_I2C_INTERFACE, *PVIDEO_PORT_I2C_INTERFACE;
547
548 /* VIDEO_PORT_INT10_INTERFACE.Version constants */
549#define VIDEO_PORT_INT10_INTERFACE_VERSION_1 1
550
551typedef VP_STATUS DDKAPI
552(*PINT10_ALLOCATE_BUFFER)(
553 /*IN*/ PVOID Context,
554 /*OUT*/ PUSHORT Seg,
555 /*OUT*/ PUSHORT Off,
556 /*IN OUT*/ PULONG Length);
557
558typedef VP_STATUS DDKAPI
559(*PINT10_CALL_BIOS)(
560 /*IN*/ PVOID Context,
561 /*IN OUT*/ PINT10_BIOS_ARGUMENTS BiosArguments);
562
563typedef VP_STATUS DDKAPI
564(*PINT10_FREE_BUFFER)(
565 /*IN*/ PVOID Context,
566 /*IN*/ USHORT Seg,
567 /*IN*/ USHORT Off);
568
569typedef VP_STATUS DDKAPI
570(*PINT10_READ_MEMORY)(
571 /*IN*/ PVOID Context,
572 /*IN*/ USHORT Seg,
573 /*IN*/ USHORT Off,
574 /*OUT*/ PVOID Buffer,
575 /*IN*/ ULONG Length);
576
577typedef VP_STATUS DDKAPI
578(*PINT10_WRITE_MEMORY)(
579 /*IN*/ PVOID Context,
580 /*IN*/ USHORT Seg,
581 /*IN*/ USHORT Off,
582 /*IN*/ PVOID Buffer,
583 /*IN*/ ULONG Length);
584
585typedef struct _VIDEO_PORT_INT10_INTERFACE {
586 /*IN*/ USHORT Size;
587 /*IN*/ USHORT Version;
588 /*OUT*/ PVOID Context;
589 /*OUT*/ PINTERFACE_REFERENCE InterfaceReference;
590 /*OUT*/ PINTERFACE_DEREFERENCE InterfaceDereference;
591 /*OUT*/ PINT10_ALLOCATE_BUFFER Int10AllocateBuffer;
592 /*OUT*/ PINT10_FREE_BUFFER Int10FreeBuffer;
593 /*OUT*/ PINT10_READ_MEMORY Int10ReadMemory;
594 /*OUT*/ PINT10_WRITE_MEMORY Int10WriteMemory;
595 /*OUT*/ PINT10_CALL_BIOS Int10CallBios;
596} VIDEO_PORT_INT10_INTERFACE, *PVIDEO_PORT_INT10_INTERFACE;
597
598 /* Flags for VideoPortGetDeviceBase and VideoPortMapMemory */
599#define VIDEO_MEMORY_SPACE_MEMORY 0x00
600#define VIDEO_MEMORY_SPACE_IO 0x01
601#define VIDEO_MEMORY_SPACE_USER_MODE 0x02
602#define VIDEO_MEMORY_SPACE_DENSE 0x04
603#define VIDEO_MEMORY_SPACE_P6CACHE 0x08
604
605typedef struct _VIDEO_X86_BIOS_ARGUMENTS {
606 ULONG Eax;
607 ULONG Ebx;
608 ULONG Ecx;
609 ULONG Edx;
610 ULONG Esi;
611 ULONG Edi;
612 ULONG Ebp;
613} VIDEO_X86_BIOS_ARGUMENTS, *PVIDEO_X86_BIOS_ARGUMENTS;
614
615typedef struct _VP_DEVICE_DESCRIPTION {
616 BOOLEAN ScatterGather;
617 BOOLEAN Dma32BitAddresses;
618 BOOLEAN Dma64BitAddresses;
619 ULONG MaximumLength;
620} VP_DEVICE_DESCRIPTION, *PVP_DEVICE_DESCRIPTION;
621
622typedef struct _VPOSVERSIONINFO {
623 /*IN*/ ULONG Size;
624 /*OUT*/ ULONG MajorVersion;
625 /*OUT*/ ULONG MinorVersion;
626 /*OUT*/ ULONG BuildNumber;
627 /*OUT*/ USHORT ServicePackMajor;
628 /*OUT*/ USHORT ServicePackMinor;
629} VPOSVERSIONINFO, *PVPOSVERSIONINFO;
630
631
632
633 /* Video port functions for miniports */
634
635VPAPI
636VOID
637DDKAPI
638VideoDebugPrint(
639 /*IN*/ ULONG DebugPrintLevel,
640 /*IN*/ PCHAR DebugMessage,
641 /*IN*/ ...);
642
643VPAPI
644VOID
645DDKAPI
646VideoPortAcquireDeviceLock(
647 /*IN*/ PVOID HwDeviceExtension);
648
649VPAPI
650VOID
651DDKAPI
652VideoPortAcquireSpinLock(
653 /*IN*/ PVOID HwDeviceExtension,
654 /*IN*/ PSPIN_LOCK SpinLock,
655 /*OUT*/ PUCHAR OldIrql);
656
657VPAPI
658VOID
659DDKAPI
660VideoPortAcquireSpinLockAtDpcLevel(
661 /*IN*/ PVOID HwDeviceExtension,
662 /*IN*/ PSPIN_LOCK SpinLock);
663
664VPAPI
665VP_STATUS
666DDKAPI
667VideoPortAllocateBuffer(
668 /*IN*/ PVOID HwDeviceExtension,
669 /*IN*/ ULONG Size,
670 /*OUT*/ PVOID *Buffer);
671
672VPAPI
673PVOID
674DDKAPI
675VideoPortAllocateCommonBuffer(
676 /*IN*/ PVOID HwDeviceExtension,
677 /*IN*/ PVP_DMA_ADAPTER VpDmaAdapter,
678 /*IN*/ ULONG DesiredLength,
679 /*OUT*/ PPHYSICAL_ADDRESS LogicalAddress,
680 /*IN*/ BOOLEAN CacheEnabled,
681 PVOID Reserved);
682
683VPAPI
684PVOID
685DDKAPI
686VideoPortAllocateContiguousMemory(
687 /*IN*/ PVOID HwDeviceExtension,
688 /*IN*/ ULONG NumberOfBytes,
689 /*IN*/ PHYSICAL_ADDRESS HighestAcceptableAddress);
690
691 /* VideoPortAllocatePool.PoolType constants */
692typedef enum _VP_POOL_TYPE {
693 VpNonPagedPool = 0,
694 VpPagedPool,
695 VpNonPagedPoolCacheAligned = 4,
696 VpPagedPoolCacheAligned
697} VP_POOL_TYPE, *PVP_POOL_TYPE;
698
699VPAPI
700PVOID
701DDKAPI
702VideoPortAllocatePool(
703 /*IN*/ PVOID HwDeviceExtension,
704 /*IN*/ VP_POOL_TYPE PoolType,
705 /*IN*/ SIZE_T NumberOfBytes,
706 /*IN*/ ULONG Tag);
707
708VPAPI
709PDMA
710DDKAPI
711VideoPortAssociateEventsWithDmaHandle(
712 /*IN*/ PVOID HwDeviceExtension,
713 /*IN OUT*/ PVIDEO_REQUEST_PACKET pVrp,
714 /*IN*/ PVOID MappedUserEvent,
715 /*IN*/ PVOID DisplayDriverEvent);
716
717 /* VideoPortCheckForDeviceExistence.Flags constants */
718#define CDE_USE_SUBSYSTEM_IDS 0x00000001
719#define CDE_USE_REVISION 0x00000002
720
721VPAPI
722BOOLEAN
723DDKAPI
724VideoPortCheckForDeviceExistence(
725 /*IN*/ PVOID HwDeviceExtension,
726 /*IN*/ USHORT VendorId,
727 /*IN*/ USHORT DeviceId,
728 /*IN*/ UCHAR RevisionId,
729 /*IN*/ USHORT SubVendorId,
730 /*IN*/ USHORT SubSystemId,
731 /*IN*/ ULONG Flags);
732
733VPAPI
734VOID
735DDKAPI
736VideoPortClearEvent(
737 /*IN*/ PVOID HwDeviceExtension,
738 /*IN*/ PEVENT pEvent);
739
740VPAPI
741ULONG
742DDKAPI
743VideoPortCompareMemory(
744 /*IN*/ PVOID Source1,
745 /*IN*/ PVOID Source2,
746 /*IN*/ ULONG Length);
747
748VPAPI
749VP_STATUS
750DDKAPI
751VideoPortCompleteDma(
752 /*IN*/ PVOID HwDeviceExtension,
753 /*IN*/ PVP_DMA_ADAPTER VpDmaAdapter,
754 /*IN*/ PVP_SCATTER_GATHER_LIST VpScatterGather,
755 /*IN*/ BOOLEAN WriteToDevice);
756
757VPAPI
758VP_STATUS
759DDKAPI
760VideoPortCreateEvent(
761 /*IN*/ PVOID HwDeviceExtension,
762 /*IN*/ ULONG EventFlag,
763 /*IN*/ PVOID Unused,
764 /*OUT*/ PEVENT *ppEvent);
765
766VPAPI
767VP_STATUS
768DDKAPI
769VideoPortCreateSecondaryDisplay(
770 /*IN*/ PVOID HwDeviceExtension,
771 /*IN OUT*/ PVOID *SecondaryDeviceExtension,
772 /*IN*/ ULONG ulFlag);
773
774VPAPI
775VP_STATUS
776DDKAPI
777VideoPortCreateSpinLock(
778 /*IN*/ PVOID HwDeviceExtension,
779 /*OUT*/ PSPIN_LOCK *SpinLock);
780
781typedef struct _DDC_CONTROL {
782 /*IN*/ ULONG Size;
783 /*IN*/ I2C_CALLBACKS I2CCallbacks;
784 /*IN*/ UCHAR EdidSegment;
785} DDC_CONTROL, *PDDC_CONTROL;
786
787VPAPI
788BOOLEAN
789DDKAPI
790VideoPortDDCMonitorHelper(
791 /*IN*/ PVOID HwDeviceExtension,
792 /*IN*/ PVOID DDCControl,
793 /*IN OUT*/ PUCHAR EdidBuffer,
794 /*IN*/ ULONG EdidBufferSize);
795
796VPAPI
797VOID
798DDKCDECLAPI
799VideoPortDebugPrint(
800 /*IN*/ VIDEO_DEBUG_LEVEL DebugPrintLevel,
801 /*IN*/ PCHAR DebugMessage,
802 /*IN*/ ...);
803
804VPAPI
805VP_STATUS
806DDKAPI
807VideoPortDeleteEvent(
808 /*IN*/ PVOID HwDeviceExtension,
809 /*IN*/ PEVENT pEvent);
810
811VPAPI
812VP_STATUS
813DDKAPI
814VideoPortDeleteSpinLock(
815 /*IN*/ PVOID HwDeviceExtension,
816 /*IN*/ PSPIN_LOCK SpinLock);
817
818VPAPI
819VP_STATUS
820DDKAPI
821VideoPortDisableInterrupt(
822 /*IN*/ PVOID HwDeviceExtension);
823
824VPAPI
825PDMA
826DDKAPI
827VideoPortDoDma(
828 /*IN*/ PVOID HwDeviceExtension,
829 /*IN*/ PDMA pDma,
830 /*IN*/ DMA_FLAGS DmaFlags);
831
832VPAPI
833VP_STATUS
834DDKAPI
835VideoPortEnableInterrupt(
836 /*IN*/ PVOID HwDeviceExtension);
837
838VPAPI
839VP_STATUS
840DDKAPI
841VideoPortEnumerateChildren(
842 /*IN*/ PVOID HwDeviceExtension,
843 /*IN*/ PVOID Reserved);
844
845VPAPI
846VOID
847DDKAPI
848VideoPortFreeCommonBuffer(
849 /*IN*/ PVOID HwDeviceExtension,
850 /*IN*/ ULONG Length,
851 /*IN*/ PVOID VirtualAddress,
852 /*IN*/ PHYSICAL_ADDRESS LogicalAddress,
853 /*IN*/ BOOLEAN CacheEnabled);
854
855VPAPI
856VOID
857DDKAPI
858VideoPortFreeDeviceBase(
859 /*IN*/ PVOID HwDeviceExtension,
860 /*IN*/ PVOID MappedAddress);
861
862VPAPI
863VOID
864DDKAPI
865VideoPortFreePool(
866 /*IN*/ PVOID HwDeviceExtension,
867 /*IN*/ PVOID Ptr);
868
869VPAPI
870VP_STATUS
871DDKAPI
872VideoPortGetAccessRanges(
873 /*IN*/ PVOID HwDeviceExtension,
874 /*IN*/ ULONG NumRequestedResources,
875 /*IN*/ PIO_RESOURCE_DESCRIPTOR RequestedResources /*OPTIONAL*/,
876 /*IN*/ ULONG NumAccessRanges,
877 /*OUT*/ PVIDEO_ACCESS_RANGE AccessRanges,
878 /*IN*/ PVOID VendorId,
879 /*IN*/ PVOID DeviceId,
880 /*OUT*/ PULONG Slot);
881
882VPAPI
883PVOID
884DDKAPI
885VideoPortGetAssociatedDeviceExtension(
886 /*IN*/ PVOID DeviceObject);
887
888VPAPI
889ULONG
890DDKAPI
891VideoPortGetAssociatedDeviceID(
892 /*IN*/ PVOID DeviceObject);
893
894VPAPI
895ULONG
896DDKAPI
897VideoPortGetBusData(
898 /*IN*/ PVOID HwDeviceExtension,
899 /*IN*/ BUS_DATA_TYPE BusDataType,
900 /*IN*/ ULONG SlotNumber,
901 /*IN OUT*/ PVOID Buffer,
902 /*IN*/ ULONG Offset,
903 /*IN*/ ULONG Length);
904
905VPAPI
906ULONG
907DDKAPI
908VideoPortGetBytesUsed(
909 /*IN*/ PVOID HwDeviceExtension,
910 /*IN*/ PDMA pDma);
911
912VPAPI
913PVOID
914DDKAPI
915VideoPortGetCommonBuffer(
916 /*IN*/ PVOID HwDeviceExtension,
917 /*IN*/ ULONG DesiredLength,
918 /*IN*/ ULONG Alignment,
919 /*OUT*/ PPHYSICAL_ADDRESS LogicalAddress,
920 /*OUT*/ PULONG pActualLength,
921 /*IN*/ BOOLEAN CacheEnabled);
922
923VPAPI
924UCHAR
925DDKAPI
926VideoPortGetCurrentIrql(
927 VOID);
928
929VPAPI
930PVOID
931DDKAPI
932VideoPortGetDeviceBase(
933 /*IN*/ PVOID HwDeviceExtension,
934 /*IN*/ PHYSICAL_ADDRESS IoAddress,
935 /*IN*/ ULONG NumberOfUchars,
936 /*IN*/ UCHAR InIoSpace);
937
938VPAPI
939VP_STATUS
940DDKAPI
941VideoPortGetDeviceData(
942 /*IN*/ PVOID HwDeviceExtension,
943 /*IN*/ VIDEO_DEVICE_DATA_TYPE DeviceDataType,
944 /*IN*/ PMINIPORT_QUERY_DEVICE_ROUTINE CallbackRoutine,
945 /*IN*/ PVOID Context);
946
947VPAPI
948PVP_DMA_ADAPTER
949DDKAPI
950VideoPortGetDmaAdapter(
951 /*IN*/ PVOID HwDeviceExtension,
952 /*IN*/ PVP_DEVICE_DESCRIPTION VpDeviceDescription);
953
954VPAPI
955PVOID
956DDKAPI
957VideoPortGetDmaContext(
958 /*IN*/ PVOID HwDeviceExtension,
959 /*IN*/ PDMA pDma);
960
961VPAPI
962PVOID
963DDKAPI
964VideoPortGetMdl(
965 /*IN*/ PVOID HwDeviceExtension,
966 /*IN*/ PDMA pDma);
967
968VPAPI
969VP_STATUS
970DDKAPI
971VideoPortGetRegistryParameters(
972 /*IN*/ PVOID HwDeviceExtension,
973 /*IN*/ PWSTR ParameterName,
974 /*IN*/ UCHAR IsParameterFileName,
975 /*IN*/ PMINIPORT_GET_REGISTRY_ROUTINE CallbackRoutine,
976 /*IN*/ PVOID Context);
977
978VPAPI
979PVOID
980DDKAPI
981VideoPortGetRomImage(
982 /*IN*/ PVOID HwDeviceExtension,
983 /*IN*/ PVOID Unused1,
984 /*IN*/ ULONG Unused2,
985 /*IN*/ ULONG Length);
986
987VPAPI
988VP_STATUS
989DDKAPI
990VideoPortGetVersion(
991 /*IN*/ PVOID HwDeviceExtension,
992 /*IN OUT*/ PVPOSVERSIONINFO pVpOsVersionInfo);
993
994VPAPI
995VP_STATUS
996DDKAPI
997VideoPortGetVgaStatus(
998 /*IN*/ PVOID HwDeviceExtension,
999 /*OUT*/ PULONG VgaStatus);
1000
1001VPAPI
1002ULONG
1003DDKAPI
1004VideoPortInitialize(
1005 /*IN*/ PVOID Argument1,
1006 /*IN*/ PVOID Argument2,
1007 /*IN*/ PVIDEO_HW_INITIALIZATION_DATA HwInitializationData,
1008 /*IN*/ PVOID HwContext);
1009
1010VPAPI
1011VP_STATUS
1012DDKAPI
1013VideoPortInt10(
1014 /*IN*/ PVOID HwDeviceExtension,
1015 /*IN*/ PVIDEO_X86_BIOS_ARGUMENTS BiosArguments);
1016
1017VPAPI
1018LONG
1019DDKFASTAPI
1020VideoPortInterlockedDecrement(
1021 /*IN*/ PLONG Addend);
1022
1023VPAPI
1024LONG
1025DDKFASTAPI
1026VideoPortInterlockedExchange(
1027 /*IN OUT*/ PLONG Target,
1028 /*IN*/ LONG Value);
1029
1030VPAPI
1031LONG
1032DDKFASTAPI
1033VideoPortInterlockedIncrement(
1034 /*IN*/ PLONG Addend);
1035
1036typedef enum _VP_LOCK_OPERATION {
1037 VpReadAccess = 0,
1038 VpWriteAccess,
1039 VpModifyAccess
1040} VP_LOCK_OPERATION;
1041
1042VPAPI
1043PVOID
1044DDKAPI
1045VideoPortLockBuffer(
1046 /*IN*/ PVOID HwDeviceExtension,
1047 /*IN*/ PVOID BaseAddress,
1048 /*IN*/ ULONG Length,
1049 /*IN*/ VP_LOCK_OPERATION Operation);
1050
1051VPAPI
1052BOOLEAN
1053DDKAPI
1054VideoPortLockPages(
1055 /*IN*/ PVOID HwDeviceExtension,
1056 /*IN OUT*/ PVIDEO_REQUEST_PACKET pVrp,
1057 /*IN OUT*/ PEVENT pUEvent,
1058 /*IN*/ PEVENT pDisplayEvent,
1059 /*IN*/ DMA_FLAGS DmaFlags);
1060
1061VPAPI
1062VOID
1063DDKAPI
1064VideoPortLogError(
1065 /*IN*/ PVOID HwDeviceExtension,
1066 /*IN*/ PVIDEO_REQUEST_PACKET Vrp /*OPTIONAL*/,
1067 /*IN*/ VP_STATUS ErrorCode,
1068 /*IN*/ ULONG UniqueId);
1069
1070VPAPI
1071VP_STATUS
1072DDKAPI
1073VideoPortMapBankedMemory(
1074 /*IN*/ PVOID HwDeviceExtension,
1075 /*IN*/ PHYSICAL_ADDRESS PhysicalAddress,
1076 /*IN OUT*/ PULONG Length,
1077 PULONG InIoSpace,
1078 PVOID *VirtualAddress,
1079 ULONG BankLength,
1080 UCHAR ReadWriteBank,
1081 PBANKED_SECTION_ROUTINE BankRoutine,
1082 PVOID Context);
1083
1084VPAPI
1085PDMA
1086DDKAPI
1087VideoPortMapDmaMemory(
1088 /*IN*/ PVOID HwDeviceExtension,
1089 /*IN*/ PVIDEO_REQUEST_PACKET pVrp,
1090 /*IN*/ PHYSICAL_ADDRESS BoardAddress,
1091 /*IN*/ PULONG Length,
1092 /*IN*/ PULONG InIoSpace,
1093 /*IN*/ PVOID MappedUserEvent,
1094 /*IN*/ PVOID DisplayDriverEvent,
1095 /*IN OUT*/ PVOID *VirtualAddress);
1096
1097VPAPI
1098VP_STATUS
1099DDKAPI
1100VideoPortMapMemory(
1101 /*IN*/ PVOID HwDeviceExtension,
1102 /*IN*/ PHYSICAL_ADDRESS PhysicalAddress,
1103 /*IN OUT*/ PULONG Length,
1104 /*IN*/ PULONG InIoSpace,
1105 /*IN OUT*/ PVOID *VirtualAddress);
1106
1107VPAPI
1108VOID
1109DDKAPI
1110VideoPortMoveMemory(
1111 /*IN*/ PVOID Destination,
1112 /*IN*/ PVOID Source,
1113 /*IN*/ ULONG Length);
1114
1115VPAPI
1116VOID
1117DDKAPI
1118VideoPortPutDmaAdapter(
1119 /*IN*/ PVOID HwDeviceExtension,
1120 /*IN*/ PVP_DMA_ADAPTER VpDmaAdapter);
1121
1122VPAPI
1123LONGLONG
1124DDKAPI
1125VideoPortQueryPerformanceCounter(
1126 /*IN*/ PVOID HwDeviceExtension,
1127 /*OUT*/ PLONGLONG PerformanceFrequency /*OPTIONAL*/);
1128
1129 /* VideoPortQueryServices.ServicesType constants */
1130typedef enum _VIDEO_PORT_SERVICES {
1131 VideoPortServicesAGP = 1,
1132 VideoPortServicesI2C,
1133 VideoPortServicesHeadless,
1134 VideoPortServicesInt10
1135} VIDEO_PORT_SERVICES;
1136
1137VPAPI
1138VP_STATUS
1139DDKAPI
1140VideoPortQueryServices(
1141 /*IN*/ PVOID HwDeviceExtension,
1142 /*IN*/ VIDEO_PORT_SERVICES ServicesType,
1143 /*IN OUT*/ PINTERFACE Interface);
1144
1145VPAPI
1146VOID
1147DDKAPI
1148VideoPortQuerySystemTime(
1149 /*OUT*/ PLARGE_INTEGER CurrentTime);
1150
1151VPAPI
1152BOOLEAN
1153DDKAPI
1154VideoPortQueueDpc(
1155 /*IN*/ PVOID HwDeviceExtension,
1156 /*IN*/ PMINIPORT_DPC_ROUTINE CallbackRoutine,
1157 /*IN*/ PVOID Context);
1158
1159VPAPI
1160VOID
1161DDKAPI
1162VideoPortReadPortBufferUchar(
1163 /*IN*/ PUCHAR Port,
1164 /*OUT*/ PUCHAR Buffer,
1165 /*IN*/ ULONG Count);
1166
1167VPAPI
1168VOID
1169DDKAPI
1170VideoPortReadPortBufferUlong(
1171 /*IN*/ PULONG Port,
1172 /*OUT*/ PULONG Buffer,
1173 /*IN*/ ULONG Count);
1174
1175VPAPI
1176VOID
1177DDKAPI
1178VideoPortReadPortBufferUshort(
1179 /*IN*/ PUSHORT Port,
1180 /*OUT*/ PUSHORT Buffer,
1181 /*IN*/ ULONG Count);
1182
1183VPAPI
1184UCHAR
1185DDKAPI
1186VideoPortReadPortUchar(
1187 /*IN*/ PUCHAR Port);
1188
1189VPAPI
1190ULONG
1191DDKAPI
1192VideoPortReadPortUlong(
1193 /*IN*/ PULONG Port);
1194
1195VPAPI
1196USHORT
1197DDKAPI
1198VideoPortReadPortUshort(
1199 /*IN*/ PUSHORT Port);
1200
1201VPAPI
1202VOID
1203DDKAPI
1204VideoPortReadRegisterBufferUchar(
1205 /*IN*/ PUCHAR Register,
1206 /*OUT*/ PUCHAR Buffer,
1207 /*IN*/ ULONG Count);
1208
1209VPAPI
1210VOID
1211DDKAPI
1212VideoPortReadRegisterBufferUlong(
1213 /*IN*/ PULONG Register,
1214 /*OUT*/ PULONG Buffer,
1215 /*IN*/ ULONG Count);
1216
1217VPAPI
1218VOID
1219DDKAPI
1220VideoPortReadRegisterBufferUshort(
1221 /*IN*/ PUSHORT Register,
1222 /*OUT*/ PUSHORT Buffer,
1223 /*IN*/ ULONG Count);
1224
1225VPAPI
1226UCHAR
1227DDKAPI
1228VideoPortReadRegisterUchar(
1229 /*IN*/ PUCHAR Register);
1230
1231VPAPI
1232ULONG
1233DDKAPI
1234VideoPortReadRegisterUlong(
1235 /*IN*/ PULONG Register);
1236
1237VPAPI
1238USHORT
1239DDKAPI
1240VideoPortReadRegisterUshort(
1241 /*IN*/ PUSHORT Register);
1242
1243VPAPI
1244LONG
1245DDKAPI
1246VideoPortReadStateEvent(
1247 /*IN*/ PVOID HwDeviceExtension,
1248 /*IN*/ PEVENT pEvent);
1249
1250VPAPI
1251VOID
1252DDKAPI
1253VideoPortReleaseBuffer(
1254 /*IN*/ PVOID HwDeviceExtension,
1255 /*IN*/ PVOID Buffer);
1256
1257VPAPI
1258VOID
1259DDKAPI
1260VideoPortReleaseCommonBuffer(
1261 /*IN*/ PVOID HwDeviceExtension,
1262 /*IN*/ PVP_DMA_ADAPTER VpDmaAdapter,
1263 /*IN*/ ULONG Length,
1264 /*IN*/ PHYSICAL_ADDRESS LogicalAddress,
1265 /*IN*/ PVOID VirtualAddress,
1266 /*IN*/ BOOLEAN CacheEnabled);
1267
1268VPAPI
1269VOID
1270DDKAPI
1271VideoPortReleaseDeviceLock(
1272 /*IN*/ PVOID HwDeviceExtension);
1273
1274VPAPI
1275VOID
1276DDKAPI
1277VideoPortReleaseSpinLock(
1278 /*IN*/ PVOID HwDeviceExtension,
1279 /*IN*/ PSPIN_LOCK SpinLock,
1280 /*IN*/ UCHAR NewIrql);
1281
1282VPAPI
1283VOID
1284DDKAPI
1285VideoPortReleaseSpinLockFromDpcLevel(
1286 /*IN*/ PVOID HwDeviceExtension,
1287 /*IN*/ PSPIN_LOCK SpinLock);
1288
1289VPAPI
1290BOOLEAN
1291DDKAPI
1292VideoPortScanRom(
1293 PVOID HwDeviceExtension,
1294 PUCHAR RomBase,
1295 ULONG RomLength,
1296 PUCHAR String);
1297
1298VPAPI
1299ULONG
1300DDKAPI
1301VideoPortSetBusData(
1302 /*IN*/ PVOID HwDeviceExtension,
1303 /*IN*/ BUS_DATA_TYPE BusDataType,
1304 /*IN*/ ULONG SlotNumber,
1305 /*IN*/ PVOID Buffer,
1306 /*IN*/ ULONG Offset,
1307 /*IN*/ ULONG Length);
1308
1309VPAPI
1310VOID
1311DDKAPI
1312VideoPortSetBytesUsed(
1313 /*IN*/ PVOID HwDeviceExtension,
1314 /*IN OUT*/ PDMA pDma,
1315 /*IN*/ ULONG BytesUsed);
1316
1317VPAPI
1318VOID
1319DDKAPI
1320VideoPortSetDmaContext(
1321 /*IN*/ PVOID HwDeviceExtension,
1322 /*OUT*/ PDMA pDma,
1323 /*IN*/ PVOID InstanceContext);
1324
1325VPAPI
1326LONG
1327DDKAPI
1328VideoPortSetEvent(
1329 /*IN*/ PVOID HwDeviceExtension,
1330 /*IN*/ PEVENT pEvent);
1331
1332VPAPI
1333VP_STATUS
1334DDKAPI
1335VideoPortSetRegistryParameters(
1336 /*IN*/ PVOID HwDeviceExtension,
1337 /*IN*/ PWSTR ValueName,
1338 /*IN*/ PVOID ValueData,
1339 /*IN*/ ULONG ValueLength);
1340
1341VPAPI
1342VP_STATUS
1343DDKAPI
1344VideoPortSetTrappedEmulatorPorts(
1345 /*IN*/ PVOID HwDeviceExtension,
1346 /*IN*/ ULONG NumAccessRanges,
1347 /*IN*/ PVIDEO_ACCESS_RANGE AccessRange);
1348
1349VPAPI
1350BOOLEAN
1351DDKAPI
1352VideoPortSignalDmaComplete(
1353 /*IN*/ PVOID HwDeviceExtension,
1354 /*IN*/ PVOID pDmaHandle);
1355
1356VPAPI
1357VOID
1358DDKAPI
1359VideoPortStallExecution(
1360 /*IN*/ ULONG Microseconds);
1361
1362VPAPI
1363VP_STATUS
1364DDKAPI
1365VideoPortStartDma(
1366 /*IN*/ PVOID HwDeviceExtension,
1367 /*IN*/ PVP_DMA_ADAPTER VpDmaAdapter,
1368 /*IN*/ PVOID Mdl,
1369 /*IN*/ ULONG Offset,
1370 /*IN OUT*/ PULONG pLength,
1371 /*IN*/ PEXECUTE_DMA ExecuteDmaRoutine,
1372 /*IN*/ PVOID Context,
1373 /*IN*/ BOOLEAN WriteToDevice);
1374
1375VPAPI
1376VOID
1377DDKAPI
1378VideoPortStartTimer(
1379 /*IN*/ PVOID HwDeviceExtension);
1380
1381VPAPI
1382VOID
1383DDKAPI
1384VideoPortStopTimer(
1385 /*IN*/ PVOID HwDeviceExtension);
1386
1387 /* VideoPortSynchronizeExecution.Priority constants */
1388typedef enum VIDEO_SYNCHRONIZE_PRIORITY {
1389 VpLowPriority = 0,
1390 VpMediumPriority,
1391 VpHighPriority
1392} VIDEO_SYNCHRONIZE_PRIORITY, *PVIDEO_SYNCHRONIZE_PRIORITY;
1393
1394VPAPI
1395BOOLEAN
1396DDKAPI
1397VideoPortSynchronizeExecution(
1398 /*IN*/ PVOID HwDeviceExtension,
1399 /*IN*/ VIDEO_SYNCHRONIZE_PRIORITY Priority,
1400 /*IN*/ PMINIPORT_SYNCHRONIZE_ROUTINE SynchronizeRoutine,
1401 /*IN*/ PVOID Context);
1402
1403VPAPI
1404VOID
1405DDKAPI
1406VideoPortUnLockBuffer(
1407 /*IN*/ PVOID HwDeviceExtension,
1408 /*IN*/ PVOID Mdl);
1409
1410VPAPI
1411BOOLEAN
1412DDKAPI
1413VideoPortUnlockPages(
1414 /*IN*/ PVOID hwDeviceExtension,
1415 /*IN OUT*/ PDMA pDma);
1416
1417VPAPI
1418BOOLEAN
1419DDKAPI
1420VideoPortUnmapDmaMemory(
1421 /*IN*/ PVOID HwDeviceExtension,
1422 /*IN*/ PVOID VirtualAddress,
1423 /*IN*/ HANDLE ProcessHandle,
1424 /*IN*/ PDMA BoardMemoryHandle);
1425
1426VPAPI
1427VP_STATUS
1428DDKAPI
1429VideoPortUnmapMemory(
1430 /*IN*/ PVOID HwDeviceExtension,
1431 /*IN OUT*/ PVOID VirtualAddress,
1432 /*IN*/ HANDLE ProcessHandle);
1433
1434VPAPI
1435VP_STATUS
1436DDKAPI
1437VideoPortVerifyAccessRanges(
1438 /*IN*/ PVOID HwDeviceExtension,
1439 /*IN*/ ULONG NumAccessRanges,
1440 /*IN*/ PVIDEO_ACCESS_RANGE AccessRanges);
1441
1442VPAPI
1443VP_STATUS
1444DDKAPI
1445VideoPortWaitForSingleObject(
1446 /*IN*/ PVOID HwDeviceExtension,
1447 /*IN*/ PVOID Object,
1448 /*IN*/ PLARGE_INTEGER Timeout /*OPTIONAL*/);
1449
1450VPAPI
1451VOID
1452DDKAPI
1453VideoPortWritePortBufferUchar(
1454 /*IN*/ PUCHAR Port,
1455 /*IN*/ PUCHAR Buffer,
1456 /*IN*/ ULONG Count);
1457
1458VPAPI
1459VOID
1460DDKAPI
1461VideoPortWritePortBufferUlong(
1462 /*IN*/ PULONG Port,
1463 /*IN*/ PULONG Buffer,
1464 /*IN*/ ULONG Count);
1465
1466VPAPI
1467VOID
1468DDKAPI
1469VideoPortWritePortBufferUshort(
1470 /*IN*/ PUSHORT Port,
1471 /*IN*/ PUSHORT Buffer,
1472 /*IN*/ ULONG Count);
1473
1474VPAPI
1475VOID
1476DDKAPI
1477VideoPortWritePortUchar(
1478 /*IN*/ PUCHAR Port,
1479 /*IN*/ UCHAR Value);
1480
1481VPAPI
1482VOID
1483DDKAPI
1484VideoPortWritePortUlong(
1485 /*IN*/ PULONG Port,
1486 /*IN*/ ULONG Value);
1487
1488VPAPI
1489VOID
1490DDKAPI
1491VideoPortWritePortUshort(
1492 /*IN*/ PUSHORT Port,
1493 /*IN*/ USHORT Value);
1494
1495VPAPI
1496VOID
1497DDKAPI
1498VideoPortWriteRegisterBufferUchar(
1499 /*IN*/ PUCHAR Register,
1500 /*IN*/ PUCHAR Buffer,
1501 /*IN*/ ULONG Count);
1502
1503VPAPI
1504VOID
1505DDKAPI
1506VideoPortWriteRegisterBufferUlong(
1507 /*IN*/ PULONG Register,
1508 /*IN*/ PULONG Buffer,
1509 /*IN*/ ULONG Count);
1510
1511VPAPI
1512VOID
1513DDKAPI
1514VideoPortWriteRegisterBufferUshort(
1515 /*IN*/ PUSHORT Register,
1516 /*IN*/ PUSHORT Buffer,
1517 /*IN*/ ULONG Count);
1518
1519VPAPI
1520VOID
1521DDKAPI
1522VideoPortWriteRegisterUchar(
1523 /*IN*/ PUCHAR Register,
1524 /*IN*/ UCHAR Value);
1525
1526VPAPI
1527VOID
1528DDKAPI
1529VideoPortWriteRegisterUlong(
1530 /*IN*/ PULONG Register,
1531 /*IN*/ ULONG Value);
1532
1533VPAPI
1534VOID
1535DDKAPI
1536VideoPortWriteRegisterUshort(
1537 /*IN*/ PUSHORT Register,
1538 /*IN*/ USHORT Value);
1539
1540VPAPI
1541VOID
1542DDKAPI
1543VideoPortZeroDeviceMemory(
1544 /*IN*/ PVOID Destination,
1545 /*IN*/ ULONG Length);
1546
1547VPAPI
1548VOID
1549DDKAPI
1550VideoPortZeroMemory(
1551 /*IN*/ PVOID Destination,
1552 /*2IN*/ ULONG Length);
1553
1554#ifdef DBG
1555#define VideoDebugPrint(x) VideoPortDebugPrint x
1556#else
1557#define VideoDebugPrint(x)
1558#endif
1559
1560#ifdef __cplusplus
1561}
1562#endif
1563
1564#endif /* defined __WINDDI_H */
1565
1566#endif /* __VIDEO_H */
Note: See TracBrowser for help on using the repository browser.