DXGKDDI_NOTIFY_ACPI_EVENT callback function

Notifies the display miniport driver about certain ACPI events.

Syntax

DXGKDDI_NOTIFY_ACPI_EVENT DxgkddiNotifyAcpiEvent;

NTSTATUS DxgkddiNotifyAcpiEvent(
  IN_CONST_PVOID MiniportDeviceContext,
  IN_DXGK_EVENT_TYPE EventType,
  IN_ULONG Event,
  IN_PVOID Argument,
  OUT_PULONG AcpiFlags
)
{...}

Parameters

MiniportDeviceContext

A handle to a context block that represents a display adapter. The display miniport driver's DxgkDdiAddDevice function previously provided this handle to the DirectX graphics kernel subsystem.

EventType

A DXGK_EVENT_TYPE enumerator that supplies the event type (DpAcpiEvent, DpPowerStateEvent, DpDockingEvent).

Event

The event number. The following table lists the possible event numbers for each of the event types.

Event type Possible event numbers
DpAcpiEvent The following are the allowed events as defined in Dispmprt.h:
  • ACPI_NOTIFY_CYCLE_DISPLAY_HOTKEY - It notifies the operating system that the user has pressed the cycle display hotkey.
  • ACPI_NOTIFY_DOCK_EVENT - Indicates that a docking event has occurred. For example, the user docked or undocked a mobile computer.
  • ACPI_NOTIFY_DEVICE_HOTPLUG - Indicates that the status of any output device attached to the VGA controller has been changed. For example, the user removed or plugged a CRT display to the VGA port.
  • ACPI_NOTIFY_PANEL_SWITCH - Indicates that the status of one of the output devices attached to the VGA controller has been toggled. For example, the user switched the active output display from LCD to CRT display type.
  • ACPI_NOTIFY_VIDEO_WAKEUP - Indicates that the output display has been resumed. For example, the user has reactivated the computer display.
Defined in Dispmprt.h.
DpPowerStateEvent PO_CB_LID_SWITCH_STATE, PO_CB_AC_STATUS Defined in Wdm.h.
DpDockingEvent ACPI_NOTIFY_DOCK_EVENT - Indicates that a docking event has occurred. For example, the user docked or undocked a mobile computer. Defined in Dispmprt.h.

Argument

A pointer to an argument that depends on the event. For most events, this will be NULL. The following table shows the event arguments, which are ULONG values, for specified event numbers that are available.

Event number Possible event arguments
PO_CB_AC_STATUS 0 - Indicates that the system is on battery power. 1 - Indicates that the system is on AC power.
PO_CB_LID_SWITCH_STATE 0 - Indicates that the lid is being closed. 1 - Indicates that the lid is being opened.

AcpiFlags

A pointer to a value that indicates the type of request that the display miniport driver should make to the operating system. The following table shows the values that can be specified.

Value Request type
DXGK_ACPI_CHANGE_DISPLAY_MODE The display miniport driver makes a request to the operating system to call the DxgkDdiRecommendFunctionalVidPn function and then to initiate a mode change to the new recommended active video present network (VidPN). For example, the display miniport driver might make this request if the user has specified a mode change.
DXGK_ACPI_POLL_DISPLAY_CHILDREN The display miniport driver makes a request to the operating system to poll the connectivity of the children of the display adapter represented by MiniportDeviceContext.

This parameter is ignored if this function returns an error or if the display adapter loses power.

Return Value

DxgkDdiNotifyAcpiEvent returns STATUS_SUCCESS if it succeeds; otherwise, it returns one of the error codes defined in Ntstatus.h.

Remarks

DxgkDdiNotifyAcpiEvent is an optional display miniport driver function.

DxgkDdiNotifyAcpiEvent should be made pageable.

Requirements

   
Windows version Available in Windows Vista and later versions of the Windows operating systems.
Target Platform Desktop
Header dispmprt.h
IRQL PASSIVE_LEVEL

See Also

DxgkCbEvalAcpiMethod