feat(windows-drivers): STEP 3 — IddCx adapter init (deferred D0, FP16 caps)
apple / swift (push) Failing after 1s
apple / screenshots (push) Has been skipped
windows-drivers / probe-and-proto (push) Successful in 18s
windows-drivers / driver-build (push) Successful in 1m5s
windows-host / package (push) Successful in 5m13s
android / android (push) Successful in 3m42s
ci / web (push) Successful in 53s
ci / docs-site (push) Successful in 1m3s
ci / rust (push) Successful in 4m27s
deb / build-publish (push) Successful in 2m14s
decky / build-publish (push) Successful in 11s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 5s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 4s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 3s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 4s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 4s
ci / bench (push) Successful in 4m41s
rpm / build-publish (bazzite, punktfunk-fedora-rpm) (push) Successful in 8m33s
rpm / build-publish (fedora-44, punktfunk-fedora44-rpm) (push) Successful in 8m24s
docker / deploy-docs (push) Successful in 17s
apple / swift (push) Failing after 1s
apple / screenshots (push) Has been skipped
windows-drivers / probe-and-proto (push) Successful in 18s
windows-drivers / driver-build (push) Successful in 1m5s
windows-host / package (push) Successful in 5m13s
android / android (push) Successful in 3m42s
ci / web (push) Successful in 53s
ci / docs-site (push) Successful in 1m3s
ci / rust (push) Successful in 4m27s
deb / build-publish (push) Successful in 2m14s
decky / build-publish (push) Successful in 11s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 5s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 4s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 3s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 4s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 4s
ci / bench (push) Successful in 4m41s
rpm / build-publish (bazzite, punktfunk-fedora-rpm) (push) Successful in 8m33s
rpm / build-publish (fedora-44, punktfunk-fedora44-rpm) (push) Successful in 8m24s
docker / deploy-docs (push) Successful in 17s
adapter.rs: init_adapter(device) builds IDDCX_ADAPTER_CAPS (CAN_PROCESS_FP16, MaxMonitorsSupported=16, endpoint diagnostics with wstr! PCWSTR names) + IDARG_IN_ADAPTER_INIT and calls IddCxAdapterInitAsync; EvtDeviceD0Entry triggers it (idempotent), EvtIddCxAdapterInitFinished stashes the adapter in a OnceLock for later DDIs. zeroed()+named-field construction dodges the Default-derive + field-order questions. Compiles + links clean on the box (pf_vdisplay.dll 268KB). CI gate = compile+link; the on-glass load/enumerate gate needs the box + an INF + SwDeviceCreate (next). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -11,20 +11,22 @@ use wdk_sys::{call_unsafe_wdf_function_binding, NTSTATUS, WDFDEVICE, WDFREQUEST}
|
||||
|
||||
use crate::{STATUS_NOT_IMPLEMENTED, STATUS_SUCCESS};
|
||||
|
||||
/// PnP `EvtDeviceD0Entry` (not an IddCx config callback). STEP 3 calls `DeviceContext::init_adapter`
|
||||
/// here (adapter creation is deferred to first D0, not driver_add).
|
||||
/// PnP `EvtDeviceD0Entry` (not an IddCx config callback). Adapter creation is deferred to the first D0
|
||||
/// (the adapter object is only valid after D0), not driver_add.
|
||||
pub unsafe extern "C" fn device_d0_entry(
|
||||
_device: WDFDEVICE,
|
||||
device: WDFDEVICE,
|
||||
_previous_state: wdk_sys::WDF_POWER_DEVICE_STATE,
|
||||
) -> NTSTATUS {
|
||||
STATUS_SUCCESS
|
||||
crate::adapter::init_adapter(device)
|
||||
}
|
||||
|
||||
/// Async completion of `IddCxAdapterInitAsync`. STEP 3: stash the adapter + start the watchdog.
|
||||
/// Async completion of `IddCxAdapterInitAsync`: stash the adapter for later DDIs. STEP 4 also starts the
|
||||
/// watchdog here.
|
||||
pub unsafe extern "C" fn adapter_init_finished(
|
||||
_adapter: iddcx::IDDCX_ADAPTER,
|
||||
adapter: iddcx::IDDCX_ADAPTER,
|
||||
_p_in: *const iddcx::IDARG_IN_ADAPTER_INIT_FINISHED,
|
||||
) -> NTSTATUS {
|
||||
crate::adapter::set_adapter(adapter);
|
||||
STATUS_SUCCESS
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user