DXGKDDI_INTERRUPT_ROUTINE回调函数 (dispmprt.h)

DxgkDdiInterruptRoutine 函数处理显示适配器生成的中断。

语法

DXGKDDI_INTERRUPT_ROUTINE DxgkddiInterruptRoutine;

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

参数

[in] MiniportDeviceContext

与显示适配器关联的上下文块的句柄。 显示微型端口驱动程序的 DxgkDdiAddDevice 函数以前向 DirectX 图形内核子系统提供了此句柄。

[in] MessageNumber

如果中断已发出消息信号,则 消息信号中断(MSI)表中从零开始的索引。 对于基于行的中断,此参数为零。

返回值

如果 DxgkDdiInterruptRoutine 确定由 MiniportDeviceContext 表示的适配器 未生成中断,则返回 FALSE。 否则,在适配器返回 TRUE 之前,它必须消除适配器上的中断。

言论

如果中断是基于行的(MessageNumber = 0),DxgkDdiInterruptRoutine 必须确定由 MiniportDeviceContext 表示的适配器是否 生成中断,否则立即返回 FALSE。

如果 MiniportDeviceContext 表示的适配器 确实生成了中断,则 DxgkDdiInterruptRoutine 应执行以下步骤:

  • 消除适配器上的中断。
  • 完成导致中断的请求作,或将 DPC 排入队列,该 DPC 稍后将完成该作。
  • 尽快返回 TRUE。

DxgkDdiInterruptRoutine 共享内存的其他任何显示微型端口驱动程序函数(例如,MiniportDeviceContext所表示的状态的某些部分)必须调用 DxgkCbSynchronizeExecution 才能同步对共享内存的访问。

DxgkDdiInterruptRoutine 函数可以调用 DxgkCbQueueDpcDxgkCbNotifyInterrupt,但不能调用任何其他 DxgkCbXxx 函数。 有关函数调用的正确顺序的详细信息,请参阅 提交命令缓冲区

DxgkDdiInterruptRoutine 在提升的 IRQL 上运行,因此它(及其调用的所有函数)必须不可分页。 此外,DxgkDdiInterruptRoutine(及其调用的所有函数)不得尝试访问可分页内存。

要求

要求 价值
最低支持的客户端 Windows Vista
目标平台 桌面
标头 dispmprt.h
IRQL 请参阅“备注”部分。

另请参阅

DxgkCbNotifyInterrupt

DxgkCbQueueDpc

DxgkCbSynchronizeExecution