VideoPortAllocateCommonBuffer - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// video.h

VIDEOPORT_DEPRECATED VIDEOPORT_API PVOID VideoPortAllocateCommonBuffer(
  [in]  IN PVOID              HwDeviceExtension,
  [in]  IN PVP_DMA_ADAPTER    VpDmaAdapter,
  [in]  IN ULONG              DesiredLength,
  [out] OUT PPHYSICAL_ADDRESS LogicalAddress,
  [in]  IN BOOLEAN            CacheEnabled,
  [out] OUT PVOID             Reserved
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-video-videoportallocatecommonbuffer)

VideoPortAllocateCommonBuffer function

Description

The VideoPortAllocateCommonBuffer function allocates and maps system memory so that it is simultaneously accessible from both the processor and a device for common-buffer DMA operations.

Parameters

HwDeviceExtension [in]

Pointer to the miniport driver's device extension.

VpDmaAdapter [in]

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

DesiredLength [in]

Specifies the requested number of bytes of memory.

LogicalAddress [out]

Pointer to a memory location that receives the logical address to be used by the adapter to access the allocated buffer.

CacheEnabled [in]

Specifies whether the allocated memory can be cached. For more information, see the description of the CacheEnabled parameter for AllocateCommonBuffer.

Reserved [out]

Is currently ignored by the video port driver; should be set to NULL.

Return value

VideoPortAllocateCommonBuffer returns the base virtual address of the allocated buffer if successful; otherwise, it returns NULL if the buffer cannot be allocated.

Remarks

When the buffer is no longer needed, the video miniport driver should release it by calling VideoPortReleaseCommonBuffer.

See also

AllocateCommonBuffer

VP_DMA_ADAPTER

VideoPortGetDmaAdapter

VideoPortReleaseCommonBuffer