DXGKDDI_INTERRUPT_ROUTINE callback function (dispmprt.h)

The DxgkDdiInterruptRoutine function handles interrupts generated by a display adapter.

Syntax

DXGKDDI_INTERRUPT_ROUTINE DxgkddiInterruptRoutine;

BOOLEAN DxgkddiInterruptRoutine(
  [in] IN_CONST_PVOID MiniportDeviceContext,
  [in] IN_ULONG MessageNumber
)
{...}

Parameters

[in] MiniportDeviceContext

A handle to a context block associated with a display adapter. The display miniport driver's DxgkDdiAddDevice function previously provided this handle to the DirectX graphics kernel subsystem.

[in] MessageNumber

The zero-based index in the message-signaled interrupt (MSI) table if the interrupt is message-signaled. For line-based interrupts, this parameter is zero.

Return value

If DxgkDdiInterruptRoutine determines that the adapter represented by MiniportDeviceContext did not generate the interrupt, it returns FALSE. Otherwise, it must dismiss the interrupt on the adapter before it returns TRUE.

Remarks

If the interrupt is line-based (MessageNumber = 0), DxgkDdiInterruptRoutine must determine whether the adapter represented by MiniportDeviceContext generated the interrupt and, if not, return FALSE immediately.

If the adapter represented by MiniportDeviceContext did generate the interrupt, then DxgkDdiInterruptRoutine should perform the following steps:

  • Dismiss the interrupt on the adapter.
  • Complete the requested operation that caused the interrupt, or queue a DPC that will complete the operation later.
  • Return TRUE as quickly as possible.

Any other display miniport driver function that shares memory (for example, some portion of the state represented by MiniportDeviceContext) with DxgkDdiInterruptRoutine must call DxgkCbSynchronizeExecution to synchronize its access to the shared memory.

The DxgkDdiInterruptRoutine function can call DxgkCbQueueDpc and DxgkCbNotifyInterrupt but must not call any other DxgkCbXxx functions. For more information on the proper sequence of function calls, see Submitting a Command Buffer.

DxgkDdiInterruptRoutine runs at an elevated IRQL, so it (and all the functions it calls) must be non-pageable. Also, DxgkDdiInterruptRoutine (and all the functions it calls) must not attempt to access pageable memory.

Requirements

Requirement Value
Minimum supported client Windows Vista
Target Platform Desktop
Header dispmprt.h
IRQL See Remarks section.

See also

DxgkCbNotifyInterrupt

DxgkCbQueueDpc

DxgkCbSynchronizeExecution