// dispmprt.h
DXGKDDI_SYSTEM_DISPLAY_ENABLE DxgkddiSystemDisplayEnable;
NTSTATUS DxgkddiSystemDisplayEnable(
[in] PVOID MiniportDeviceContext,
[in] D3DDDI_VIDEO_PRESENT_TARGET_ID TargetId,
[in] PDXGKARG_SYSTEM_DISPLAY_ENABLE_FLAGS Flags,
[out] UINT *Width,
[out] UINT *Height,
[out] D3DDDIFORMAT *ColorFormat
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
The OS calls the kernel-mode display driver's (KMD) DxgkddiSystemDisplayEnable function to request that KMD reset the current display device to a specified state.
MiniportDeviceContext [in]Handle to a context block associated with a display adapter. KMD's DxgkDdiAddDevice function previously provided this handle to Dxgkrnl.
TargetId [in]A D3DDDI_VIDEO_PRESENT_TARGET_ID value that specifies the identifier of the video present target on the display adapter that the display device is connected to. This identifier could be for the target that was left in the current video present network (VidPn) state during the previous call to DxgkDdiCommitVidPn.
Flags [in]Pointer to a DXGKARG_SYSTEM_DISPLAY_ENABLE_FLAGS value that contains a bitwise OR of flags. This member is reserved by the OS.
Width [out]Width of the display mode of the specified device, in pixels.
Height [out]Height of the display mode of the specified device, in pixels.
ColorFormat [out]Pointer to a D3DDDIFORMAT value that specifies the color format of the display device.
DxgkDdiSystemDisplayEnable returns STATUS_SUCCESS if it succeeds. If the target specified by the TargetId parameter isn't connected to a display device, the function returns STATUS_NOT_SUPPORTED. Otherwise, it returns one of the error codes defined in Ntstatus.h.
The OS calls DxgkddiSystemDisplayEnable during a bugcheck operation following a system stop error.
The KMD must follow these steps when its DxgkDdiSystemDisplayEnable function is called:
KMD doesn't have to use a linear frame buffer mode. However, KMD should support write operations to this frame buffer from sources that have the D3DDDIFMT_A8R8G8B8 format of the D3DDDIFORMAT enumeration.
After KMD gives the OS control over display functionality, the OS can call the DxgkDdiSystemDisplayWrite function to update the screen image and to write a block of images from specified sources to the screen that was reset by the DxgkDdiSystemDisplayEnable function.
DxgkDdiSystemDisplayWrite provides the driver with the starting address of the source image as well as the stride, width, and height. The color format of the source image is always D3DDDIFMT_X8R8G8B8. The OS guarantees that the source image is in non-paged memory.
KMD must write this source image to the current screen starting at the positions specified by the PositionX and PositionY parameters of the DxgkDdiSystemDisplayWrite function.
It's recommended that the driver use the CPU to write the image from the source to the frame buffer because a system bugcheck might be caused by repeated Timeout Detection and Recovery (TDR) instances that result in the GPU being in an unknown condition.
Windows kernel-mode functions might not be available while this function is being called.
DxgkDdiSystemDisplayEnable can be called at any IRQL, so it must be in nonpageable memory. DxgkDdiSystemDisplayEnable must not call any code that is in pageable memory and must not manipulate any data that is in pageable memory.
An automatic display switch driver's DxgkDdiSystemDisplayEnable DDI must ensure that panel self refresh (PSR) is disabled at the end of the call to it. For more information, see Automatic Display Switch.
DxgkCbAcquirePostDisplayOwnership
DxgkDdiStopDeviceAndReleasePostDisplayOwnership