Skip to content

drm/apple: v14.7: scan out 10-bit l10r framebuffers on the internal panel - #3801

Merged
DjDeveloperr merged 4 commits into
mainfrom
feat/v14-10bit-l10r
Dec 2, 2026
Merged

DjDeveloperr merged 4 commits into
mainfrom
feat/v14-10bit-l10r

Conversation

@maralcbr

@maralcbr maralcbr commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Enable 10-bit (XRGB2101010 / ARGB2101010 -> firmware 'l10r') primary plane scanout on internal v14.7 panels while keeping external v14.7 displays and v26.6 pipes strictly 8-bit only.

Commits

  1. Prep (drm/apple: v14.7: separate internal v14.7 primary plane format table): add dcp_v14_7_is_internal() and split dcp_primary_formats_14_7[] (internal v14.7) from dcp_primary_formats_14_7_8bit[] (v14.7 external + v26.6) with no functional change, keeping the series bisectable.
  2. Preserve Ilyas Akin's original commit (45c641ced832414a08c2ecbd4e447f256230a12a) encoding XRGB2101010/ARGB2101010 as 'l10r' and extending dcp_primary_formats_14_7[] (now scoped strictly to internal v14.7 panels).
  3. Add v14_encode_surface_l10r KUnit test in v14-board-test.c covering both opaque and alpha 'l10r' surface descriptor encoding.

Tested: MacBook Pro 14-inch (M3 Pro, j514s, j1203-085733-044e) and 16-inch (M3 Max, j516c, j1203-085740-3c50) at 57cc412 (b1203-084707-39df): internal primary Plane 35 exposes XR24 AR24 XR30 AR30, external v14.7 Planes 43/48 stay 8-bit XR24 AR24, and live Hyprland 10-bit XRGB2101010 scanout passes 7/7 at both 120 Hz and locked 60 Hz with zero DRM/DCP dmesg errors.
Risk: two-way · drm/apple v14.7 internal primary plane format advertisement and l10r surface encoding

@maralcbr
maralcbr requested review from a team as code owners December 1, 2026 15:11
@maralcbr
maralcbr requested review from LiamRay11 and malik-na and a balanced review from Copilot December 1, 2026 15:11

Copilot AI 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.

🟢 Approval recommended

No active review issues were identified in the change adding 10-bit scanout for internal v14.7 panels.

No open issues 🎉

What changed in this PR

Adds 10-bit primary-plane scanout for internal v14.7 panels in the Apple DRM driver, while keeping external v14.7 displays and v26.6 pipes restricted to 8-bit formats.

Changes:

  • Separates primary-plane format tables using an internal-v14.7 capability check.
  • Maps XRGB2101010 and ARGB2101010 to firmware l10r encoding and updates format validation.
  • Adds KUnit coverage for opaque and alpha l10r descriptors and updates existing encoder calls.
File Description
drivers/​gpu/​drm/​apple/​v14-board-test.c Adds opaque and alpha l10r encoding tests.
drivers/​gpu/​drm/​apple/​plane.h Adds the internal-v14.7 flag to plane initialization.
drivers/​gpu/​drm/​apple/​plane.c Selects internal 10-bit or restricted 8-bit format tables.
drivers/​gpu/​drm/​apple/​iomfb_v14_7.c Adds 10-bit format mapping, opacity handling, and validation.
drivers/​gpu/​drm/​apple/​iomfb_v14_7_swap.h Defines l10r and makes surface encoding format-aware.
drivers/​gpu/​drm/​apple/​iomfb_v14_7_backlight_test.c Passes the explicit BGRA format in the existing test.
drivers/​gpu/​drm/​apple/​dcp.h Declares the internal-v14.7 capability helper.
drivers/​gpu/​drm/​apple/​dcp.c Implements the firmware and internal-display check.
drivers/​gpu/​drm/​apple/​apple_drv.c Passes the capability check into plane initialization.

Review effort: Balanced

@github-actions github-actions Bot added area:display Area from CODEOWNERS (bot) ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Dec 1, 2026
@github-actions

github-actions Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Merge readiness at 57cc412a: not ready yet

Check Detail
CI at head running running: apple-build, host-tests, KUnit plan
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head ok in the PR body at 57cc412a
Conflicts ok none
PR text ok Risk: two-way · drm/apple v14.7 internal primary plane format advertisement and l10r surface encoding

Areas: area:display

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

maralcbr and others added 3 commits December 2, 2026 10:05
apple_plane_init_v14_7() is shared by v14.7 internal panels, v14.7
external displays, and v26.6 standalone pipes. Split out a dedicated
8-bit table for v14.7 external and v26.6 pipes and select
dcp_primary_formats_14_7[] only when dcp_v14_7_is_internal() is true,
so extending dcp_primary_formats_14_7[] with internal-only 10-bit
formats in the following commit never advertises unsupported formats on
external v14.7 or v26.6 planes.

No functional change on its own.

Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
The 14.7 firmware takes 'l10r', a 10-bit linear format laid out as
ARGB2101010, and lists it beside 'BGRA' in its pixel format table. Offer
XRGB2101010 and ARGB2101010 on the primary plane and send them as l10r,
so compositors can drive the panel at 10 bits per channel (Hyprland
bitdepth 10, which otherwise falls back to 8 bits).

XRGB2101010 is sent opaque, as XRGB8888 already is. External displays
keep 8 bits: 10 bits were only tested on the internal panel.

Signed-off-by: Ilyas Akin <ashnwor@gmail.com>
Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
Cover both opaque (XRGB2101010) and alpha (ARGB2101010) DCP_V14_FORMAT_L10R
surface descriptor encoding in v14-board-test.c.

Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
@maralcbr
maralcbr force-pushed the feat/v14-10bit-l10r branch from 70613d4 to c3d095e Compare December 2, 2026 00:05
@github-actions github-actions Bot removed the ci-failing A check failed at the PR head (bot) label Dec 2, 2026
@maralcbr

maralcbr commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

Additional live hardware verification on aurora-silicon/main (b1202-121643-a0b0, job j1202-122310-8341 on 14-inch M3 Pro j514s, and b1202-103918-3651, job j1202-104500-6229 on 16-inch M3 Max j516c):

  • Internal primary plane (Plane 35) exposes XR24 AR24 XR30 AR30; external v14.7 planes (Plane 43, Plane 48) remain 8-bit XR24 AR24.
  • Live Hyprland 10-bit XRGB2101010 scanout at both 120 Hz and locked 60 Hz passed on both J514S (3024x1964) and J516C (3456x2234) with zero DRM warnings.

DjDeveloperr
DjDeveloperr previously approved these changes Dec 2, 2026

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed c3d095e. l10r is only offered on internal v14.7 panels; the external path and 26.6 keep the 8-bit list, and atomic_check refuses 10-bit on external outputs as well. The surface encoding change is covered by the new KUnit case.

Two things before merge: the branch now conflicts with main, so please merge main into it (a merge commit is fine), and add a line with the new head SHA, the Mac and the result of the J514s/J516c 10-bit run at that head.

@github-actions github-actions Bot removed the needs-review No approving review from Core or Omarchy Mac yet (bot) label Dec 2, 2026
v14-board-test.c: main added v14_boot_panel_height() where this branch
adds v14_encode_surface_l10r(). Keep both tests.

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

Copy link
Copy Markdown
Contributor

Merged main into this branch as 57cc412ad0bb (a merge commit, no rebase or force push).

The one conflict was in v14-board-test.c: main added v14_boot_panel_height() where this branch adds v14_encode_surface_l10r(). The merge keeps both tests and both KUNIT_CASE entries. Against main 1b95b711bbc2, it changes the same 9 files as before (+83/−18).

Local checks on the merge tree, arm64 + asahi config, LLVM=1:

  • W=1 build of drivers/gpu/drm/apple/: 0 warnings.
  • With CONFIG_KUNIT=y and CONFIG_DRM_APPLE_DISPLAY_KUNIT_TEST=y, v14-board-test.o, iomfb_v14_7.o and plane.o build with W=1 and 0 warnings. The KUnit suite wasn't run; this is a compile check only.

What's left:

  • One review of this merge from someone other than DjDeveloperr (the last pusher).
  • An exact-head row at 57cc412a on an M3 Pro/Max internal panel: the internal plane lists XR30/AR30 and scans out 10-bit cleanly, and an external v14.7 plane stays 8-bit. The J514S/J516C rows above ran this branch on an older main.

@DjDeveloperr

Copy link
Copy Markdown
Contributor

Independent review of merge 57cc412ad0bb, by a reviewing agent that didn't make the merge: no blocking findings.

The diff against main matches this PR's diff line for line. v14-board-test.c has both tests, and both are registered. Main added no new callers of dcp_v14_encode_surface() or apple_plane_init_v14_7(), whose signatures this PR changes, including in its new iomfb_v14_7_locked_mode_test.c. Main's new blend-mode property agrees with this PR's dcp_v14_format_opaque().

@github-actions github-actions Bot removed the merge-conflict Conflicts with the base branch (bot) label Dec 2, 2026
@github-actions github-actions Bot added needs-review No approving review from Core or Omarchy Mac yet (bot) and removed needs-hw-row No hardware row at the PR head (bot) labels Dec 2, 2026
@maralcbr

maralcbr commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

Exact-head hardware verification at 57cc412ad0bb (7.3.0-lab57cc412a-90bb, maclab b1203-084707-39df):

  • 14" M3 Pro (j514s, T6030, macbook-pro-14-m3-pro-nov-202-2, job j1203-085733-044e):
    • modetest -M apple -p: internal primary Plane 35 (CRTC 39, 3024x1964) exposes formats: XR24 AR24 XR30 AR30 + pixel blend mode; external v14.7 Planes 43, 48 stay 8-bit only (formats: XR24 AR24).
    • Live Hyprland 10-bit scanout (verify-m3-gui 7/7 PASS): 3024x1964@120.00Hz -> XRGB2101010 PASS, locked 3024x1964@60.00Hz -> XRGB2101010 PASS, clean restore to XRGB8888, zero apple-drm/apple-dcp warnings or errors in dmesg.
  • 16" M3 Max (j516c, T6031, naeems-m3-max, job j1203-085740-3c50):
    • modetest -M apple -p: internal primary Plane 35 (CRTC 39, 3456x2234) exposes formats: XR24 AR24 XR30 AR30 + pixel blend mode.
    • Live Hyprland 10-bit scanout (verify-m3-gui 7/7 PASS): 3456x2234@120.00Hz -> XRGB2101010 PASS, locked 3456x2234@60.00Hz -> XRGB2101010 PASS, clean restore to XRGB8888, zero apple-drm/apple-dcp warnings or errors in dmesg.

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verdict: MERGE at 57cc412ad0bb. No blocking findings.

Code, read against current main

  • It merges cleanly with main 48fc75eaffa6; dcp.c is the only file changed on both sides, in different places. The resulting diff is identical to the PR's diff.
  • Only fw_compat == V_14_7 && !external gets the 10-bit list. external is set at probe from apple,t6030-dcpext, before planes exist, so T6030's external pipes keep 8 bits, and atomic_check refuses 10-bit there as well. A t6031-dcpext never gets V_14_7.
  • 26.6 panels use the same init with the 8-bit list and their own atomic_check. 26.x desktop, 27.x and T8132 pipes use other init functions and are not touched.
  • The encoder gives the same bytes as before for BGRA, and l10r changes only the format field (a small host program, 6 panel sizes, opaque and alpha).

Local checks (arm64, LLVM; tree = this head merged with main b924bf47. The newer main commits don't touch drivers/gpu/drm/apple.)

  • make W=1 drivers/gpu/drm/apple/ with CONFIG_DRM_APPLE_DISPLAY_KUNIT_TEST off and on: 0 compiler warnings. The one dtc warning is in audio-no-sio-test.dtso, which this PR doesn't change. The touched files also build clean with the T8132 code on.
  • Full host tests in the CI-pinned container: 1028/1028, apple-dcp included.
  • KUnit on UML: dcp-fabric 117/117. The v14 board suite and the other two display suites need DRM_APPLE, which is ARM64-only, so they were compiled (v14 board, W=1) but not run.

Hardware: the J514s (T6030) and J516c (T6031) rows above are at this exact head: 10-bit 7/7 at 120 and 60 Hz, external planes still 8-bit on J514s.

After the merge: J613, J615 and J504 (T8122) also count as internal 14.7 panels, so they now list XR30/AR30 and have no 10-bit row yet. A compositor that picks 10 bits by default would be the first to try it there, so an owner's row is wanted.

@DjDeveloperr
DjDeveloperr merged commit 49fa570 into main Dec 2, 2026
8 of 12 checks passed
@DjDeveloperr
DjDeveloperr deleted the feat/v14-10bit-l10r branch December 2, 2026 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:display Area from CODEOWNERS (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants