Repository navigation
asahi, hk: G15C (M3 Max) on the native AGX3 path - #25
Merged
DjDeveloperr merged 4 commits intoOct 18, 2026
Merged
Conversation
drm_shim now learns the bus of the fake device from a subsystem link override, which drivers set up through drm_shim_override_link() or drm_shim_platform_device_setup(). The asahi shim sets the bus type and the uevent file but no link, so libdrm's drmGetDevices2() cannot classify the node and returns no device: vkEnumeratePhysicalDevices() fails with VK_ERROR_INITIALIZATION_FAILED for every ASAHI_SHIM_CHIP, and the EGL loader falls back to softpipe. Tests that open the node directly were not affected. Add the platform subsystem link. Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
ASAHI_SHIM_CHIP=g15c presents the M3 Max (T6031, G15C) as an M3 kernel would: chip 0x6031, revision B2, one die, four clusters of ten cores with every core present (masks 0x3ff), AGX3 shaders on the legacy HAL, the G15S user VA range and a 1380 MHz top clock. The feature word is empty; the ASAHI_SHIM_* switches can add bits on top as for any identity. The G15 kernel's bind refusal for [0x7000000000, 0x7100000000) and its submission gate now apply to both G15 identities. The gate checks prior barriers against the feature word the shim reports instead of the G15S constant, which is the same word for G15S. The driver does not admit G15C yet, so a g15c run is still refused at device open. G15S behaves as before. Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
Put the M3 Max (T6031, G15C) on the native AGX3 path beside G15S. It is the same G15 generation with four clusters instead of two: Gen9 descriptors in a 32-byte sampler heap, the G15 command stream, the Gen4 sampler, the classic queue model and the AGX3B encoding. - agx_chip_native_agx3(), agx_chip_native_imageblock() and agx_chip_native_indirect_compute() name G15C, so it takes every G15S choice in Honeykrisp and Gallium. - agx_chip_driver_supported() checks G15C's axes as it does G15S's, and agx_params_driver_supported() requires the exact T6031 parameters: chip 0x6031, one die, four clusters, AGX3 shaders on the legacy HAL. The core masks are not checked, so binned parts are admitted. Both land together, since an unlisted chip would pass the parameter check. - The device loads the G15S build of libagx: G15C executes the same encoding and needs no scheduling stalls. - The CDM barrier packer accepts the wide-visibility form for G15C, which agx_chip_cdm_wide_visibility() asks for on every native G15 part. - A refused G15C names the parameters it expected. Ray-query encodings stay refused on G15C. A new admission test covers both G15 identities and the parameters that must be refused, and the CDM barrier test covers the wide form. Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
On the M3 Max (G15C), half of each compute dispatch and of each draw ran without its uniform state: compute-check got 4096 of 65536 words wrong, and the vk and gl render checks got 2048 of 4096 pixels wrong. Without kernel-side backing for it, the shader cores also faulted reading the page after the USC window base page. The profile prefix ends in a computed helper call. On G15C that call can index past the base page's two ten-entry helper tables for some shader cores, and the slots after the tables were zero, so the call did not return. It ran on through the rest of the page and into the following unbound guard page, and the uniform state it was meant to load was skipped. On the native path every G15 program carries that prefix. Build the base page with agx3_build_usc_base_page(), which on G15C fills every 16-byte slot from +0x2c0 to +0x340 and from +0x350 to the end of the page with the helper table's terminal record, so any such call returns inside the page. The zero block-size dword at +0x340 that ends the page's container chain is left alone. Only G15C is changed; G15S, G17P and every per-shader container get the same bytes as before. A host test checks the page for G15C, G15S and G17P. The same fill was tested on J516C (M3 Max, 40 cores) with the earlier G15C driver, where compute-check, vk-render-check and gl-render-check passed (0 wrong over ~2700-5700 runs each) with no kernel-side page backing. Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
This was referenced Oct 18, 2026
This was referenced Oct 19, 2026
Spec: J516C port completion (board data from DT, G15C tuning, display, PRs)
malik-na/linux-aurora#53
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Admits the M3 Max GPU (G15C, chip 0x6031, 1 die, 4 clusters x 10 cores) on the native path from #23, with the G15S
library programs. G15S is unchanged: under the drm-shim, all 215 compute and 3 render submissions are byte-identical to
#23.
Stacked on #23.
Commits
asahi/drm-shim: publish the platform bus link: without it, this tree's drm-shim found no Vulkan device for any chipand GL fell back to softpipe.
asahi/drm-shim: add a G15C (T6031) identity.asahi,hk: admit G15C on the native path: the native-path predicates, the driver and parameter admission,libagx_g15s, wide-visibility barrier grounding, and tests.asahi: return every out-of-table USC helper call on G15C: the profile prefix's computed helper call can index pastthe base page's two ten-entry helper tables for some G15C cores. Those calls ran on into the unmapped page after the
base page and skipped the uniform loads, so half of every dispatch and draw went wrong. Every slot after the tables
now holds a return. G15C only.
Tested
drm-shim: 14/14 smoke checks for G15C, plus the G15S byte-identity check above. Unit tests: 33 pass, and 1
(
hk_g17p_compression) fails the same way on #23.On the J516C (M3 Max, 40 cores), with aurora-silicon/linux #358 plus the T6031 row (PR aurora-silicon/linux#363):
The helper-call fix was first measured on the legacy kit path. There, compute-check went from 4096 of 65536 words
wrong to 0, and the render checks from 2048 of 4096 pixels wrong to 0.
Notes
shown up so far.