diff options
| author | Alexandre Courbot <acourbot@nvidia.com> | 2026-07-09 15:52:58 +0900 |
|---|---|---|
| committer | Alexandre Courbot <acourbot@nvidia.com> | 2026-07-15 16:00:52 -0700 |
| commit | 92faa16f341dd2bc43eaab4f32dc8511ea70f3d3 (patch) | |
| tree | 5ac30741dd5e36b1e76eb8ceaeda3da2d55770c9 | |
| parent | 3099edaaabe97d9cbe604083a9badde70b05221e (diff) | |
| download | linux-next-92faa16f341dd2bc43eaab4f32dc8511ea70f3d3.tar.gz linux-next-92faa16f341dd2bc43eaab4f32dc8511ea70f3d3.zip | |
gpu: nova-core: gsp: centralize missing unload bundle warnings
The warning emitted when the unload bundle cannot be constructed is
valid regardless of the boot method, but it was local to `Tu102`. Move
it to `Gsp::boot` so it applies to all boot methods.
Reviewed-by: Eliot Courtney <ecourtney@nvidia.com>
Link: https://patch.msgid.link/20260709-nova-bootcontext-v6-5-520cbf8b9b50@nvidia.com
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
| -rw-r--r-- | drivers/gpu/nova-core/gsp/boot.rs | 10 | ||||
| -rw-r--r-- | drivers/gpu/nova-core/gsp/hal/tu102.rs | 9 |
2 files changed, 10 insertions, 9 deletions
diff --git a/drivers/gpu/nova-core/gsp/boot.rs b/drivers/gpu/nova-core/gsp/boot.rs index a23219a79355..75488a8e3c0b 100644 --- a/drivers/gpu/nova-core/gsp/boot.rs +++ b/drivers/gpu/nova-core/gsp/boot.rs @@ -56,7 +56,15 @@ impl super::Gsp { let wpr_meta = Coherent::init(dev, GFP_KERNEL, GspFwWprMeta::new(&gsp_fw, &fb_layout))?; // Perform the chipset-specific boot sequence, and retrieve the unload bundle. - let unload_bundle = hal.boot(&self, &ctx, &fb_layout, &wpr_meta)?; + let unload_bundle = hal.boot(&self, &ctx, &fb_layout, &wpr_meta)?.or_else(|| { + dev_warn!(dev, "The GSP won't be able to unload properly on unbind.\n"); + dev_warn!( + dev, + "The GPU will need to be reset before the driver can bind again.\n" + ); + + None + }); let unload_guard = ScopeGuard::new_with_data((ctx, unload_bundle), |(ctx, unload_bundle)| { diff --git a/drivers/gpu/nova-core/gsp/hal/tu102.rs b/drivers/gpu/nova-core/gsp/hal/tu102.rs index c0956fb1c9cf..ef465b99af05 100644 --- a/drivers/gpu/nova-core/gsp/hal/tu102.rs +++ b/drivers/gpu/nova-core/gsp/hal/tu102.rs @@ -278,14 +278,7 @@ impl GspHal for Tu102 { // If the unload bundle creation fails, the GPU will need to be reset before the driver can // be probed again. let unload_bundle = Sec2UnloadBundle::build(dev, chipset, &bios, gsp_falcon, sec2_falcon) - .inspect_err(|e| { - dev_warn!(dev, "Failed to prepare unload firmware: {:?}\n", e); - dev_warn!(dev, "The GSP won't be able to unload properly on unbind.\n"); - dev_warn!( - dev, - "The GPU will need to be reset before the driver can bind again.\n" - ); - }) + .inspect_err(|e| dev_warn!(dev, "Failed to prepare unload firmware: {:?}\n", e)) .ok() .map(crate::gsp::UnloadBundle); |
