Repository navigation
drm/apple: v14.7: scan out 10-bit l10r framebuffers on the internal panel - #3801
Conversation
There was a problem hiding this comment.
🟢 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
l10rencoding and updates format validation. - Adds KUnit coverage for opaque and alpha
l10rdescriptors 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
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
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>
70613d4 to
c3d095e
Compare
|
Additional live hardware verification on
|
DjDeveloperr
left a comment
There was a problem hiding this comment.
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.
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>
|
Merged main into this branch as The one conflict was in Local checks on the merge tree, arm64 + asahi config, LLVM=1:
What's left:
|
|
Independent review of merge The diff against main matches this PR's diff line for line. |
|
Exact-head hardware verification at
|
DjDeveloperr
left a comment
There was a problem hiding this comment.
Verdict: MERGE at 57cc412ad0bb. No blocking findings.
Code, read against current main
- It merges cleanly with
main48fc75eaffa6;dcp.cis 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 && !externalgets the 10-bit list.externalis set at probe fromapple,t6030-dcpext, before planes exist, so T6030's external pipes keep 8 bits, andatomic_checkrefuses 10-bit there as well. At6031-dcpextnever getsV_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
l10rchanges 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/withCONFIG_DRM_APPLE_DISPLAY_KUNIT_TESToff and on: 0 compiler warnings. The one dtc warning is inaudio-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-dcpincluded. - KUnit on UML:
dcp-fabric117/117. The v14 board suite and the other two display suites needDRM_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.
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
drm/apple: v14.7: separate internal v14.7 primary plane format table): adddcp_v14_7_is_internal()and splitdcp_primary_formats_14_7[](internal v14.7) fromdcp_primary_formats_14_7_8bit[](v14.7 external + v26.6) with no functional change, keeping the series bisectable.45c641ced832414a08c2ecbd4e447f256230a12a) encodingXRGB2101010/ARGB2101010as'l10r'and extendingdcp_primary_formats_14_7[](now scoped strictly to internal v14.7 panels).v14_encode_surface_l10rKUnit test inv14-board-test.ccovering 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-bitXR24 AR24, and live Hyprland 10-bitXRGB2101010scanout 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