NVIDIA GPU driver infrastructure
 help / color / mirror / Atom feed
From: "Danilo Krummrich" <dakr@kernel.org>
To: "Alexandre Courbot" <acourbot@nvidia.com>
Cc: "Alice Ryhl" <aliceryhl@google.com>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Benno Lossin" <lossin@kernel.org>, "Gary Guo" <gary@garyguo.net>,
	<nova-gpu@lists.linux.dev>, <dri-devel@lists.freedesktop.org>,
	<linux-kernel@vger.kernel.org>, <rust-for-linux@vger.kernel.org>,
	"Joel Fernandes" <joelagnelf@nvidia.com>
Subject: Re: [PATCH v3 3/3] gpu: nova-core: gsp: Extract and display usable FB regions from GSP
Date: Sat, 20 Jun 2026 13:30:46 +0200	[thread overview]
Message-ID: <DJDUCF0FN8M3.OKSUDWCKJ4PR@kernel.org> (raw)
In-Reply-To: <20260617-boot-vram-v3-3-20b9ec5fe9f2@nvidia.com>

On Wed Jun 17, 2026 at 3:24 PM CEST, Alexandre Courbot wrote:
> @@ -377,6 +378,21 @@ pub(crate) fn new(
>                      Err(e) => dev_warn!(pdev, "GPU name unavailable: {:?}\n", e),
>                  }
>  
> +                if !info.usable_fb_regions.is_empty() {
> +                    dev_info!(pdev, "Usable FB regions:\n");
> +                    for region in &info.usable_fb_regions {
> +                        dev_info!(pdev, "  - {:#x?}\n", region);
> +                    }
> +
> +                    dev_info!(
> +                        pdev,
> +                        "Total usable VRAM: {} MiB\n",
> +                        info.usable_fb_regions.iter().fold(0u64, |res, region| res
> +                            .saturating_add(region.end - region.start))
> +                            / u64::SZ_1M
> +                    );
> +                }

Drivers should generally remain silent when they work properly, some exceptions
are fine, but this seems too verbose. Let's use dev_dbg!() instead.

Also, would it make sense to (rather) warn in the else case? (I think OpenRM
treats this as error, although the check in OpenRM checks whether there are no
regions at all.)

  reply	other threads:[~2026-06-20 11:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-17 13:24 [PATCH v3 0/3] gpu: nova-core: obtain and display VRAM amount Alexandre Courbot
2026-06-17 13:24 ` [PATCH v3 1/3] gpu: nova-core: move GSP unload state to a pinned Gpu subobject Alexandre Courbot
2026-06-17 13:24 ` [PATCH v3 2/3] gpu: nova-core: move GPU static information acquisition to a GSP method Alexandre Courbot
2026-06-17 13:24 ` [PATCH v3 3/3] gpu: nova-core: gsp: Extract and display usable FB regions from GSP Alexandre Courbot
2026-06-20 11:30   ` Danilo Krummrich [this message]
2026-06-20 14:06     ` Alexandre Courbot
2026-06-20 14:26       ` Danilo Krummrich
2026-06-20 10:49 ` [PATCH v3 0/3] gpu: nova-core: obtain and display VRAM amount Alexandre Courbot

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=DJDUCF0FN8M3.OKSUDWCKJ4PR@kernel.org \
    --to=dakr@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gary@garyguo.net \
    --cc=joelagnelf@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 \
    --cc=simona@ffwll.ch \
    /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