From: Lyude Paul <lyude@redhat.com>
To: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
rust-for-linux@vger.kernel.org,
Danilo Krummrich <dakr@kernel.org>
Cc: nouveau@lists.freedesktop.org, "Miguel Ojeda" <ojeda@kernel.org>,
"Simona Vetter" <simona@ffwll.ch>,
"Alice Ryhl" <aliceryhl@google.com>,
"Shankari Anand" <shankari.ak0208@gmail.com>,
"David Airlie" <airlied@gmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Asahi Lina" <lina+kernel@asahilina.net>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
"Lyude Paul" <lyude@redhat.com>
Subject: [PATCH v5 0/4] Introduce DeviceContext
Date: Fri, 30 Jan 2026 19:13:29 -0500 [thread overview]
Message-ID: <20260131001602.2095470-1-lyude@redhat.com> (raw)
Previous version of this patch series:
https://patchwork.freedesktop.org/series/160217/#rev3
One of the unsolved issues we still have with the rust DRM bindings is
the ability to limit certain Device operations to contexts where we can
guarantee that a Device has been fully initialized and registered with
userspace, or vice-versa (e.g. must be unregistered).
While the previous solution for this that I had was simply not exposing
drm::Device at all until the device has been registered with userspace,
unfortunately this isn't enough since:
* As we found out with Tyr, drivers occasionally need to be able to
create GEM objects before device registration
* We would still need to be able to handle KMS callbacks which could be
invoked after KMS init but before userspace registration (not handled
in this series specifically, but DeviceContext will be required for
handling this).
This patch series provides a pretty nice solution to this, by
implementing a very similar solution to kernel::device::DeviceContext:
introducing our own DeviceContext type state.
This patch series depends on the two pre-requisite patch series:
* https://patchwork.freedesktop.org/series/160523/
Series-wide changes
V2:
* s/DeviceCtx/DeviceContext/ for consistency
* Move private driver-data availability to the Registration
DeviceContext
* s/AnyCtx/Init/
V4:
* Split out DriverAllocImpl into it's own patch
More changes described in each patch description.
Lyude Paul (3):
rust/drm: Introduce DeviceContext
rust/drm: Don't setup private driver data until registration
rust/drm/gem: Use DeviceContext with GEM objects
Lyude Paul (4):
rust/drm: Introduce DeviceContext
rust/drm: Don't setup private driver data until registration
rust/drm/gem: Add DriverAllocImpl type alias
rust/drm/gem: Use DeviceContext with GEM objects
drivers/gpu/drm/nova/driver.rs | 10 +-
drivers/gpu/drm/nova/gem.rs | 11 +-
drivers/gpu/drm/tyr/driver.rs | 12 +-
drivers/gpu/drm/tyr/gem.rs | 3 +-
rust/kernel/drm/device.rs | 250 +++++++++++++++++++++++++--------
rust/kernel/drm/driver.rs | 52 +++++--
rust/kernel/drm/gem/mod.rs | 64 ++++++---
rust/kernel/drm/mod.rs | 4 +
8 files changed, 305 insertions(+), 101 deletions(-)
base-commit: cea7b66a80412e2a5b74627b89ae25f1d0110a4b
prerequisite-patch-id: ddb20be75c8fc92ba2d48a5c4aa8e724202de1ff
prerequisite-patch-id: 87e69cd89a806392d3275b19fbfb160d44d957c9
--
2.52.0
next reply other threads:[~2026-01-31 0:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-31 0:13 Lyude Paul [this message]
2026-01-31 0:13 ` [PATCH v5 1/4] rust/drm: Introduce DeviceContext Lyude Paul
2026-02-06 13:28 ` Daniel Almeida
2026-02-12 23:39 ` Deborah Brouwer
2026-01-31 0:13 ` [PATCH v5 2/4] rust/drm: Don't setup private driver data until registration Lyude Paul
2026-02-04 18:28 ` Daniel Almeida
2026-02-04 20:56 ` lyude
2026-02-06 13:46 ` Daniel Almeida
2026-01-31 0:13 ` [PATCH v5 3/4] rust/drm/gem: Add DriverAllocImpl type alias Lyude Paul
2026-02-06 13:48 ` Daniel Almeida
2026-01-31 0:13 ` [PATCH v5 4/4] rust/drm/gem: Use DeviceContext with GEM objects Lyude Paul
2026-02-06 14:08 ` Daniel Almeida
-- strict thread matches above, loose matches on Subject: below --
2026-03-17 21:28 [PATCH v5 0/4] Introduce DeviceContext Lyude Paul
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=20260131001602.2095470-1-lyude@redhat.com \
--to=lyude@redhat.com \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=lina+kernel@asahilina.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=nouveau@lists.freedesktop.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=shankari.ak0208@gmail.com \
--cc=simona@ffwll.ch \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox