feat(windows-drivers): STEP 4 (1/n) — control-plane IOCTL dispatch (GET_INFO + PING)
EvtIddCxDeviceIoControl now dispatches the pf-vdisplay-proto control plane (new
src/control.rs): IOCTL_GET_INFO writes InfoReply{protocol_version, watchdog_timeout_s}
(the host asserts the version + fails loudly on mismatch), IOCTL_PING bumps the watchdog
keepalive. ADD/REMOVE/SET_RENDER_ADAPTER/CLEAR_ALL are dispatched but stubbed
(STATUS_NOT_IMPLEMENTED) pending create_monitor + the real mode DDIs (next). Unknown
IOCTLs -> STATUS_NOT_FOUND. Builds CI-green; warnings are the *2/HDR stubs (STEP 7) +
the stored adapter handle (read by create_monitor, next).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
//! is implemented now because it gates HDR (`HIGH_COLOR_SPACE`) and the adapter (STEP 3) sets FP16.
|
||||
|
||||
use wdk_sys::iddcx;
|
||||
use wdk_sys::{call_unsafe_wdf_function_binding, NTSTATUS, WDFDEVICE, WDFREQUEST};
|
||||
use wdk_sys::{NTSTATUS, WDFDEVICE, WDFREQUEST};
|
||||
|
||||
use crate::{STATUS_NOT_IMPLEMENTED, STATUS_SUCCESS};
|
||||
|
||||
@@ -143,10 +143,8 @@ pub unsafe extern "C" fn device_io_control(
|
||||
request: WDFREQUEST,
|
||||
_output_len: usize,
|
||||
_input_len: usize,
|
||||
_ioctl_code: u32,
|
||||
ioctl_code: u32,
|
||||
) {
|
||||
// SAFETY: `request` is the framework-provided WDFREQUEST; completing it hands it back to the OS.
|
||||
unsafe {
|
||||
call_unsafe_wdf_function_binding!(WdfRequestComplete, request, STATUS_SUCCESS);
|
||||
}
|
||||
// SAFETY: `request` is the framework-provided WDFREQUEST; `control::dispatch` completes it exactly once.
|
||||
unsafe { crate::control::dispatch(request, ioctl_code) };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user