diff --git a/drivers/gpu/drm/asahi/asahi_core.rs b/drivers/gpu/drm/asahi/asahi_core.rs index 9e2e8f7b7a219..27edb7d0fc0d4 100644 --- a/drivers/gpu/drm/asahi/asahi_core.rs +++ b/drivers/gpu/drm/asahi/asahi_core.rs @@ -130,6 +130,10 @@ module! { default: 1, description: "Count held GPU memory in its creator's RSS for the OOM killer (1 = on)", }, + g17_tvb_min_blocks: usize { + default: 0, + description: "G17: floor on a render target's initial TVB blocks (0: use the computed tile-count size). 25G83 is always floored to at least 256, because its firmware's mid-render TVB growth trips a forward-progress watchdog (reason 0); this parameter overrides the floor on any G17 part", + }, g16_deadline_ms: u32 { default: 5000, description: "G16: administrative completion-stamp deadline, ms (0 disables; long running work can exceed it)", diff --git a/drivers/gpu/drm/asahi/g17/buffer/target.rs b/drivers/gpu/drm/asahi/g17/buffer/target.rs index 64c88da8eca14..9c8e642ef5801 100644 --- a/drivers/gpu/drm/asahi/g17/buffer/target.rs +++ b/drivers/gpu/drm/asahi/g17/buffer/target.rs @@ -105,6 +105,13 @@ impl Layout { ); } tvb_blocks = tvb_blocks.max(cfg::TVB_INITIAL_PAGES.len()); + // 25G83 firmware hangs if asked to grow the TVB mid-render (reason-0 watchdog), so + // pre-size it past ordinary overflow. Other G17 parts grow reliably and keep their + // computed size; the module parameter overrides the floor on any part. + let min_blocks = crate::module_parameters::g17_tvb_min_blocks + .value() + .max(if programs == RegisterPrograms::V25G83 { 256 } else { 0 }); + tvb_blocks = tvb_blocks.max(min_blocks.min(cfg::TVB_MAX_BLOCKS)); let mut gtp = [None; 8]; let mut tpc_end = tpc_size; if programs == RegisterPrograms::V25G83 {