Skip to content

Commit 97dc508

Browse files
asahilinaherrnst
authored andcommitted
fixup! drm/asahi: Add the Asahi driver for Apple AGX GPUs
1 parent 8ede8ba commit 97dc508

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

drivers/gpu/drm/asahi/driver.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,13 @@ impl platform::Driver for AsahiDriver {
131131
(hw::GpuGen::G14, hw::GpuVariant::G, &[12, 4, 0]) => {
132132
gpu::GpuManagerG14V12_4::new(reg.device(), &res, cfg)? as Arc<dyn gpu::GpuManager>
133133
}
134-
(hw::GpuGen::G13, _, &[13, 4, 99, 4]) => {
134+
(hw::GpuGen::G13, _, &[13, 5, 0]) => {
135135
gpu::GpuManagerG13V13_5::new(reg.device(), &res, cfg)? as Arc<dyn gpu::GpuManager>
136136
}
137-
(hw::GpuGen::G14, hw::GpuVariant::G, &[13, 4, 99, 4]) => {
137+
(hw::GpuGen::G14, hw::GpuVariant::G, &[13, 5, 0]) => {
138138
gpu::GpuManagerG14V13_5::new(reg.device(), &res, cfg)? as Arc<dyn gpu::GpuManager>
139139
}
140-
(hw::GpuGen::G14, _, &[13, 4, 99, 4]) => {
140+
(hw::GpuGen::G14, _, &[13, 5, 0]) => {
141141
gpu::GpuManagerG14XV13_5::new(reg.device(), &res, cfg)? as Arc<dyn gpu::GpuManager>
142142
}
143143
_ => {

drivers/gpu/drm/asahi/regs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ impl Resources {
236236
core_mask_regs.try_push(self.sgx_read32(CORE_MASKS_G14X))?;
237237
core_mask_regs.try_push(self.sgx_read32(CORE_MASKS_G14X + 4))?;
238238
core_mask_regs.try_push(self.sgx_read32(CORE_MASKS_G14X + 8))?;
239-
(id_clusters >> 28) & 0xf // TODO: guess
239+
(id_counts_1 >> 8) & 0xff
240240
}
241241
a => {
242242
dev_err!(self.dev, "Unknown GPU generation {}\n", a);

0 commit comments

Comments
 (0)