PDXGK_POWER_NOTIFICATION callback function

A callback providing notification that the graphics device will be undergoing a device power state transition.

Syntax

PDXGK_POWER_NOTIFICATION PdxgkPowerNotification;

void PdxgkPowerNotification(
  PVOID GraphicsDeviceHandle,
  DEVICE_POWER_STATE NewGrfxPowerState,
  BOOLEAN PreNotification,
  PVOID PrivateHandle
)
{...}

Parameters

GraphicsDeviceHandle

An opaque handle which should be provided when making callbacks to the graphics device.

NewGrfxPowerState

Indicates the new graphics power state that is in the process of being set.

PreNotification

Indicates that a notification should be provided.

PrivateHandle

An opaque handle which will be provided in any callbacks. This handle must be globally unique, therefore, a pointer to the calling driver’s PDO or FDO should be used.

Return Value

This callback function does not return a value.

Remarks

This callback is made at PASSIVE_LEVEL. The driver may block in order to complete the servicing of the operation only when the new power state is PowerDeviceD3. In this case, the call must still be completed in a timely fashion, as it can block the completion of the overall device power state transition and is subject to causing a power watchdog bug check. The driver must not block when the new state is PowerDeviceD0. When going into PowerDeviceD3, both a “pre” and “post” notification will be provided, assuming that the transition is not canceled in the interim. When going into PowerDeviceD0, only a “post” notification will be provided. It is permitted for this callback handler to call the SetSharedPowerComponentStateCb graphics callback if desired; no other callbacks into graphics kernel are permitted from this handler.

Important

The initial graphics power state will be provided in the IOCTL output, however, since it is possible that the graphics device may be undergoing a power state transition while registration is occurring, a mutex must be acquired around the IOCTL call and parsing of the original state, and that same mutex must be acquired in this callback function. That way, should the state be transitioning, the callback will provide the most up to date state information.

The following

Requirements

   
Target Platform Windows
Header d3dkmthk.h