Re: [PATCH 3/4] drm: nova: Add GETPARAM parameter to read the GPU chipset

From: Danilo Krummrich

Date: Mon Jul 06 2026 - 14:17:34 EST


On Mon Jul 6, 2026 at 7:34 AM CEST, Alistair Popple wrote:
> @@ -31,7 +31,6 @@ pub(crate) struct Nova<'bound> {
>
> /// DRM registration data, accessible from ioctl handlers via the registration guard.
> pub(crate) struct DrmRegData<'bound> {
> - #[allow(dead_code)]

Forgot to mention that in the previous patch, please use expect instead.

> @@ -12,11 +12,11 @@
> types::CovariantForLt, //
> };
>
> +use crate::gpu::Chipset;
> use crate::gpu::Gpu;

Vertical import style.

> @@ -25,6 +25,13 @@ extern "C" {
> */
> #define NOVA_GETPARAM_VRAM_BAR_SIZE 0x1
>
> +/*
> + * NOVA_GETPARAM_GPU_CHIPSET
> + *
> + * Query the GPU chipset architecture/implementation.
> + */
> +#define NOVA_GETPARAM_GPU_CHIPSET 0x2

We could provide an enum for the chipset values and use it in the definition of
nova-core's Chipset type, which guarantees a single source of truth.

define_chipset!({
TU102 = uapi::NOVA_CHIPSET_TU102,
TU104 = uapi::NOVA_CHIPSET_TU104,
// ...
});