The VideoPortStartDma function prepares the system for a DMA operation. As soon as the appropriate resource is available, VideoPortStartDma creates a scatter/gather list, initializes the system resources, and calls the video miniport driver-supplied HwVidExecuteDma routine to carry out the DMA operation.
VIDEOPORT_API VP_STATUS 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 );
Pointer to the miniport driver's device extension.
Specifies the byte offset in the buffer at which the DMA operation begins. The Mdl parameter describes this buffer.
Pointer to a variable that specifies the requested transfer size, in bytes, and that will receive the actual size to be transferred. The variable will be updated when either of the following events occurs: VideoPortStartDma returns or HwVidExecuteDma is called. It is therefore safe to read this variable from within HwVidExecuteDma even before VideoPortStartDma returns.
Pointer to a miniport driver-supplied HwVidExecuteDma callback routine. VideoPortStartDma calls this routine to program the hardware registers and start the actual DMA operation.
Pointer to the driver-determined context to be passed to the miniport driver's HwVidExecuteDma callback routine. Since the HwVidExecuteDma callback routine runs at DISPATCH_LEVEL, the data that Context points to should be in nonpaged memory.
Specifies the direction of the DMA transfer. A value of TRUE denotes a transfer from the buffer to the device, and a value of FALSE denotes a transfer from the device to the buffer.
VideoPortStartDma returns one of the following status codes:
|NO_ERROR||The operation was successfully carried out.|
|ERROR_NOT_ENOUGH_MEMORY||There are not enough system resources for this operation.|
To prepare for a DMA-transfer operation, VideoPortStartDma:
- Flushes the memory region in the host processor's caches.
- Builds a scatter/gather list.
- Calls the video miniport driver's HwVidExecuteDma callback.
|Minimum supported client||Available in Windows XP and later versions of the Windows operating systems.|
|Header||video.h (include Video.h)|