Skip to content

drm/apple: expose the pixel blend mode of DCP planes - #588

Merged
RyanTheTide merged 1 commit into
aurora-wipfrom
claude/bootlog-drm-apple-blend
Oct 30, 2026
Merged

RyanTheTide merged 1 commit into
aurora-wipfrom
claude/bootlog-drm-apple-blend

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

Every machine logs one warning per DCP plane at boot (6 on the M1 Pro, the M2 and the J616s, 3 on the Neo):

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

The planes advertise ARGB formats but no pixel blend mode property. Without it the uAPI says userspace must assume pre-multiplied alpha, while the driver leaves is_premultiplied clear for alpha formats, so DCP blends them by coverage. The existing XRGB workaround (set is_premultiplied and blend over the black background) relies on that flag meaning pre-multiplied.

This creates the property:

  • DCPs whose swap surface carries is_premultiplied: "Pre-multiplied" (default) and "Coverage", and the flag follows the plane state.
  • H17P (T8140 and T8122): its surface has no is_premultiplied byte (dcp_h17p_prepare_swap() drops it) and the firmware applies alpha as coverage, so those planes expose "Coverage" only, which is what they do now.

Behaviour change: on non-H17P DCPs an ARGB plane with the default property value now blends pre-multiplied, as the uAPI documents. XRGB planes are unchanged.

Not covered: the T6030 (apple_plane_init_v14_7) and T8132 (apple_plane_init_v26_6) primary planes. Their firmware only has an opaque flag and none of our machines can test what it does for alpha, so they keep the warning for now.

Testing

  • W=1 compile of the touched objects with the universal config (Fedora Asahi base + asahi.config), no new warnings; full Image, modules and dtbs build of all four bootlog PRs together is queued on the buildbox. checkpatch clean apart from the Co-Authored-By trailer, apple-dcp host selftests 80/80.
  • Not yet run on hardware. To test: boot, check dmesg | grep "blend mode not setup" is empty, modetest -M apple -p (or drm_info) shows pixel blend mode on each plane, and the desktop and a fullscreen video look as before.

🤖 Generated with Claude Code

Every DCP plane advertises formats with alpha but no "pixel blend mode"
property, so drm_mode_config_validate() warns once per plane at boot:

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

Without the property userspace must assume pre-multiplied alpha, while
the driver leaves is_premultiplied clear for every alpha format and DCP
blends those by coverage.

Create the property. DCP blends pre-multiplied when the surface's
is_premultiplied flag is set and by coverage when it is clear, so expose
both, with pre-multiplied as the default the uAPI documents, and set the
flag from the plane state. The H17P swap surface has no
is_premultiplied byte and its firmware applies alpha as coverage, so
H17P planes expose coverage only.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Full universal-config build (Fedora Asahi base + asahi.config, LLVM, W=1) of aurora-wip b7edb5b plus #587, #588, #589 and #590 together: Image, modules and dtbs build OK, no warnings or errors in the touched files. Not yet run on hardware.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Boot-tested in fleet10 (7.3.0-aurora-fleet10): integration/aurora 1173b79 plus 587, 588, 589, 590, 596, 599, 600, 601, 603, 604, 605, 607 and 608, built with the shipping recipe (Fedora Asahi base + asahi.config, 0 mismatches, all distro gates). apple-dcp host selftests 80/80, and the other host tests match integration/aurora exactly (62 pass, the same 26 pre-existing failures). One-shot boots on the Neo (J700), the M2 and the M1 Pro, compared with each machine's fleet9 boot; fleet10 is now the default on all three. Full dmesg and journals are in aurora-ctl reports/fleet10-20261030.

Result for this PR: pass.

  • blend mode not setup warnings: Neo 3 to 0, M2 6 to 0, M1 Pro 6 to 0.
  • Desktop composition looked normal: GNOME session up on all three, glmark2 and vkcube under Wayland ran on the M2 and the M1 Pro, eDP connected on the Neo and the M2, external DP on the M1 Pro.
  • No drm_info/modetest on these machines, so the property itself was not listed; the warning going away is the kernel side of that.
  • J616s not tested yet.

@RyanTheTide
RyanTheTide merged commit 47c9f79 into aurora-wip Oct 30, 2026
@RyanTheTide
RyanTheTide deleted the claude/bootlog-drm-apple-blend branch October 30, 2026 06:11
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