]> www.infradead.org Git - users/jedix/linux-maple.git/commit
rust: drm: ioctl: Add DRM ioctl abstraction
authorAsahi Lina <lina@asahilina.net>
Thu, 10 Apr 2025 23:55:21 +0000 (01:55 +0200)
committerDanilo Krummrich <dakr@kernel.org>
Thu, 24 Apr 2025 11:50:05 +0000 (13:50 +0200)
commit9a69570682b1f179a8bd9439a24495e7a6246aa9
tree90f61f868936b67985d11569330d32135592da5c
parent57493a145552fe8a9a926f25b14c324c441ca358
rust: drm: ioctl: Add DRM ioctl abstraction

DRM drivers need to be able to declare which driver-specific ioctls they
support. Add an abstraction implementing the required types and a helper
macro to generate the ioctl definition inside the DRM driver.

Note that this macro is not usable until further bits of the abstraction
are in place (but it will not fail to compile on its own, if not called).

Signed-off-by: Asahi Lina <lina@asahilina.net>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Link: https://lore.kernel.org/r/20250410235546.43736-3-dakr@kernel.org
[ MISC fixes
    * wrap raw_data in Opaque to avoid UB when creating a reference
    * fix IOCTL sample declaration
    * fix safety comment of IOCTL argument
    * original source archive: https://archive.is/LqHDQ

  - Danilo ]
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
rust/bindings/bindings_helper.h
rust/kernel/drm/ioctl.rs [new file with mode: 0644]
rust/kernel/drm/mod.rs [new file with mode: 0644]
rust/kernel/lib.rs
rust/uapi/uapi_helper.h