public inbox for rust-for-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: "Alexandre Courbot" <acourbot@nvidia.com>
To: "Timur Tabi" <ttabi@nvidia.com>
Cc: "Joel Fernandes" <joelagnelf@nvidia.com>,
	"dakr@kernel.org" <dakr@kernel.org>,
	"Eliot Courtney" <ecourtney@nvidia.com>,
	"John Hubbard" <jhubbard@nvidia.com>,
	"rust-for-linux@vger.kernel.org" <rust-for-linux@vger.kernel.org>
Subject: Re: [PATCH 4/6] gpu: nova-core: add FbHal::frts_size() for GA100 support
Date: Tue, 14 Apr 2026 15:03:28 +0900	[thread overview]
Message-ID: <DHSNFBLMU1L4.1A45K7QUFPXP3@nvidia.com> (raw)
In-Reply-To: <30ac632602debeaf649e67ecd2e0698786c19517.camel@nvidia.com>

On Tue Apr 14, 2026 at 12:13 PM JST, Timur Tabi wrote:
> On Tue, 2026-04-14 at 10:04 +0900, Alexandre Courbot wrote:
>> > Note that we cannot use supports_display() to determine the FRTS
>> > size because there are other GPUs (e.g. GA102GL) that have display
>> > disabled (and so supports_display() returns False), but the FRTS
>> > window size still needs to be 1MB.
>> 
>> Order-wise this should probably come before patch 3 - I was a bit
>> confused about the fact that we are checking the size of the frts region
>> since it is defined as a constant until this patch.
>
> I put it in this order because we don't want to call run_fwsec_frts() if frts is empty. 
> Otherwise, frts could be empty because of this patch, and we would call run_fwsec_frts() anyway.

Good point, that makes sense - taking my suggestion back.

>
>> > +
>> > +    fn frts_size(&self) -> u64 {
>> > +        usize_as_u64(SZ_1M)
>> > +    }
>> 
>> This implementation is identical to the one in `tu102.rs`. As a pattern,
>> when different HALs use different implementations, we define it into a
>> function that both HALs can call instead of repeating the code (see for
>> instance how `read_sysmem_flush_page` is handled between ga100 and
>> ga102).
>> 
>
> I figured since all it did is return a constant, that it would be simpler to just do that, but I
> will change it.

Yeah I agree it doesn't change much, it's just for the sake of staying
consistent through the codebase.

  reply	other threads:[~2026-04-14  6:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-10 20:37 [PATCH 0/6] gpu: nova-core: add GA100 support Timur Tabi
2026-04-10 20:37 ` [PATCH 1/6] gpu: nova-core: use correct fwsignature for GA100 Timur Tabi
2026-04-13  4:10   ` Eliot Courtney
2026-04-10 20:37 ` [PATCH 2/6] gpu: nova-core: do not consider 0xBB77 as a valid PCI ROM header signature Timur Tabi
2026-04-13  4:11   ` Eliot Courtney
2026-04-10 20:37 ` [PATCH 3/6] gpu: nova-core: only boot FRTS if it actually exists Timur Tabi
2026-04-13  4:19   ` Eliot Courtney
2026-04-13 19:49     ` Timur Tabi
2026-04-13 23:48       ` Timur Tabi
2026-04-14 18:10         ` Timur Tabi
2026-04-15  2:35           ` Eliot Courtney
2026-04-10 20:37 ` [PATCH 4/6] gpu: nova-core: add FbHal::frts_size() for GA100 support Timur Tabi
2026-04-14  1:04   ` Alexandre Courbot
2026-04-14  3:13     ` Timur Tabi
2026-04-14  6:03       ` Alexandre Courbot [this message]
2026-04-10 20:37 ` [PATCH 5/6] gpu: nova-core: skip the IFR header if present Timur Tabi
2026-04-13  4:53   ` Eliot Courtney
2026-04-14 20:42     ` Timur Tabi
2026-04-10 20:37 ` [PATCH 6/6] gpu: nova-core: enable GA100 Timur Tabi
2026-04-13  4:20   ` 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=DHSNFBLMU1L4.1A45K7QUFPXP3@nvidia.com \
    --to=acourbot@nvidia.com \
    --cc=dakr@kernel.org \
    --cc=ecourtney@nvidia.com \
    --cc=jhubbard@nvidia.com \
    --cc=joelagnelf@nvidia.com \
    --cc=rust-for-linux@vger.kernel.org \
    --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