9 "Device Removal Notification\n");
11 WdfIoTargetCloseForQueryRemove(ioTarget);
23 "Device Removal Cancel\n");
31 "WdfIoTargetOpen failed 0x%x\n",
status);
32 WdfObjectDelete(ioTarget);
44 "Device Removal Complete\n");
47 ioTargetContext = GraphicsIoTarget_GetContext(ioTarget);
55 WdfObjectDelete(ioTarget);
60 PVOID GraphicsDeviceHandle,
75 PVOID GraphicsDeviceHandle,
115 "Ejecting Gfx Codec\n");
117 WdfInterruptAcquireLock(fdoCtx->
Interrupt);
119 WdfChildListUpdateChildDescriptionAsMissing(WdfFdoGetDefaultChildList(fdoCtx->
WdfDevice), &
description.Header);
122 WdfInterruptReleaseLock(fdoCtx->
Interrupt);
133 "Enumerating Gfx Codec\n");
139 PVOID GraphicsDeviceHandle,
140 ULONG ComponentIndex,
149 if (PreNotification) {
157 if (PreNotification) {
167 PVOID GraphicsDeviceHandle,
169 ULONG ComponentIndex,
173 UINT PowerComponentMappingFlag
180 if (PowerComponentMappingFlag) {
200 WDFIOTARGET ioTarget;
207 "WdfIoTargetCreate failed 0x%x\n",
status);
211 ioTargetContext = GraphicsIoTarget_GetContext(ioTarget);
216 graphicsDeviceSymlink,
227 "WdfIoTargetOpen failed with status 0x%x\n",
status);
228 WdfObjectDelete(ioTarget);
236 DXGK_GRAPHICSPOWER_REGISTER_INPUT graphicsPowerRegisterInput;
237 graphicsPowerRegisterInput = { 0 };
238 graphicsPowerRegisterInput.Version = DXGK_GRAPHICSPOWER_VERSION;
239 graphicsPowerRegisterInput.PrivateHandle = fdoCtx;
251 status = WdfIoTargetSendInternalIoctlSynchronously(ioTarget,
253 IOCTL_INTERNAL_GRAPHICSPOWER_REGISTER,
254 &inputDescriptor, &outputDescriptor,
NULL,
NULL);
257 "IOCTL_INTERNAL_GRAPHICSPOWER_REGISTER failed with status 0x%x\n",
status);
268 PVOID NotificationStruct,
281 "Graphics Arrival Notification!\n");
292 WDFWORKITEM workItem;
301 WdfWorkItemCreate(&workItemConfig, &attributes, &workItem);
307 WdfWorkItemEnqueue(workItem);
330 status = WdfRegistryQueryULong(settingsKey, &GfxSharedCodecAddress, &GfxCodecAddr);
336 WdfRegistryClose(settingsKey);
339 WdfRegistryClose(driverKey);
#define STATUS_NOT_SUPPORTED
#define NT_SUCCESS(StatCode)
#define SklHdAudBusPrint(dbglevel, fmt,...)
const GUID GUID_DEVICE_INTERFACE_ARRIVAL
struct _FDO_CONTEXT * PFDO_CONTEXT
WDF_IO_TARGET_OPEN_PARAMS openParams
GLenum const GLvoid * addr
#define STANDARD_RIGHTS_ALL
#define UNREFERENCED_PARAMETER(P)
enum _DEVICE_POWER_STATE DEVICE_POWER_STATE
NTSTRSAFEAPI RtlUnicodeStringValidate(PCUNICODE_STRING SourceString)
#define IsEqualGUID(rguid1, rguid2)
void NTAPI HDAGraphics_EvtIoTargetRemoveComplete(WDFIOTARGET ioTarget)
void HDAGraphicsPowerFStateNotificationCallback(PVOID GraphicsDeviceHandle, ULONG ComponentIndex, UINT NewFState, BOOLEAN PreNotification, PVOID PrivateHandle)
void NTAPI HDAGraphics_EvtIoTargetRemoveCanceled(WDFIOTARGET ioTarget)
void HDAGraphicsPowerRemovalNotificationCallback(PVOID GraphicsDeviceHandle, PVOID PrivateHandle)
void HDAGraphicsPowerInitialComponentStateCallback(PVOID GraphicsDeviceHandle, PVOID PrivateHandle, ULONG ComponentIndex, BOOLEAN IsBlockingType, UINT InitialFState, GUID ComponentGuid, UINT PowerComponentMappingFlag)
void HDAGraphicsPowerNotificationCallback(PVOID GraphicsDeviceHandle, DEVICE_POWER_STATE NewGrfxPowerState, BOOLEAN PreNotification, PVOID PrivateHandle)
void CheckHDAGraphicsRegistryKeys(PFDO_CONTEXT fdoCtx)
void NTAPI EnumerateGraphicsCodec(PFDO_CONTEXT fdoCtx)
void NTAPI EjectGraphicsCodec(PFDO_CONTEXT fdoCtx)
NTSTATUS NTAPI HDAGraphicsPowerInterfaceCallback(PVOID NotificationStruct, PVOID Context)
void NTAPI Fdo_EnumerateCodec(PFDO_CONTEXT fdoCtx, UINT8 addr)
void NTAPI HDAGraphicsPowerInterfaceAdd(WDFWORKITEM WorkItem)
NTSTATUS NTAPI HDAGraphics_EvtIoTargetQueryRemove(WDFIOTARGET ioTarget)
PUNICODE_STRING SymbolicLinkName
BOOLEAN GraphicsCodecConnected
struct _PDO_DEVICE_DATA * codecs[HDA_MAX_CODECS]
ULONG GraphicsCodecAddress
WDFWAITLOCK GraphicsDevicesCollectionWaitLock
WDFCOLLECTION GraphicsDevicesCollection
DXGK_GRAPHICSPOWER_REGISTER_OUTPUT graphicsPowerRegisterOutput
struct _FDO_CONTEXT * FdoContext
UNICODE_STRING GPUDeviceSymlink
struct _FDO_CONTEXT * FdoContext
PFN_WDF_IO_TARGET_QUERY_REMOVE EvtIoTargetQueryRemove
PFN_WDF_IO_TARGET_REMOVE_CANCELED EvtIoTargetRemoveCanceled
PFN_WDF_IO_TARGET_REMOVE_COMPLETE EvtIoTargetRemoveComplete
#define RtlCopyMemory(Destination, Source, Length)
#define PLUGPLAY_REGKEY_DRIVER
FORCEINLINE VOID WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER_INIT(_Out_ PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER Header, _In_ ULONG IdentificationDescriptionSize)
#define DECLARE_CONST_UNICODE_STRING(_variablename, _string)
FORCEINLINE VOID WDF_IO_TARGET_OPEN_PARAMS_INIT_REOPEN(_Out_ PWDF_IO_TARGET_OPEN_PARAMS Params)
FORCEINLINE VOID WDF_IO_TARGET_OPEN_PARAMS_INIT_OPEN_BY_NAME(_Out_ PWDF_IO_TARGET_OPEN_PARAMS Params, _In_ PCUNICODE_STRING TargetDeviceName, _In_ ACCESS_MASK DesiredAccess)
FORCEINLINE VOID WDF_MEMORY_DESCRIPTOR_INIT_BUFFER(_Out_ PWDF_MEMORY_DESCRIPTOR Descriptor, _In_ PVOID Buffer, _In_ ULONG BufferLength)
FORCEINLINE VOID WDF_OBJECT_ATTRIBUTES_INIT(_Out_ PWDF_OBJECT_ATTRIBUTES Attributes)
#define WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE(_attributes, _contexttype)
#define WDF_OBJECT_ATTRIBUTES_SET_CONTEXT_TYPE(_attributes, _contexttype)
_Must_inspect_result_ FORCEINLINE NTSTATUS WdfWaitLockAcquire(_In_ _Requires_lock_not_held_(_Curr_) WDFWAITLOCK Lock, _In_opt_ PLONGLONG Timeout)
FORCEINLINE VOID WDF_WORKITEM_CONFIG_INIT(_Out_ PWDF_WORKITEM_CONFIG Config, _In_ PFN_WDF_WORKITEM EvtWorkItemFunc)
_Must_inspect_result_ _In_ PWDF_WORKITEM_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWORKITEM * WorkItem
struct _DEVICE_INTERFACE_CHANGE_NOTIFICATION * PDEVICE_INTERFACE_CHANGE_NOTIFICATION