Repository navigation
drm/apple: offer only alpha formats on the T6050 internal primary plane - #1873
joshuaswarren wants to merge 1 commit into
Conversation
The T6050 internal DCP blends the X byte of XRGB8888 as alpha, as the T8142 does on firmware 27 (43f8980). A fill with X=0 shows black and X=0x10 about half. Offer alpha formats only, selected by a hardware flag set for apple,t6050-dcp.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
[Joshua's agent] Test result for this PR on a 14-inch M5 Max MacBook Pro (internal panel, Hyprland session). Problem before the PR (kernel without it, With this PR (alpha-only primary plane) and a user-local Aquamarine build that allocates
Green and blue with no red light fully. Those were the two dark cases before. The compositor screenshot shows the intended colour for each pattern. A foot terminal at alpha 0.5 over the wallpaper is see-through (screenshot pixel (211,70,116) becomes (107,36,59)). Not measured: absolute brightness, colour accuracy, |
e2ebdd7 to
1021d1a
Compare
|
GREEN on 1021d1a Rebase verified three-way in both conflicted files. In dcp-internal.h, base-to-head is exactly the PR's two lines (the xrgb_is_alpha comment and field) placed after the base's new fields - the old-head comparison shows every other delta is base content the old head predates. In dcp.c, base-to-head is exactly one line, .xrgb_is_alpha = true, sitting inside apple_dcp_hw_t6050 next to .only_120hz_modes with the base's v27 fields intact above it - both sides kept in each place, commit message and author unchanged. The appended body section matches the trees, including the build scope with the two kernel-doc warnings attributed to a line this change does not touch, and the measurements correctly scoped to the pre-rebase tree with this head not booted. Model: zai/glm-5.3 (live from lane_models.py this turn). |
|
[Joshua's agent] This draft is superseded and should be closed, not merged. It adds |
|
Closing as superseded: see the comment above for the replacement fix on PR 1816. |
|
[Joshua's agent] Correction to my close-out comment above (PR closed, leaving this for the record). The "frames two updates late" symptom I described is not what a stock Hyprland does on such a plane: that lag came from our own downstream aquamarine patch (hyprwm/aquamarine#496, closed), which allocates AR24 when XR24 is missing so the desktop can start at all. Hyprland 0.57.2's |
[Joshua's agent]
On the M5 Max (T6050) internal panel, the firmware reads the X byte of XRGB8888 as alpha. The same defect is already handled for the T8142 on firmware 27 (43f8980).
Measured by filling the primary plane with pure green and varying X: X=0x00 shows black for every colour, X=0x10 about half brightness, X=0x80 and X=0xff the correct colour. Green and blue also looked wrong while red was zero. The cause fits
apple_plane_atomic_updateforcingis_premultipliedfor XRGB8888, andiomfb_enqueue_opaque_xskipping the opaque-X property on firmware 27.Change: add a hardware flag
xrgb_is_alpha, set inapple_dcp_hw_t6050, and OR it into thexrgb_is_alphaargument of the primary-planeapple_plane_initcall. The T6050 internal primary plane then offers only formats that carry alpha (dcp_overlay_formats), so compositors write the alpha byte. The T6050dcpextnodes are not changed: their firmware was not measured.Effect on userspace: XRGB8888 is no longer advertised on that plane. An XR24 framebuffer is rejected at atomic check; ARGB8888 with alpha 0xff shows the colour.
Not verified yet: the boot check on the M5 (IN_FORMATS of the internal primary plane, ARGB8888 fill with alpha 0xff lights, fbcon still shows text). No KUnit covers
apple_probe_per_dcp.Validated on, and reach
Validated on: Measurement on a 14-inch M5 Max MacBook Pro (K114c, T6050): filling the primary plane with pure green and varying X gave black at X=0x00, half brightness at 0x10, correct colour at 0x80 and 0xff. The change itself (formats offered) has not been booted.
Applies beyond the M4: The same defect is already handled for the T8142 (M4) on firmware 27 (43f8980). This PR sets the hardware flag for T6050 only; the T6050
dcpextnodes are not changed because their firmware was not measured.m tester run (omarchy-m-testing.org): feature rows Built-in display. The tester needs the hardware; no tester run is linked to this change.
Rebased onto integration/aurora 514ae1f (head 1021d1a)
The branch conflicted with the base in two places, both adjacent additions: the new
xrgb_is_alphafield indcp-internal.hsits next to the base's newonly_120hz_modesandv27_sleep_*fields, and the.xrgb_is_alpha = trueinitialiser inapple_dcp_hw_t6050sits next to.only_120hz_modes = true. I kept both sides in each place. The commit message and author are unchanged.dcp.oandapple_drv.obuild on the 13-inch M1 MacBook at this head (gcc 16.1.1,W=1); the only warnings are two kernel-doc ones atdcp.c:715, which this change does not touch. This head was not booted; the measurements above ran on the pre-rebase tree.