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
22 changes: 22 additions & 0 deletions drivers/gpu/drm/asahi/fwid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,28 @@ mod tests {
}
}

#[test]
fn m5_builds_name_their_layouts() {
use crate::g17::fw::variant::{Firmware, M5Layouts};
for cfg in [&crate::hw::t6050::CONFIG, &crate::hw::t6050::CONFIG_MAX] {
let Firmware::Identified(builds) = cfg.firmware else {
panic!("the M5 Pro and Max must identify their loaded firmware");
};
for (i, build) in builds.iter().enumerate() {
// 27.2 (26B123) moved the InitData layouts.
let layouts = if build.os_version >= [27, 2, 0] {
M5Layouts::V26B123
} else {
M5Layouts::V26A428
};
assert_eq!(build.variant.m5_layouts, Some(layouts));
for other in &builds[i + 1..] {
assert_ne!(build.images[0].text_sha256, other.images[0].text_sha256);
}
}
}
}

fn t6050_admits_only(builds: &[crate::g17::fw::variant::Build]) {
for image in builds.iter().flat_map(|build| build.images) {
// Both roles' records, inside TEXT.
Expand Down
Loading
Loading