RFC Rust bindings for KMS + RVKMS
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 RFC Latest33 patches 37 repliesIn review
- v2 RFC35 patches 75 repliesSuperseded
- v1 RFC4 patches 7 repliesSuperseded
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/33 | rust: drm: Add a small handful of fourcc bindingsrust/ rust/ | +22 | 3 replies | |
| 2/33 | rust: drm: Add traits for registering KMS devicesrust/ rust/ rust/ +4 more | +258 | 4 replies | |
| 3/33 | rust: drm/kms: Introduce the main ModeConfigObject traitsrust/ | +126 | 2 replies | |
| 4/33 | rust: drm/kms: Add drm_connector bindingsrust/ rust/ rust/ | +619 | 4 replies | |
| 5/33 | rust: drm/kms: Add drm_plane bindingsrust/ rust/ rust/ +1 more | +624 | 3 replies | |
| 6/33 | rust: drm/kms: Add drm_crtc bindingsrust/ rust/ rust/ | +579 | 0 replies | |
| 7/33 | rust: drm/kms: Add drm_encoder bindingsrust/ rust/ rust/ | +326 | 2 replies | |
| 8/33 | rust: drm/kms: Add UnregisteredConnector::attach_encoder()rust/ | +13 | 0 replies | |
| 9/33 | rust: drm/kms: Add DriverConnector::get_mode callbackrust/ rust/ rust/ | +147 | 3 replies | |
| 10/33 | rust: drm/kms: Add ConnectorGuard::add_modes_noedid()rust/ rust/ | +12 | 5 replies | |
| 11/33 | rust: drm/kms: Add ConnectorGuard::set_preferred_moderust/ | +6 | 0 replies | |
| 12/33 | rust: drm/kms: Add RawConnector and RawConnectorStaterust/ rust/ | +59 | 2 replies | |
| 13/33 | rust: drm/kms: Add RawPlane and RawPlaneStaterust/ | +37 | 0 replies | |
| 14/33 | rust: drm/kms: Add OpaqueConnector and OpaqueConnectorStaterust/ rust/ | +285 | 2 replies | |
| 15/33 | rust: drm/kms: Add OpaqueCrtc and OpaqueCrtcStaterust/ | +166 | 0 replies | |
| 16/33 | rust: drm/kms: Add OpaquePlane and OpaquePlaneStaterust/ | +175 | 0 replies | |
| 17/33 | rust: drm/kms: Add OpaqueEncoderrust/ | +90 | 0 replies | |
| 18/33 | rust: drm/kms: Add drm_atomic_state bindingsrust/ rust/ rust/ +4 more | +700 | 1 reply | |
| 19/33 | rust: drm/kms: Add DriverCrtc::atomic_check()rust/ rust/ | +52 | 2 replies | |
| 20/33 | rust: drm/kms: Add DriverPlane::atomic_update()rust/ | +44 | 0 replies | |
| 21/33 | rust: drm/kms: Add DriverPlane::atomic_check()rust/ | +50 | 1 reply | |
| 22/33 | rust: drm/kms: Add RawCrtcState::active()rust/ | +8 | 0 replies | |
| 23/33 | rust: drm/kms: Add RawPlaneState::crtc()rust/ | +12 | 0 replies | |
| 24/33 | rust: drm/kms: Add RawPlaneState::atomic_helper_check()rust/ rust/ | +29 | 0 replies | |
| 25/33 | rust: drm/kms: Add drm_framebuffer bindingsrust/ rust/ rust/ | +76 | 0 replies | |
| 26/33 | rust: drm/kms: Add RawPlane::framebuffer()rust/ rust/ | +17 | 0 replies | |
| 27/33 | rust: drm/kms: Add DriverCrtc::atomic_begin() and atomic_flush()rust/ | +88 | 1 reply | |
| 28/33 | rust: drm/kms: Add DriverCrtc::atomic_enable() and atomic_disable()rust/ | +86 | 0 replies | |
| 29/33 | rust: drm: Add Device::event_lock()rust/ | +8 | 0 replies | |
| 30/33 | rust: drm/kms: Add Device::num_crtcs()rust/ | +11 | 1 reply | |
| 31/33 | rust: drm/kms: Add VblankSupportrust/ rust/ rust/ +4 more | +501 | 1 reply | |
| 32/33 | rust: drm/kms: Add Kms::atomic_commit_tailrust/ rust/ | +387 | 0 replies | |
| 33/33 | drm: Introduce RVKMS!drivers/ drivers/ drivers/ +9 more | +635 | 0 replies |
Reviews trailers per patch
1 of 33 patches has a Reviewed-by or Acked-by.
| Patch | Maxime Ripard |
|---|---|
| 1/33 | |
| 2/33 | |
| 3/33 | |
| 4/33 | |
| 5/33 | |
| 6/33 | |
| 7/33 | |
| 8/33 | |
| 9/33 | |
| 10/33 | |
| 11/33 | |
| 12/33 | |
| 13/33 | |
| 14/33 | |
| 15/33 | |
| 16/33 | |
| 17/33 | |
| 18/33 | |
| 19/33 | |
| 20/33 | |
| 21/33 | |
| 22/33 | |
| 23/33 | |
| 24/33 | |
| 25/33 | |
| 26/33 | |
| 27/33 | |
| 28/33 | |
| 29/33 | |
| 30/33 | R-b |
| 31/33 | |
| 32/33 | |
| 33/33 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [RFC v3 00/33] Rust bindings for KMS + RVKMS
Hi! It's been a while but I think I'm quite happy with where this patch series is at the moment. I've gone through most of the changes suggested on the mailing list last, and have also gone and done quite a lot of cleanup. Here's some of the big changes I've made across the patch series:
* Cleaned up pretty much all of the WIP bits, I think I'm more confident with the design here now
* Limited the scope of the patches a bit more and removed:
* Plane state iterators (I think people get the idea, we want these but there's nothing I have to use these just yet)
* Some unused bindings for drm_format_info
* We use the faux driver subsytem now in response to some of Greg's comments
* All DRM types should have functions for converting from Opaque variants, and we now use a fancy macro for implementing this (this will make adding iterators in the future super easy as well)
* Lots of documentation cleanups
* Lots of safety comment cleanups
* Ensure type IDs for encoders, connectors, etc. are all fully defined using more fancy macro
* We now have special types for handling unregistered variants of mode objects, which fixes the last soundness issue I'm aware of.
There's a lot of other changes that I've noted in each patch as well. It's entirely possible with how many changes that I missed some feedback along the way, but I think I did a pretty thorough job of documenting all of the changes I did made (thanks squash!).
The only thing I think is still up in the air is documentation - I've linked in a few additional spots back to kernel headers/kernel documentation, but ideally I would like us to be able to link back to the relevant C function for almost every binding to try to slim down how much duplicate documentation we maintain.
This patch series still depends on the base branch that I've been maintaining as we still have a handful of dependencies that I'm working on getting upstream, you can find the base branch here:
https://gitlab.freedesktop.org/lyudess/linux/-/commits/rvkms-base
As well, you can find the previous version of this patch series here:
https://lore.kernel.org/dri-devel/[email protected]/T/
ALSO!!!!!
Please help review it is ok if you don't know rust, or if you know rust but don't know DRM. I honestly trust the DRM/rust community enough to know that y'all will ask questions in earnest and I'm happy to do my best to answer them :).
Lyude Paul (33):
rust: drm: Add a small handful of fourcc bindings
rust: drm: Add traits for registering KMS devices
rust: drm/kms: Introduce the main ModeConfigObject traits
rust: drm/kms: Add drm_connector bindings
rust: drm/kms: Add drm_plane bindings
rust: drm/kms: Add drm_crtc bindings
rust: drm/kms: Add drm_encoder bindings
rust: drm/kms: Add UnregisteredConnector::attach_encoder()
rust: drm/kms: Add DriverConnector::get_mode callback
rust: drm/kms: Add ConnectorGuard::add_modes_noedid()
rust: drm/kms: Add ConnectorGuard::set_preferred_mode
rust: drm/kms: Add RawConnector and RawConnectorState
rust: drm/kms: Add RawPlane and RawPlaneState
rust: drm/kms: Add OpaqueConnector and OpaqueConnectorState
rust: drm/kms: Add OpaqueCrtc and OpaqueCrtcState
rust: drm/kms: Add OpaquePlane and OpaquePlaneState
rust: drm/kms: Add OpaqueEncoder
rust: drm/kms: Add drm_atomic_state bindings
rust: drm/kms: Add DriverCrtc::atomic_check()
rust: drm/kms: Add DriverPlane::atomic_update()
rust: drm/kms: Add DriverPlane::atomic_check()
rust: drm/kms: Add RawCrtcState::active()
rust: drm/kms: Add RawPlaneState::crtc()
rust: drm/kms: Add RawPlaneState::atomic_helper_check()
rust: drm/kms: Add drm_framebuffer bindings
rust: drm/kms: Add RawPlane::framebuffer()
rust: drm/kms: Add DriverCrtc::atomic_begin() and atomic_flush()
rust: drm/kms: Add DriverCrtc::atomic_enable() and atomic_disable()
rust: drm: Add Device::event_lock()
rust: drm/kms: Add Device::num_crtcs()
rust: drm/kms: Add VblankSupport
rust: drm/kms: Add Kms::atomic_commit_tail
drm: Introduce RVKMS!
drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/rvkms/Kconfig | 3 + drivers/gpu/drm/rvkms/Makefile | 1 + drivers/gpu/drm/rvkms/connector.rs | 55 ++ drivers/gpu/drm/rvkms/crtc.rs | 245 ++++++ drivers/gpu/drm/rvkms/encoder.rs | 31 + drivers/gpu/drm/rvkms/file.rs | 19 + drivers/gpu/drm/rvkms/gem.rs | 29 + drivers/gpu/drm/rvkms/output.rs | 36 + drivers/gpu/drm/rvkms/plane.rs | 73 ++ drivers/gpu/drm/rvkms/rvkms.rs | 140 ++++ rust/bindings/bindings_helper.h | 14 + rust/helpers/drm/atomic.c | 32 + rust/helpers/drm/drm.c | 5 + rust/helpers/drm/vblank.c | 8 + rust/kernel/drm/device.rs | 17 +- rust/kernel/drm/drv.rs | 56 +- rust/kernel/drm/fourcc.rs | 20 + rust/kernel/drm/gem/mod.rs | 4 + rust/kernel/drm/gem/shmem.rs | 4 + rust/kernel/drm/kms.rs | 574 ++++++++++++++ rust/kernel/drm/kms/atomic.rs | 717 ++++++++++++++++++ rust/kernel/drm/kms/connector.rs | 1003 +++++++++++++++++++++++++ rust/kernel/drm/kms/crtc.rs | 1109 ++++++++++++++++++++++++++++ rust/kernel/drm/kms/encoder.rs | 413 +++++++++++ rust/kernel/drm/kms/framebuffer.rs | 73 ++ rust/kernel/drm/kms/plane.rs | 1077 +++++++++++++++++++++++++++ rust/kernel/drm/kms/vblank.rs | 448 +++++++++++ rust/kernel/drm/mod.rs | 2 + 30 files changed, 6202 insertions(+), 9 deletions(-) create mode 100644 drivers/gpu/drm/rvkms/Kconfig create mode 100644 drivers/gpu/drm/rvkms/Makefile create mode 100644 drivers/gpu/drm/rvkms/connector.rs create mode 100644 drivers/gpu/drm/rvkms/crtc.rs create mode 100644 drivers/gpu/drm/rvkms/encoder.rs create mode 100644 drivers/gpu/drm/rvkms/file.rs create mode 100644 drivers/gpu/drm/rvkms/gem.rs create mode 100644 drivers/gpu/drm/rvkms/output.rs create mode 100644 drivers/gpu/drm/rvkms/plane.rs create mode 100644 drivers/gpu/drm/rvkms/rvkms.rs create mode 100644 rust/helpers/drm/atomic.c create mode 100644 rust/helpers/drm/vblank.c create mode 100644 rust/kernel/drm/fourcc.rs create mode 100644 rust/kernel/drm/kms.rs create mode 100644 rust/kernel/drm/kms/atomic.rs create mode 100644 rust/kernel/drm/kms/connector.rs create mode 100644 rust/kernel/drm/kms/crtc.rs create mode 100644 rust/kernel/drm/kms/encoder.rs create mode 100644 rust/kernel/drm/kms/framebuffer.rs create mode 100644 rust/kernel/drm/kms/plane.rs create mode 100644 rust/kernel/drm/kms/vblank.rs
Signature · 1 line
2.48.1