Repository navigation
drm/apple: set blend mode property on v14.7 and v26.6 primary planes - #3857
Conversation
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>
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
There was a problem hiding this comment.
🟢 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
left a comment
There was a problem hiding this comment.
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.
|
Merging at |
Summary
Both
apple_plane_init_v14_7()andapple_plane_init_v26_6()exposeDRM_FORMAT_ARGB8888without registering apixel blend modeproperty, triggering a DRM core validation warning on every boot of v14.7 (M3 Pro/Max) and v26.6 (M4) Macs:Both wire encoders (
dcp_v14_encode_surface()iniomfb_v14_7_swap.handdcp_m4_surface_encode()indcp-m4-frame.h) setsurface[2](is_premultiplied) only for opaque XRGB formats and pass0for ARGB surfaces, so DCP blends alpha as coverage — identical toapple_plane_init()whenpremultipliedis false.Register
drm_plane_create_blend_mode_property(&plane->base, BIT(DRM_MODE_BLEND_COVERAGE))in bothapple_plane_init_v14_7()andapple_plane_init_v26_6(), matchingapple_plane_init().Tested: MacBook Pro 16-inch (M3 Max, J516C, T6031) at cb5eee0 (maclab b1202-103918-3651 / j1202-104500-6229): zero
blend mode not setuporapple-drm/dcpwarnings/errors in dmesg,modetest -M apple -preports37 pixel blend mode: enums: Coverage=1 value: 1onPlane 35(XR24 AR24 XR30 AR30), and live Hyprland mode/format switches (@60,@120,10-bit XRGB2101010 @ 120 Hz&@ 60 Hz) pass 7/7; checkpatch--strictclean; Codex Round 2 review VERIFIED (01a23427-73a4-75d1-b4e9-39a20be8b9c5).Risk: two-way ·
drivers/gpu/drm/apple/plane.cv14.7/v26.6 primary plane blend mode property