Repository navigation
drm/apple: expose the pixel blend mode of DCP planes - #588
Merged
Merged
Conversation
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]>
Contributor
Author
This was referenced Oct 30, 2026
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.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every machine logs one warning per DCP plane at boot (6 on the M1 Pro, the M2 and the J616s, 3 on the Neo):
The planes advertise ARGB formats but no
pixel blend modeproperty. Without it the uAPI says userspace must assume pre-multiplied alpha, while the driver leavesis_premultipliedclear for alpha formats, so DCP blends them by coverage. The existing XRGB workaround (setis_premultipliedand blend over the black background) relies on that flag meaning pre-multiplied.This creates the property:
is_premultiplied: "Pre-multiplied" (default) and "Coverage", and the flag follows the plane state.is_premultipliedbyte (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
dmesg | grep "blend mode not setup"is empty,modetest -M apple -p(or drm_info) showspixel blend modeon each plane, and the desktop and a fullscreen video look as before.🤖 Generated with Claude Code