From 6c9836868d269605a4cb0e2367a1281691decf0e Mon Sep 17 00:00:00 2001 From: Eryk Wieliczko Date: Wed, 28 Oct 2026 06:15:42 +0100 Subject: [PATCH 1/3] drm/asahi: g15: build Board::DeviceTree only with the G15 backend The T8122 runtime builds g15/hw.rs without the G15 backend, which has no board module, so DRM_ASAHI_M3_T8122=y with DRM_ASAHI_G15=n fails: error[E0433]: failed to resolve: could not find `board` in `super` --> drivers/gpu/drm/asahi/g15/hw.rs:54:32 Only the G15 backend builds device-tree board data. Fixes: aeffd0e53b42 ("drm/asahi: g15: t6031: build the J516C board data without a board file") Signed-off-by: Eryk Wieliczko Assisted-by: Claude:claude-opus-5-5 --- drivers/gpu/drm/asahi/g15/hw.rs | 1 + tools/asahi/g15-zero-words-tests.py | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/asahi/g15/hw.rs b/drivers/gpu/drm/asahi/g15/hw.rs index f231e573c40176..a9d947bbbdd493 100644 --- a/drivers/gpu/drm/asahi/g15/hw.rs +++ b/drivers/gpu/drm/asahi/g15/hw.rs @@ -51,6 +51,7 @@ pub(crate) enum Board { /// ([`super::board::record`], [`super::board::device_tree`]), with the SoC's reference /// words for what neither carries ([`super::board::record::Reference`]). A value the /// builder refuses stops admission, before any firmware is touched. + #[cfg(CONFIG_DRM_ASAHI_G15)] DeviceTree(&'static super::board::record::Reference), /// No board data: admission refuses the SoC before anything firmware-visible. None, diff --git a/tools/asahi/g15-zero-words-tests.py b/tools/asahi/g15-zero-words-tests.py index 154c291dda2066..49ae02734c7ee3 100644 --- a/tools/asahi/g15-zero-words-tests.py +++ b/tools/asahi/g15-zero-words-tests.py @@ -12,7 +12,9 @@ the tables are unchanged), and when the T6031 board source became the device tree with reference words instead of a board file (the Board enum; the T6030 tables are unchanged), and for publication-bound slots (removal of -MAX_VMS and its lifetime-slot comment only). Its T6030 configuration module is +MAX_VMS and its lifetime-slot comment only), and when Board::DeviceTree was +gated on CONFIG_DRM_ASAHI_G15 for the T8122 runtime without the G15 backend +(one #[cfg] line; the tables are unchanged). Its T6030 configuration module is independently pinned to the original bytes. prepare_board() is pinned too; it was refreshed for the same Board change (its T6030 arm is unchanged). """ @@ -30,7 +32,7 @@ GOLDEN_FILES = { "board/data.rs": "7c5ff1077ca3296cbfc9e7144294162b6dea78a3774c38eeed4b0f59a14d7a5c", "board/template.rs": "286872f5474a67534f214e83e659253299f85143f3dc59035fa80894022e2549", - "hw.rs": "dd024e27c261635c2edd5356f6d79a6e2072ba57f7d13ada0862491b357cdbf3", + "hw.rs": "f29da6ef402ec5b0218cb8e57a0f10bb382b5895510f9f0c05a30680b9fbc24c", "power/idle.rs": "4928ecf7699b3ca85ff5143eb6e996efd40d47321e29a238a02c8873bc9f102c", } GOLDEN_FUNCTIONS = { From 88e3cc7d7a618f945d3471b2dcd9f33ce9b47773 Mon Sep 17 00:00:00 2001 From: Eryk Wieliczko Date: Wed, 28 Oct 2026 05:08:08 +0100 Subject: [PATCH 2/3] drm/asahi: build Uat::try_bind only with the G15 backend Only the G15 backend binds VMs at publication. With DRM_ASAHI_M3_T8122=y and DRM_ASAHI_G15=n, W=1 warns that Uat::try_bind is never used. Signed-off-by: Eryk Wieliczko Assisted-by: Claude:claude-opus-5-5 --- drivers/gpu/drm/asahi/mmu.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/asahi/mmu.rs b/drivers/gpu/drm/asahi/mmu.rs index 3a7941b4a36534..5a3c56b16a8a22 100644 --- a/drivers/gpu/drm/asahi/mmu.rs +++ b/drivers/gpu/drm/asahi/mmu.rs @@ -2781,6 +2781,7 @@ impl Uat { } /// Binds a VM without waiting for another slot owner to retire. + #[cfg(CONFIG_DRM_ASAHI_G15)] pub(crate) fn try_bind(&self, vm: &Vm) -> Result { self.bind_inner(vm, false) } From f5d723338c5cd63d56176959b8a67d97d9fa22df Mon Sep 17 00:00:00 2001 From: Eryk Wieliczko Date: Wed, 28 Oct 2026 06:15:42 +0100 Subject: [PATCH 3/3] drm/asahi: build VmReadGuard::covers_range only with the G15 backend Only the G15 command checks use it. With DRM_ASAHI_M3_T8122=y and DRM_ASAHI_G15=n, W=1 warns that it is never used. Signed-off-by: Eryk Wieliczko Assisted-by: Claude:claude-opus-5-5 --- drivers/gpu/drm/asahi/mmu.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/asahi/mmu.rs b/drivers/gpu/drm/asahi/mmu.rs index 5a3c56b16a8a22..948631e16a4597 100644 --- a/drivers/gpu/drm/asahi/mmu.rs +++ b/drivers/gpu/drm/asahi/mmu.rs @@ -363,6 +363,7 @@ pub(crate) struct VmReadGuard(VmExecGuard); #[cfg(CONFIG_DRM_ASAHI_UAT_ADOPTION)] impl VmReadGuard { + #[cfg(CONFIG_DRM_ASAHI_G15)] pub(crate) fn covers_range(&mut self, address: u64, size: u64, read: bool, write: bool) -> bool { Vm::covers_range_locked(&mut self.0, address, size, read, write) }