Skip to content

drm/asahi: g17: M5: report COMPUTE_NO_QUERY_ACCESS (timestamp queries 137 -> 0.03 us at depth 16) - #1422

Merged
DjDeveloperr merged 1 commit into
funkzy/t6050-gpu-on-integrationfrom
dj/g17-m5-no-query-access
Nov 10, 2026
Merged

DjDeveloperr merged 1 commit into
funkzy/t6050-gpu-on-integrationfrom
dj/g17-m5-no-query-access

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

What

The M5 command set accepts DRM_ASAHI_COMPUTE_NO_QUERY_ACCESS but doesn't report DRM_ASAHI_FEATURE_COMPUTE_NO_QUERY_ACCESS, so Mesa never sets the flag. As a result, every compute command waits on the host until its predecessors' timestamps are published. With a timestamp query in flight, a depth-16 compute stream runs at depth-1 latency: +137 µs per query, where macOS takes 0.12 µs.

This PR reports the feature. Mesa (honeykrisp, asahi_fill_cdm_command) already sets the flag on commands that neither copy nor reset queries. Those that do still wait for the published timestamps. There's no Mesa change.

The comment this replaces said that reporting the feature makes top-of-pipe timestamps read out of order. That doesn't reproduce: the whole timestamp group passes with the feature reported, including sequential_timestamps, consistent_results and check_timestamp_compute_and_graphics.

Measured

J714s (M5 Pro). Module built from the same change on the integration tree. Mesa is mesa-aurora with #32 and #33. One boot per kernel, measured before dEQP.

gpubench timestamp row, µs per query over the no-query row before after macOS
depth 16 136.97 0.025 0.12
depth 1 0 0.38

dEQP, all lists with 0 Fail and no GPU recoveries:

  • dEQP-VK.pipeline.monolithic.timestamp.*: 262/262
  • dEQP-VK.query_pool.*: 912 Pass, 2 NotSupported
  • occlusion queries: 440
  • multi-queue (mq-tl 214, mq-v1 427, mq-all 290)
  • synchronization2 (600) and synchronization (693)
  • s0 (109), compute (223), glsl (1209), draw (906) and texture (660)

gpubench core-a,feat: 41/41 ok.

🤖 Generated with Claude Code

…ies stop costing a host round trip per command

Every M5 compute command waited on the host for its predecessors'
timestamp publication, because the kernel accepted
DRM_ASAHI_COMPUTE_NO_QUERY_ACCESS but did not report the feature, so
Mesa never set the flag. With a timestamp query in flight, a depth-16
stream of compute commands ran at depth-1 latency.

Report the feature in the M5 command set. Mesa then marks the commands
that neither copy nor reset queries, and only those that do still wait
for the published timestamps.

J714s (M5 Pro), gpubench timestamp row, us per query over the no-query
row: depth 16 136.97 -> 0.025, depth 1 0 -> 0.38 (macOS: 0.12).
dEQP-VK.pipeline.monolithic.timestamp.* 262/262 and
dEQP-VK.query_pool.* 912/912 pass, as do the occlusion, multi-queue,
synchronization, compute, glsl, draw and texture lists, with no GPU
recoveries.

Signed-off-by: Diljit Singh <[email protected]>
@DjDeveloperr
DjDeveloperr force-pushed the dj/g17-m5-no-query-access branch from 2178d6c to fb68a2b Compare November 10, 2026 09:11
@DjDeveloperr
DjDeveloperr changed the base branch from funkzy/t6050-gpu-on-integration to j716c/v27-swap-timebase November 10, 2026 09:11
@DjDeveloperr
DjDeveloperr changed the base branch from j716c/v27-swap-timebase to funkzy/t6050-gpu-on-integration November 10, 2026 10:21
@DjDeveloperr
DjDeveloperr merged commit cebabc0 into funkzy/t6050-gpu-on-integration Nov 10, 2026
@RyanTheTide
RyanTheTide deleted the dj/g17-m5-no-query-access branch November 16, 2026 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant