Skip to content

drm/apple: set blend mode property on v14.7 and v26.6 primary planes - #3857

Merged
RyanTheTide merged 1 commit into
mainfrom
fix/drm-v14-v26-blend-mode
Dec 2, 2026
Merged

RyanTheTide merged 1 commit into
mainfrom
fix/drm-v14-v26-blend-mode

Conversation

@maralcbr

@maralcbr maralcbr commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Both apple_plane_init_v14_7() and apple_plane_init_v26_6() expose DRM_FORMAT_ARGB8888 without registering a pixel blend mode property, triggering a DRM core validation warning on every boot of v14.7 (M3 Pro/Max) and v26.6 (M4) Macs:

apple-drm display-subsystem: [drm] [PLANE:35:plane-0] pixel format with alpha exposed but blend mode not setup. Please fix.

Both wire encoders (dcp_v14_encode_surface() in iomfb_v14_7_swap.h and dcp_m4_surface_encode() in dcp-m4-frame.h) set surface[2] (is_premultiplied) only for opaque XRGB formats and pass 0 for ARGB surfaces, so DCP blends alpha as coverage — identical to apple_plane_init() when premultiplied is false.

Register drm_plane_create_blend_mode_property(&plane->base, BIT(DRM_MODE_BLEND_COVERAGE)) in both apple_plane_init_v14_7() and apple_plane_init_v26_6(), matching apple_plane_init().

Tested: MacBook Pro 16-inch (M3 Max, J516C, T6031) at cb5eee0 (maclab b1202-103918-3651 / j1202-104500-6229): zero blend mode not setup or apple-drm/dcp warnings/errors in dmesg, modetest -M apple -p reports 37 pixel blend mode: enums: Coverage=1 value: 1 on Plane 35 (XR24 AR24 XR30 AR30), and live Hyprland mode/format switches (@60, @120, 10-bit XRGB2101010 @ 120 Hz & @ 60 Hz) pass 7/7; checkpatch --strict clean; Codex Round 2 review VERIFIED (01a23427-73a4-75d1-b4e9-39a20be8b9c5).
Risk: two-way · drivers/gpu/drm/apple/plane.c v14.7/v26.6 primary plane blend mode property

Both apple_plane_init_v14_7() and apple_plane_init_v26_6() expose
DRM_FORMAT_ARGB8888 without registering a pixel blend mode property,
triggering a DRM core validation warning on every boot:

  [PLANE:35:plane-0] pixel format with alpha exposed but blend mode not
  setup. Please fix.

Both wire encoders (dcp_v14_encode_surface() and dcp_m4_surface_encode())
set surface[2] (is_premultiplied) only for opaque XRGB formats and pass 0
for ARGB surfaces, so DCP blends alpha as coverage (the same contract as
apple_plane_init() when premultiplied is false).

Register drm_plane_create_blend_mode_property() with
BIT(DRM_MODE_BLEND_COVERAGE) in both helpers, matching apple_plane_init().

Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
@maralcbr
maralcbr requested review from a team as code owners December 2, 2026 00:53
@maralcbr
maralcbr requested review from Acelogic and malik-na and a balanced review from Copilot December 2, 2026 00:53
@github-actions github-actions Bot added 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) labels Dec 2, 2026
@github-actions

github-actions Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Merge readiness at cb5eee07: ready to merge

Check Detail
CI at head ok 9 checks passed
Review ok approved by DjDeveloperr
Requested changes ok none
Hardware row at head ok in the PR body at cb5eee07
Conflicts ok none
PR text ok Risk: two-way · drivers/gpu/drm/apple/plane.c v14.7/v26.6 primary plane blend mode property

Areas: area:display
Merge: gh pr merge 3857 --merge (Owners and Core through the bypass: add --admin).

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

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

There are no active review issues for the coverage blend-mode registration change.

No open issues 🎉

What changed in this PR

Registers coverage blend mode for Apple DRM v14.7 and v26.6 primary planes, matching their existing alpha handling and addressing DRM validation warnings.

Changes:

  • Adds the pixel blend mode property to both plane initializers.
  • Propagates property-creation errors and documents the coverage behavior.
File Description
drivers/​gpu/​drm/​apple/​plane.c Registers coverage blend mode for v14.7 and v26.6 primary planes with error handling.

Review effort: Balanced

@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.

The current DRM helper accepts coverage-only planes and initializes the atomic state from the property default. Both Apple paths register coverage before exposing the plane, and the exact-head J516C run verifies the property, clean initialization, and mode switches. The v26.6 path still needs its M4 run with the same property and boot checks.

@github-actions github-actions Bot added ready-to-merge Meets the merge policy: merge it (bot) and removed needs-review No approving review from Core or Omarchy Mac yet (bot) labels Dec 2, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor

Merging at cb5eee07d835 (B2 merge train, 12-01 merge bar). Approval at this head: DjDeveloperr. Row: the hardware row at cb5eee0 that the readiness check found (PR body or comment). CI: train L20 = main f53f2fe + #3857 #3845: Apple build + changed .c objects pass, KUnit dcp-fabric/dcp-topology/dcp-display pass, host tests apple-dcp/dcp 91 ok Revert: git revert -m 1 <merge commit>.

@RyanTheTide
RyanTheTide merged commit 35e2cd4 into main Dec 2, 2026
12 checks passed
@RyanTheTide
RyanTheTide deleted the fix/drm-v14-v26-blend-mode branch December 2, 2026 02:30
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) ready-to-merge Meets the merge policy: merge it (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants