mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00

A DRM File is the DRM counterpart to a kernel file structure, representing an open DRM file descriptor. Add a Rust abstraction to allow drivers to implement their own File types that implement the DriverFile trait. Reviewed-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Asahi Lina <lina@asahilina.net> Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Lyude Paul <lyude@redhat.com> Link: https://lore.kernel.org/r/20250410235546.43736-7-dakr@kernel.org [ Rework of drm::File * switch to the Opaque<T> type * fix (mutable) references to struct drm_file (which in this context is UB) * restructure and rename functions to align with common kernel schemes * write and fix safety and invariant comments * remove necessity for and convert 'as' casts * original source archive: https://archive.is/GH8oy - Danilo ] Signed-off-by: Danilo Krummrich <dakr@kernel.org>
19 lines
347 B
Rust
19 lines
347 B
Rust
// SPDX-License-Identifier: GPL-2.0 OR MIT
|
|
|
|
//! DRM subsystem abstractions.
|
|
|
|
pub mod device;
|
|
pub mod driver;
|
|
pub mod file;
|
|
pub mod ioctl;
|
|
|
|
pub use self::device::Device;
|
|
pub use self::driver::Driver;
|
|
pub use self::driver::DriverInfo;
|
|
pub use self::driver::Registration;
|
|
pub use self::file::File;
|
|
|
|
pub(crate) mod private {
|
|
pub trait Sealed {}
|
|
}
|