On Fri, 2025-04-11 at 01:55 +0200, Danilo Krummrich wrote:
> +
> +/// The open callback of a `struct drm_file`.
> +pub(crate) extern "C" fn open_callback(
> +raw_dev: *mut bindings::drm_device,
> +raw_file: *mut bindings::drm_file,
> +) -> core::ffi::c_int {
> +/
> +// SAFETY: A callback from `struct drm_driver::open` guarantees that
> +// - `raw_dev` is valid pointer to a `sturct drm_device`
struct
> +// - the corresponding `sturct drm_device` has been registered.
struct
> +// SAFETY: `raw_file` valid pointer to a `stru
From: Asahi Lina
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
Signed-off-by: Asahi Lina
[ Rework
From: Asahi Lina
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
Signed-off-by: Danilo Krummrich
---