Skip to content

drm/asahi: reserve the M5 UAPI feature bits, command types and bind flag - #273

Merged
chriskearney merged 1 commit into
integration/aurorafrom
neo/asahi-uapi-reserve-m5-20261029
Oct 30, 2026
Merged

chriskearney merged 1 commit into
integration/aurorafrom
neo/asahi-uapi-reserve-m5-20261029

Conversation

@DjDeveloperr

Copy link
Copy Markdown
Collaborator

Requested by maralcbr in his review of omacom/mesa#19.

The Aurora Mesa that #19 syncs defines these values for the M5 (G17G/G17S) runtime, and this header defines none of them:

  • feature bits 17–24, 26 and 28;
  • command types 5–7 (SET_RENDER_RESOURCES, SET_COMPUTE_RESOURCES, SET_RENDER_RESOURCES_V2);
  • DRM_ASAHI_BIND_SPARSE_TILE.

Mesa only uses each one after the kernel reports its feature bit, and this kernel never does, so nothing runs today. But if one of those numbers were later given to something else, Mesa would take an M5 path this kernel doesn't have.

This reserves them under Mesa's names and values:

  • Each entry says it belongs to the M5 runtime, and the comment before the feature bits notes that bits 25 and 27 are reserved for it too.
  • The kernel already rejects the command types (_ => EINVAL) and the bind flag (explicit flag mask), and it reports none of the feature bits.
  • No code changes; header only.

Testing:

  • The 14 names and values match Mesa's include/drm-uapi/asahi_drm.h exactly.
  • scripts/kernel-doc -Wall reports nothing new.
  • omacom KUnit: 1718 tests, 1715 pass, 3 skip.
  • The asahi driver builds as a module (DRM_ASAHI=m, with G15 and M3_T8122).

The Aurora Mesa that omacom/mesa is syncing (omacom/mesa#19) defines
feature bits 17 to 24, 26 and 28, command types 5 to 7 and
DRM_ASAHI_BIND_SPARSE_TILE for the M5 (G17G/G17S) runtime. This header
defines none of them. Mesa only uses each one after the kernel reports
its feature bit, and this kernel never does, so nothing runs today. But
if one of those numbers were later given to something else, Mesa would
take an M5 path this kernel does not have.

Reserve them under Mesa's names and values. Each entry says it belongs
to the M5 runtime, and the comment before the feature bits notes that
bits 25 and 27 are reserved for it too. This kernel already rejects the
command types and the bind flag with EINVAL, and it reports none of the
feature bits.

Signed-off-by: DjDeveloperr <hey@djdev.me>

@chriskearney chriskearney left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed exact head 0a449af26b3a658da149ed94ad6f7180a005648a: all 71 added header lines and the current feature-reporting, command and bind consumers. This reserves ABI numbers; it does not advertise or enable the M5 capabilities.

Compiled host ABI controls preserve all 82 existing constants/ioctls, 28 structure sizes/alignments, 182 field offsets and three enum widths. The 14 new constants match merged Mesa's header, and three compiled collision mutants are rejected. Current backends still reject commands 5–7 and bind bit 4, and do not report the reserved feature bits.

Source/host ABI PASS; no additional physical boot is needed for this header-only reservation. Native compilation and full current-tree merge-queue checks remain required. No M5 runtime or general cross-backend compatibility claim is made.

@chriskearney
chriskearney added this pull request to the merge queue Oct 30, 2026
Merged via the queue into integration/aurora with commit 1e60f81 Oct 30, 2026
24 of 25 checks passed
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.

2 participants