]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
gpu: nova-core: remove unneeded get_gsp_info proxy function
authorAlexandre Courbot <acourbot@nvidia.com>
Sun, 19 Apr 2026 02:48:14 +0000 (11:48 +0900)
committerAlexandre Courbot <acourbot@nvidia.com>
Fri, 29 May 2026 06:39:26 +0000 (15:39 +0900)
This function was useful before the generic command-queue send methods
got merged, but it is just boilerplate now. Replace it with the correct
sequence to queue the `GetGspStaticInfo` command directly.

Reviewed-by: Eliot Courtney <ecourtney@nvidia.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260521-nova-unload-v6-1-65f581c812c9@nvidia.com
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
drivers/gpu/nova-core/gsp/boot.rs
drivers/gpu/nova-core/gsp/commands.rs

index 3e8f9611d2b3b47afe1d217cd56247682d98172f..0e6eea072e5bacb90aabb7e67ee62578be091ca4 100644 (file)
@@ -243,7 +243,7 @@ impl super::Gsp {
         commands::wait_gsp_init_done(&self.cmdq)?;
 
         // Obtain and display basic GPU information.
-        let info = commands::get_gsp_info(&self.cmdq, bar)?;
+        let info = self.cmdq.send_command(bar, commands::GetGspStaticInfo)?;
         match info.gpu_name() {
             Ok(name) => dev_info!(pdev, "GPU name: {}\n", name),
             Err(e) => dev_warn!(pdev, "GPU name unavailable: {:?}\n", e),
index c89c7b57a751e54f2a53a65fabf679240d395184..e81a865050e09ad6d3f0be34734549d006024fa2 100644 (file)
@@ -18,7 +18,6 @@ use kernel::{
 };
 
 use crate::{
-    driver::Bar0,
     gsp::{
         cmdq::{
             Cmdq,
@@ -176,7 +175,7 @@ pub(crate) fn wait_gsp_init_done(cmdq: &Cmdq) -> Result {
 }
 
 /// The `GetGspStaticInfo` command.
-struct GetGspStaticInfo;
+pub(crate) struct GetGspStaticInfo;
 
 impl CommandToGsp for GetGspStaticInfo {
     const FUNCTION: MsgFunction = MsgFunction::GetGspStaticInfo;
@@ -232,8 +231,3 @@ impl GetGspStaticInfoReply {
             .map_err(GpuNameError::InvalidUtf8)
     }
 }
-
-/// Send the [`GetGspInfo`] command and awaits for its reply.
-pub(crate) fn get_gsp_info(cmdq: &Cmdq, bar: &Bar0) -> Result<GetGspStaticInfoReply> {
-    cmdq.send_command(bar, GetGspStaticInfo)
-}