search for: declare_drm_ioctl

Displaying 3 results from an estimated 3 matches for "declare_drm_ioctl".

Did you mean: declare_drm_ioctls
2024 Jun 18
1
[PATCH v2 1/8] rust: drm: ioctl: Add DRM ioctl abstraction
...fn IOW<T>(nr: u32) -> u32 { + ioctl::_IOW::<T>(BASE, nr) +} + +/// Construct a DRM ioctl number with a read-write argument. +#[inline(always)] +pub const fn IOWR<T>(nr: u32) -> u32 { + ioctl::_IOWR::<T>(BASE, nr) +} + +/// Descriptor type for DRM ioctls. Use the `declare_drm_ioctls!{}` macro to construct them. +pub type DrmIoctlDescriptor = bindings::drm_ioctl_desc; + +/// This is for ioctl which are used for rendering, and require that the file descriptor is either +/// for a render node, or if it?s a legacy/primary node, then it must be authenticated. +pub const AUTH: u32...
2024 Jun 18
1
[PATCH v2 3/8] rust: drm: add driver abstractions
...this driver. + /// + /// Should be either `drm::gem::Object<T>` or `drm::gem::shmem::Object<T>`. + type Object: AllocImpl; + + /// Driver metadata + const INFO: DriverInfo; + + /// Feature flags + const FEATURES: u32; + + /// IOCTL list. See `kernel::drm::ioctl::declare_drm_ioctls!{}`. + const IOCTLS: &'static [drm::ioctl::DrmIoctlDescriptor]; +} diff --git a/rust/kernel/drm/mod.rs b/rust/kernel/drm/mod.rs index 9ec6d7cbcaf3..d987c56b3cec 100644 --- a/rust/kernel/drm/mod.rs +++ b/rust/kernel/drm/mod.rs @@ -2,4 +2,5 @@ //! DRM subsystem abstractions. +pub mod...
2024 Sep 02
2
[PATCH v2 3/8] rust: drm: add driver abstractions
...hem somewhere in the runtime data structure instead of having them statically sepcified in drm_driver->features. In general these feature flag are midlayer design and that tends to be bad, rust is just the messenger here. Cheers, Sima > + > + /// IOCTL list. See `kernel::drm::ioctl::declare_drm_ioctls!{}`. > + const IOCTLS: &'static [drm::ioctl::DrmIoctlDescriptor]; > +} > diff --git a/rust/kernel/drm/mod.rs b/rust/kernel/drm/mod.rs > index 9ec6d7cbcaf3..d987c56b3cec 100644 > --- a/rust/kernel/drm/mod.rs > +++ b/rust/kernel/drm/mod.rs > @@ -2,4 +2,5 @@ > &gt...