pub trait Driver {
type Data: Sync + Send;
type Object<Ctx: DeviceContext>: AllocImpl;
type File: DriverFile;
const INFO: DriverInfo;
const IOCTLS: &'static [DrmIoctlDescriptor];
const USE_VTABLE_ATTR: ();
const FEAT_RENDER: bool = false;
}Expand description
The DRM Driver trait.
This trait must be implemented by drivers in order to create a struct drm_device and struct drm_driver to be registered in the DRM subsystem.
Required Associated Constants§
Sourceconst INFO: DriverInfo
const INFO: DriverInfo
Driver metadata
Sourceconst IOCTLS: &'static [DrmIoctlDescriptor]
const IOCTLS: &'static [DrmIoctlDescriptor]
IOCTL list. See kernel::drm::ioctl::declare_drm_ioctls!{}.
Sourceconst USE_VTABLE_ATTR: ()
const USE_VTABLE_ATTR: ()
A marker to prevent implementors from forgetting to use #[vtable]
attribute when implementing this trait.
Provided Associated Constants§
Sourceconst FEAT_RENDER: bool = false
const FEAT_RENDER: bool = false
Sets the DRIVER_RENDER feature for this driver.
When enabled, the driver exposes /dev/dri/renderDXX render nodes to
userspace. The render node is an alternate low-priviledge way to access
the driver, which is enforced on a per-ioctl level. Userspace processes
that open the render node can only invoke ioctls explicitly listed as
usable from the render node (i.e. marked DRM_RENDER_ALLOW), whereas
userspace processes using the master node can invoke any ioctl.
Required Associated Types§
Sourcetype Object<Ctx: DeviceContext>: AllocImpl
type Object<Ctx: DeviceContext>: AllocImpl
The type used to manage memory for this driver.
Sourcetype File: DriverFile
type File: DriverFile
The type used to represent a DRM File (client)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".