dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Danilo Krummrich" <dakr@kernel.org>
To: "Alexandre Courbot" <acourbot@nvidia.com>
Cc: "Alistair Popple" <apopple@nvidia.com>,
	<nova-gpu@lists.linux.dev>, "Alice Ryhl" <aliceryhl@google.com>,
	"David Airlie" <airlied@gmail.com>,
	"Benno Lossin" <lossin@kernel.org>, "Gary Guo" <gary@garyguo.net>,
	"Eliot Courtney" <ecourtney@nvidia.com>,
	"John Hubbard" <jhubbard@nvidia.com>,
	<linux-kernel@vger.kernel.org>, <dri-devel@lists.freedesktop.org>,
	<rust-for-linux@vger.kernel.org>
Subject: Re: [PATCH v2 3/5] drm: nova: Add GETPARAM parameter to read the GPU chipset
Date: Fri, 10 Jul 2026 00:28:27 +0200	[thread overview]
Message-ID: <DJUE8BYTRI82.29EEOWULQ2T8G@kernel.org> (raw)
In-Reply-To: <DJU1LZQLJ38P.2OHWQWKDYJ86J@nvidia.com>

On Thu Jul 9, 2026 at 2:35 PM CEST, Alexandre Courbot wrote:
> On Thu Jul 9, 2026 at 5:52 PM JST, Alistair Popple wrote:
>> @@ -82,39 +83,39 @@ fn try_from(value: u32) -> Result<Self, Self::Error> {
>>  
>>  define_chipset!({
>>      // Turing
>> -    TU102 = 0x162,
>> -    TU104 = 0x164,
>> -    TU106 = 0x166,
>> -    TU117 = 0x167,
>> -    TU116 = 0x168,
>> +    TU102 = uapi::drm_nova_chipset_NOVA_DRM_CHIPSET_TU102,
>> +    TU104 = uapi::drm_nova_chipset_NOVA_DRM_CHIPSET_TU104,
>> +    TU106 = uapi::drm_nova_chipset_NOVA_DRM_CHIPSET_TU106,
>> +    TU117 = uapi::drm_nova_chipset_NOVA_DRM_CHIPSET_TU117,
>> +    TU116 = uapi::drm_nova_chipset_NOVA_DRM_CHIPSET_TU116,
>
> If we are going to remove the actual values, let's at least generate the
> right-hand side in the macro as it is just verbose without bringing any
> new information. The following diff lets you remove the `= uapi::...`
> for each chipset declaration.

I was about to propose the same thing, the right-hand side is just noise.

> The UAPI definitions come technically from nova-drm (and are defined as
> such), which introduces a dependency of sorts from nova-core to
> nova-drm. I'm not saying this is a problem, but mentioning it as we want
> to make that decision consciously.

It is the other way around, both nova-core (mostly indirectly) and nova-drm
(directly) implement the uAPI contract and hence obviously depend on this
contract.

The chipset value that is exposed to userspace is produced by nova-core, not by
nova-drm; nova-drm just passes it through.

So, this is not a "we randomly reuse the uAPI enum" kind of situation, it is
more about making nova-core commit to the contract that it has to uphold.

> I also think the introduction of UAPI variants and modification of
> `define_chipset` should be its own patch, as these are pretty
> mechanical.

Yes, it should be.

Thanks,
Danilo

  reply	other threads:[~2026-07-09 22:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-09  8:51 [PATCH v2 0/5] gpu: nova: Export parameters from nova-core to nova-drm Alistair Popple
2026-07-09  8:52 ` [PATCH v2 1/5] gpu: nova-core: Add public driver API to nova-core Alistair Popple
2026-07-09 12:34   ` Alexandre Courbot
2026-07-09  8:52 ` [PATCH v2 2/5] gpu: nova: Add DRM registration data Alistair Popple
2026-07-09 12:34   ` Alexandre Courbot
2026-07-09  8:52 ` [PATCH v2 3/5] drm: nova: Add GETPARAM parameter to read the GPU chipset Alistair Popple
2026-07-09 12:35   ` Alexandre Courbot
2026-07-09 22:28     ` Danilo Krummrich [this message]
2026-07-09  8:52 ` [PATCH v2 4/5] drm: nova: Add a GETPARAM parameter to read usable VRAM size Alistair Popple
2026-07-09  8:52 ` [PATCH v2 5/5] drm: nova: Use nova-core to read VRAM_BAR_SIZE parameter Alistair Popple

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=DJUE8BYTRI82.29EEOWULQ2T8G@kernel.org \
    --to=dakr@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=apopple@nvidia.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ecourtney@nvidia.com \
    --cc=gary@garyguo.net \
    --cc=jhubbard@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=nova-gpu@lists.linux.dev \
    --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