mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
gpu: nova-core: remove unneeded get_gsp_info proxy function
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>
This commit is contained in:
parent
dc395c2831
commit
7740837d84
|
|
@ -243,7 +243,7 @@ pub(crate) fn boot(
|
|||
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),
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
};
|
||||
|
||||
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 @@ pub(crate) fn gpu_name(&self) -> core::result::Result<&str, GpuNameError> {
|
|||
.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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user