Repository navigation
drm/apple: don't offer PQ on firmware 27 panels - #3423
Conversation
Turning HDR on in GNOME on a K114s (T6050, firmware 27) makes the internal panel blinding, with most of the desktop clipped to white. Measured on the K114s with flat full-screen greys and the ambient light sensor, no compositor in the loop: a surface tagged ST 2084 is decoded with the sRGB curve and then scaled by about 10000/100, so everything above a quarter of the code range sits at the panel's peak. Every other transfer function value gives the plain sRGB decode at SDR white, and the colour space doesn't change it. Firmware 27 has no PQ decode on this path, so a PQ desktop can't be shown correctly with any surface tag. Add dcp_fw_panel_decodes_pq() and, on firmware 27 panels, stop advertising PQ: no EDR (dcp_panel_edr(), dcp_panel_edr_supported()), so no Colorspace and HDR_OUTPUT_METADATA properties, and no HDR static metadata in the panel's EDID. Compositors then keep the panel in SDR. Desktop 26.x panels (J614s/J616s, which decode PQ) don't change. Signed-off-by: Ryan Murray <[email protected]>
|
K114s row (M5 Pro, T6050, firmware 27), batched boot. Kernel 7.3.0-k114srow = main
Still to run: a 120 Hz handover on this head (after a cold boot) and the J616s row for #3423 (desktop 26.x, HDR must stay offered). |
|
J616s row (M4 Pro, desktop 26.x firmware, mini-LED panel with EDR), before/after. Kernel 7.3.0-j6row = main
HDR stays offered and active on the desktop 26.x panel, so the change only withdraws PQ where the firmware has no PQ decode (firmware 27). #3427 is inert here ( |
|
Non-author merge-train review at @DjDeveloperr code-owner ping (interim rule, point 6): I'll merge after 07:49 AEDT if CI is green, the App approves, and you have no objection. Ryan may veto the interim. Revert: |
There was a problem hiding this comment.
Verdict: HOLD for hosted checks and the recorded code-owner wait. Approved the ORCH5-authorized interim.
Checked: The common panel PQ predicate gates EDID HDR metadata, HDR property exposure and the EDR path. It applies to the affected firmware interface across boards. The batched K114s row exercises the affected path and the J616s row verifies preservation of 26.x desktop HDR. Keep the documented follow-up to replace the interim firmware check with a measured EDR-path capability.
…entity units The panel identity, j616s identity and colorimetry units extract dcp_panel_edid_snapshot(), which now asks dcp_fw_panel_decodes_pq(). Stub it, and check that a firmware 27 panel with a peak gets no HDR static metadata block. Signed-off-by: Ryan Murray <[email protected]>
There was a problem hiding this comment.
Verdict: HOLD for hosted checks and the code-owner wait.
Checked: The new commit changes only the desktop selftest. The stub supplies the firmware PQ capability used by the extracted EDID helper, and the new case verifies that a firmware-27 panel with a nonzero peak omits the HDR extension. The existing HDR-positive control remains. The runtime delta and scope are the same as in the prior approval.
|
host-tests fix pushed ( |
|
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.
Verdict: MERGE at 945fd3235666 as the ORCH5-approved interim, once the hosted checks are green, with one point recorded for the follow-up.
Blockers: none.
Point for Dj / the follow-up (not blocking): dcp_fw_panel_decodes_pq() is keyed on fw_compat == V_27_0, so it withdraws PQ/EDR from every firmware-27 internal panel, not only the K boards: the J714s/J716c (and J714c/J775c) mini-LED panels lose the HDR offer too. The no-PQ-decode measurement is from the K114s OLED only, and the v27 EDR model in iomfb_template.c came from Dj's macOS 27 trace on his M5 Pro. If HDR displayed correctly on a J714s under Linux before this, this change regresses it there. That is reversible (no crash, SDR unchanged), which is why I don't block the interim. @DjDeveloperr, one check on your J714s would settle it: is HDR offered and correct at main, and does it go away at this head? If it was correct, the follow-up should key on the measured capability (for example the panel path) rather than the firmware version.
Checked: read the whole diff; the predicate gates all three HDR exposures (EDID HDR static metadata, Colorspace/HDR_OUTPUT_METADATA via dcp_panel_edr_supported(), and dcp_panel_edr()), so a compositor can't half-enable PQ. Desktop 26.x is unchanged (J616s before/after table: same connector properties, byte-identical EDID, BT.2100 still active). 945fd323 is test-only over the rowed 7a8f8c9a. K114s row: no HDR offered, P3 primaries kept, backlight fine. No attribution.
|
Re the firmware 27 reach (J714s/J716c): right, the measurement is the K114s only. The firmware 27 surface path has no PQ curve there, and the decision is keyed on the firmware interface because the swap layout and the EDR model ( |
|
Merging under the 6-point rule (Ryan 09:29: kept permanently), at
Recorded follow-up (not blocking): the gate is keyed on firmware 27, so J714s/J716c/J714c/J775c lose the HDR offer too, and only the K114s was measured. It's reversible: SDR and brightness are unchanged. @DjDeveloperr, a Revert: |
|
Correction (post-merge): the measurement behind this change does not reproduce on today's K114s stack. With Ryan's current Stage 2 (aura b17 + aura#535, live-DCP hand-off) and the same stock kernel, PQ surfaces decode correctly on firmware 27 (PQ 128 near black, PQ 594 = 2.0× SDR white, highlights to the panel peak; lock-in ALS rows by the FW27-HDR lane). My map ran on an older b14-family Stage 2 after overnight macOS guest sessions. So this change now hides HDR that works; FW27-HDR is attributing the cause (Stage 2 vs panel state) and will revert this in its series. |
drm/apple: offer HDR on firmware 27 panels again (revert #3423)
This reverts commit 9edf0b2 ("Merge pull request aurora-silicon#3423 from aurora-silicon/fix/dcp-fw27-no-pq"). aurora-silicon#3423 hid the PQ/HDR switch on firmware 27 panels because an overnight measurement on the K114s (T6050) showed ST 2084 surfaces decoded with the sRGB curve. That does not reproduce: with the current Stage 2 the same firmware 27 panel decodes PQ as designed with the existing EDR model (PQ code 128 = black, 594 = 2.0x SDR white = 203 nits, highlights up to the panel peak), on both an unmodified 7.3.0-42 module and main. FP16 extended-linear surfaces show EDR too (1.0 = SDR white, linear to the panel peak). So the panel EDR path is the same on firmware 26.6 and 27; drop the firmware 27 exception. Measurements (relative ambient-light lock-in, fill vs black under the same tag): traces/display/20261128-fw27-hdr.
What
Turning HDR on in GNOME on a K114s (T6050, firmware 27) makes the internal panel blinding ("flash-bang"): most of the desktop is clipped to white, and colour is left only in the darkest areas.
Measured on the K114s with flat full-screen greys from a small atomic KMS client (no compositor in the loop) and the ambient light sensor as the meter, the firmware 27 panel path has no PQ decode:
So no surface tag lets a PQ desktop show correctly on firmware 27. This change adds
dcp_fw_panel_decodes_pq()and, on firmware 27 panels, stops advertising PQ: no EDR (dcp_panel_edr(),dcp_panel_edr_supported()), so no Colorspace and HDR_OUTPUT_METADATA properties, and no HDR static metadata in the panel's EDID. Compositors then keep the panel in SDR and don't offer the HDR switch. Desktop 26.x panels (J614s/J616s), which do decode PQ, don't change.Showing HDR properly on firmware 27 needs a different mapping, for example decoding without the PQ tag and remapping through the output gamma table with EDR headroom, or whatever macOS 27 sends. That is follow-up work.
Tested
Tested: K114s (T6050, firmware 27) and J616s (M4 Pro, desktop 26.x) at 945fd32 (driver files as 7a8f8c9): K114s no HDR offered, SDR/P3/backlight unchanged; J616s HDR still offered and active, EDID byte-identical; 0 failed units; KUnit 372/373 + apple-dcp host tests 96/96.
edr.kunitconfig: display tests +CONFIG_DRM_APPLE_KUNIT_TEST=y, arm64 QEMU): 373 tests, 372 passed, 1 skipped.Risk: one-way · firmware 27 internal panels (T6050 K boards): HDR is no longer offered (it was unusable); SDR unchanged · desktop 26.x panels unchanged
Not yet
Rows: K114s (batched with #3427) and J616s before/after (HDR unchanged) are posted below.