Repository navigation
J813: H17G backlight, CoreAnalytics reply, soft DPMS and colours (MacBook Air M5) - #1002
Conversation
On H17G the system endpoint announces powerlog-service on channel 1 with only ep-has-desc-mgr and interface-id, so parse_epic_service_init() returned -ENOENT and the service carrying the mNits reports never bound. Match such announces by their name, as props-less announces are (only for the H17G method profile, so H17P is unchanged). H17G publishes no NITS property, so register the backlight device from the first powerlog report instead (140 nits at boot on the J813). H17G firmware ignores the DAC words (bl_unk/bl_value/bl_power at swap+0x32f) and takes the H17P brightness encoding in the same swap bytes (activation at +0x354, binary64 nits at +0x35e, ceiling pair at +0x36e/+0x376), which the unserialized 26.6 request already spans. Factor the H17P encoder to take the swap record and use it from the flush on a brightness update. Tested on the MacBook Air M5 (J813): apple-panel-bl 0..500 nits; writes of 100/300/140 give DCP "send_brightness" at those levels and matching actual_brightness, and the panel follows. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
…pty dict
The M5's DCP (H17G) panicked with "app NMI" one hour after every boot,
taking the display with it. Its crash log shows "OSDictionary
deserialization failed": D114 CoreAnalyticsSendEvent was answered with
trampoline_zero on H17G, so the reply starts with 0 instead of an
OSDictionary. H17P already returns an empty dictionary ('d', 0x1004
bytes); D114's sizes are the same on H17G (0x1044/0x1004), so use that
reply there too.
DJ identified the analytics callback as the one-hour trigger.
Tested on J813 (M5 MacBook Air): two boots run past one hour (3799 s,
4269 s+) without a DCP crash; before, every boot crashed at about 3600 s.
Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
On the M5 (H17G) internal panel, DPMS off stopped the DCP pipe:
setPowerState(0) times out and the following setPowerState(1) is never
answered ("wait for power timed out, connector will be broken"), so the
panel stays frozen after a lid close or a compositor's output power off.
Keep the pipe running instead, as H17P soft DPMS does: DPMS off submits
a black, surface-free clear swap that also takes the backlight to 0 nits;
DPMS on only requests a brightness update, and the next frame restores
scanout and level.
Tested on J813: fbdev blank/unblank and sway output power off/on cycles
and a lid close/open; the firmware reports brightness 0 and back to the
previous level, no timeouts.
Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
The H17G (M5) DCP firmware blends the fourth byte of an XRGB surface as alpha, and it ignores the opaque-X property as H17P does. A compositor that picks XRGB8888 leaves that byte to whatever its renderer stored: the GPU-rendered sway output on J813 showed blue and cyan text as black and grey while the pixels in memory were right. Offer the overlay formats, which all carry alpha, on the H17G primary plane, so that compositors write the byte. Treat the fbdev console the same way as on H17P: an XRGB console with X = 0 stays black. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
Carries the work merged on aurora-wip since #1018 into the release branch: M5 T8142/J813 bring-up (#995 #996 #997 #998 #1001 #1002 #1003), T8152/J873 bring-up (#984 #1009 #1013 #1022), J813 AVD/ISP (#1026) and the selftest harness updates (#1014). The merge is clean; the 13 integration/aurora commits since #1018 are kept. Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> Assisted-by: LLM
|
On J815/T8142 (15-inch M5 Air, 25G76), GPU/MSAA/AVD/Wi-Fi pass, but DCP startup times out. D408 requests service PROV (0x50524f56), arg=0. The public H17P handler rejects arg 0; Linux has a 24 MHz primary clock and no clock-194. Same-boot ADT has 174 clock-frequency cells and disp0 IDs 0x249/0x1af, outside the older id-256 lookup. On the working J813 boot, does D408 request PROV/0, and what rate/source supplies the reply? Which exact combined kernel and aura commits produced the working panel, and is another provider-property/clock handoff required? |
|
@MrNews89 Thanks for the trace. I checked The working J813 boot reported here used @sithglan Could you share, from the working J813 boot:
That comparison should help distinguish H17G callback semantics from a missing clock/provider handoff. We do not yet have evidence that the 24 MHz primary clock is the correct reply to |
|
@MrNews89 @Acelogic Both J813 questions: yes, the working J813 makes the identical D408 call, and nothing supplies the rate — the reply is a plain zero. 1. The raw D408 request/reply on the working J813 (live configured boot, kernel It repeats twice per boot (two updateFrequencies calls), and the panel comes up regardless ( So the arg is 0, in the same slot your trace shows as 2. Clock properties, DT and ADT. J813 ADT disp0 3. Exact commits behind the working panel.
|
Four fixes to integration's drm/apple for the MacBook Air M5 (J813, H17G DCP firmware), which otherwise already drives the J813 panel:
Tested on the J813: backlight control was verified on the J813 kernel this comes from (
apple-panel-bl0-500 nits,actual_brightnessfollows, the powerlog error gone; DPMS and CoreAnalytics as described above). On the rebased tree (integration/aurora 11eccbe with all nine J813 branches) drm/apple drives the panel through a full boot; the brightness and DPMS retest on this exact base is still to be done.Stability caveat: a second boot of the same image hung about 38 s in, just after the NTP step set off the daily fstrim/apt timers, with no panic record (no pstore). The first boot went through the same timer burst and stayed up for minutes. Until the hang is understood, the combined tree is not proven stable across reboots.
cc @Acelogic @DjDeveloperr @RyanTheTide @LiamRay10