Video Port Driver Support for AGP

The video port driver implements the following functions to support Accelerated Graphics Port (AGP).










Before the video miniport driver calls the functions in the preceding list, it must obtain function pointers by calling VideoPortQueryServices. For more information about obtaining pointers to the AGP functions, see AGP Functions Implemented by the Video Port Driver.

The video miniport driver performs the following steps to reserve and commit a portion of the AGP aperture through which the display adapter can access system memory:

  1. Call AgpReservePhysical to reserve a contiguous range of physical addresses in the AGP aperture.

  2. Call AgpCommitPhysical to map a portion (or all) of the address range returned by AgpReservePhysical to pages in system memory. The pages in system memory are locked, but not necessarily contiguous. The video miniport driver can call AgpCommitPhysical several times to do several small commitments rather than one large one. However, the driver must not attempt to commit a range that is already committed.

Then, for an application to be able to see and use the committed pages in system memory, the video miniport driver performs the following steps:

  1. Call AgpReserveVirtual to reserve a range of virtual addresses in the application's address space. The video miniport driver must pass AgpReserveVirtual a handle, previously returned by AgpReservePhysical, so that the reserved virtual address range can be associated with the physical address range created by AgpReservePhysical.

  2. Call AgpCommitVirtual to map a portion of the virtual address range returned by AgpReserveVirtual to pages in system memory. The pages that AgpCommitVirtual maps must have been previously mapped by a call to AgpCommitPhysical. Furthermore, that mapping established by AgpCommitPhysical must still be current; that is, those pages must not have been freed by a call to AgpFreePhysical.

Note Whenever you use the AGP functions to commit or reserve an address range (physical or virtual), the size of the range must be a multiple of 64 kilobytes.

The video miniport driver is responsible for releasing and freeing all memory that it has reserved and committed by calling the following functions: