drmkit_modeset/lib.rs
1// SPDX-FileCopyrightText: (c) 2026 Joel Winarske
2// SPDX-License-Identifier: MIT
3
4//! Mode selection and page-flip dispatch for drmkit.
5//!
6//! Port of `src/modeset/` from drm-cxx @ `dc2915b`, less `atomic.*`, which
7//! lives in `drmkit-core` alongside the property cache it is built from.
8//!
9//! # Invariant 3
10//!
11//! [`PageFlip::dispatch`] never reports an interrupted wait. `EINTR` is
12//! retried internally, and a bounded wait recomputes its remaining budget from
13//! a monotonic clock across retries, so a signal storm cannot stretch the wait
14//! past what was asked for. See that method for the Rust-specific hazard this
15//! guards against.
16
17mod error;
18mod mode;
19mod page_flip;
20
21pub use error::{ModesetError, Result};
22pub use mode::{ModeInfo, select_mode, select_preferred_mode};
23pub use page_flip::{Handler, PageFlip, PageFlipEvent, SourceCallback, Timeout};
24
25#[cfg(test)]
26mod tests;