Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
c5e1b35
drm/asahi: dispatch G15 compute through extended T8122 firmware
satchlj Oct 31, 2026
ec30b22
drm/asahi: enable J613 extended firmware render and retirement
satchlj Oct 31, 2026
efcd402
drm/asahi: admit authorized HIGH queues on Extended T8122
satchlj Nov 3, 2026
c1c0e23
drm/asahi: test the M3 host priority mapping alongside admission
satchlj Nov 3, 2026
ba872b9
ci: register the M3 queue priority admission tests
satchlj Nov 4, 2026
bd92c01
drm/asahi: back off interrupt-assisted M3 completion waits
satchlj Nov 3, 2026
9f3b310
drm/asahi: omit no-op M3 module pins without unload support
satchlj Nov 3, 2026
8f8374b
Merge branch 'satchlj/t8122-api-fixes-20261104' into satchlj/port-347…
satchlj Nov 5, 2026
40c0f57
selftests: asahi: match the 7.3 capability argument type
satchlj Nov 5, 2026
841394c
Merge branch 'satchlj/port-346-20261104' into satchlj/port-347-20261104
satchlj Nov 5, 2026
c3910f7
Merge branch 'satchlj/t8122-api-fixes-20261104' into satchlj/port-306…
satchlj Nov 5, 2026
a64da66
Merge branch 'satchlj/t8122-api-fixes-20261104' into satchlj/port-307…
satchlj Nov 5, 2026
3822ecc
Merge branch 'satchlj/t8122-api-fixes-20261104' into satchlj/port-346…
satchlj Nov 5, 2026
82aaf1b
Merge branch 'satchlj/t8122-api-fixes-20261104' into satchlj/port-347…
satchlj Nov 5, 2026
4425ded
Merge branch 'satchlj/t8122-api-fixes-20261104' into satchlj/port-306…
satchlj Nov 5, 2026
8363fbb
Merge branch 'satchlj/t8122-api-fixes-20261104' into satchlj/port-307…
satchlj Nov 5, 2026
ae10e3b
Merge branch 'satchlj/t8122-api-fixes-20261104' into satchlj/port-346…
satchlj Nov 5, 2026
a3cf48e
Merge branch 'satchlj/t8122-api-fixes-20261104' into satchlj/port-347…
satchlj Nov 5, 2026
2cbb206
Merge branch 'satchlj/t8122-api-fixes-20261104' into satchlj/port-306…
satchlj Nov 5, 2026
7879118
Merge branch 'satchlj/t8122-api-fixes-20261104' into satchlj/port-307…
satchlj Nov 5, 2026
79d45bd
Merge branch 'satchlj/t8122-api-fixes-20261104' into satchlj/port-346…
satchlj Nov 5, 2026
d7be34e
Merge branch 'satchlj/t8122-api-fixes-20261104' into satchlj/port-347…
satchlj Nov 5, 2026
e71fbb0
Merge branch 'satchlj/port-305-20261104' into satchlj/port-306-20261104
satchlj Nov 5, 2026
72b6142
Merge branch 'satchlj/port-306-20261104' into satchlj/port-307-20261104
satchlj Nov 5, 2026
66eb34e
Merge branch 'satchlj/port-307-20261104' into satchlj/port-346-20261104
satchlj Nov 5, 2026
03692e5
Merge branch 'satchlj/port-346-20261104' into satchlj/port-347-20261104
satchlj Nov 5, 2026
a0d0a49
Merge branch 'satchlj/t8122-api-fixes-20261104' into satchlj/port-306…
satchlj Nov 5, 2026
34de4e4
Merge branch 'satchlj/t8122-api-fixes-20261104' into satchlj/port-307…
satchlj Nov 5, 2026
119f1ea
Merge branch 'satchlj/t8122-api-fixes-20261104' into satchlj/port-346…
satchlj Nov 5, 2026
020e3f8
Merge branch 'satchlj/t8122-api-fixes-20261104' into satchlj/port-347…
satchlj Nov 5, 2026
032486e
Merge branch 'satchlj/t8122-api-fixes-20261104' into satchlj/port-306…
satchlj Nov 5, 2026
2436856
Merge branch 'satchlj/t8122-api-fixes-20261104' into satchlj/port-307…
satchlj Nov 5, 2026
49a678e
Merge branch 'satchlj/t8122-api-fixes-20261104' into satchlj/port-346…
satchlj Nov 5, 2026
523b9eb
Merge branch 'satchlj/t8122-api-fixes-20261104' into satchlj/port-347…
satchlj Nov 5, 2026
ea7c050
Merge branch 'satchlj/port-305-20261104' into satchlj/port-306-20261104
satchlj Nov 5, 2026
ef875a1
Merge branch 'satchlj/port-306-20261104' into satchlj/port-307-20261104
satchlj Nov 5, 2026
44c5989
Merge branch 'satchlj/port-307-20261104' into satchlj/port-346-20261104
satchlj Nov 5, 2026
c89fd6e
Merge branch 'satchlj/port-346-20261104' into satchlj/port-347-20261104
satchlj Nov 5, 2026
f163501
Merge branch 'satchlj/t8122-api-fixes-20261104' into satchlj/port-306…
satchlj Nov 5, 2026
57d2141
Merge branch 'satchlj/t8122-api-fixes-20261104' into satchlj/port-307…
satchlj Nov 5, 2026
9a28266
Merge branch 'satchlj/t8122-api-fixes-20261104' into satchlj/port-346…
satchlj Nov 5, 2026
d798e55
Merge branch 'satchlj/t8122-api-fixes-20261104' into satchlj/port-347…
satchlj Nov 5, 2026
b17b5ec
Merge branch 'satchlj/port-305-20261104' into satchlj/port-306-20261104
satchlj Nov 5, 2026
ea85d43
Merge branch 'satchlj/port-306-20261104' into satchlj/port-307-20261104
satchlj Nov 5, 2026
33dcc77
Merge branch 'satchlj/port-307-20261104' into satchlj/port-346-20261104
satchlj Nov 5, 2026
1ac0d6b
Merge branch 'satchlj/port-346-20261104' into satchlj/port-347-20261104
satchlj Nov 5, 2026
368d1dc
Merge commit '33313096c66f4afdff4ef7060d20fe9bedebc34c' into satchlj/…
satchlj Nov 5, 2026
076b28b
Merge commit '33313096c66f4afdff4ef7060d20fe9bedebc34c' into satchlj/…
satchlj Nov 5, 2026
c34bce8
Merge commit '33313096c66f4afdff4ef7060d20fe9bedebc34c' into satchlj/…
satchlj Nov 5, 2026
bbf8435
Merge commit '33313096c66f4afdff4ef7060d20fe9bedebc34c' into satchlj/…
satchlj Nov 5, 2026
0a7d334
Merge branch 'satchlj/port-305-20261104' into satchlj/port-306-20261104
satchlj Nov 5, 2026
0d31784
Merge branch 'satchlj/port-306-20261104' into satchlj/port-307-20261104
satchlj Nov 5, 2026
f1e8a99
Merge branch 'satchlj/port-307-20261104' into satchlj/port-346-20261104
satchlj Nov 5, 2026
b73d1f9
Merge branch 'satchlj/port-346-20261104' into satchlj/port-347-20261104
satchlj Nov 5, 2026
8d07b11
Merge commit 'b50066848322c6799c1433ee3a358aab2e9faabb' into satchlj/…
satchlj Nov 5, 2026
c81410e
Merge commit 'b50066848322c6799c1433ee3a358aab2e9faabb' into satchlj/…
satchlj Nov 5, 2026
cd9eac9
Merge commit 'b50066848322c6799c1433ee3a358aab2e9faabb' into satchlj/…
satchlj Nov 5, 2026
1f5c951
Merge commit 'b50066848322c6799c1433ee3a358aab2e9faabb' into satchlj/…
satchlj Nov 5, 2026
58c89f5
Merge branch 'satchlj/port-305-20261104' into satchlj/port-306-20261104
satchlj Nov 5, 2026
9b2e8cf
Merge branch 'satchlj/port-306-20261104' into satchlj/port-307-20261104
satchlj Nov 5, 2026
e7936d8
Merge branch 'satchlj/port-307-20261104' into satchlj/port-346-20261104
satchlj Nov 5, 2026
7b88ebb
Merge branch 'satchlj/port-346-20261104' into satchlj/port-347-20261104
satchlj Nov 5, 2026
bb25219
Merge satchlj/port-305-20261104 into satchlj/port-306-20261104
DjDeveloperr Nov 7, 2026
cc7dc16
Merge satchlj/port-306-20261104 into satchlj/port-307-20261104
DjDeveloperr Nov 7, 2026
b3a9f65
Merge satchlj/port-307-20261104 into satchlj/port-346-20261104
DjDeveloperr Nov 7, 2026
25f9051
Merge satchlj/port-346-20261104 into satchlj/port-347-20261104
DjDeveloperr Nov 7, 2026
9840daa
Merge pull request #977 from aurora-silicon/satchlj/port-347-20261104
RyanTheTide Nov 10, 2026
27d860d
Merge pull request #976 from aurora-silicon/satchlj/port-346-20261104
RyanTheTide Nov 10, 2026
fe20293
Merge pull request #969 from aurora-silicon/satchlj/port-307-20261104
RyanTheTide Nov 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions drivers/gpu/drm/asahi/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1350,9 +1350,15 @@ impl File {
cls_pr_debug!(Errors, "queue_create: Invalid priority\n");
return Err(EINVAL);
}
// HIGH has only been run on G17; G13 and G14 keep refusing it.
// Keep support tied to a backend and admitted profile. G13/G14 and
// unqualified M3 profiles retain their previous rejection.
let high_supported = reg_data.gpu.as_any().is::<crate::g17::Gpu>();
#[cfg(CONFIG_DRM_ASAHI_M3_T8122)]
let high_supported = high_supported || reg_data.gpu.as_any()
.downcast_ref::<crate::m3::m3_drm::Backend>()
.is_some_and(|gpu| gpu.supports_high_priority());
if data.priority == uapi::drm_asahi_priority_DRM_ASAHI_PRIORITY_HIGH
&& !reg_data.gpu.as_any().is::<crate::g17::Gpu>()
&& !high_supported
{
cls_pr_debug!(
Errors,
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/asahi/m3/m3_board.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use crate::m3::m3_resources::{
use crate::m3::m3_soc::Soc;

/// Whether the root node's compatible list contains `compatible`.
fn board_is(compatible: &[u8]) -> bool {
pub(crate) fn board_is(compatible: &[u8]) -> bool {
let Some(root) = kernel::of::root() else {
return false;
};
Expand Down
26 changes: 11 additions & 15 deletions drivers/gpu/drm/asahi/m3/m3_completion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ impl WorkItem for Completion {
type Pointer = Arc<Self>;
fn run(owner: Arc<Self>) {
use crate::m3::m3_runtime::Service;
// Snapshots after a notification before sleeping for the next one: the completion
// stamps can trail the firmware's event message.
const TRAILING_POLLS: u32 = 4;
let (mut trailing, mut waited_at) = (0, u64::MAX);
// No deliberate spin: fsleep(5) selects udelay, not a scheduler sleep.
// Check immediately on IRQ, with backoff for trailing coherent witnesses.
let mut policy = super::m3_completion_policy::WaitPolicy::new();
loop {
let (outcome, events) = {
let mut guard = owner.shared.lock();
Expand All @@ -37,23 +36,20 @@ impl WorkItem for Completion {
// Preserve the root-only CPU-overlap diagnostic: disabled waits retain
// the runtime lock so VM/timestamp preparation cannot overlap the GPU.
if let Service::Waiting(messages)=outcome {
if !events.cpu_overlap() {events.wait_past(messages);continue;}
if !events.cpu_overlap() {
events.wait_past(messages, policy.next_wait_us(events.wait_ceiling_us()));
continue;
}
}
(outcome,events)
};
match outcome {
Service::Idle => break,
Service::Progress => { trailing = 0; waited_at = u64::MAX; }
Service::Progress => policy.progress(),
Service::Waiting(messages) => {
if messages != waited_at { waited_at = messages; trailing = 0; }
if trailing < TRAILING_POLLS {
trailing += 1;
kernel::time::delay::fsleep(kernel::time::Delta::from_micros(5));
} else {
// Until the next firmware event, or a bounded 100 us resnapshot.
events.wait_past(messages);
trailing = 0;
}
// IRQs and timer expiry alone are not retirement progress.
// Keep backing off until service publishes or retires work.
events.wait_past(messages, policy.next_wait_us(events.wait_ceiling_us()));
}
}
}
Expand Down
77 changes: 77 additions & 0 deletions drivers/gpu/drm/asahi/m3/m3_completion_policy.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
// SPDX-License-Identifier: GPL-2.0-only OR MIT

//! Bounded fallback for witnesses which can become visible after the last IRQ.
//!
//! Notifications request a fresh snapshot, but do not prove witness progress.
//! Only publication or retirement resets this policy. In particular, neither a
//! timer wake nor a stream of early firmware notifications renews a spin budget.

pub(crate) struct WaitPolicy {
next_us: u64,
}

impl WaitPolicy {
pub(crate) const fn new() -> Self {
Self { next_us: 25 }
}

pub(crate) fn progress(&mut self) {
self.next_us = 25;
}

/// No deliberate busy delay: IRQs still wake each sleep immediately.
/// The caller supplies the root-selected ceiling (25..=1000 us).
pub(crate) fn next_wait_us(&mut self, ceiling_us: u64) -> u64 {
let wait = self.next_us.min(ceiling_us.clamp(25, 1000));
self.next_us = (wait * 2).min(1000);
wait
}
}

#[cfg_attr(not(test), kernel::macros::kunit_tests(asahi_m3_completion_policy))]
mod tests {
use super::WaitPolicy;

#[test]
fn no_progress_backs_off_and_stays_bounded() {
let mut policy = WaitPolicy::new();
for expected in [25, 50, 100, 200, 400, 800, 1000, 1000] {
assert_eq!(policy.next_wait_us(1000), expected);
}
for _ in 0..100_000 {
assert_eq!(policy.next_wait_us(1000), 1000);
}
}

#[test]
fn publication_or_retirement_restarts_fast_detection() {
let mut policy = WaitPolicy::new();
for _ in 0..8 { policy.next_wait_us(1000); }
policy.progress();
assert_eq!(policy.next_wait_us(1000), 25);
assert_eq!(policy.next_wait_us(1000), 50);
}

#[test]
fn live_ceiling_changes_apply_to_the_next_wait() {
let mut policy = WaitPolicy::new();
for _ in 0..8 { policy.next_wait_us(1000); }
assert_eq!(policy.next_wait_us(25), 25);
assert_eq!(policy.next_wait_us(1000), 50);
assert_eq!(policy.next_wait_us(100), 100);
assert_eq!(policy.next_wait_us(100), 100);
}

#[test]
fn fallback_keeps_timeout_checks_frequent_without_any_irq() {
let mut policy = WaitPolicy::new();
let mut elapsed_us = 0;
while elapsed_us < 2_000_000 {
let wait = policy.next_wait_us(1000);
assert!(wait <= 1000);
elapsed_us += wait;
}
// This bounds the requested delay, not scheduler dispatch latency.
assert!(elapsed_us < 2_001_000);
}
}
Loading