Skip to content

Latest commit

 

History

History
95 lines (68 loc) · 4.98 KB

nc-d3dkmthk-pdxgk_initial_component_state.md

File metadata and controls

95 lines (68 loc) · 4.98 KB
UID title description ms.date keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.lib req.dll req.irql req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library targetos tech.root ms.custom f1_keywords topic_type api_type api_location api_name
NC:d3dkmthk.PDXGK_INITIAL_COMPONENT_STATE
PDXGK_INITIAL_COMPONENT_STATE (d3dkmthk.h)
The InitialComponentStateCb callback function is implemented by the client driver to initialize the component state.
10/07/2022
PDXGK_INITIAL_COMPONENT_STATE callback function
d3dkmthk.h
Windows 8
Windows Server 2012
DISPATCH_LEVEL
Windows
display
engagement-fy23
PDXGK_INITIAL_COMPONENT_STATE
d3dkmthk/PDXGK_INITIAL_COMPONENT_STATE
apiref
UserDefined
d3dkmthk.h
PDXGK_INITIAL_COMPONENT_STATE

PDXGK_INITIAL_COMPONENT_STATE callback function

-description

The PDXGK_INITIAL_COMPONENT_STATE callback function is implemented by the client driver to initialize the component state.

-parameters

-param GraphicsDeviceHandle

A handle to the graphics device.

-param PrivateHandle

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

-param ComponentIndex

The index of the component. Generally, this will be the index used by the graphics adapter. The exception is for linked display adapter (LDA) scenarios, where the HIWORD of the ComponentIndex indicates the adapter index, as is done when the graphics driver is called by the graphics kernel for F-state changes in LDA scenarios.

-param IsBlockingType

Set TRUE if the component is "blocking"; for example, the graphics driver has reported the component as ActiveInD3 = 0. Otherwise, set FALSE.

-param InitialFState

The F-state of a component represented by ComponentIndex at the time of the call. If an F-state transition is currently in progress, a PDXGK_FSTATE_NOTIFICATION completion notification callback with PreNotification=FALSE will follow some time later when the transition completes. Depending on the timing, a PreNotification=TRUE callback might occur. If it does occur, it will precede the completion notification callback.

-param ComponentGuid

A GUID value which is the component GUID as reported by the graphics driver for this component during its DXGKQAITYPE_POWERCOMPONENTINFO response.

-param PowerComponentMappingFlag

The HIWORD indicates if this is a custom driver defined value (0 = no, 1 = yes). If 0 (no), then the low word represents a DXGKMT_POWER_SHARED_TYPE enum value. These values are set by the graphics driver during its DXGKQAITYPE_POWERCOMPONENTINFO response, using the DXGK_POWER_COMPONENT_SHARED_DESC type added to DXGK_POWER_COMPONENT_MAPPING.

-remarks

Upon shared power registration (IoCallDriver call), if PDXGK_INITIAL_COMPONENT_STATE was provided, it is called once for each shared power component that the graphics driver has reported. The behavior of this callback is such that:

  • These calls are re-entrant calls, occurring prior to IoCallDriver returning
  • These calls occur at DISPATCH_LEVEL, which requires driver code and data to be memory-resident
  • As these callbacks occur prior to IoCallDriver returning, DXGK_GRAPHICSPOWER_REGISTER_OUTPUT would not have been filled in yet
  • If any F-state transitions are currently in progress, a post-notification PDXGK_FSTATE_NOTIFICATION will alert the driver of the final state. Such calls will be guaranteed to occur after the InitialComponentStateCb calls. However, it is possible that such callbacks could occur prior to IoCallDriver returning if synchronization is required. A spin lock should be around IoCallDriver and the PDXGK_FSTATE_NOTIFICATION handler.

-see-also

DXGK_GRAPHICSPOWER_REGISTER_OUTPUT

DXGK_POWER_COMPONENT_MAPPING

DXGK_QUERYADAPTERINFOTYPE

DXGKMT_POWER_SHARED_TYPE

PDXGK_FSTATE_NOTIFICATION