GSP firmware requires a nonzero vGPU timeout in GSP_INIT. Populate the NVKV keys as u32 values: 0xA0: vGPU timeout, 1,800,000 us 0xA1: graphics-mode timeout, 4,000,000 us 0xA2: compute-mode timeout, 30,000,000 us Signed-off-by: Alok Kumar --- drivers/gpu/nova-core/gsp/fw/commands.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/nova-core/gsp/fw/commands.rs b/drivers/gpu/nova-core/gsp/fw/commands.rs index 08798f150ad7..adb0b1f29ceb 100644 --- a/drivers/gpu/nova-core/gsp/fw/commands.rs +++ b/drivers/gpu/nova-core/gsp/fw/commands.rs @@ -192,6 +192,9 @@ pub(crate) struct GspInitRequest { pci_config_mirror_base: Key, pci_config_mirror_size: Key, host_arch: Key, + default_timeout_us_vgpu: Key, + default_timeout_us_graphics_mode: Key, + default_timeout_us_compute_mode: Key, bus_device_func: Key, regkeys: KVVec, vf_info: Option, @@ -230,6 +233,11 @@ struct DomainBusDevice(u64) { ]; impl GspInitRequest { + // GPU timeout defaults in microseconds. All three values must be nonzero in GSP_INIT. + const DEFAULT_TIMEOUT_US_VGPU: u32 = 1_800_000; + const DEFAULT_TIMEOUT_US_GRAPHICS_MODE: u32 = 4_000_000; + const DEFAULT_TIMEOUT_US_COMPUTE_MODE: u32 = 30_000_000; + fn build_vf_info(ctx: &GspBootContext<'_, '_>) -> Result> { let total_vfs = match *ctx.vgpu_state { VgpuState::Disabled => return Ok(None), @@ -300,6 +308,9 @@ pub(crate) fn new(ctx: &GspBootContext<'_, '_>) -> Result { pci_config_mirror_base: mirror.start.into(), pci_config_mirror_size: (mirror.end - mirror.start).into(), host_arch: HostArch::host().into(), + default_timeout_us_vgpu: Self::DEFAULT_TIMEOUT_US_VGPU.into(), + default_timeout_us_graphics_mode: Self::DEFAULT_TIMEOUT_US_GRAPHICS_MODE.into(), + default_timeout_us_compute_mode: Self::DEFAULT_TIMEOUT_US_COMPUTE_MODE.into(), bus_device_func: u64::from(bus_device_func).into(), regkeys, vf_info: Self::build_vf_info(ctx)?, -- 2.53.0