fix(pf-vdisplay,pf-capture,pf-win-display): pre-split paths in the auto-merged v4 code
windows-drivers / probe-and-proto (push) Successful in 31s
ci / web (push) Successful in 43s
apple / swift (push) Failing after 1m1s
ci / docs-site (push) Successful in 1m0s
apple / screenshots (push) Has been skipped
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 10s
decky / build-publish (push) Successful in 19s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 10s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 44s
windows-drivers / driver-build (push) Successful in 1m38s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 1m1s
ci / bench (push) Successful in 5m34s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 5m53s
android / android (push) Has been cancelled
arch / build-publish (push) Has been cancelled
ci / rust (push) Has been cancelled
deb / build-publish (push) Has been cancelled
windows-host / package (push) Successful in 15m6s
rpm / build-publish (43, bazzite, punktfunk-fedora-rpm) (push) Successful in 18m48s
docker / deploy-docs (push) Successful in 23s
rpm / build-publish (44, fedora-44, punktfunk-fedora44-rpm) (push) Successful in 18m28s
windows-drivers / probe-and-proto (push) Successful in 31s
ci / web (push) Successful in 43s
apple / swift (push) Failing after 1m1s
ci / docs-site (push) Successful in 1m0s
apple / screenshots (push) Has been skipped
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 10s
decky / build-publish (push) Successful in 19s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 10s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 44s
windows-drivers / driver-build (push) Successful in 1m38s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 1m1s
ci / bench (push) Successful in 5m34s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 5m53s
android / android (push) Has been cancelled
arch / build-publish (push) Has been cancelled
ci / rust (push) Has been cancelled
deb / build-publish (push) Has been cancelled
windows-host / package (push) Successful in 15m6s
rpm / build-publish (43, bazzite, punktfunk-fedora-rpm) (push) Successful in 18m48s
docker / deploy-docs (push) Successful in 23s
rpm / build-publish (44, fedora-44, punktfunk-fedora44-rpm) (push) Successful in 18m28s
The rename-followed perf hunks still said crate::win_display:: (the pre-W6 layout) — point them at pf_win_display::win_display:: and widen the four helpers they call cross-crate. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -706,7 +706,9 @@ impl IddPushCapturer {
|
|||||||
// stash/format-guard machinery absorbs).
|
// stash/format-guard machinery absorbs).
|
||||||
let hdr_settle = Instant::now();
|
let hdr_settle = Instant::now();
|
||||||
while hdr_settle.elapsed() < Duration::from_millis(250) {
|
while hdr_settle.elapsed() < Duration::from_millis(250) {
|
||||||
if crate::win_display::advanced_color_enabled(target.target_id) == Some(true) {
|
if pf_win_display::win_display::advanced_color_enabled(target.target_id)
|
||||||
|
== Some(true)
|
||||||
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
std::thread::sleep(Duration::from_millis(25));
|
std::thread::sleep(Duration::from_millis(25));
|
||||||
|
|||||||
@@ -1085,7 +1085,7 @@ impl VirtualDisplayManager {
|
|||||||
// FAST PATH (driver-independent): the OS already offers this resolution — the monitor's
|
// FAST PATH (driver-independent): the OS already offers this resolution — the monitor's
|
||||||
// arrival list, which since the driver's mode-history union contains every size this
|
// arrival list, which since the driver's mode-history union contains every size this
|
||||||
// identity ever served — so a plain CCD mode set reaches it with no driver round-trip.
|
// identity ever served — so a plain CCD mode set reaches it with no driver round-trip.
|
||||||
let already = crate::win_display::wait_mode_advertised(&gdi, mode, Duration::ZERO);
|
let already = pf_win_display::win_display::wait_mode_advertised(&gdi, mode, Duration::ZERO);
|
||||||
if !already {
|
if !already {
|
||||||
// Out-of-arrival-list mode. On-glass (build 26200) the OS re-parses our description
|
// Out-of-arrival-list mode. On-glass (build 26200) the OS re-parses our description
|
||||||
// AND re-queries target modes after UpdateModes2 — our callbacks served the fresh
|
// AND re-queries target modes after UpdateModes2 — our callbacks served the fresh
|
||||||
@@ -1124,8 +1124,12 @@ impl VirtualDisplayManager {
|
|||||||
// forwards it to a synchronous IOCTL with owned/borrowed locals only.
|
// forwards it to a synchronous IOCTL with owned/borrowed locals only.
|
||||||
unsafe { self.driver.update_modes(dev, &mon.key, mode) }?;
|
unsafe { self.driver.update_modes(dev, &mon.key, mode) }?;
|
||||||
// SAFETY: CCD query/apply FFI under the held `state` lock (this fn's contract).
|
// SAFETY: CCD query/apply FFI under the held `state` lock (this fn's contract).
|
||||||
unsafe { crate::win_display::force_mode_reenumeration() };
|
unsafe { pf_win_display::win_display::force_mode_reenumeration() };
|
||||||
if !crate::win_display::wait_mode_advertised(&gdi, mode, Duration::from_millis(800)) {
|
if !pf_win_display::win_display::wait_mode_advertised(
|
||||||
|
&gdi,
|
||||||
|
mode,
|
||||||
|
Duration::from_millis(800),
|
||||||
|
) {
|
||||||
self.update_modes_futile.store(true, Ordering::Relaxed);
|
self.update_modes_futile.store(true, Ordering::Relaxed);
|
||||||
anyhow::bail!(
|
anyhow::bail!(
|
||||||
"OS did not advertise {}x{} within {}ms of the driver mode-list update \
|
"OS did not advertise {}x{} within {}ms of the driver mode-list update \
|
||||||
@@ -1133,7 +1137,7 @@ impl VirtualDisplayManager {
|
|||||||
mode.width,
|
mode.width,
|
||||||
mode.height,
|
mode.height,
|
||||||
t0.elapsed().as_millis(),
|
t0.elapsed().as_millis(),
|
||||||
crate::win_display::advertised_resolutions(&gdi)
|
pf_win_display::win_display::advertised_resolutions(&gdi)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -243,11 +243,7 @@ pub unsafe fn active_resolution(target_id: u32) -> Option<(u32, u32)> {
|
|||||||
///
|
///
|
||||||
/// # Safety
|
/// # Safety
|
||||||
/// Runs the CCD/GDI query FFI; call under the manager `state` lock like the callers it serves.
|
/// Runs the CCD/GDI query FFI; call under the manager `state` lock like the callers it serves.
|
||||||
pub(crate) unsafe fn wait_mode_settled(
|
pub unsafe fn wait_mode_settled(target_id: u32, mode: Mode, ceiling: std::time::Duration) -> bool {
|
||||||
target_id: u32,
|
|
||||||
mode: Mode,
|
|
||||||
ceiling: std::time::Duration,
|
|
||||||
) -> bool {
|
|
||||||
let deadline = std::time::Instant::now() + ceiling;
|
let deadline = std::time::Instant::now() + ceiling;
|
||||||
loop {
|
loop {
|
||||||
// SAFETY (both calls): CCD/GDI FFI over a `Copy` target id, owned returns — the callers'
|
// SAFETY (both calls): CCD/GDI FFI over a `Copy` target id, owned returns — the callers'
|
||||||
@@ -272,7 +268,7 @@ pub(crate) unsafe fn wait_mode_settled(
|
|||||||
///
|
///
|
||||||
/// # Safety
|
/// # Safety
|
||||||
/// Runs the CCD query/apply FFI; call under the manager `state` lock (sole topology mutator).
|
/// Runs the CCD query/apply FFI; call under the manager `state` lock (sole topology mutator).
|
||||||
pub(crate) unsafe fn force_mode_reenumeration() -> bool {
|
pub unsafe fn force_mode_reenumeration() -> bool {
|
||||||
let Some((paths, modes)) = query_active_config() else {
|
let Some((paths, modes)) = query_active_config() else {
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
@@ -292,7 +288,7 @@ pub(crate) unsafe fn force_mode_reenumeration() -> bool {
|
|||||||
|
|
||||||
/// The distinct resolutions `gdi_name` currently advertises (diagnostics for the in-place-resize
|
/// The distinct resolutions `gdi_name` currently advertises (diagnostics for the in-place-resize
|
||||||
/// path: what the OS actually offers when a requested mode never shows up).
|
/// path: what the OS actually offers when a requested mode never shows up).
|
||||||
pub(crate) fn advertised_resolutions(gdi_name: &str) -> Vec<(u32, u32)> {
|
pub fn advertised_resolutions(gdi_name: &str) -> Vec<(u32, u32)> {
|
||||||
let wname: Vec<u16> = gdi_name.encode_utf16().chain(std::iter::once(0)).collect();
|
let wname: Vec<u16> = gdi_name.encode_utf16().chain(std::iter::once(0)).collect();
|
||||||
let mut set = std::collections::BTreeSet::new();
|
let mut set = std::collections::BTreeSet::new();
|
||||||
let mut i = 0u32;
|
let mut i = 0u32;
|
||||||
@@ -325,11 +321,7 @@ pub(crate) fn advertised_resolutions(gdi_name: &str) -> Vec<(u32, u32)> {
|
|||||||
/// CCD/GDI force-set: the OS re-evaluates an indirect display's settable modes asynchronously after
|
/// CCD/GDI force-set: the OS re-evaluates an indirect display's settable modes asynchronously after
|
||||||
/// `IddCxMonitorUpdateModes2`, so an immediate `set_active_mode` could race the re-enumeration and
|
/// `IddCxMonitorUpdateModes2`, so an immediate `set_active_mode` could race the re-enumeration and
|
||||||
/// silently leave the old mode. Returns `true` once any refresh at the requested WxH is enumerable.
|
/// silently leave the old mode. Returns `true` once any refresh at the requested WxH is enumerable.
|
||||||
pub(crate) fn wait_mode_advertised(
|
pub fn wait_mode_advertised(gdi_name: &str, mode: Mode, ceiling: std::time::Duration) -> bool {
|
||||||
gdi_name: &str,
|
|
||||||
mode: Mode,
|
|
||||||
ceiling: std::time::Duration,
|
|
||||||
) -> bool {
|
|
||||||
let wname: Vec<u16> = gdi_name.encode_utf16().chain(std::iter::once(0)).collect();
|
let wname: Vec<u16> = gdi_name.encode_utf16().chain(std::iter::once(0)).collect();
|
||||||
let deadline = std::time::Instant::now() + ceiling;
|
let deadline = std::time::Instant::now() + ceiling;
|
||||||
loop {
|
loop {
|
||||||
|
|||||||
Reference in New Issue
Block a user