Repository navigation
drm/asahi: m3: drop the two unreachable T6030-only branches - #2478
Conversation
…0-only publish_mixed() refuses unless the chip is 0x6030, and boot logs the Globals debug word only on 0x6030. These are not GPU generation gates: the two-engine prefix was measured on the T6030 firmware's idle queues, and the debug word sits in the T6030 firmware's Globals layout. The M3 runtime starts only on T8122 (m3_soc::SOCS), whose Legacy and Extended firmware were not shown to take either, so keying them on G15 would turn them on there without evidence. Keep the gates and say so in the code. Comment only. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
publish_mixed() refused any SoC but 0x6030, and boot logged the Globals debug word only on 0x6030. The M3 runtime has a table only for T8122 (m3_soc::SOCS), so soc().chip_id is never 0x6030 here: publish_mixed() always returned EINVAL through that test and the debug word was never read. Both branches are dead code. Delete them. publish_mixed() is only reached for a batch that holds both render and compute commands, and next_batch() builds such a batch only when policy::mixed_prefix() allows it, so dropping the chip test there changes nothing. With the boot-time log gone, log_globals_debug() has no caller and goes too. The previous commit's comments go with the code. No functional change on any SoC the runtime starts on. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
DjDeveloperr
left a comment
There was a problem hiding this comment.
Reviewed at 7e75526.
Both branches were dead code. m3_soc::SOCS has only T8122 (m3_soc.rs:262), and policy::mixed_prefix() already returns 0 for any chip but 0x6030 (m3_batch_policy.rs:17). So next_batch() never builds a two-engine batch, and dropping the chip test in publish_mixed() changes nothing. After removing log_globals_debug(), globals_debug_off() and m3_globals_debug::OFFSET still have users (m3_adt_config.rs:1031, g15_raw.rs:1607), so no dead-code warnings appear. Built in your swfx1 kernel and host-tests passed on this head. This also answers the earlier "why do these stay T6030" commit: they are now gone, not justified.
The T6030 tests in stage_timestamps(), mixed_prefix() and coalesce_render_stamps() remain. They are reachable on nothing, so they are candidates for the same sweep.
Problem
drivers/gpu/drm/asahi/m3/m3_runtime.rshad two inlinechip_id == 0x6030tests:publish_mixed()refused any SoC but 0x6030, and boot logged the Globals debug word only on 0x6030 (84ef8e4). The M3 runtime has a table for T8122 only (m3_soc::SOCS), sosoc().chip_idis never 0x6030 there. Both branches were dead code:publish_mixed()always returned EINVAL through that test, and the debug word was never read.Change
Delete both branches.
publish_mixed()drops the chip test. It is reached only for a batch that holds both render and compute commands, andnext_batch()builds such a batch only whenpolicy::mixed_prefix()allows it, so the result is the same on every SoC.M3Config::log_globals_debug(), which had no other caller.No functional change on any SoC the runtime starts on.
Testing
drivers/gpu/drm/asahi/included: builds (7.3.0-aurora-swfx1, this change on top of the other open sweep PRs); no warning in the m3 files.tools/asahi/run-host-tests.py): 427/427 pass.Still to run
None: the deleted code could not run on any supported SoC.
Assisted-by: LLM (Claude:Opus 5.5)