DXGKDDI_COLLECTDBGINFO callback function (d3dkmddi.h)

The DxgkDdiCollectDbgInfo function outputs driver information for a debug report.

Syntax

DXGKDDI_COLLECTDBGINFO DxgkddiCollectdbginfo;

NTSTATUS DxgkddiCollectdbginfo(
  [in]     IN_CONST_HANDLE hAdapter,
  [in/out] IN_CONST_PDXGKARG_COLLECTDBGINFO pCollectDbgInfo
)
{...}

Parameters

[in] hAdapter

A handle to a context block that is associated with a display adapter. The display miniport (KMD) previously provided this handle to Dxgkrnl in the MiniportDeviceContext output parameter of DxgkDdiAddDevice.

[in/out] pCollectDbgInfo

A pointer to a DXGKARG_COLLECTDBGINFO structure that contains information for the debug report.

Return value

DxgkDdiCollectDbgInfo returns one of the following values:

Return code Description
STATUS_SUCCESS DxgkDdiCollectDbgInfo successfully output driver information for a debug report; OR, the OS ignored the content in the buffer that pBuffer points to and didn't add information from DxgkDdiCollectDbgInfo to the debug report.
STATUS_NO_MEMORY DxgkDdiCollectDbgInfo couldn't allocate memory that was required for it to complete.
STATUS_UNSUCCESSFUL Another error prevented the driver from collecting valid debug information.

Remarks

Dxgkrnl calls KMD's DxgkDdiCollectDbgInfo function whenever the OS is about to generate a driver-related debug report. DxgkDdiCollectDbgInfo might be called either immediately before Timeout Detection and Recovery (TDR) work or immediately before the OS bug checks. While DxgkDdiCollectDbgInfo should return as quickly as possible, there is no system-defined maximum amount of time that the driver can spend in this function.

KMD should collect debug information. When DxgkDdiCollectDbgInfo is called, the driver receives a bug-check code in pCollectDbgInfo->Reason that indicates the type of information required for the debug report. The driver copies the required debug information into the buffer that pCollectDbgInfo->pBuffer points to. The maximum number of bytes of information that the driver can copy is specified by pCollectDbgInfo->BufferSize.

DxgkDdiCollectDbgInfo generally runs at an undefined IRQL. However, if pCollectDbgInfo->Reason is set to VIDEO_TDR_TIMEOUT_DETECTED (to indicate an adapter-wide reset) or VIDEO_ENGINE_TIMEOUT_DETECTED (available starting with Windows 8 to indicate a reset of one or more nodes within a physical adapter), the driver must ensure that DxgkDdiCollectDbgInfo is pageable, runs at IRQL = PASSIVE_LEVEL, and supports synchronization zero level.

Requirements

Requirement Value
Minimum supported client Windows Vista
Target Platform Desktop
Header d3dkmddi.h
IRQL PASSIVE_LEVEL (See Remarks)

See also

DXGKARG_COLLECTDBGINFO

DxgkDdiAddDevice

DxgkDdiResetFromTimeout