1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// SPDX-FileCopyrightText: (c) 2026 Joel Winarske
// SPDX-License-Identifier: MIT
//! Core DRM/KMS device access for drmkit.
//!
//! Port of `src/core/` plus `src/modeset/atomic.{hpp,cpp}` from drm-cxx @
//! `dc2915b`.
//!
//! The main pieces:
//!
//! - [`Device`] — an open DRM node, owning or borrowing its descriptor.
//! - [`PropertyStore`] — a per-object property cache, so building a frame's
//! atomic request is hash-map lookups rather than an ioctl per property.
//! - [`AtomicRequest`] — accumulated property writes, testable and committable.
//!
//! # Relationship to the `drm` crate
//!
//! Per DR-2 drmkit **wraps** the Smithay `drm` crate and never re-binds the
//! ioctls. [`Device`] implements [`drm::Device`] and [`drm::control::Device`],
//! so the whole KMS surface those traits expose is available directly. What
//! this crate adds is the parts the C++ gives a different contract: descriptor
//! ownership, the property cache, and the atomic request's export seam.
//!
//! # Example
//!
//! ```no_run
//! use drmkit_core::{AtomicRequest, Device, ObjectType, PropertyStore};
//! use drm::control::AtomicCommitFlags;
//!
//! let device = Device::open("/dev/dri/card0")?;
//! device.enable_universal_planes()?;
//! device.enable_atomic()?;
//!
//! let mut props = PropertyStore::new();
//! props.cache_properties(&device, 31, ObjectType::Plane)?;
//!
//! let mut request = AtomicRequest::new();
//! request.add_property(31, props.property_id(31, "FB_ID")?, 42)?;
//!
//! request.test(&device, AtomicCommitFlags::empty())?;
//! # Ok::<(), drmkit_core::CoreError>(())
//! ```
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
// Re-exported so consumers need not depend on `drm` directly for the types
// that appear in this crate's signatures.
pub use ClientCapability;
pub use AtomicCommitFlags;
pub use Mode;