You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
drm/asahi g17: multiview query timestamps wrong on main (regression since 11-16, J700) #3243
What happens: on a J700 (G17P), Vulkan multiview query/timestamp CTS cases now fail with Fail (timestamp). They pass on the 7.3.0-41 kernel from 11-16.
Cases:
dEQP-VK.multiview.{renderpass2,dynamic_rendering}.{queries_and_timestamps,non_precise_queries_and_timestamps,non_precise_queries_with_availability_and_timestamps}.{get_query_pool_results,cmd_copy_query_pool_results}.*, plus readback_explicit_clear.no_queries.*. 48 cases in all.
First failure: dEQP-VK.multiview.dynamic_rendering.non_precise_queries_and_timestamps.get_query_pool_results.1_2_4_8.
Measured on the J700, same session, system Mesa 26.3.0-30, cases run one at a time:
7.3.0-41 (11-16): 48/48 Pass.
main 255761f1d55f (+ unrelated security PRs): 42 Fail, 6 Pass. All failures are "Fail (timestamp)".
main 7be48f37 + an unrelated PR: the same failures.
With hard faults enabled: 0 MMU faults, 0 recoveries, 0 WARN/BUG. Nothing is refused; the timestamp values themselves are wrong.
Suspects (G17 timestamp-path merges between 11-16 and now): #2531 (timestamp window), #3139 (publication overlap), #2552 (cross-engine overlap), and c139054181d2.
Culprit: the #2552 merge, f0c5cb1a80eb ("drm/asahi: overlap cross-engine commands with timestamped producers on G17", merged 11-24). It was bisected on the J700 (MacBook Neo, G17P) with one-shot kernels built from the Neo config.
Every boot ran the same 48 cases, one at a time: dEQP-VK.multiview.{renderpass2,dynamic_rendering}.*queries*timestamps*, the matching cmd_copy_query_pool_results cases and readback_explicit_clear.no_queries. The Mesa was the same throughout (stock 26.3.0-30), with soft faults. Every failure is Fail (timestamp).
Likely fix: on G17P (host_producer_waits() false), the new overlap lets a consumer run on the producer's scheduled fence before that producer's host-written timestamps are published. The multiview query/timestamp readback apparently isn't treated as "accessing pending query words". Keeping the host completion wait whenever the consumer reads or writes timestamps or query results, including the multiview per-view query slots, or turning the overlap off on G17P until that's handled, should restore the 48.
Every boot cleared the PMU boot-error count (00). The Neo is back on the stock default, and stock.sh matches the start.
The A/B in #3246 reproduced the same timestamp failures on both J714s and J700, and the change was withdrawn. The multiview regression remains open for a root-cause fix and a rerun of both GPU rows.
I checked the exact-head J700 row and J714s row on #3443. The J700 list covers synchronization, command buffers, render-pass suballocation and occlusion-query copies. The J714s list includes multiview.queries.* and pipeline.monolithic.timestamp.basic_graphics_tests.*. The failing multiview.dynamic_rendering and multiview.renderpass2 query-and-timestamp groups listed here still need a direct run.
For the next GPU batch, please keep the existing J700 and J714s slots and record the exact case lists and result on both boards, with the kernel and Mesa revisions. Include non_precise_queries_and_timestamps.get_query_pool_results.1_2_4_8 and keep the copy-query and explicit-clear controls from the original report. #3246's failed A/B and #2552's first-parent bisect remain the reference points.
Code audit of origin/main (9a89b412ca50c), the bisected #2552 merge (f0c5cb1a80eb), and Borealis/VK-GL-CTS traces the root cause to a pre-mesa#578 Borealis bug on in-pass timestamp copies rather than a bug in g17/queue/mod.rs:
Root cause
What the CTS test records:vktMultiViewRenderTests.cpp:3300-3320 issues two vkCmdWriteTimestamp(VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, ...) calls inside the same multiview render pass — first to timestampStartQueryPool, then after drawing to timestampEndQueryPool — and checks m_timestampEndValues[ndx] > 0 && m_timestampEndValues[ndx] >= m_timestampStartValues[ndx] (:3086).
Pre-mesa#578 Borealis mis-flagged the copy as NO_QUERY_ACCESS: Both the J714s system Mesa (vk-aac82bea8e, 2026-11-14) tested on #3246 and the J700 stock Mesa (26.3.0-30) predate aurora-silicon/mesa#578 (f424007470e9, merged 2026-11-21). In src/asahi/vulkan/hk_sync.c:1353-1356 at aac82bea8e, the second in-pass timestamp emits libagx_copy_timestamp(..., AGX_BARRIER_ALL | AGX_POSTGFX, req.addr, gfx->timestamp.end.addr) into post_gfx without setting cs->query_access = true. asahi_fill_cdm_command() (hk_queue.c:154) then checks !cs->query_access and sets DRM_ASAHI_COMPUTE_NO_QUERY_ACCESS on a compute command that reads gfx->timestamp.end.addr (timestampStartQueryPool[i]), which is host-published when the render retires.
Why #2552 exposed it and #3246 did not fix it:
Before #2552 (cb7ea62102a8), cross-engine consumers waited on fences.ready, which was fences.completed for timestamped renders, so the kernel ignored DRM_ASAHI_COMPUTE_NO_QUERY_ACCESS cross-engine and masked the missing flag in Borealis.
#2552 (f0c5cb1a80eb) honored DRM_ASAHI_COMPUTE_NO_QUERY_ACCESS cross-engine, letting libagx_copy_timestamp run in firmware before the render published timestampStartQueryPool[i] on the host. It copied LIBAGX_QUERY_UNAVAILABLE (UINT64_MAX) into timestampEndQueryPool[i]. Because vktMultiViewRenderTests.cpp:3397 calls getQueryPoolResults without VK_CHECK, Borealis hit the idle-unavailable fallback (0), failing m_timestampEndValues[ndx] > 0 with Fail (timestamp). (In dEQP-VK.pipeline.*.timestamp.*, waiting on the copied LIBAGX_QUERY_UNAVAILABLE hit the 2 s timeout / VK_ERROR_DEVICE_LOST seen in #3246.)
#3246 only added writes_timestamps (has_outputs) to cross_engine_wait_completed(); the post_gfxlibagx_copy_timestamp command has has_outputs == false and (in pre-#578 Borealis) query_access == false, so it still overlapped.
On J714s, cmd_copy_query_pool_results passed 48/48 because vktMultiViewRenderTests.cpp:3339-3385 copies only occlusionQueryPool into queryBuffer and memcpys that buffer into both timestampStartQueryResultsBuffer and timestampEndQueryResultsBuffer.
Current status
Kernel (origin/main9a89b412ca50c):EnqueueOrdering::build() in drivers/gpu/drm/asahi/g17/queue/mod.rs already host-waits any compute command with query_access == true (no DRM_ASAHI_COMPUTE_NO_QUERY_ACCESS) behind pending host-timestamp writers. No kernel change or #2552 revert is needed.
Borealis: Fixed in aurora-silicon/mesa#578 (f424007470e9, tracking query ranges on timestamp copies so overlapping copies omit DRM_ASAHI_COMPUTE_NO_QUERY_ACCESS), further covered by aurora-silicon/mesa#918 (aa14512c8f72, verified 1,094/1,094 pass on dEQP-VK.pipeline.*.timestamp.* + dEQP-VK.multiview.*timestamp* on J714s), aurora-silicon/mesa#1368 (23a93d988ef3), and aurora-silicon/mesa#1561.
Next step: Re-run the 48 J700 and 112 J714s multiview query/timestamp cases on current main paired with Borealis >= f424007470e9 (current aurora-wip) to confirm and close.
Activity
DjDeveloperr commentedon Nov 26, 2026
Culprit: the #2552 merge,
f0c5cb1a80eb("drm/asahi: overlap cross-engine commands with timestamped producers on G17", merged 11-24). It was bisected on the J700 (MacBook Neo, G17P) with one-shot kernels built from the Neo config.Every boot ran the same 48 cases, one at a time:
dEQP-VK.multiview.{renderpass2,dynamic_rendering}.*queries*timestamps*, the matchingcmd_copy_query_pool_resultscases andreadback_explicit_clear.no_queries. The Mesa was the same throughout (stock 26.3.0-30), with soft faults. Every failure isFail (timestamp).255761f+ other PRs, without #3225255761fwith #2531 revertedcb7ea62102a8(11-24), the first parent of the #2552 mergef0c5cb1a80eb, the #2552 mergefault_control 0x0) of the drm/asahi: g17: map validated command and queue records firmware-only #3225 tree also logged 0 MMU faults, so these are wrong timestamp values, not refused accesses. drm/asahi: keep timestamp buffers out of the shared firmware range, charge binds to their client, and bound per-file window share #2531, drm/asahi: g17: avoid publication contagion and host drains on timestamp overlap #3139,c139054, drm/asahi: g17: map validated command and queue records firmware-only #3225 and drm/asahi: g17: bound submit syncs, install repeated timeline outputs once, return closed queues' identities at close #3200 are cleared: ts3 → ts4 is one first-parent step.host_producer_waits()false), the new overlap lets a consumer run on the producer'sscheduledfence before that producer's host-written timestamps are published. The multiview query/timestamp readback apparently isn't treated as "accessing pending query words". Keeping the host completion wait whenever the consumer reads or writes timestamps or query results, including the multiview per-view query slots, or turning the overlap off on G17P until that's handled, should restore the 48.stock.shmatches the start.RyanTheTide commentedon Nov 27, 2026
#3246 is the repair for timestamp publication ordering. Keep this linked through the multiview timestamp suite and a concurrent submit row on G17P.
RyanTheTide commentedon Nov 29, 2026
The A/B in #3246 reproduced the same timestamp failures on both J714s and J700, and the change was withdrawn. The multiview regression remains open for a root-cause fix and a rerun of both GPU rows.
RyanTheTide commentedon Nov 30, 2026
I checked the exact-head J700 row and J714s row on #3443. The J700 list covers synchronization, command buffers, render-pass suballocation and occlusion-query copies. The J714s list includes
multiview.queries.*andpipeline.monolithic.timestamp.basic_graphics_tests.*. The failingmultiview.dynamic_renderingandmultiview.renderpass2query-and-timestamp groups listed here still need a direct run.For the next GPU batch, please keep the existing J700 and J714s slots and record the exact case lists and result on both boards, with the kernel and Mesa revisions. Include
non_precise_queries_and_timestamps.get_query_pool_results.1_2_4_8and keep the copy-query and explicit-clear controls from the original report. #3246's failed A/B and #2552's first-parent bisect remain the reference points.RyanTheTide commentedon Dec 5, 2026
Code audit of
origin/main(9a89b412ca50c), the bisected#2552merge (f0c5cb1a80eb), and Borealis/VK-GL-CTS traces the root cause to a pre-mesa#578Borealis bug on in-pass timestamp copies rather than a bug ing17/queue/mod.rs:Root cause
vktMultiViewRenderTests.cpp:3300-3320issues twovkCmdWriteTimestamp(VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, ...)calls inside the same multiview render pass — first totimestampStartQueryPool, then after drawing totimestampEndQueryPool— and checksm_timestampEndValues[ndx] > 0 && m_timestampEndValues[ndx] >= m_timestampStartValues[ndx](:3086).mesa#578Borealis mis-flagged the copy asNO_QUERY_ACCESS: Both the J714s system Mesa (vk-aac82bea8e, 2026-11-14) tested on#3246and the J700 stock Mesa (26.3.0-30) predateaurora-silicon/mesa#578(f424007470e9, merged 2026-11-21). Insrc/asahi/vulkan/hk_sync.c:1353-1356ataac82bea8e, the second in-pass timestamp emitslibagx_copy_timestamp(..., AGX_BARRIER_ALL | AGX_POSTGFX, req.addr, gfx->timestamp.end.addr)intopost_gfxwithout settingcs->query_access = true.asahi_fill_cdm_command()(hk_queue.c:154) then checks!cs->query_accessand setsDRM_ASAHI_COMPUTE_NO_QUERY_ACCESSon a compute command that readsgfx->timestamp.end.addr(timestampStartQueryPool[i]), which is host-published when the render retires.#2552exposed it and#3246did not fix it:#2552(cb7ea62102a8), cross-engine consumers waited onfences.ready, which wasfences.completedfor timestamped renders, so the kernel ignoredDRM_ASAHI_COMPUTE_NO_QUERY_ACCESScross-engine and masked the missing flag in Borealis.#2552(f0c5cb1a80eb) honoredDRM_ASAHI_COMPUTE_NO_QUERY_ACCESScross-engine, lettinglibagx_copy_timestamprun in firmware before the render publishedtimestampStartQueryPool[i]on the host. It copiedLIBAGX_QUERY_UNAVAILABLE(UINT64_MAX) intotimestampEndQueryPool[i]. BecausevktMultiViewRenderTests.cpp:3397callsgetQueryPoolResultswithoutVK_CHECK, Borealis hit the idle-unavailable fallback (0), failingm_timestampEndValues[ndx] > 0withFail (timestamp). (IndEQP-VK.pipeline.*.timestamp.*, waiting on the copiedLIBAGX_QUERY_UNAVAILABLEhit the 2 s timeout /VK_ERROR_DEVICE_LOSTseen in#3246.)#3246only addedwrites_timestamps(has_outputs) tocross_engine_wait_completed(); thepost_gfxlibagx_copy_timestampcommand hashas_outputs == falseand (in pre-#578Borealis)query_access == false, so it still overlapped.cmd_copy_query_pool_resultspassed 48/48 becausevktMultiViewRenderTests.cpp:3339-3385copies onlyocclusionQueryPoolintoqueryBufferandmemcpys that buffer into bothtimestampStartQueryResultsBufferandtimestampEndQueryResultsBuffer.Current status
origin/main9a89b412ca50c):EnqueueOrdering::build()indrivers/gpu/drm/asahi/g17/queue/mod.rsalready host-waits any compute command withquery_access == true(noDRM_ASAHI_COMPUTE_NO_QUERY_ACCESS) behind pending host-timestamp writers. No kernel change or#2552revert is needed.aurora-silicon/mesa#578(f424007470e9, tracking query ranges on timestamp copies so overlapping copies omitDRM_ASAHI_COMPUTE_NO_QUERY_ACCESS), further covered byaurora-silicon/mesa#918(aa14512c8f72, verified 1,094/1,094 pass ondEQP-VK.pipeline.*.timestamp.*+dEQP-VK.multiview.*timestamp*on J714s),aurora-silicon/mesa#1368(23a93d988ef3), andaurora-silicon/mesa#1561.mainpaired with Borealis >=f424007470e9(currentaurora-wip) to confirm and close.