public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: "Danilo Krummrich" <dakr@kernel.org>
To: "Deborah Brouwer" <deborah.brouwer@collabora.com>
Cc: <dri-devel@lists.freedesktop.org>,
	<rust-for-linux@vger.kernel.org>, <daniel.almeida@collabora.com>,
	<aliceryhl@google.com>, <boris.brezillon@collabora.com>,
	"dri-devel" <dri-devel-bounces@lists.freedesktop.org>
Subject: Re: [PATCH v2] drm/tyr: Clarify driver/device type names
Date: Mon, 23 Feb 2026 22:41:04 +0100	[thread overview]
Message-ID: <DGMO1YUKS8WK.H2FG6YL1ROC3@kernel.org> (raw)
In-Reply-To: <20260223204648.208886-1-deborah.brouwer@collabora.com>

On Mon Feb 23, 2026 at 9:46 PM CET, Deborah Brouwer wrote:
> Currently the `TyrDriver` struct implements both `platform::Driver` and
> `drm::Driver`. For clarity, split up these two roles:
>  - Introduce `TyrPlatformDeviceData` to implement `platform::Driver`, and

I think this should be TyrPlatformDriverData instead, i.e. it is the driver's
private data that happens to be stored in (and owned by) the platform device.

The corresponding C setter is also called platform_set_drvdata() and not
platform_set_devdata().

>  - Introduce `TyrDrmDriver` to implement `drm::Driver`.
>
> Also rename other variables to reflect their roles in the DRM context:
> - Rename `TyrDevice` to `TyrDrmDevice`
> - Rename `TyrData` to `TyrDrmDeviceData`

Although it might sound contradictory at first, I think for a drm::Device it is
OK to name it TyrDrmDeviceData as opposed to TyrDrmDriverData (although that
would make sense as well and I'd probably prefer that).

The reason is that a platform::Device being a bus device may store different
*driver specific* data types thoughout its whole lifetime, i.e. a platform
device may be bound to multiple different drivers throughout its lifetime.

But a drm::Device being a class device is always *statically* typed over it's
private data type, i.e. drm::Device<TyrDrmDeviceData>.

> - Rename `File` to `TyrDrmFileData`
> - Rename `DrmFile` to `TyrDrmFile`
>
> No functional changes are intended.
>
> Co-developed-by: Boris Brezillon <boris.brezillon@collabora.com>
> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
> Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>

Otherwise LGTM.

  reply	other threads:[~2026-02-23 21:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-23 20:46 [PATCH v2] drm/tyr: Clarify driver/device type names Deborah Brouwer
2026-02-23 21:41 ` Danilo Krummrich [this message]
2026-02-23 23:38 ` Claude review: " Claude Code Review Bot
2026-02-23 23:38 ` Claude Code Review Bot

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=DGMO1YUKS8WK.H2FG6YL1ROC3@kernel.org \
    --to=dakr@kernel.org \
    --cc=aliceryhl@google.com \
    --cc=boris.brezillon@collabora.com \
    --cc=daniel.almeida@collabora.com \
    --cc=deborah.brouwer@collabora.com \
    --cc=dri-devel-bounces@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    --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