Presents the screen image to the display device of a kernel mode display-only driver (KMDOD).



NTSTATUS APIENTRY DxgkDdiPresentDisplayOnly(
  _In_ const HANDLE                      hAdapter,
  _In_ const DXGKARG_PRESENT_DISPLAYONLY *pPresentDisplayOnly
{ ... }


hAdapter [in]

A handle to the device context for the display adapter. The KMDOD's DxgkDdiAddDevice function previously returned this handle in the MiniportDeviceContext parameter.

pPresentDisplayOnly [in]

A pointer to a DXGKARG_PRESENT_DISPLAYONLY structure that contains information about the present operation.

Return value

Returns one of the following values:

Return codeDescription

The present operation completed successfully.


The present operation has been sent to the software or hardware queue to complete.

In this case, the KMDOD should use an interrupt and deferred procedure call (DPC) to report progress of the current present operation. Otherwise the operating system uses the Timeout Detection and Recovery (TDR) process, which reports an error and requires the KMDOD to reinitialize itself and to reset the GPU.

Note that this status code should not be returned for synchronous mode, as described in Remarks.


The driver can also return any other error status code defined in Ntstatus.h to indicate issues that have occurred with the present operation.


The KMDOD must complete all screen-to-screen moves before copying dirty rectangles. In addition, the KMDOD must complete each move/copy operation before beginning another move/copy operation.

The operating system supports two modes of KMDOD present operations: synchronous and asynchronous. Depending on hardware and driver implementation, the KMDOD can use either mode or switch between them at any time.

Synchronous mode

When the KMDOD receives a call to DxgkDdiPresentDisplayOnly, it prepares hardware commands, sends them to the hardware, and waits for the commands to complete. When the hardware has completed the present operation, depending on the hardware's status the KMDOD returns STATUS_SUCCESS or any other status code—except that the KMDOD should not return STATUS_PENDING, so that the operating system doesn't erroneously conclude that the present operation is in asynchronous mode.

Asynchronous mode

When the KMDOD receives a call to DxgkDdiPresentDisplayOnly, it prepares hardware commands, sends them to the hardware, and immediately returns STATUS_SUCCESS. Later, when the KMDOD receives the interrupt notification of command completion, it should call the DxgkCbNotifyInterrupt, DxgkCbQueueDpc, and DxgkCbNotifyDpc functions to notify the operating system about the progress of the current present operation. See Remarks of the DxgkCbNotifyInterrupt function on how to use these three functions with an interrupt service routine (ISR).

In this case, when the driver calls DxgkCbNotifyInterrupt in an ISR, it should specify the InterruptType member of the DXGKARGCB_NOTIFY_INTERRUPT_DATA structure as type DXGK_INTERRUPT_DISPLAYONLY_PRESENT_PROGRESS, and it should fill in the DisplayOnlyPresentProgress member with an appropriate value for the progress.

The operating system guarantees that for each VidPN source there is only one pending present operation.

The operating system guarantees that this function follows the zero level synchronization mode as defined in Threading and Synchronization Zero Level.


Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Target platform






See also




Send comments about this topic to Microsoft