Rust for Linux List
 help / color / mirror / Atom feed
From: "Danilo Krummrich" <dakr@kernel.org>
To: "Gary Guo" <gary@garyguo.net>
Cc: "Deborah Brouwer" <deborah.brouwer@collabora.com>,
	"Alice Ryhl" <aliceryhl@google.com>,
	<daniel.almeida@collabora.com>, <boris.brezillon@collabora.com>,
	<dri-devel@lists.freedesktop.org>,
	<rust-for-linux@vger.kernel.org>,
	"Eliot Courtney" <ecourtney@nvidia.com>,
	"Alexandre Courbot" <acourbot@nvidia.com>
Subject: Re: [PATCH v2 2/2] drm/tyr: use IoMem directly instead of Devres
Date: Tue, 02 Jun 2026 12:49:38 +0200	[thread overview]
Message-ID: <DIYI74CF465A.259FWQ2ZT6Y1Y@kernel.org> (raw)
In-Reply-To: <DIYHW8MAG0AY.FJ96EJ5RDZK7@garyguo.net>

On Tue Jun 2, 2026 at 12:35 PM CEST, Gary Guo wrote:
> I am not sure what the distinction even mean for a class device?
>
> There's 1 device per registration, so they're equal. Am I missing something?

The existing DRM device private data's lifetime is tied to the lifetime of the
DRM device itself, which makes sense as long as IOCTLs are not guarded against
driver unbind and can still reach into the driver after driver unbind.

Once that is changed, this doesn't make sense anymore, the driver structures are
then tied to the lifetime of the Registration.

Any handles that userspace may keep open beyond this should be handled by the
subsystem; at this point there is no more HW state the driver would need to take
care of.

Thus, the private data tied to the lifetime of the DRM device won't be needed
anymore, see also [1].

[1] https://lore.kernel.org/dri-devel/DIXMEKSYML5D.1JUXO9CW10RY8@kernel.org/

  reply	other threads:[~2026-06-02 10:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-29  0:00 [PATCH 0/2] drm: tyr: use lifetime-bound IoMem Danilo Krummrich
2026-05-29  0:00 ` [PATCH v2 1/2] drm/tyr: separate driver type from driver data Danilo Krummrich
2026-05-29  1:57   ` Alexandre Courbot
2026-05-29  0:00 ` [PATCH v2 2/2] drm/tyr: use IoMem directly instead of Devres Danilo Krummrich
2026-06-01  9:35   ` Alice Ryhl
2026-06-01  9:54     ` Danilo Krummrich
2026-06-02  1:12     ` Deborah Brouwer
2026-06-02 10:35       ` Gary Guo
2026-06-02 10:49         ` Danilo Krummrich [this message]
2026-06-02  0:50   ` Deborah Brouwer
2026-06-02  6:40   ` Boris Brezillon
2026-06-02 10:55 ` [PATCH 0/2] drm: tyr: use lifetime-bound IoMem Daniel Almeida
2026-06-02 11:01 ` Alice Ryhl

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=DIYI74CF465A.259FWQ2ZT6Y1Y@kernel.org \
    --to=dakr@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=aliceryhl@google.com \
    --cc=boris.brezillon@collabora.com \
    --cc=daniel.almeida@collabora.com \
    --cc=deborah.brouwer@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ecourtney@nvidia.com \
    --cc=gary@garyguo.net \
    --cc=rust-for-linux@vger.kernel.org \
    /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