diff options
author | Asahi Lina <lina@asahilina.net> | 2023-02-05 20:58:29 +0900 |
---|---|---|
committer | Danilo Krummrich <dakr@kernel.org> | 2024-10-22 22:55:10 +0200 |
commit | 57e9abb1112d7008cfd13b25f8105b3e8ff78ac3 (patch) | |
tree | 8150be7e6faf6519c8979d961b8c0152ae188218 /rust/kernel/drm/drv.rs | |
parent | 7509fd275f9629a29fee30b6271bec6d0657d9f5 (diff) |
rust: drm: file: Add File abstraction
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.
Signed-off-by: Asahi Lina <lina@asahilina.net>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'rust/kernel/drm/drv.rs')
-rw-r--r-- | rust/kernel/drm/drv.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/rust/kernel/drm/drv.rs b/rust/kernel/drm/drv.rs index ebb79a8c90ee..895409f04664 100644 --- a/rust/kernel/drm/drv.rs +++ b/rust/kernel/drm/drv.rs @@ -139,6 +139,9 @@ pub trait Driver { /// Should be either `drm::gem::Object<T>` or `drm::gem::shmem::Object<T>`. type Object: AllocImpl; + /// The type used to represent a DRM File (client) + type File: drm::file::DriverFile; + /// Driver metadata const INFO: DriverInfo; |