Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 5 additions & 1 deletion drivers/gpu/drm/asahi/g17/fw/variant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,9 @@ pub(crate) const V25G83: Variant = Variant {
// 25G83 build since ec3ced95 and measured on the M4 Pro (J616s).
render_id_at_create: true,
objects_after_release: true,
telemetry_protocol: crate::g17::telemetry::Protocol::NONE,
// Pstate reports (tags 0x19/0x1b) and 8 ms timestamped utilisation records (tag 0x13),
// measured on T6040 (J616s) and T6041.
telemetry_protocol: crate::g17::telemetry::Protocol::PSTATE_8MS,
};

/// The 26A428 firmware of the M5 GPUs, which runs the M5 protocol (the M5 graph, queues and
Expand Down Expand Up @@ -277,6 +279,8 @@ pub(crate) const V25F84: Variant = Variant {
render_stage_prefixes: false,
render_id_at_create: false,
objects_after_release: false,
// Not measured on 25F84 or 26B123.
telemetry_protocol: crate::g17::telemetry::Protocol::NONE,
..V25G83
};

Expand Down
7 changes: 3 additions & 4 deletions drivers/gpu/drm/asahi/g17/stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,9 @@ pub(super) const fn max_age_ns(graph: InitGraph) -> u64 {

/// Whether the firmware reports its performance state. V25G83 and V26A428 accept
/// the logical pstate record (tag 0x10) but never emit it. V26A428 (A18 Pro and
/// M5) and T6041's 25G83 report the state in tags 0x19 and 0x1b instead
/// (`Variant::telemetry_protocol`); T6040's 25G83 is left on `Protocol::NONE`
/// because it has not been measured yet, so it is unsupported there. A firmware
/// that reports it reads valid or stale.
/// M5) and 25G83 (T6040, T6041) report the state in tags 0x19 and 0x1b instead
/// (`Variant::telemetry_protocol`). A firmware that reports it reads valid or
/// stale.
pub(super) const fn reports_pstate(protocol: super::telemetry::Protocol) -> bool {
protocol.reports_pstate()
}
Expand Down
9 changes: 4 additions & 5 deletions drivers/gpu/drm/asahi/g17/telemetry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
//! Qualified V25G83/V26A428 statistics, decoded from complete copied records.
//! No record of these firmwares measures power or temperature.
//!
//! The 26A428 firmware (the A18 Pro's, and the M5's) and T6041's 25G83
//! firmware report the performance state the GPU runs at (tags 0x19 and 0x1b),
//! and their utilisation records carry their own timestamps, from which busy
//! time is integrated ([`Protocol`]). T6040's 25G83 is left on `Protocol::NONE`
//! because it has not been measured yet.
//! The 26A428 firmware (the A18 Pro's, and the M5's) and the 25G83 firmware
//! (T6040 and T6041) report the performance state the GPU runs at (tags 0x19
//! and 0x1b), and their utilisation records carry their own timestamps, from
//! which busy time is integrated ([`Protocol`]).
//! All state is protected by the device mutex.

pub(super) const UNAVAILABLE: u32 = 0;
Expand Down
3 changes: 0 additions & 3 deletions drivers/gpu/drm/asahi/hw/t6041.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,8 @@ pub(super) const BUILD_25G83: fw::variant::Build = fw::variant::Build {
],
// 40-core T6041 parts (J614C, J575C) stay on TA mode 1 until clustered tiling is tested on
// 40-core hardware; 32-core parts run [`BUILD_25G83_32CORE`] below.
// T6041's 25G83 firmware emits pstate reports (tags 0x19/0x1b) and 8 ms
// timestamped utilisation records (tag 0x13).
variant: &fw::variant::Variant {
ta_mode_1: true,
telemetry_protocol: crate::g17::telemetry::Protocol::PSTATE_8MS,
..fw::variant::V25G83
},
config: None,
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/asahi/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ static ssize_t agx_qualified_stats_show(struct asahi_stats_attribute *stats, cha
}
/*
* unsupported comes from the firmware match data (g17::stats): builds
* without a pstate telemetry protocol (such as T6040 25G83, left on
* Protocol::NONE pending measurement) have no qualified pstate support,
* without a pstate telemetry protocol (such as the unmeasured 25F84 and
* 26B123 G17 builds, on Protocol::NONE) have no qualified pstate support,
* so it is not a transient state.
* unavailable keeps meaning "no qualified sample yet".
*/
Expand Down
Loading