DRM 'feature' support for DRM drivers
Status from this message: Applied, thanks!
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest1 patch 2 repliesApplied
- v21 patch 2 repliesSuperseded
Patches in v3 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | rust: drm: add FEAT_RENDER flag for render node supportdrivers/ rust/ rust/ | +24 | 1 reply |
Reviews trailers per patch
The patch has a Reviewed-by or Acked-by.
| Patch | Alice Ryhl |
|---|---|
| 1/1 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 0/1] DRM 'feature' support for DRM drivers
This is a follow up to [1], which introduces feature support for DRM drivers, as will soon be needed by Tyr and rvkms.
Based on feedback and discussion on the first iteration, render node support has been reworked.
Support for render nodes was initially modeled as an unsafe trait, to require drivers to comply with any safety requirements tied to enabling a given feature. For DRIVER_RENDER specifically, the intent was to force implementors to ensure that any ioctl declared with DRM_RENDER_ALLOW does not call KMS/modesetting APIs or require DRM_MASTER.
However, the C DRM core already enforces render node access control at the ioctl dispatch level: if a client opens a render node, any ioctl without the DRM_RENDER_ALLOW flag will fail. So the C DRM framework already ensures the rules are respected for core ioctls, and the unsafe trait doesn't add any meaningful protection beyond this.
For these reasons and since enabling DRIVER_RENDER doesn't require any particular method to be implemented, there's no real need to model this as a trait, and a boolean flag is sufficient.
This does not prevent other driver features to be modeled differently based on their requirements. Features that require additional ops (e.g. FEAT_MODESET) could instead be modeled as a trait, and some other constant type that can only be constructed when the relevant trait is implemented.
Introducing the FEAT_RENDER bool flag here leaves room for implementing other features differently at a later stage.
Changes since v2[2]:
- Renamed RENDER_CAPABILITY const to FEAT_RENDER
- Expanded documentation for FEAT_RENDER
[1] v1: https://lore.kernel.org/rust-for-linux/[email protected]/
[2] v2: https://lore.kernel.org/rust-for-linux/[email protected]/
Laura Nao (1):
rust: drm: add FEAT_RENDER flag for render node support
drivers/gpu/drm/tyr/driver.rs | 1 + rust/kernel/drm/device.rs | 12 +++++++++++- rust/kernel/drm/driver.rs | 12 ++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-)
Signature · 1 line
2.39.5