From: Joel Fernandes <joelagnelf@nvidia.com>
To: Eliot Courtney <ecourtney@nvidia.com>,
Danilo Krummrich <dakr@kernel.org>,
Alexandre Courbot <acourbot@nvidia.com>,
Alice Ryhl <aliceryhl@google.com>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Cc: John Hubbard <jhubbard@nvidia.com>,
Alistair Popple <apopple@nvidia.com>,
Timur Tabi <ttabi@nvidia.com>,
rust-for-linux@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpu: nova-core: require little endian
Date: Mon, 6 Apr 2026 12:30:51 -0400 [thread overview]
Message-ID: <a66916c8-8e82-4e54-8e21-b312a7badfc4@nvidia.com> (raw)
In-Reply-To: <20260406-fix-kconfig-v1-1-8f634499f7f0@nvidia.com>
On 4/6/2026 2:52 AM, Eliot Courtney wrote:
> The driver already assumes little endian in a lot of locations. For
> example, all the code that reads RPCs out of the command queue just
> directly interprets the bytes.
Oh yeah, its not just the driver making assumptions, it is the hardware itself.
The Nvidia GPU architecture is little-endian (including MMU structures in VRAM).
>
> Make this explicit in Kconfig.
>
> Signed-off-by: Eliot Courtney <ecourtney@nvidia.com>
> ---
> The current code assumes little endian in a bunch of places. I think we
> should either explicitly decide to be generic on endianness or explicitly
> decide not to - having some handling sprinkled around in various
> locations seems confusing to me.
>
> I believe that currently e.g. `RUST` transitively depends on
> !CPU_BIG_ENDIAN, so this is more about making the decision explicit for
> nova-core rather than fixing any kind of hole.
> ---
> drivers/gpu/nova-core/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/nova-core/Kconfig b/drivers/gpu/nova-core/Kconfig
> index a4f2380654e2..d8456f8eaa05 100644
> --- a/drivers/gpu/nova-core/Kconfig
> +++ b/drivers/gpu/nova-core/Kconfig
> @@ -3,6 +3,7 @@ config NOVA_CORE
> depends on 64BIT
> depends on PCI
> depends on RUST
> + depends on !CPU_BIG_ENDIAN
If we want to do this, I am Ok. Although I am also Ok with the potential
transitive Rust dependency in which case the only value of adding it in Kconfig
is documentation. But just a side note (not a rejection comment), Nouveau does
not do this, and no other GPU driver afaics either.
thanks,
--
Joel Fernandes
next prev parent reply other threads:[~2026-04-06 16:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-06 6:52 [PATCH] gpu: nova-core: require little endian Eliot Courtney
2026-04-06 16:30 ` Joel Fernandes [this message]
2026-04-07 10:56 ` Danilo Krummrich
2026-04-07 18:02 ` Timur Tabi
2026-04-07 18:30 ` Joel Fernandes
2026-04-06 16:34 ` Gary Guo
2026-04-06 19:37 ` John Hubbard
2026-04-06 19:46 ` Danilo Krummrich
2026-04-07 2:15 ` Eliot Courtney
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=a66916c8-8e82-4e54-8e21-b312a7badfc4@nvidia.com \
--to=joelagnelf@nvidia.com \
--cc=acourbot@nvidia.com \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=apopple@nvidia.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=ecourtney@nvidia.com \
--cc=jhubbard@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=ttabi@nvidia.com \
/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