All of lore.kernel.org
 help / color / mirror / Atom feed
From: Danilo Krummrich <dakr@kernel.org>
To: airlied@gmail.com, simona@ffwll.ch,
	maarten.lankhorst@linux.intel.com, mripard@kernel.org,
	tzimmermann@suse.de, lyude@redhat.com, acurrid@nvidia.com,
	lina@asahilina.net, daniel.almeida@collabora.com, j@jannau.net
Cc: ojeda@kernel.org, alex.gaynor@gmail.com, boqun.feng@gmail.com,
	gary@garyguo.net, bjorn3_gh@protonmail.com,
	benno.lossin@proton.me, a.hindborg@kernel.org,
	aliceryhl@google.com, tmgross@umich.edu,
	dri-devel@lists.freedesktop.org, rust-for-linux@vger.kernel.org,
	Danilo Krummrich <dakr@kernel.org>
Subject: [PATCH 0/8] DRM Rust abstractions
Date: Wed, 26 Mar 2025 00:54:27 +0100	[thread overview]
Message-ID: <20250325235522.3992-1-dakr@kernel.org> (raw)

This is the series for the initial DRM Rust abstractions, including DRM device /
driver, IOCTL, File and GEM object abstractions.

This series has been posted previously, however this is a long time ago and I
reworked a lot of things quite heavily. Hence, I decided to post this as a whole
new series.

Besides the rework, I want to credit Lina for her initial work, which this
series is based on.

In a private mail Lina told me to "feel free to take anything that's useful
from my past patch submissions or the downstream branches and use it/submit it
in any way".

@Lina: If you, however, feel uncomfortable with any of the Co-developed-by:
tags, due to the major changes, please let me know.

Those changes include:
  - switch to the subclassing pattern for DRM device
  - rework of the GEM object abstraction; dropping the custom reference types in
    favor of AlwaysRefCounted
  - rework of the File abstractions
  - rework of the driver registration
  - lots of minor changes (e.g. to better align with existing abstractions)

This patch series is also available in [1]; an example usage from nova-drm can
be found in [2] and [3].

[1] https://gitlab.freedesktop.org/drm/misc/kernel/-/tree/topic/rust-drm
[2] https://lore.kernel.org/nouveau/20250325232222.5326-1-dakr@kernel.org/
[3] https://gitlab.freedesktop.org/drm/nova/-/tree/staging/nova-drm

Asahi Lina (1):
  rust: drm: ioctl: Add DRM ioctl abstraction

Danilo Krummrich (7):
  drm: drv: implement __drm_dev_alloc()
  rust: drm: add driver abstractions
  rust: drm: add device abstraction
  rust: drm: add DRM driver registration
  rust: drm: file: Add File abstraction
  rust: drm: gem: Add GEM object abstraction
  MAINTAINERS: add DRM Rust source files to DRM DRIVERS

 MAINTAINERS                     |   1 +
 drivers/gpu/drm/drm_drv.c       |  58 ++++--
 include/drm/drm_drv.h           |   5 +
 rust/bindings/bindings_helper.h |   6 +
 rust/helpers/drm.c              |  19 ++
 rust/helpers/helpers.c          |   1 +
 rust/kernel/drm/device.rs       | 195 +++++++++++++++++++
 rust/kernel/drm/driver.rs       | 194 +++++++++++++++++++
 rust/kernel/drm/file.rs         |  99 ++++++++++
 rust/kernel/drm/gem/mod.rs      | 321 ++++++++++++++++++++++++++++++++
 rust/kernel/drm/ioctl.rs        | 159 ++++++++++++++++
 rust/kernel/drm/mod.rs          |  19 ++
 rust/kernel/lib.rs              |   2 +
 rust/uapi/uapi_helper.h         |   1 +
 14 files changed, 1064 insertions(+), 16 deletions(-)
 create mode 100644 rust/helpers/drm.c
 create mode 100644 rust/kernel/drm/device.rs
 create mode 100644 rust/kernel/drm/driver.rs
 create mode 100644 rust/kernel/drm/file.rs
 create mode 100644 rust/kernel/drm/gem/mod.rs
 create mode 100644 rust/kernel/drm/ioctl.rs
 create mode 100644 rust/kernel/drm/mod.rs

-- 
2.49.0


             reply	other threads:[~2025-03-25 23:55 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-25 23:54 Danilo Krummrich [this message]
2025-03-25 23:54 ` [PATCH 1/8] drm: drv: implement __drm_dev_alloc() Danilo Krummrich
2025-03-26  8:46   ` Maxime Ripard
2025-03-25 23:54 ` [PATCH 2/8] rust: drm: ioctl: Add DRM ioctl abstraction Danilo Krummrich
2025-03-25 23:54 ` [PATCH 3/8] rust: drm: add driver abstractions Danilo Krummrich
2025-03-26  9:05   ` Maxime Ripard
2025-03-28 22:00   ` Lyude Paul
2025-03-28 22:46     ` Danilo Krummrich
2025-03-25 23:54 ` [PATCH 4/8] rust: drm: add device abstraction Danilo Krummrich
2025-03-26  9:12   ` Maxime Ripard
2025-03-25 23:54 ` [PATCH 5/8] rust: drm: add DRM driver registration Danilo Krummrich
2025-03-26  9:24   ` Maxime Ripard
2025-03-26 10:46     ` Danilo Krummrich
2025-03-28 14:28       ` Maxime Ripard
2025-03-28 14:50         ` Danilo Krummrich
2025-04-10  9:23           ` Maxime Ripard
2025-03-25 23:54 ` [PATCH 6/8] rust: drm: file: Add File abstraction Danilo Krummrich
2025-03-28 14:42   ` Maxime Ripard
2025-03-25 23:54 ` [PATCH 7/8] rust: drm: gem: Add GEM object abstraction Danilo Krummrich
2025-03-25 23:54 ` [PATCH 8/8] MAINTAINERS: add DRM Rust source files to DRM DRIVERS Danilo Krummrich
2025-03-28 14:49   ` Maxime Ripard
2025-03-28 14:50     ` Danilo Krummrich
2025-04-08 16:29 ` [PATCH 0/8] DRM Rust abstractions Asahi Lina
2025-04-08 17:04   ` Danilo Krummrich
2025-04-08 18:06     ` Asahi Lina
2025-04-08 19:17       ` Danilo Krummrich
2025-04-09  7:49         ` Asahi Lina
2025-04-09 21:29           ` Dave Airlie
2025-04-10  4:33             ` Asahi Lina
2025-04-10  7:12               ` Asahi Lina
2025-04-10 10:23                 ` Danilo Krummrich
2025-04-10 12:37                   ` Asahi Lina
2025-04-10 13:33                     ` Danilo Krummrich
2025-04-11  0:43                     ` Dave Airlie
2025-04-11  6:53                       ` Asahi Lina
2025-04-10  6:44             ` Simona Vetter
2025-04-10  8:14 ` Asahi Lina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250325235522.3992-1-dakr@kernel.org \
    --to=dakr@kernel.org \
    --cc=a.hindborg@kernel.org \
    --cc=acurrid@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=benno.lossin@proton.me \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=daniel.almeida@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gary@garyguo.net \
    --cc=j@jannau.net \
    --cc=lina@asahilina.net \
    --cc=lyude@redhat.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tmgross@umich.edu \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.