Re: [PATCH 1/1] gpu: nova-core: send GPU timeout defaults in GSP_INIT
From: Alistair Popple
Date: Fri Dec 04 2026 - 00:41:02 EST
On 2026-11-17 at 17:10 +1100, Alok Kumar <alkumar@xxxxxxxxxx> wrote...
> GSP firmware requires a nonzero vGPU timeout in GSP_INIT.
In future GSP will have to deal with this situation in a backwards compatible
manner when adding required keys to GSP_INIT. This one was missed, and as we
haven't finished merging the r000 GSP_INIT code we decided this was the easier
fix.
Tested-by: Alistair Popple <apopple@xxxxxxxxxx>
Reviewed-by: Alistair Popple <apopple@xxxxxxxxxx>
> 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 <alkumar@xxxxxxxxxx>
> ---
> 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<u32, 0x0010>,
> pci_config_mirror_size: Key<u32, 0x0011>,
> host_arch: Key<HostArch, 0x0070, u32>,
> + default_timeout_us_vgpu: Key<u32, 0x00a0>,
> + default_timeout_us_graphics_mode: Key<u32, 0x00a1>,
> + default_timeout_us_compute_mode: Key<u32, 0x00a2>,
> bus_device_func: Key<u64, 0x1020>,
> regkeys: KVVec<RegKey>,
> vf_info: Option<VfInfo>,
> @@ -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<Option<VfInfo>> {
> let total_vfs = match *ctx.vgpu_state {
> VgpuState::Disabled => return Ok(None),
> @@ -300,6 +308,9 @@ pub(crate) fn new(ctx: &GspBootContext<'_, '_>) -> Result<Self> {
> 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
>