VideoPortCompleteDma function

The VideoPortCompleteDma function flushes any data remaining in a bus-master adapter's internal cache at the end of a DMA transfer operation, and then frees the previously allocated map registers and scatter/gather list used in scatter/gather DMA operations.

Syntax

VIDEOPORT_API VP_STATUS VideoPortCompleteDma(
  IN PVOID                   HwDeviceExtension,
  IN PVP_DMA_ADAPTER         VpDmaAdapter,
  IN PVP_SCATTER_GATHER_LIST VpScatterGather,
  IN BOOLEAN                 WriteToDevice
);

Parameters

HwDeviceExtension

Pointer to the miniport driver's device extension.

VpDmaAdapter

Pointer to a VP_DMA_ADAPTER structure that represents the bus-master adapter. This structure was returned by a call to VideoPortGetDmaAdapter.

VpScatterGather

Pointer to the VP_SCATTER_GATHER_LIST structure previously passed to the miniport driver callback routine, HwVidExecuteDma.

WriteToDevice

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.

Return Value

VideoPortCompleteDma returns NO_ERROR.

Remarks

The video miniport driver should call VideoPortCompleteDma immediately to free up system resources after a DMA transfer has been completed.

It is important to note that the scatter/gather list built by VideoPortStartDma becomes invalid when VideoPortCompleteDma is called..

Requirements

   
Minimum supported client Available in Windows XP and later versions of the Windows operating systems.
Target Platform Desktop
Header video.h (include Video.h)
Library Videoprt.lib
DLL Videoprt.sys
IRQL <=DISPATCH_LEVEL

See Also

VP_DMA_ADAPTER

VP_SCATTER_GATHER_LIST

VideoPortGetDmaAdapter

VideoPortStartDma