Re: [PATCH v3 3/3] gpu: nova-core: gsp: Extract and display usable FB regions from GSP
From: Danilo Krummrich
Date: Sat Jun 20 2026 - 07:31:01 EST
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.)