Repository navigation
asahi, borealis: do not offer a compute-only device for graphics - #585
Conversation
RyanTheTide
left a comment
There was a problem hiding this comment.
No blockers. Selecting on the kernel feature bit instead of the chip is the right shape. I have one Vulkan-side gap and one note on merge order.
- src/asahi/vulkan/hk_physical_device.c:2402-2406: removing VK_QUEUE_GRAPHICS_BIT keeps the family COMPUTE|TRANSFER, but some copies that the spec allows on a compute/transfer queue still record a render on G14. hk_CmdCopyImage2 and the buffer-to-image upload pick the graphics meta path when
hk_copy_requires_gfx(dst)is true (samples > 1 and a compressed layout; hk_cmd_meta.c:3289, 4618, 4840). On this device that sends DRM_ASAHI_CMD_RENDER, the kernel refuses it, and the app gets VK_ERROR_DEVICE_LOST from a command that is valid on its queue. The device also still reports multisample counts and the attachment format features that create such images. Fix: either route those copies through compute whenagx_compute_only()(or fail them with a clear error at record time), or stop reporting sample counts > 1 and the COLOR/DEPTH_STENCIL_ATTACHMENT format features on a compute-only device, so that a compressed MSAA image can't be created. VK_KHR_swapchain and present support are still offered too. That is legal without a graphics family, but anything that blits on present would hit the same refusal. The simplest fix is to drop the swapchain extension when compute-only. - include/drm-uapi/asahi_drm.h: bit 41 is defined here before linux#2610 has merged, and #567 claims bit 40 the same way. Please merge both after their kernel PRs, or note in the PR that the bit numbers are frozen there, so a renumber on the kernel side can't silently flip graphics off on some other device.
Evidence is good: queue flags and the 57 Skip-to-Pass compute-only dEQP-VK cases on J413 are a clear before/after. The GL half is honestly marked untested. A row exercising it (eglinfo/glxinfo under a kmsro or surfaceless client, showing the asahi screen skipped) would close it.
Assisted-by: LLM (Claude:Opus 5.5)
|
Selecting this by the kernel feature bit looks right to me, and the gallium and queue-family changes are consistent with each other. kmsro skips the screen, then zink also skips Borealis because the device no longer has a graphics queue. One gap in the Vulkan side:
Assisted-by: LLM (Claude:Opus 5.5) |
1e25fa3 to
9102326
Compare
|
Claude Opus 5.5 on @satchlj's behalf. Thanks to you both. New head 9102326 (rebased on aurora-wip afcc08b, which hasn't moved):
Tested: compile, and the asahi host tests (140/141; the one failure is the same Not tested: |
RyanTheTide
left a comment
There was a problem hiding this comment.
No blockers. Re-review of 9102326. Resolved: multisampled images are no longer compressed on a compute-only device, so hk_copy_requires_gfx() cannot be true there and MSAA copies and uploads take compute. KHR_swapchain and the main present extensions are dropped, and the merge order after linux#2610 is in the body.
- src/asahi/vulkan/hk_physical_device.c:2304-2320: three extensions that require VK_KHR_swapchain are still advertised on a compute-only device:
EXT_present_timing(:290, with featurespresentTiming,presentAtRelativeTimeandpresentAtAbsoluteTimeat :946-948),EXT_hdr_metadata(:262) andGOOGLE_display_timing(:331). Advertising an extension without its required extension breaks the dependency rules, and the CTSapi.infoextension checks will flag it. Fix: clear those three extensions and the three present-timing features in the same block. - Testing is as you list it: the MSAA
api.copy_and_blitcases on the compute-only queue and aneglinfo -Bfallback row are still to run. Please also reruninfo.txton the new head, which would catch point 1.
HW row: M2 (G14G), if it is booted on GPU firmware 27.2 with a linux#2610 kernel: dEQP-VK.api.copy_and_blit.*multisample* and dEQP-VK.api.info.* with --deqp-compute-only=enable, plus surfaceless eglinfo -B. Pass = no Fail/Crash, no render-submit EINVAL in the journal, and a non-asahi GL renderer.
Assisted-by: LLM (Claude:Opus 5.5)
|
Codex GPT-6.2 Sol on @satchlj's behalf. Thanks @RyanTheTide. In The incremental aarch64 Linux build compiled This head is untested on hardware. The Vulkan CTS info cases ( |
RyanTheTide
left a comment
There was a problem hiding this comment.
No blockers. Re-review of e25bb5d: point 1 from the last review is resolved. EXT_hdr_metadata, EXT_present_timing and GOOGLE_display_timing are now cleared with KHR_swapchain on a compute-only device (hk_physical_device.c:2315-2317), along with the three present-timing features (:2322-2324). I checked the rest of the advertised list at this head and found no other extension that requires VK_KHR_swapchain still on.
Still open, unchanged: the hardware rows (api.info.* on this head, the MSAA api.copy_and_blit cases on the compute-only queue, surfaceless eglinfo -B), and the merge order after linux#2610, which is still open. Same HW row as before: M2 (G14G) on GPU firmware 27.2 with a linux#2610 kernel. Pass = no Fail/Crash, no render-submit EINVAL in the journal, and a non-asahi GL renderer.
Assisted-by: LLM (Claude:Opus 5.5)
|
Blockers: 2.
Code otherwise checked at e25bb5d: the swapchain-dependent extension list is complete for what Borealis advertises, HW row: M2 (J413, G14G) on GPU firmware 27.2 with a linux#2610 kernel, at the rebased head: Assisted-by: LLM (Claude:Opus 5.5) |
e25bb5d to
055daf2
Compare
|
Claude Opus 5.5 on @satchlj's behalf. Trailer-only rewrite, Assisted-by: LLM (Anthropic:Claude Opus 5.5) |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Full §1–§6 pre-PR checklist review at 055daf22b02783a92a06420c04f62c6e20c52d9f.
Blockers
- Merge conflicts with
aurora-wip(DIRTY): the branch no longer applies cleanly against currentaurora-wip(acd6874dae55) in two files:include/drm-uapi/asahi_drm.h:454— conflicts withDRM_ASAHI_FEATURE_VDM_USC_INVALIDATE((1ULL) << 40, landed via #567). Rebase and placeDRM_ASAHI_FEATURE_COMPUTE_ONLY(bit 41) after bit 40.src/asahi/lib/agx_device.h:568— conflicts with the removal ofagx_native_graphics()(75b186e77).
- Kernel UAPI dependency still open:
aurora-silicon/linux#2610(which definesDRM_ASAHI_FEATURE_COMPUTE_ONLYas bit 41) is stillOPEN. As noted in the PR body, this PR cannot merge untillinux#2610lands so bit 41 is locked in the kernel UAPI. - §5 Evidence incomplete for commits 2 and 3:
- Only commit 1 (
1e25fa36) was exercised on hardware (vkcompute+ 195-case dEQP-VK subset on J413). Commits 2 (2e5aea9c, disabling MSAA compression inhk_can_compress()) and 3 (055daf22, disabling swapchain/present/timing/HDR extensions and features) are compile + host-test only. - Still needed on the rebased head on J413 (M2, G14G, GPU firmware 27.2 +
linux#2610):dEQP-VK.api.info.*(orinfo.txt) verifying extension/feature dependency checks pass with swapchain/present/timing/HDR extensions cleared.dEQP-VK.api.copy_and_blit.*multisample*with--deqp-compute-only=enable, confirming 0 Fail/Crash and 0 render-submitEINVALin the kernel journal.- Surfaceless
eglinfo -B(or a kmsro client) exercising the Galliumcaps->graphics = falsepath and confirming Asahi is skipped for a non-Asahi GL renderer. - A sanity regression check on a non-compute-only Mac (bit 41 unset) confirming no regressions.
- Only commit 1 (
Technical & Polish Findings
- WSI surface support remains advertised on compute-only devices (
src/asahi/vulkan/hk_physical_device.c:2488):hk_init_wsi(pdev)is still called unconditionally, andwsi_device_init()(src/vulkan/wsi/wsi_common.c:162-165) setswsi->queue_supports_blitfor any queue family withGRAPHICS | COMPUTE | TRANSFER. Because family 0 retainsCOMPUTE | TRANSFER,vkGetPhysicalDeviceSurfaceSupportKHR()will still reportVK_TRUEeven thoughVK_KHR_swapchainand all present extensions are disabled. Clearingpdev->wsi_device.queue_supports_blit = 0;afterhk_init_wsi(pdev)whenagx_compute_only(&pdev->dev)(keepingwsi_deviceinitialized sowsi_GetPhysicalDeviceSurfaceSupportKHRdoes not dereferenceNULL) will make surface-support queries reportVK_FALSEconsistently. - Comment / commit-message accuracy (
src/gallium/drivers/asahi/agx_pipe.c& commit4948c8c5): the inline comment still states"kmsro and the EGL/GBM loaders skip a screen without graphics"and commit 1 says"kmsro and EGL already skip". In Mesa, onlykmsro_drm_winsys.c:146andplatform_surfaceless.c:303checkcaps.graphics(GBM and Wayland/X11 EGL platforms do not). Please tighten both to say"kmsro and EGL surfaceless". - Future-proofing note for non-G14 chips (§1):
hk_can_compress()disabling compression forsamples > 1keeps G14 offhk_copy_requires_gfx()(and clears/non-MSAA copies already run on compute on G14). Note that if a future AGX3/M5/G18G kernel ever advertisesDRM_ASAHI_FEATURE_COMPUTE_ONLY,hk_xfer_copybuffertoimage2()(src/asahi/vulkan/hk_cmd_meta.c:4640,4704) andhk_xfer_copyimage2()(:4862) still unconditionally selectgfx = trueon those chips.
Checklist Summary (§1–§6)
- §1 No model gating: Pass — capability-gated via
DRM_ASAHI_FEATURE_COMPUTE_ONLY/agx_compute_only(). - §2 Production-ready: Pass (modulo WSI
queue_supports_blitconsistency above). - §3 Safety: Pass.
- §4 Clean-room & attribution: Pass —
055daf22cleaned all commit trailers; all 3 commits carry only human author/committer + humanSigned-off-by:. - §5 Evidence: Blocked — commits 2–3 untested on hardware; GL fallback and rebased-head CTS rows still open.
- §6 Naming: Pass — Borealis used throughout (
hk_*symbols tracked in #591).
Assisted-by: LLM (Gemini 4 Neon)
RyanTheTide
left a comment
There was a problem hiding this comment.
Independent source review at 055daf22b027. The queue and extension clamp follows the backend's capability bit. Compute-only still initializes common WSI, which derives surface support from compute/transfer queue flags. Please align the surface-support answer with the disabled present extensions, and verify a normal GBM login as well as surfaceless EGL, Vulkan compute and multisample copies. The kernel capability in linux#2610 and a current aurora-wip integration are prerequisites for that row.
|
I built
The GBM row used a GLES2 context on the shim render node. With the fallback, an FBO cleared to red read back RGBA Validated GBM changediff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c
index 755f3ca3fed..8c80160f212 100644
--- a/src/gbm/backends/dri/gbm_dri.c
+++ b/src/gbm/backends/dri/gbm_dri.c
@@ -245,6 +245,15 @@ static const __DRIextension *gbm_dri_screen_extensions[] = {
NULL,
};
+static void
+dri_screen_destroy(struct gbm_dri_device *dri)
+{
+ driDestroyScreen(dri->screen);
+ for (unsigned i = 0; dri->driver_configs[i]; i++)
+ free((struct dri_config *) dri->driver_configs[i]);
+ free(dri->driver_configs);
+}
+
static int
dri_screen_create_for_driver(struct gbm_dri_device *dri, char *driver_name, bool driver_name_is_inferred)
{
@@ -271,6 +280,11 @@ dri_screen_create_for_driver(struct gbm_dri_device *dri, char *driver_name, bool
if (dri->screen == NULL)
goto fail;
+ if (!dri->screen->base.screen->caps.graphics) {
+ dri_screen_destroy(dri);
+ goto fail;
+ }
+
dri->lookup_user_data = NULL;
return 0;
@@ -1182,15 +1196,11 @@ static void
dri_destroy(struct gbm_device *gbm)
{
struct gbm_dri_device *dri = gbm_dri_device(gbm);
- unsigned i;
if (dri->context)
driDestroyContext(dri->context);
- driDestroyScreen(dri->screen);
- for (i = 0; dri->driver_configs[i]; i++)
- free((struct dri_config *) dri->driver_configs[i]);
- free(dri->driver_configs);
+ dri_screen_destroy(dri);
free(dri->driver_name);
free(dri);A separate DRM-shim probe submitted a 128×128 RGBA8 four-sample image copy on both builds. Bit 41 clear produced one render command. Bit 41 set produced one compute command and zero render commands. All four submissions returned success. Image contents still need native hardware verification. The integration retains UAPI bits 39 and 40 and the current Gallium mipmap capability. The remaining hardware checks are a normal GBM login on the compute-only kernel, Vulkan compute and multisample copies. Linux #2610 supplies bit 41. Assisted-by: LLM (Codex) |
|
The direct-GBM fix can live in the shared DRI screen constructor. EGL, GLX and GBM all create graphics screens through this constructor. Rejecting a Gallium screen with The attached patch also releases the secondary EGL display screen if render-screen creation fails. It applies to both
The current-tip build includes the WSI queue-mask correction. In the compute-only arm, all 10 previously advertised extensions with a direct Vulkan registry dependency on swapchain were removed. The other 141 device extensions stayed advertised. G13 and G17P shim controls also retained the Apple renderer on both EGL platforms. Apply-ready shared DRI patchdiff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index d25a3724e14..745041abcae 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -820,9 +820,15 @@ dri2_create_screen(_EGLDisplay *disp)
* will not crash.
*/
if (strcmp(dri2_dpy->driver_name, driver_name_display_gpu) == 0) {
+ const struct dri_config **display_configs = NULL;
dri2_dpy->dri_screen_display_gpu = driCreateNewScreen3(
0, dri2_dpy->fd_display_gpu, dri2_dpy->loader_extensions,
- type, &dri2_dpy->driver_configs, false, dri2_dpy->multibuffers_available, disp);
+ type, &display_configs, false, dri2_dpy->multibuffers_available, disp);
+ if (display_configs) {
+ for (unsigned i = 0; display_configs[i]; i++)
+ free((struct dri_config *)display_configs[i]);
+ free(display_configs);
+ }
}
free(driver_name_display_gpu);
}
@@ -834,6 +840,8 @@ dri2_create_screen(_EGLDisplay *disp)
&dri2_dpy->driver_configs, false, dri2_dpy->multibuffers_available, disp);
if (dri2_dpy->dri_screen_render_gpu == NULL) {
+ driDestroyScreen(dri2_dpy->dri_screen_display_gpu);
+ dri2_dpy->dri_screen_display_gpu = NULL;
_eglLog(_EGL_WARNING, "egl: failed to create dri2 screen");
return EGL_FALSE;
}
diff --git a/src/egl/drivers/dri2/platform_surfaceless.c b/src/egl/drivers/dri2/platform_surfaceless.c
index 8fbb9a60ed4..af0befcabc8 100644
--- a/src/egl/drivers/dri2/platform_surfaceless.c
+++ b/src/egl/drivers/dri2/platform_surfaceless.c
@@ -300,23 +300,6 @@ surfaceless_probe_device(_EGLDisplay *disp, bool swrast, bool zink)
goto retry;
}
- if (!dri2_dpy->dri_screen_render_gpu->base.screen->caps.graphics) {
-
- _eglLog(_EGL_DEBUG, "DRI2: Driver %s doesn't support graphics, skipping.", dri2_dpy->driver_name);
-
- if (dri2_dpy->dri_screen_display_gpu != dri2_dpy->dri_screen_render_gpu) {
- driDestroyScreen(dri2_dpy->dri_screen_display_gpu);
- dri2_dpy->dri_screen_display_gpu = NULL;
- }
-
- driDestroyScreen(dri2_dpy->dri_screen_render_gpu);
- dri2_dpy->dri_screen_render_gpu = NULL;
-
- dri2_dpy->own_dri_screen = false;
-
- goto retry;
- }
-
break;
}
diff --git a/src/gallium/frontends/dri/dri_screen.c b/src/gallium/frontends/dri/dri_screen.c
index 6087422c7f9..4d2c6623e84 100644
--- a/src/gallium/frontends/dri/dri_screen.c
+++ b/src/gallium/frontends/dri/dri_screen.c
@@ -624,6 +624,10 @@ dri_init_screen(struct dri_screen *screen,
bool has_multibuffer)
{
screen->base.screen = pscreen;
+ /* EGL, GLX and GBM require a graphics-capable Gallium screen. */
+ if (!pscreen->caps.graphics)
+ return NULL;
+
screen->base.get_egl_image = dri_get_egl_image;
screen->base.get_param = dri_get_param;
screen->base.set_background_context = dri_set_background_context;The host rows cover renderer selection and software readback. A native compositor login, mixed display/render nodes and image contents from compute-only MSAA copies still need hardware coverage together with the kernel capability. |
A kernel that refuses render commands on a device (the G14 runtime on GPU firmware 27.2) reports DRM_ASAHI_FEATURE_COMPUTE_ONLY. Without a check, the device is taken for graphics: on Apple M2 with that runtime, the greeter's renders on the render node failed with EINVAL and Hyprland and sddm-greeter-qt aborted. On such a device: - the Gallium screen reports caps.graphics = false. kmsro and EGL surfaceless already skip a screen without graphics, as for etnaviv's compute-only cores, and fall back to another driver, in the end software. - Borealis's queue family drops VK_QUEUE_GRAPHICS_BIT, so Vulkan graphics clients, zink among them, pass over the device, while compute keeps its queue. Kernels without the bit are unaffected. Signed-off-by: Satya Benson <satya@benson.earth>
…aphics path On a device that reports DRM_ASAHI_FEATURE_COMPUTE_ONLY, the kernel refuses render commands. Two Borealis paths still exposed or recorded them: - A copy or buffer-to-image upload into a multisampled, compressed image takes the graphics meta path (hk_copy_requires_gfx()). Such a copy is valid on the compute and transfer family the device now exposes, so the app would get VK_ERROR_DEVICE_LOST. Multisampled images are no longer compressed on a compute-only device, so these copies run on compute, as copies into uncompressed images already do. - Presenting can blit through the same path. The swapchain and present extensions (KHR_swapchain and its maintenance and mutable-format extensions, EXT_swapchain_maintenance1, incremental present, present id/wait, EXT_hdr_metadata, EXT_present_timing, and GOOGLE_display_timing) and their features are not offered on such a device, and wsi_device.queue_supports_blit is cleared after hk_init_wsi() so vkGetPhysicalDeviceSurfaceSupportKHR() reports VK_FALSE consistently. No other device reports the bit, so nothing else changes. Reported by Ryan Murray in review. Signed-off-by: Satya Benson <satya@benson.earth>
EGL, GLX and GBM all create graphics screens through dri_init_screen(). Previously, only kmsro and EGL surfaceless checked caps.graphics, so GBM and the other EGL/GLX loaders accepted a compute-only Gallium screen whose kernel refuses render commands. Reject a Gallium screen with caps.graphics == false directly in dri_init_screen(), after assigning screen->base.screen so dri_destroy_screen() releases pscreen cleanly on failure. Callers then take their existing error or fallback paths (for example Zink or software rendering), while Rusticl continues to open compute screens through the pipe loader directly. Drop the now-duplicate caps.graphics check in EGL's surfaceless platform, and in dri2_create_screen() avoid leaking the display GPU's temporary driver_configs or leaving dri_screen_display_gpu alive when render-screen creation fails. Suggested by Ryan Murray in review. Signed-off-by: Satya Benson <satya@benson.earth>
055daf2 to
99af00b
Compare
|
Rebased onto Changes at
|
| Profile / bit 41 | Vulkan qf0 flags |
Swapchain/present exts | Headless surface support | 4x MSAA 128×128 copy submit | Surfaceless EGL | Direct-GBM EGL |
|---|---|---|---|---|---|---|
| G14G, clear | 0xf |
11 advertised (161 total) |
VK_TRUE |
1 render / 0 compute (VK_SUCCESS) |
Apple M2 (G14G A0) |
Apple M2 (G14G A0) |
| G14G, set | 0xe |
0 advertised (150 total) |
VK_FALSE |
0 render / 1 compute (VK_SUCCESS) |
softpipe |
softpipe (FBO clear readback RGBA 255,0,0,255, GL_NO_ERROR) |
| G17P, clear | 0xf |
11 advertised (169 total) |
VK_TRUE |
1 render / 0 compute (VK_SUCCESS) |
Apple A18 Pro (G17P A0) |
Apple A18 Pro (G17P A0) |
| G13G, clear | 0xf |
11 advertised (161 total) |
VK_TRUE |
1 render / 0 compute (VK_SUCCESS) |
Apple M1 (G13G A0) |
Apple M1 (G13G A0) |
- G14G DRM-shim (bit 41 set)
dEQP-VK.info.*:20/20supported PASS (0Fail,3NotSupported, includingdevice_extension_dependencies). - Live Apple M5 Max (
G17C B1, bit 41 unset, Linux 7.3,MESA_SHADER_CACHE_DISABLE=1,0kernel GPU faults):dEQP-VK.info.*:22/22supported PASS (1NotSupported)dEQP-VK.compute.pipeline.basic.*:80/80supported PASS (1NotSupported)dEQP-VK.api.copy_and_blit.core.resolve_image.whole_copy_before_resolving.*:6/6supported PASS (6NotSupported)dEQP-VK.api.copy_and_blit.copy_commands2.resolve_image.whole_copy_before_resolving.*:3/3supported PASS (3NotSupported)dEQP-GLES3.info.renderer:1/1PASS (Apple M5 Max (G17C B1))dEQP-GLES3.functional.fbo.msaa.4_samples.*:22/22PASS
Remaining before merge
aurora-silicon/linux#2610(locking bit 41 in kernel UAPI) is still open; this PR remains gated on#2610.- Native Apple M2 (G14G, GPU firmware 27.2 +
linux#2610) hardware verification for a normal GBM compositor login, mixed display/render nodes, and pixel-level MSAA copy image contents on the compute-only kernel remains untested here.
|
99af00b J413 (M2 Air, G14G B0, 13.5 fw / fleet88, COMPUTE_ONLY unset) PASS: gpubench-gl render.light 280.3 us ok, gpubench-vk compute.light 122.0 us ok + render.light 226.6 us ok, dEQP-VK.api.smoke.* 8/8 pass; MESA_SHADER_CACHE_DISABLE=1, 0 GPU faults, 0 AVC, 0 failed units, Enforcing. |
|
Updated the PR description at
Ready for re-review ( |
|
Re-check of the items in Dj's 11-22 review, at 99af00b (merges cleanly onto aurora-wip e1b5658):
Still open: item 3, a row at this head on a G14G with GPU firmware 27.2 and linux#2610, so bit 41 is set. It should cover |
…ompute-only Signed-off-by: Satya Benson <satya@benson.earth> # Conflicts: # src/asahi/lib/agx_device.h
|
Merged |
|
Exact-head
Updated the PR description |
…ompute-only Resolve conflict in include/drm-uapi/asahi_drm.h by keeping both DRM_ASAHI_FEATURE_COMPUTE_ONLY (bit 41) and DRM_ASAHI_FEATURE_TILE_BUFFER_48K (bit 46). Signed-off-by: Satya Benson <satya@benson.earth>
|
Resolved the Exact-head
Updated the PR description |
There was a problem hiding this comment.
Verdict: MERGE at 08aaa3e2
Blockers: none (ready for multi-family lab regression overlay and merge).
Checked:
include/drm-uapi/asahi_drm.h&src/asahi/lib/agx_device.h:08aaa3e2cleanly mergesaurora-wip(a0164c9101c), preserving bothDRM_ASAHI_FEATURE_COMPUTE_ONLY(bit 41) andDRM_ASAHI_FEATURE_TILE_BUFFER_48K(bit 46), keyed strictly on the kernel capability bit (agx_compute_only()).src/asahi/vulkan/hk_physical_device.c&hk_image.c: disables swapchain/present extensions and features, clearspdev->wsi_device.queue_supports_blit = 0so surface-support queries reportVK_FALSEconsistently (resolving prior WSI review question), and disables multisampled compression on compute-only devices.src/gallium/drivers/asahi/agx_pipe.c,src/gallium/frontends/dri/dri_screen.c,src/egl/drivers/dri2/egl_dri2.c,platform_surfaceless.c: rejects!pscreen->caps.graphicscentrally indri_init_screen(), avoids leakingdisplay_configs, and cleanly callsdriDestroyScreen()(verified NULL-safe indri_util.c:196) if render screen creation fails.- Exact-head J775c verification PASS (
meson test+ Borealis CTS);MERGEABLEonaurora-wip; no Apple material, tool attribution, or private serials.
Evidence
- Head:
08aaa3e2e0ed(base: aurora-wip,mergeable: MERGEABLE,+87/-18across 8 files).
|
@DjDeveloperr could you re-review at |
|
Claude Opus 5.5 on @satchlj's behalf. G14G row at Kernel:
Mesa: packaged at
0 GPU faults and 0 kernel errors from The PR's MSAA-copy change could not be exercised here. With bit 41 the device offers no multisample counts, so every MSAA copy and resolve case is NotSupported before it copies anything. That is consistent with a compute-only device, and there are no failures. |
RyanTheTide
left a comment
There was a problem hiding this comment.
Approved at 08aaa3e2e0ed. I reviewed all eight changed files and the clean current aurora-wip integration b8fe64c49d93. The kernel UAPI dependency landed in aurora-silicon/linux#2610. The capability bit gates graphics queues, present extensions and surface-support queries. The shared DRI screen constructor rejects non-graphics devices, and the EGL teardown releases the temporary display-screen configurations and screen on failure. The relevant commits are d94c07ae334a, 756a1400d6d5 and 99af00b0d59e.
The exact J413 compute-only row passed 6,880 api.info cases and reported 1,300 NotSupported, with software EGL fallback and zero GPU faults. The kernel intentionally restored bit 41 for this one-shot test. Multisample cases reported NotSupported under the device's available sample counts. On the graphics-capable J316s current-base comparison, both drivers retained a graphics queue and VK_KHR_swapchain, matched all 96 sampled Vulkan results, and passed all layered readbacks. Both Gallium arms passed 49/49 GLES cases and initialized Mesa EGL 1.5 through GBM with their own loaded libgallium. Saved boot and GPU health were unchanged. The assertions-enabled integrated host suite passed 353/353.
|
Merged as |
What: When the kernel reports
DRM_ASAHI_FEATURE_COMPUTE_ONLY(bit 41, merged in aurora-silicon/linux#2610 atd7706b72c531), keep graphics APIs and render-only paths off that device while keeping Vulkan compute working:agx_pipe.c): reportcaps->graphics = falsewhenagx_compute_only()is set.dri_screen.c,egl_dri2.c,platform_surfaceless.c): reject!pscreen->caps.graphicsdirectly indri_init_screen()(after assigningscreen->base.screensodri_destroy_screen()freespscreencleanly) so EGL, GLX, and GBM all fall back cleanly (e.g., to Zink or software) while Rusticl keeps opening compute screens through the pipe loader directly; remove the duplicate surfaceless check and clean updisplay_configs/dri_screen_display_gpuon render-screen creation failure.hk_physical_device.c,hk_image.c): dropVK_QUEUE_GRAPHICS_BITfrom queue family 0; disable all 13 swapchain/present/timing/HDR extensions and their 8 features; clearpdev->wsi_device.queue_supports_blit = 0afterhk_init_wsi(pdev)sovkGetPhysicalDeviceSurfaceSupportKHR()reportsVK_FALSEconsistently across all WSI platforms; disable compression on multisampled images (samples > 1) so MSAA copies and uploads stay on the compute path instead of takinghk_copy_requires_gfx().On kernels that do not set bit 41, all changes are no-ops (
agx_compute_only()returnsfalse).Tested:
08aaa3e2e0ed(mergedaurora-wipa0164c9101c)J775c,G17C B1,COMPUTE_ONLYunset)08aaa3e2e0ed-Dbuildtype=release -Db_ndebug=false -Dbuild-tests=true -Dtools=asahi,drm-shim+meson test --suite asahi --suite poly; Borealis overlaydeqp-vk(MESA_SHADER_CACHE_DISABLE=1:api.smoke.*8/8,info.*22/23,compute.pipeline.basic.*80/81,resolve_image.whole_copy_before_resolving.*6/12);EGL_PLATFORM=surfaceless eglinfo -B5pre-existingaurora-wipa0164c9101cnir_validatemuladd_supportfailures atagx_compile.c:20037, unrelated to this PR); 116/124 VK CTS PASS (8NotSupported,0fail); OpenGL 4.6 Core/Compat clean;0GPU faultsJ413,G14G B0,COMPUTE_ONLYunset)99af00b0d59egpubench-gl render.light,gpubench-vk compute.light+render.light,dEQP-VK.api.smoke.*(MESA_SHADER_CACHE_DISABLE=1)8/8smoke,0GPU faults,0AVC,0failed units, Enforcing)COMPUTE_ONLYbit 41 forced set viaLD_PRELOADwrapper)99af00b0d59eeglinfo -B(surfaceless,gbm), directgbm_create_device+gbm_bo_create(llvmpipefallback),glxinfo, Borealis VK queue/extension/surface-support probeasahi_drirejects atdri_init_screen(), GBM/EGL/GLX fall back cleanly, Borealis exposes compute-only queue withoutVK_QUEUE_GRAPHICS_BIT, 0 swapchain/HDR extensions,vkGetPhysicalDeviceSurfaceSupportKHR == VK_FALSEJ413,G14G, GPU firmware 27.2, bit 41 set by the kernel; see note)08aaa3e2e0eddEQP-VK.api.info.*;dEQP-VK.api.copy_and_blit.*multisample/msaa/resolve with--deqp-compute-only=enable;eglinfo -B(GBM, surfaceless)api.info6880 pass / 0 fail;copy_and_blitMSAA/resolve 0 fail (all NotSupported: the compute-only device exposes no MSAA sample counts); EGL falls back to softpipe; 0 GPU faults (row)Risk: two-way · AGX1/AGX2/AGX3 (gated on
agx_compute_only()bit 41; strict no-op when bit 41 is unset; reverting restores pre-bit-41 behavior).Note on bit 41 today: linux
cb9cf343bc5d(G14 paired tiler/fragment render on firmware 27.2) made G14G stop reporting itself compute-only, so no current linuxmainkernel sets bit 41. The bit is still defined in the UAPI. This PR keeps Mesa correct on any kernel or firmware that does report it. The J413 row above re-applied bit 41 with a one-line test patch to the kernel.