From e7fe3d54c8d350d3e91f77aca2df506c5884c8aa Mon Sep 17 00:00:00 2001 From: Kevin loo Date: Wed, 2 Dec 2026 11:17:08 -0800 Subject: [PATCH 1/2] drm/asahi: g18: keep monotonic compute pool and cache same-VM aliases On G18G application compute dispatches, prepare_application_compute() currently does three expensive operations on every submission: 1. Exact-plan shared compute pool replacement: any difference between the incoming shader's G18ComputePlan and the retained pool triggers a full pool replacement and firmware descriptor switch. Multi-kernel compute workloads (such as LLM inference where shaders alternate between 3-block and 4-block plans) thrash between pool sizes on almost every dispatch, generating 1,100+ pool reallocations per short decode run. 2. Per-job UAT pool alias teardown and remapping: job.aliases is cleared and every directory page, block list, and scratch block (~526 UAT page entries) is unmapped, remapped, and translation-walked on every dispatch even when the client VM and pool are unchanged. 3. Per-job driver_preempt GEM alloc/map/free: the 48 KiB process-VM preemption object at 0x11_0000_0000 is destroyed and reallocated with page-table walks on every dispatch. Add G18ComputePlan::covers() and G18ComputePlan::union() to size the shared compute pool monotonically as a high-water mark that never shrinks, recomputing chunks_per_usc/bytes/block_count so the backing covers the combined chunk_counters[1] + sma_units + header (falling back cleanly to the incoming plan if a union would exceed G18_COMPUTE_MAX_BYTES). Retain the job's UAT pool aliases and driver_preempt mapping across retired submissions when the client VM id, pool binding generation, preempt mode, and driver_preempt geometry all match, re-zeroing the preemption buffer in place before reuse. Add the 0644 module parameter g18_app_fastpath (default 1; 0 restores exact-plan pool replacement and per-job remap; other values refuse the submission), read once per submission in ApplicationComputeKnobs. Bypass the fastpath during g18_app_prepare_test and g18_app_pool_test E2E diagnostics, and invalidate cached aliases/driver_preempt on VM switch, pool replacement, mode change, fastpath=0, preparation error rollback, recovery, and quarantine. Measured same-boot A/B on J873g M6 Mac mini (G18G B1, Vulkan via Borealis, Qwen2.5-3B Q4_K_M, g18_app_fastpath=0 vs 1): - Pool reallocations (G18_APP_COMPUTE_POOL_PENDING): 1,104 -> 1 - Host submit prep (G18_JOB_PHASES): 3-8 us - pp128: 64.60 -> 92.27 t/s (+43%) - pp512: 192.57 -> 243.13 t/s (+26%) - tg: 1.30 -> 2.38 t/s (+83%) - Coherent output, 0 faults across 300k+ compute submits and 5-min soak. Signed-off-by: Kevin loo --- .../asahi/g18/initdata/application_compute.rs | 171 +++++++++++++----- .../gpu/drm/asahi/g18/uapi/compute_plan.rs | 73 ++++++++ 2 files changed, 202 insertions(+), 42 deletions(-) diff --git a/drivers/gpu/drm/asahi/g18/initdata/application_compute.rs b/drivers/gpu/drm/asahi/g18/initdata/application_compute.rs index 28ca57d29cbd8..b91d7110dd172 100644 --- a/drivers/gpu/drm/asahi/g18/initdata/application_compute.rs +++ b/drivers/gpu/drm/asahi/g18/initdata/application_compute.rs @@ -62,6 +62,8 @@ app_knob!(knob_pool_test, "g18_app_pool_test", 0, "Pool replacement E2E: arm 1 before the first compute. Starts with the qualified 8-MiB pool, then runs original non-spill commands with 30,40,30-MiB shared pools; internal phases 2-4 replace only after verified retirement. Checks staged-owner rollback and reused addresses. Does not admit scratch shaders"); app_knob!(knob_preempt_mode, "g18_app_preempt_mode", 1, "Application compute 0x1a510 object: 1 (default) = fresh zeroed 0xc000 bytes mapped only in the job VM at 0x1100000000 (driver arena); 0 = candidate160 16 KiB page at 0x7050000000. Other values refuse the submission"); +app_knob!(knob_fastpath, "g18_app_fastpath", 1, + "Application compute fastpath: 1 (default) = monotonic high-water-mark compute pool, same-VM cached UAT aliases and reused re-zeroed driver_preempt; 0 = exact-plan pool replacement and per-job remap. Other values refuse the submission"); app_knob!(knob_d62a, "g18_app_d62a", 1, "Application compute desc+0x62a (0x1a458 0x14c08a60 texture mode instead of 0x10c08860): 1 (default) = from the command's DRM_ASAHI_COMPUTE_USES_TEXTURE_STATE flag, as native; 0 = never; 2 = always. Other values refuse the submission"); @@ -77,6 +79,8 @@ pub(crate) struct ApplicationComputeKnobs { sma_units: u32, metadata_plan: bool, preempt_mode: u32, + fastpath: u32, + fastpath_active: bool, d62a_mode: u32, preempt: u64, preempt_bytes: u64, @@ -95,6 +99,8 @@ impl ApplicationComputeKnobs { sma_units: knob_sma_units::VALUE.load(Ordering::Relaxed), metadata_plan: false, preempt_mode: knob_preempt_mode::VALUE.load(Ordering::Relaxed), + fastpath: knob_fastpath::VALUE.load(Ordering::Relaxed), + fastpath_active: false, d62a_mode: knob_d62a::VALUE.load(Ordering::Relaxed), preempt: 0, preempt_bytes: 0, pool_slot: 0, texture_state: false, d62a: 0, @@ -142,6 +148,9 @@ impl ApplicationComputeKnobs { } else if self.preempt_mode > 1 { Some(("g18_app_preempt_mode", self.preempt_mode, "admitted 0 (0x7050000000 page) or 1 (driver arena)")) + } else if self.fastpath > 1 { + Some(("g18_app_fastpath", self.fastpath, + "admitted 0 (per-job remap) or 1 (monotonic pool and cached VM aliases)")) } else if self.d62a_mode > 2 { Some(("g18_app_d62a", self.d62a_mode, "admitted 0 (never), 1 (from the command flag) or 2 (always)")) @@ -159,19 +168,25 @@ impl ApplicationComputeKnobs { impl kernel::fmt::Display for ApplicationComputeKnobs { fn fmt(&self, f: &mut kernel::fmt::Formatter<'_>) -> kernel::fmt::Result { let [d550, d558] = self.pair(); - write!(f, "d514={:#x} a731={} sma_pair=({},{}) reg_a5e1={:#x} sma_units={:#x} reg_10241={:#x} preempt_mode={} preempt={:#x}+{:#x} texture_state={} d62a_mode={} d62a={} metadata_plan={}", + write!(f, "d514={:#x} a731={} sma_pair=({},{}) reg_a5e1={:#x} sma_units={:#x} reg_10241={:#x} preempt_mode={} preempt={:#x}+{:#x} texture_state={} d62a_mode={} d62a={} metadata_plan={} fastpath={}", self.d514, self.a731, d550, d558, d550 | d558 << 16, self.sma_units, (self.pool_slot as i32 as i64 as u64) | u64::from(self.sma_units) << 16, self.preempt_mode, self.preempt, self.preempt_bytes, - u8::from(self.texture_state), self.d62a_mode, self.d62a, u8::from(self.metadata_plan)) + u8::from(self.texture_state), self.d62a_mode, self.d62a, u8::from(self.metadata_plan), + self.fastpath) } } pub(super) struct ApplicationCompute { guard: Option, aliases: KVec, + // Cache identity for retained `aliases` and `driver_preempt` across retired + // jobs on the same client VM, pool binding generation and preempt mode. + aliases_vm_id: Option, + aliases_pool_gen: u64, + aliases_preempt_mode: u32, // g18_app_preempt_mode=1 object, mapped only in the submitting job VM. - // Replaced only after the previous generation retired. + // Replaced on VM/mode/pool change or recovery; zeroed in place on reuse. driver_preempt: Option, pool: G18UmaPoolMemory, binding: G18UmaPoolBinding, @@ -237,7 +252,8 @@ impl G18FirmwareMemory { 0x70_5000_0000..0x70_5100_0000, 0x4000, 0x4000, mmu::PROT_GPU_FW_SHARED_RW)?; let mut owner = KBox::new(ApplicationCompute { - guard: None, aliases: KVec::new(), driver_preempt: None, pool, binding, + guard: None, aliases: KVec::new(), aliases_vm_id: None, aliases_pool_gen: 0, + aliases_preempt_mode: 0, driver_preempt: None, pool, binding, previous_pool: None, previous_binding: None, bound_context: 0, successful_retirement: true, metadata_pool: metadata_plan.is_some(), @@ -276,10 +292,23 @@ impl G18FirmwareMemory { } job.pool.verify_replacement_rollback(dev, &self.uat, pool_plan.ok_or(EINVAL)?)?; } + knobs.fastpath_active = knobs.fastpath != 0 && diagnostic == 0 && pool_test == 0; let replacement = if let Some(plan) = metadata_plan { let job = self.application_compute.as_ref().ok_or(EIO)?; - (job.pool.shared_compute_plan() != Some(plan)).then_some(plan) - } else if pool_test > 1 { pool_plan } else { None }; + if knobs.fastpath_active { + match job.pool.shared_compute_plan() { + Some(cur) if cur.covers(&plan) => None, + Some(cur) => Some(cur.union(&plan).unwrap_or(plan)), + None => Some(plan), + } + } else { + (job.pool.shared_compute_plan() != Some(plan)).then_some(plan) + } + } else if pool_test > 1 { + pool_plan + } else { + None + }; let prepared = self.prepare_application_compute_attempt(dev, vm, command, knobs, 0, replacement)?; if pool_test != 0 && pool_test < 4 { let _ = knob_pool_test::VALUE.compare_exchange(0, pool_test + 1, @@ -328,7 +357,13 @@ impl G18FirmwareMemory { if let Some(expected) = command.g18_resource_descriptor.as_ref() { let expected = crate::g18::uapi::compute_plan::G18ComputePlan::from_descriptor(expected) .ok_or(EINVAL)?; - if pool.shared_compute_plan() != Some(expected) + let plan_ok = if knobs.fastpath_active && fail_checkpoint == 0 { + pool.shared_compute_plan() + .is_some_and(|cur| cur.covers(&expected)) + } else { + pool.shared_compute_plan() == Some(expected) + }; + if !plan_ok || pair != expected.ideal.register_pair.map(u64::from) || knobs.sma_units != expected.sma_units || !knobs.metadata_plan { return Err(EIO); @@ -369,41 +404,76 @@ impl G18FirmwareMemory { reserved.start, reserved.end, driver_range.start, driver_range.end); return Err(EINVAL); } + let vm_id = vm.id(); + let driver_preempt_ok = knobs.preempt_mode == 0 + || job.driver_preempt.as_ref().is_some_and(|dp| { + dp.iova() == driver && dp.logical_size == driver_bytes as usize + }); + let reuse_vm_cache = knobs.fastpath_active + && fail_checkpoint == 0 + && replacement.is_none() + && job.successful_retirement + && job.aliases_vm_id == Some(vm_id) + && job.aliases_pool_gen == binding.generation + && job.aliases_preempt_mode == knobs.preempt_mode + && !job.aliases.is_empty() + && driver_preempt_ok; + let guard = vm.retain_t8140_job()?; - job.aliases.clear(); - job.driver_preempt = None; + if !reuse_vm_cache { + job.aliases.clear(); + job.driver_preempt = None; + job.aliases_vm_id = None; + job.aliases_pool_gen = 0; + } let attempt = (|| { if fail_checkpoint == 1 { return Err(ENOMEM); } let context = self.compute.bind_process(dev, &self.uat, vm)?; if fail_checkpoint == 2 { return Err(ENOMEM); } - let mut aliases = pool.compute_application_aliases(dev, &self.uat, vm)?; - if fail_checkpoint == 3 { return Err(ENOMEM); } - let mut driver_preempt = None; - let preempt = if knobs.preempt_mode == 0 { - let preempt = job.preempt.iova(); - job.preempt.with_bytes_mut(|bytes| { bytes.fill(0); Ok(()) })?; - let alias = job.preempt.map_alias_at(vm, preempt, mmu::PROT_GPU_SHARED_RW)?; - aliases.push(alias, GFP_KERNEL)?; - if vm.translate_iova(preempt)? != self.uat.kernel_lower_vm().translate_iova(preempt)? { - return Err(EFAULT); - } - knobs.preempt_bytes = 0x4000; - preempt + let (new_aliases, new_driver_preempt, preempt) = if reuse_vm_cache { + let preempt = if knobs.preempt_mode == 0 { + let preempt = job.preempt.iova(); + job.preempt.with_bytes_mut(|bytes| { bytes.fill(0); Ok(()) })?; + knobs.preempt_bytes = 0x4000; + preempt + } else { + let dp = job.driver_preempt.as_mut().ok_or(EIO)?; + dp.with_bytes_mut(|bytes| { bytes.fill(0); Ok(()) })?; + knobs.preempt_bytes = driver_bytes; + dp.iova() + }; + (None, None, preempt) } else { - // Native keeps this object in the process VM only (0x100_003f_0000, - // 48 KiB). The driver arena is refused to userspace binds, and the - // range admits exactly one placement: the object plus one guard. - let object = MappedObject::new_wc_in_range_with_guards(dev, vm, driver_range, - driver_bytes as usize, mmu::UAT_PGSZ as u64, mmu::PROT_GPU_SHARED_RW, 1)?; - let preempt = object.iova(); - driver_preempt = Some(object); - if preempt != driver { return Err(EFAULT); } - for offset in (0..driver_bytes).step_by(mmu::UAT_PGSZ) { - vm.translate_iova(preempt + offset)?; - } - if vm.translate_iova(preempt + driver_bytes).is_ok() { return Err(EFAULT); } - knobs.preempt_bytes = driver_bytes; - preempt + let mut aliases = pool.compute_application_aliases(dev, &self.uat, vm)?; + if fail_checkpoint == 3 { return Err(ENOMEM); } + let mut driver_preempt = None; + let preempt = if knobs.preempt_mode == 0 { + let preempt = job.preempt.iova(); + job.preempt.with_bytes_mut(|bytes| { bytes.fill(0); Ok(()) })?; + let alias = job.preempt.map_alias_at(vm, preempt, mmu::PROT_GPU_SHARED_RW)?; + aliases.push(alias, GFP_KERNEL)?; + if vm.translate_iova(preempt)? != self.uat.kernel_lower_vm().translate_iova(preempt)? { + return Err(EFAULT); + } + knobs.preempt_bytes = 0x4000; + preempt + } else { + // Native keeps this object in the process VM only (0x100_003f_0000, + // 48 KiB). The driver arena is refused to userspace binds, and the + // range admits exactly one placement: the object plus one guard. + let object = MappedObject::new_wc_in_range_with_guards(dev, vm, driver_range, + driver_bytes as usize, mmu::UAT_PGSZ as u64, mmu::PROT_GPU_SHARED_RW, 1)?; + let preempt = object.iova(); + driver_preempt = Some(object); + if preempt != driver { return Err(EFAULT); } + for offset in (0..driver_bytes).step_by(mmu::UAT_PGSZ) { + vm.translate_iova(preempt + offset)?; + } + if vm.translate_iova(preempt + driver_bytes).is_ok() { return Err(EFAULT); } + knobs.preempt_bytes = driver_bytes; + preempt + }; + (Some(aliases), driver_preempt, preempt) }; knobs.preempt = preempt; if fail_checkpoint == 4 { return Err(ENOMEM); } @@ -416,7 +486,7 @@ impl G18FirmwareMemory { ..Default::default() }; // G18 preemption pointers are +0x1b80..+0x1b98 (native gallery), - // not the M5 +0x1480 layout. These are fresh driver-owned zero pages. + // not the M5 +0x1480 layout. These are fresh/re-zeroed driver-owned pages. let registers = G18ComputeRegisterInputs { program: [preempt, command.control_stream_base, preempt + 0x1b80, preempt + 0x1b88, preempt + 0x1b90, preempt + 0x1b98], @@ -429,20 +499,31 @@ impl G18FirmwareMemory { ..Default::default() }; let prepared = self.compute.prepare(self.scheduler.binding(0)?, &inputs, ®isters)?; - Ok((prepared, aliases, driver_preempt, knobs)) + Ok((prepared, new_aliases, new_driver_preempt, knobs)) })(); - let (prepared, aliases, driver_preempt, knobs) = match attempt { + let (prepared, new_aliases, new_driver_preempt, knobs) = match attempt { Ok(value) => value, Err(error) => { // The local VM guard outlives process/alias cleanup. A cleanup // failure remains fatal; it is never called a clean rollback. + if reuse_vm_cache { + job.aliases.clear(); + job.driver_preempt = None; + job.aliases_vm_id = None; + job.aliases_pool_gen = 0; + } self.compute.abort_unpublished_process()?; return Err(error); } }; job.guard = Some(guard); - job.aliases = aliases; - job.driver_preempt = driver_preempt; + if let Some(aliases) = new_aliases { + job.aliases = aliases; + job.driver_preempt = new_driver_preempt; + job.aliases_vm_id = Some(vm_id); + job.aliases_pool_gen = binding.generation; + job.aliases_preempt_mode = knobs.preempt_mode; + } job.retired = false; job.generation = generation; if command.g18_resource_descriptor.is_some() { job.metadata_pool = true; } @@ -522,13 +603,19 @@ impl G18FirmwareMemory { self.compute.retire_recovered()?; job.successful_retirement = false; job.retired = true; + job.aliases.clear(); + job.driver_preempt = None; + job.aliases_vm_id = None; + job.aliases_pool_gen = 0; job.guard = None; Ok(()) } pub(crate) fn quarantine_application_compute(&mut self) { - if let Some(job) = &self.application_compute { + if let Some(job) = &mut self.application_compute { if let Some(guard) = &job.guard { guard.quarantine(); } + job.aliases_vm_id = None; + job.aliases_pool_gen = 0; } } } diff --git a/drivers/gpu/drm/asahi/g18/uapi/compute_plan.rs b/drivers/gpu/drm/asahi/g18/uapi/compute_plan.rs index 39222ca5aba43..00a4abec19f46 100644 --- a/drivers/gpu/drm/asahi/g18/uapi/compute_plan.rs +++ b/drivers/gpu/drm/asahi/g18/uapi/compute_plan.rs @@ -85,6 +85,79 @@ pub(crate) struct G18ComputePlan { } impl G18ComputePlan { + /// Whether a pool sized to `self` satisfies `other` without replacement. + /// Every backing, launch-pair, chunk-counter, and reserved-SMA dimension + /// must be at least as large as `other`. + pub(crate) fn covers(&self, other: &Self) -> bool { + self.ideal.block_count >= other.ideal.block_count + && self.ideal.bytes >= other.ideal.bytes + && self.ideal.register_pair[0] >= other.ideal.register_pair[0] + && self.ideal.register_pair[1] >= other.ideal.register_pair[1] + && self.ideal.chunk_counters[0] >= other.ideal.chunk_counters[0] + && self.ideal.chunk_counters[1] >= other.ideal.chunk_counters[1] + && self.ideal.chunks_per_usc >= other.ideal.chunks_per_usc + && self.sma_units >= other.sma_units + } + + /// Monotonic high-water-mark union of two compute plans. Never shrinks any + /// dimension, and rounds `chunks_per_usc`/`bytes`/`block_count` up so pool + /// backing continues to cover the combined `chunk_counters[1] + sma_units + + /// header`. Returns `None` if the combined plan exceeds + /// `G18_COMPUTE_MAX_BYTES`. + pub(crate) fn union(&self, other: &Self) -> Option { + let sma_units = self.sma_units.max(other.sma_units); + Some(Self { + ideal: Self::union_allocation(self.ideal, other.ideal, sma_units)?, + minimum: Self::union_allocation(self.minimum, other.minimum, sma_units)?, + sma_units, + }) + } + + fn union_allocation( + a: G18ComputeAllocation, + b: G18ComputeAllocation, + sma_units: u32, + ) -> Option { + let register_pair = [ + a.register_pair[0].max(b.register_pair[0]), + a.register_pair[1].max(b.register_pair[1]), + ]; + let chunk_counters = [ + a.chunk_counters[0].max(b.chunk_counters[0]), + a.chunk_counters[1].max(b.chunk_counters[1]), + ]; + let combined_chunks = u64::from(chunk_counters[1]) + .checked_add(u64::from(sma_units))? + .checked_add(u64::from(register_pair[1]))? + .checked_add(3 + 63)? + & !63; + let chunks = u64::from(a.chunks_per_usc.max(b.chunks_per_usc)).max(combined_chunks); + if chunks > CHUNKS_PER_USC { + return None; + } + let min_bytes = chunks + .checked_mul(USCS * 1024)? + .checked_add(G18_COMPUTE_BLOCK_BYTES - 1)? + & !(G18_COMPUTE_BLOCK_BYTES - 1); + let max_blocks = a.block_count.max(b.block_count); + let bytes = min_bytes + .max(a.bytes) + .max(b.bytes) + .max(u64::from(max_blocks).checked_mul(G18_COMPUTE_BLOCK_BYTES)?); + if bytes == 0 || bytes > G18_COMPUTE_MAX_BYTES || bytes % G18_COMPUTE_BLOCK_BYTES != 0 { + return None; + } + let block_count = u32::try_from(bytes / G18_COMPUTE_BLOCK_BYTES).ok()?; + G18ComputeDirectory::for_blocks(block_count)?; + Some(G18ComputeAllocation { + bytes, + block_count, + register_pair, + chunk_counters, + chunks_per_usc: u32::try_from(chunks).ok()?, + }) + } + /// Serialize the ideal plan only after its backing and aliases are owned. /// Ownership, address-space validity and retirement are enforced by the /// pool owner, not this arithmetic helper. The initial hardware slot is From 1d99fe4df9870f55d242df4efc6585ea5e67ef14 Mon Sep 17 00:00:00 2001 From: DjDeveloperr Date: Thu, 3 Dec 2026 07:06:57 -0500 Subject: [PATCH 2/2] drm/asahi: select the G18 compute fast path without a module parameter Keep exact-plan replacement for diagnostics and pool replacement tests. Signed-off-by: DjDeveloperr --- .../gpu/drm/asahi/g18/initdata/application_compute.rs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/asahi/g18/initdata/application_compute.rs b/drivers/gpu/drm/asahi/g18/initdata/application_compute.rs index b91d7110dd172..4ed63be0935ef 100644 --- a/drivers/gpu/drm/asahi/g18/initdata/application_compute.rs +++ b/drivers/gpu/drm/asahi/g18/initdata/application_compute.rs @@ -62,8 +62,6 @@ app_knob!(knob_pool_test, "g18_app_pool_test", 0, "Pool replacement E2E: arm 1 before the first compute. Starts with the qualified 8-MiB pool, then runs original non-spill commands with 30,40,30-MiB shared pools; internal phases 2-4 replace only after verified retirement. Checks staged-owner rollback and reused addresses. Does not admit scratch shaders"); app_knob!(knob_preempt_mode, "g18_app_preempt_mode", 1, "Application compute 0x1a510 object: 1 (default) = fresh zeroed 0xc000 bytes mapped only in the job VM at 0x1100000000 (driver arena); 0 = candidate160 16 KiB page at 0x7050000000. Other values refuse the submission"); -app_knob!(knob_fastpath, "g18_app_fastpath", 1, - "Application compute fastpath: 1 (default) = monotonic high-water-mark compute pool, same-VM cached UAT aliases and reused re-zeroed driver_preempt; 0 = exact-plan pool replacement and per-job remap. Other values refuse the submission"); app_knob!(knob_d62a, "g18_app_d62a", 1, "Application compute desc+0x62a (0x1a458 0x14c08a60 texture mode instead of 0x10c08860): 1 (default) = from the command's DRM_ASAHI_COMPUTE_USES_TEXTURE_STATE flag, as native; 0 = never; 2 = always. Other values refuse the submission"); @@ -79,7 +77,6 @@ pub(crate) struct ApplicationComputeKnobs { sma_units: u32, metadata_plan: bool, preempt_mode: u32, - fastpath: u32, fastpath_active: bool, d62a_mode: u32, preempt: u64, @@ -99,7 +96,6 @@ impl ApplicationComputeKnobs { sma_units: knob_sma_units::VALUE.load(Ordering::Relaxed), metadata_plan: false, preempt_mode: knob_preempt_mode::VALUE.load(Ordering::Relaxed), - fastpath: knob_fastpath::VALUE.load(Ordering::Relaxed), fastpath_active: false, d62a_mode: knob_d62a::VALUE.load(Ordering::Relaxed), preempt: 0, preempt_bytes: 0, pool_slot: 0, @@ -148,9 +144,6 @@ impl ApplicationComputeKnobs { } else if self.preempt_mode > 1 { Some(("g18_app_preempt_mode", self.preempt_mode, "admitted 0 (0x7050000000 page) or 1 (driver arena)")) - } else if self.fastpath > 1 { - Some(("g18_app_fastpath", self.fastpath, - "admitted 0 (per-job remap) or 1 (monotonic pool and cached VM aliases)")) } else if self.d62a_mode > 2 { Some(("g18_app_d62a", self.d62a_mode, "admitted 0 (never), 1 (from the command flag) or 2 (always)")) @@ -173,7 +166,7 @@ impl kernel::fmt::Display for ApplicationComputeKnobs { (self.pool_slot as i32 as i64 as u64) | u64::from(self.sma_units) << 16, self.preempt_mode, self.preempt, self.preempt_bytes, u8::from(self.texture_state), self.d62a_mode, self.d62a, u8::from(self.metadata_plan), - self.fastpath) + u8::from(self.fastpath_active)) } } @@ -292,7 +285,7 @@ impl G18FirmwareMemory { } job.pool.verify_replacement_rollback(dev, &self.uat, pool_plan.ok_or(EINVAL)?)?; } - knobs.fastpath_active = knobs.fastpath != 0 && diagnostic == 0 && pool_test == 0; + knobs.fastpath_active = diagnostic == 0 && pool_test == 0; let replacement = if let Some(plan) = metadata_plan { let job = self.application_compute.as_ref().ok_or(EIO)?; if knobs.fastpath_active {