Macro declare_drm_ioctls

Source
macro_rules! declare_drm_ioctls {
    ( $(($cmd:ident, $struct:ident, $flags:expr, $func:expr)),* $(,)? ) => { ... };
}
Expand description

Declare the DRM ioctls for a driver.

Each entry in the list should have the form:

(ioctl_number, argument_type, flags, user_callback),

argument_type is the type name within the bindings crate. user_callback should have the following prototype:

fn foo(device: &kernel::drm::Device<Self>,
       data: &Opaque<uapi::argument_type>,
       file: &kernel::drm::File<Self::File>,
) -> Result<u32>

where Self is the drm::drv::Driver implementation these ioctls are being declared within.

§Examples

kernel::declare_drm_ioctls! {
    (FOO_GET_PARAM, drm_foo_get_param, ioctl::RENDER_ALLOW, my_get_param_handler),
}