diff --git a/drivers/gpu/drm/asahi/file.rs b/drivers/gpu/drm/asahi/file.rs index ba674b41fa410..b7f5cd332e678 100644 --- a/drivers/gpu/drm/asahi/file.rs +++ b/drivers/gpu/drm/asahi/file.rs @@ -155,6 +155,9 @@ pub(crate) const DRM_ASAHI_COMPUTE_NO_QUERY_ACCESS: u32 = const DEBUG_CLASS: DebugFlags = DebugFlags::File; pub(crate) const MAX_COMMANDS_PER_SUBMISSION: u32 = 64; +/// Most input plus output syncs of one SUBMIT, on the GPUs that bound them +/// ([`gpu::Gpu::max_syncs`]). +pub(crate) const MAX_SYNCS_PER_SUBMISSION: usize = 4096; /// A client instance of an `mmu::Vm` address space. struct Vm { @@ -322,6 +325,7 @@ impl SyncItem { } base += chunk as u32; } + let anchor = Self::coalesce_outputs(&mut vec, in_count as usize, anchor)?; if let Some(anchor) = anchor { let bundle = crate::g17::sync_output::SignalBundle::new( &vec[in_count as usize..], @@ -338,6 +342,174 @@ impl SyncItem { Ok(vec) } + + /// Merges the timeline outputs of `syncs` (outputs from `first` on) that name the same + /// syncobj ([`coalesce_timeline_outputs`]), before any chain node is allocated for them. + /// Returns the index of the cumulative `anchor` after the merge. The anchor never merges, + /// so another output naming its syncobj is still refused. + fn coalesce_outputs( + syncs: &mut KVVec, + first: usize, + anchor: Option, + ) -> Result> { + let outputs = |&(index, _): &(usize, &SyncItem)| index >= first && Some(index) != anchor; + let timeline = |(_, sync): &(usize, &SyncItem)| sync.timeline; + let named = syncs.iter().enumerate().filter(outputs); + if named.filter(timeline).count() < 2 { + return Ok(anchor); + } + let mut named = KVVec::with_capacity(syncs.len() - first, GFP_KERNEL_ACCOUNT)?; + for (index, sync) in syncs.iter().enumerate().filter(outputs) { + let point = sync.timeline.then_some(sync.timeline_value); + named.push( + (sync.syncobj.as_raw() as usize, index, point), + GFP_KERNEL_ACCOUNT, + )?; + } + let merged = coalesce_timeline_outputs(&mut named)?; + if merged.is_empty() { + return Ok(anchor); + } + for &(_, index, point) in named.iter() { + if let Some(point) = point { + syncs[index].timeline_value = point; + } + } + let anchor = anchor + .map(|anchor| anchor - merged.iter().take_while(|&&index| index < anchor).count()); + let mut index = 0; + let mut next = merged.iter().peekable(); + syncs.retain(|_| { + let gone = next.next_if_eq(&&index).is_some(); + index += 1; + !gone + }); + Ok(anchor) + } +} + +/// Timeline outputs of one submission that name the same syncobj all receive the +/// submission's fence. Installing each walks the syncobj's unsignalled fence chain, which +/// every installation lengthens, so N of them would walk it N times. They merge into the +/// last of them, at the highest of their points: a wait for any of those points still +/// resolves to the submission's fence. A binary output of the same syncobj between two of +/// them replaces the chain, points and all, so nothing merges across it. +/// +/// `named` holds each output's syncobj, index and point, `None` for a binary output. Leaves +/// each kept output's entry with its merged point and returns the merged-away outputs' +/// indices, in order. +fn coalesce_timeline_outputs(named: &mut [(usize, usize, Option)]) -> Result> { + named.sort_unstable_by_key(|&(syncobj, index, _)| (syncobj, index)); + let mut merged = KVec::new(); + for group in named.chunk_by_mut(|a, b| a.0 == b.0 && a.2.is_some() && b.2.is_some()) { + let Some(((_, _, point), earlier)) = group.split_last_mut() else { + continue; + }; + for &(_, index, earlier_point) in earlier.iter() { + *point = (*point).max(earlier_point); + merged.push(index, GFP_KERNEL)?; + } + } + merged.sort_unstable(); + Ok(merged) +} + +#[kernel::macros::kunit_tests(asahi_submit_outputs)] +mod output_tests { + use super::*; + + fn merge_any(outputs: &[(usize, Option)]) -> (KVec, KVec<(usize, Option)>) { + let mut named = KVec::new(); + for (index, &(syncobj, point)) in outputs.iter().enumerate() { + named.push((syncobj, index, point), GFP_KERNEL).unwrap(); + } + let merged = coalesce_timeline_outputs(&mut named).unwrap(); + let mut kept = KVec::new(); + for &(_, index, point) in named.iter() { + if !merged.contains(&index) { + kept.push((index, point), GFP_KERNEL).unwrap(); + } + } + kept.sort_unstable(); + (merged, kept) + } + + /// Timeline outputs only. + fn merge(outputs: &[(usize, u64)]) -> (KVec, KVec<(usize, u64)>) { + let mut timelines = KVec::new(); + for &(syncobj, point) in outputs { + timelines.push((syncobj, Some(point)), GFP_KERNEL).unwrap(); + } + let (merged, any) = merge_any(&timelines); + let mut kept = KVec::new(); + for &(index, point) in any.iter() { + kept.push((index, point.unwrap()), GFP_KERNEL).unwrap(); + } + (merged, kept) + } + + #[test] + fn distinct_syncobjs_stay_as_they_are() { + let (merged, kept) = merge(&[(1, 5), (2, 5), (3, 0)]); + assert!(merged.is_empty()); + assert_eq!(&kept[..], &[(0, 5), (1, 5), (2, 0)]); + } + + #[test] + fn rising_points_keep_the_last_and_highest() { + // Two batches that each signal one timeline, merged into one submission. + let (merged, kept) = merge(&[(1, 5), (2, 9), (1, 6)]); + assert_eq!(&merged[..], &[0]); + assert_eq!(&kept[..], &[(1, 9), (2, 6)]); + } + + #[test] + fn falling_points_keep_the_highest_at_the_last() { + let (merged, kept) = merge(&[(4, 9), (4, 3), (4, 7)]); + assert_eq!(&merged[..], &[0, 1]); + assert_eq!(&kept[..], &[(2, 9)]); + } + + #[test] + fn a_binary_output_of_the_same_syncobj_ends_a_merge() { + // The binary output replaces the chain: the syncobj ends at 7, not at 9. + let outputs = [(4, Some(9)), (4, None), (4, Some(7))]; + let (merged, kept) = merge_any(&outputs); + assert!(merged.is_empty()); + assert_eq!(&kept[..], &[(0, Some(9)), (1, None), (2, Some(7))]); + // Either side still merges, around repeated binary outputs too, and another syncobj's + // binary output ends nothing. + let outputs = [ + (4, Some(9)), + (4, Some(8)), + (4, None), + (4, None), + (4, Some(3)), + (5, None), + (4, Some(5)), + ]; + let (merged, kept) = merge_any(&outputs); + assert_eq!(&merged[..], &[0, 4]); + assert_eq!( + &kept[..], + &[(1, Some(9)), (2, None), (3, None), (5, None), (6, Some(5))] + ); + } + + #[test] + fn repeats_of_one_point_leave_one_output() { + let mut outputs = KVec::new(); + for _ in 0..MAX_SYNCS_PER_SUBMISSION { + outputs.push((7, 3), GFP_KERNEL).unwrap(); + } + let (merged, kept) = merge(&outputs); + assert_eq!(merged.len(), MAX_SYNCS_PER_SUBMISSION - 1); + assert!(merged + .iter() + .enumerate() + .all(|(order, &index)| order == index)); + assert_eq!(&kept[..], &[(MAX_SYNCS_PER_SUBMISSION - 1, 3)]); + } } #[derive(Clone)] @@ -1892,6 +2064,12 @@ impl File { if data.cmdbuf_size as usize > gpu.max_cmdbuf_size() { return Err(E2BIG); } + // Before anything is allocated for the syncs: each one costs a parsed record, and + // a timeline output a chain node its syncobj keeps. + if data.in_sync_count as usize + data.out_sync_count as usize > gpu.max_syncs() { + cls_pr_debug!(Errors, "submit: Too many syncs\n"); + return Err(EINVAL); + } if let Some(manager) = gpu.manager() { manager.update_globals(); } diff --git a/drivers/gpu/drm/asahi/g15/command.rs b/drivers/gpu/drm/asahi/g15/command.rs index edb076df3d493..88ec0ab836be0 100644 --- a/drivers/gpu/drm/asahi/g15/command.rs +++ b/drivers/gpu/drm/asahi/g15/command.rs @@ -39,7 +39,7 @@ use crate::{file, mmu, timestamp, util::AnyBitPattern, util::Reader}; /// Largest command buffer. pub(crate) const MAX_CMDBUF: usize = 4 << 20; /// Most input plus output syncs of one SUBMIT. -pub(crate) const MAX_SYNCS: usize = 4096; +pub(crate) const MAX_SYNCS: usize = crate::file::MAX_SYNCS_PER_SUBMISSION; /// Hardware commands per SUBMIT. const MAX_COMMANDS: u32 = crate::file::MAX_COMMANDS_PER_SUBMISSION; diff --git a/drivers/gpu/drm/asahi/g16/command.rs b/drivers/gpu/drm/asahi/g16/command.rs index 5dd5f99e54854..df1e673ea8dd5 100644 --- a/drivers/gpu/drm/asahi/g16/command.rs +++ b/drivers/gpu/drm/asahi/g16/command.rs @@ -24,7 +24,7 @@ use crate::{file, mmu, util::AnyBitPattern, util::Reader}; /// Largest command buffer. pub(crate) const MAX_CMDBUF: usize = 4 << 20; /// Most input plus output syncs of one SUBMIT. -pub(crate) const MAX_SYNCS: usize = 4096; +pub(crate) const MAX_SYNCS: usize = crate::file::MAX_SYNCS_PER_SUBMISSION; /// Hardware commands per SUBMIT. pub(crate) const MAX_COMMANDS: u32 = crate::file::MAX_COMMANDS_PER_SUBMISSION; diff --git a/drivers/gpu/drm/asahi/g17/context.rs b/drivers/gpu/drm/asahi/g17/context.rs index c1f269062f9bb..0ab365a54a989 100644 --- a/drivers/gpu/drm/asahi/g17/context.rs +++ b/drivers/gpu/drm/asahi/g17/context.rs @@ -93,6 +93,7 @@ impl QosIds { ids: self.clone(), id: id as u8, seen: AtomicBool::new(false), + returned: AtomicBool::new(false), suppress_notify: AtomicBool::new(false), }, GFP_KERNEL, @@ -105,6 +106,8 @@ pub(super) struct QosLease { id: u8, /// The firmware may have seen this ID. seen: AtomicBool, + /// The ID went back to the device's pool. + returned: AtomicBool, /// Unpublished rollback: caller wakes via [`super::availability::Availability::notify_own`]. suppress_notify: AtomicBool, } @@ -119,9 +122,12 @@ impl QosLease { .as_ref() .map_or(observed, |waiters| waiters.notify_own(observed)) } -} -impl Drop for QosLease { - fn drop(&mut self) { + + /// Gives the ID back, once: early ([`Context::release_unpublished`]) or on drop. + fn give_back(&self) { + if self.returned.swap(true, Ordering::AcqRel) { + return; + } let fence = if self.seen.load(Ordering::Acquire) { super::channel::control_fence() } else { @@ -142,6 +148,11 @@ impl Drop for QosLease { } } } +impl Drop for QosLease { + fn drop(&mut self) { + self.give_back(); + } +} struct WorkStorage { object: PooledObject, @@ -607,6 +618,19 @@ impl Context { pub(crate) fn execution_share_id(&self) -> u64 { self.share.as_ref().map_or(0, |share| share.id()) } + /// Its queue closed before the firmware saw this context, and nothing of the queue can + /// publish any more. Returns the finite identities no firmware record can name: the + /// execution identity, the QoS ID and an unused render identity. A published context + /// returns its own once its scheduler release is consumed. Either way they do not wait + /// for the context's last reference, which a cancelled job keeps until its inputs signal. + pub(crate) fn release_unpublished(&self) { + if self.is_published() { + return; + } + self.release_execution(); + self.qos.give_back(); + self.release_render_id(); + } /// `other` runs in this context's shared execution context. pub(crate) fn shares_execution(&self, other: &Context) -> bool { self.share.is_some() && core::ptr::eq(&*self.execution, &*other.execution) @@ -1249,6 +1273,30 @@ mod capacity_tests { } } + #[test] + fn an_id_given_back_early_is_given_back_once() { + let ids = QosIds::new().unwrap(); + let (early, other) = (ids.acquire().unwrap(), ids.acquire().unwrap()); + assert_eq!(ids.used(), 2); + early.give_back(); + early.give_back(); + assert_eq!(ids.used(), 1); + let clock = ids.state.lock().clock; + // Every free ID is taken while the early holder lives, its own again among them. + let mut rest = KVec::with_capacity(QOS_IDS - 3, GFP_KERNEL).unwrap(); + for _ in 0..QOS_IDS - 3 { + rest.push(ids.acquire().unwrap(), GFP_KERNEL).unwrap(); + } + assert!(matches!(ids.acquire(), Err(ENOSPC))); + assert!(rest.iter().any(|lease| lease.id == early.id)); + // Dropping the early holder gives nothing back: its ID is the new owner's. + drop(early); + assert_eq!(ids.used(), QOS_IDS as u32 - 2); + assert_eq!(ids.state.lock().clock, clock); + drop((other, rest)); + assert_eq!(ids.used(), 0); + } + #[test] fn a_released_qos_row_still_in_use_is_cleared_later() { let ids = QosIds::new().unwrap(); diff --git a/drivers/gpu/drm/asahi/g17/mod.rs b/drivers/gpu/drm/asahi/g17/mod.rs index 7f44d2d8f8560..a85e0522cd64a 100644 --- a/drivers/gpu/drm/asahi/g17/mod.rs +++ b/drivers/gpu/drm/asahi/g17/mod.rs @@ -3103,6 +3103,10 @@ impl gpu::Gpu for Gpu { command::MAX_STREAM } + fn max_syncs(&self) -> usize { + crate::file::MAX_SYNCS_PER_SUBMISSION + } + fn syncobj_wait_hint(&self) -> Option<(u32, u32)> { self.shared.feed.wait_hint() } diff --git a/drivers/gpu/drm/asahi/g17/runtime/backend.rs b/drivers/gpu/drm/asahi/g17/runtime/backend.rs index 2c928b5dd385f..fc4e76e71c0e6 100644 --- a/drivers/gpu/drm/asahi/g17/runtime/backend.rs +++ b/drivers/gpu/drm/asahi/g17/runtime/backend.rs @@ -142,10 +142,11 @@ impl Backend { // may have closed this queue on its client's behalf already (`Firmware::close_failed_owners`), // and its teardown entry may be released and reclaimed since. Closing it again would // release its scheduler twice. + let mut retained = false; if !self.context.is_closed() { // Retain a published scheduler before a never-kicked physical graph is // removed. The teardown entry owns its root until control consumption. - firmware + retained = firmware .queues .teardown .close(&self.context, super::now_ns())?; @@ -160,6 +161,12 @@ impl Backend { firmware.queues.admission.release_owner(self.owner); } drop(state); + // Both schedulers are gone, so the firmware cannot see a context it has not seen yet. + // Its identities return with the queue's admission, not after the jobs that the + // closing entities cancelled: those wait for their inputs before they are freed. + if !retained { + self.context.release_unpublished(); + } // Its idle channel, or its slot and never-published QID, is free. self.shared.channels.notify(); self.shared.queue_events(); diff --git a/drivers/gpu/drm/asahi/g17/teardown.rs b/drivers/gpu/drm/asahi/g17/teardown.rs index 84e36aaaeadc6..d41800b4caead 100644 --- a/drivers/gpu/drm/asahi/g17/teardown.rs +++ b/drivers/gpu/drm/asahi/g17/teardown.rs @@ -173,20 +173,22 @@ impl Pending { } /// No allocation is needed at close. A scheduler page never exposed to firmware requires - /// no release, unless the Registry already retained one of its displaced graphs. - pub(crate) fn close(&mut self, context: &Arc, now: u64) -> Result { + /// no release, unless the Registry already retained one of its displaced graphs. Returns + /// whether the context waits here for a release. + pub(crate) fn close(&mut self, context: &Arc, now: u64) -> Result { if let Some(index) = self.find(context) { let entry = &mut self.entries[index]; if entry.phase == Phase::Deferred { entry.phase = Phase::Draining; entry.armed = now; } - return Ok(()); + return Ok(true); } if context.is_published() { self.insert(context, Phase::Draining, now)?; + return Ok(true); } - Ok(()) + Ok(false) } /// Publish in insertion order. Mandatory control replies and a full control ring stop this diff --git a/drivers/gpu/drm/asahi/gpu.rs b/drivers/gpu/drm/asahi/gpu.rs index 8da8a428ad72a..048c877848510 100644 --- a/drivers/gpu/drm/asahi/gpu.rs +++ b/drivers/gpu/drm/asahi/gpu.rs @@ -426,6 +426,11 @@ pub(crate) trait Gpu: Send + Sync { usize::MAX } + /// Admission bound on a submission's input plus output syncs, checked before parsing them. + fn max_syncs(&self) -> usize { + usize::MAX + } + /// The firmware statistics snapshot of this GPU, if its firmware reports any. fn stats_snapshot(&self) -> Option>; diff --git a/tools/asahi/g17-admission-order-tests.py b/tools/asahi/g17-admission-order-tests.py index 3b5ad6c34a469..7bc14b610a848 100644 --- a/tools/asahi/g17-admission-order-tests.py +++ b/tools/asahi/g17-admission-order-tests.py @@ -540,6 +540,8 @@ def release_fixture(): impl Context { pub fn is_published(&self) -> bool { self.published } pub fn scheduler_va(&self) -> u64 { self.scheduler } + // The identities are not modelled; release_queue() returns them at close. + pub fn release_unpublished(&self) {} pub fn note_closed(&self, _generation: u64) { self.closed.store(true, std::sync::atomic::Ordering::Release); } diff --git a/tools/asahi/g17-submit-outputs-tests.py b/tools/asahi/g17-submit-outputs-tests.py new file mode 100755 index 0000000000000..ed7f930dfd9a1 --- /dev/null +++ b/tools/asahi/g17-submit-outputs-tests.py @@ -0,0 +1,134 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: GPL-2.0-only OR MIT +"""Host test: merging a submission's repeated timeline outputs changes no syncobj (linux#3200). + +Compiles the real `SyncItem::coalesce_outputs()` and `coalesce_timeline_outputs()` from +`drivers/gpu/drm/asahi/file.rs`, with their KUnit cases, against a host model of a syncobj's +payload: an add_point() never lowers the chain's point (dma_fence_chain_init()), and a +replace_fence() drops the chain. Every sequence of up to five outputs on two syncobjs, with +and without a cumulative anchor, leaves both syncobjs with the payload that installing each +output in order leaves. + +`--mutation merge-across-binary` merges timeline outputs across a binary output of the same +syncobj, as before the fix; the run must then fail. +""" +import argparse +import os +from pathlib import Path +import subprocess +import sys +import tempfile + +FILE = Path(__file__).resolve().parents[2] / 'drivers/gpu/drm/asahi/file.rs' + +HOST = r''' +use std::ops::{Deref, DerefMut}; +type Result = core::result::Result; +#[derive(Clone, Copy)] struct Flags; +const GFP_KERNEL: Flags = Flags; +const GFP_KERNEL_ACCOUNT: Flags = Flags; +const MAX_SYNCS_PER_SUBMISSION: usize = 4096; +struct KVec(Vec); +type KVVec = KVec; +impl KVec { + fn new() -> Self { Self(Vec::new()) } + fn with_capacity(n: usize, _: Flags) -> Result { Ok(Self(Vec::with_capacity(n))) } + fn push(&mut self, v: T, _: Flags) -> Result { self.0.push(v); Ok(()) } + fn retain(&mut self, f: impl FnMut(&mut T) -> bool) { self.0.retain_mut(f) } +} +impl Deref for KVec { type Target = [T]; fn deref(&self) -> &[T] { &self.0 } } +impl DerefMut for KVec { fn deref_mut(&mut self) -> &mut [T] { &mut self.0 } } +#[derive(Clone, Copy)] struct SyncObj(usize); +impl SyncObj { fn as_raw(&self) -> *const u8 { self.0 as *const u8 } } +#[derive(Clone, Copy)] struct SyncItem { syncobj: SyncObj, timeline_value: u64, timeline: bool } + +/// What each syncobj holds: nothing, a plain fence, or a chain ending at a point. +#[derive(Clone, Copy, Debug, PartialEq)] enum Payload { Empty, Binary, Chain(u64) } +fn install(outputs: &[SyncItem]) -> [Payload; 2] { + let mut objects = [Payload::Empty; 2]; + for sync in outputs { + let payload = &mut objects[sync.syncobj.0 - 1]; + *payload = match *payload { + Payload::Chain(point) if sync.timeline => Payload::Chain(point.max(sync.timeline_value)), + _ if sync.timeline => Payload::Chain(sync.timeline_value), + _ => Payload::Binary, + }; + } + objects +} + +#[test] +fn every_short_output_list_leaves_the_same_payloads() { + // Output `code`: the syncobj and a binary output or one of three points. + let item = |code: usize| SyncItem { + syncobj: SyncObj(1 + code / 4), + timeline_value: (code % 4) as u64, + timeline: code % 4 != 0, + }; + for inputs in 0..2 { + for len in 0..=5u32 { + for mut list in 0..8usize.pow(len) { + let mut outputs = KVec::new(); + for _ in 0..len { + outputs.push(item(list % 8), GFP_KERNEL).unwrap(); + list /= 8; + } + // An input takes no part, whatever it names; and no output but the anchor may + // name the anchor's syncobj. + for anchor in (0..=len as usize).map(|at| (at < len as usize).then_some(at)) { + if anchor.is_some_and(|at| (0..len as usize).any( + |i| i != at && outputs[i].syncobj.0 == outputs[at].syncobj.0) + || !outputs[at].timeline) { continue; } + let mut syncs = KVec::new(); + for _ in 0..inputs { syncs.push(item(7), GFP_KERNEL).unwrap(); } + for &sync in outputs.iter() { syncs.push(sync, GFP_KERNEL).unwrap(); } + let moved = SyncItem::coalesce_outputs( + &mut syncs, inputs, anchor.map(|at| at + inputs)).unwrap(); + assert_eq!(install(&syncs[inputs..]), install(&outputs)); + assert_eq!(moved.map(|at| syncs[at].syncobj.0), + anchor.map(|at| outputs[at].syncobj.0)); + } + } + } + } +} +''' + + +def item(source, signature): + """The item beginning at `signature`, through its matching closing brace.""" + assert source.count(signature) == 1, f'{signature!r}: {source.count(signature)} matches' + start = source.index(signature) + opening = source.index('{', start) + depth, end = 1, opening + 1 + while depth: + depth += (source[end] == '{') - (source[end] == '}') + end += 1 + return source[start:end] + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument('--mutation', choices=['merge-across-binary']) + args = parser.parse_args() + text = FILE.read_text() + code = ('impl SyncItem {\n' + item(text, 'fn coalesce_outputs(') + '\n}\n' + + item(text, 'fn coalesce_timeline_outputs(') + + '\n#[cfg(test)]\n' + item(text, 'mod output_tests {')) + if args.mutation: + boundary = ' && a.2.is_some() && b.2.is_some()' + assert code.count(boundary) == 1 + code = code.replace(boundary, '') + with tempfile.TemporaryDirectory(prefix='g17-submit-outputs-') as tmp: + source = Path(tmp) / 'outputs.rs' + source.write_text(HOST + code) + binary = Path(tmp) / 'outputs' + subprocess.run([os.environ.get('RUSTC', 'rustc'), '--edition=2021', '--test', '-O', '-Awarnings', + str(source), '-o', str(binary)], check=True) + run = subprocess.run([str(binary)], capture_output=True, text=True, timeout=120) + print(run.stdout + run.stderr) + sys.exit(run.returncode) + + +if __name__ == '__main__': + main() diff --git a/tools/asahi/run-host-tests.py b/tools/asahi/run-host-tests.py index 62ee5dbace595..def96298c5476 100644 --- a/tools/asahi/run-host-tests.py +++ b/tools/asahi/run-host-tests.py @@ -671,6 +671,7 @@ def mutations(flag, names, base, expect=KILL): 'check-outside-lock'), []), 'g17-owner-release-order-tests.py': [([], PASS)], 'g17-pool-release-tests.py': [([], PASS)], + 'g17-submit-outputs-tests.py': [([], PASS)] + mutations('--mutation', ['merge-across-binary'], []), # no-drain-release is the old rule: only a lease ends a slot's quarantine. 'g17-quarantine-drain-tests.py': [([], PASS)] + mutations('--mutation', ('no-drain-release', 'without-witness', 'ignore-leases', 'no-last-lease', diff --git a/tools/testing/selftests/drivers/gpu/asahi-m4/test-command-stream.py b/tools/testing/selftests/drivers/gpu/asahi-m4/test-command-stream.py index 1e741c8e3cc8b..15a103d01e500 100755 --- a/tools/testing/selftests/drivers/gpu/asahi-m4/test-command-stream.py +++ b/tools/testing/selftests/drivers/gpu/asahi-m4/test-command-stream.py @@ -121,7 +121,7 @@ impl core::ops::Deref for KVec { type Target = [T]; fn deref(&self) -> &[T] { &self.0 } } impl core::ops::DerefMut for KVec { fn deref_mut(&mut self) -> &mut [T] { &mut self.0 } } mod uapi { include!("FULL_UAPI"); } -mod file { pub const MAX_COMMANDS_PER_SUBMISSION: u32 = 64; } +mod file { pub const MAX_COMMANDS_PER_SUBMISSION: u32 = 64; pub const MAX_SYNCS_PER_SUBMISSION: usize = 4096; } mod hw { pub const USER_RANGE: core::ops::Range = 0x4000..((1u64 << 42) - 0x8000); pub mod sizes { pub const MAX_ATTACHMENTS: usize = 16; }