Repository navigation
Conversation
|
Looks correct and well scoped: J313 + DCP 13.5 only, once per bind, reusing the same
|
|
Thanks, pushed 3a1194c for 1, 2 and 5:
The revised module builds W=1 clean; I haven't boot-tested this revision yet and will post once I have. |
|
Boot-tested 3a1194c on the J313 (DCP 13.5, linux-aurora 7.2.11): the handover check matched and logged |
|
Two more runs of 3a1194c on the J313:
|
|
On point 3: I read m1n1 I checked what this Air reports in the device tree: |
|
Thanks, the DPMS match and the handover check look right, and the extra test runs help. Four things on 3a1194c:
|
On a MacBook Air (M1, 2020, J313) with DCP 13.5 the boot loader leaves the panel on. The first dcp_poweron() then finds it enabled (set_device_enabled 1 -> 1) and only sets a mode: the firmware does not power up its video interface, assert HPD or load its LTM block, and logs that it could not find the Backlight service. Brightness swaps are taken and the published level follows them, but the panel stays at the boot level. A DPMS off/on runs the firmware's full power-on sequence, and every brightness change after it reaches the panel. Give the J313 panel that cycle once, on DCP 13.5, when the boot loader handed it over lit: an available simple-framebuffer whose "panel" points at it. The first power-on then cancels the swap watchdog, disconnects the AV service and powers the pipe off, as dcp_poweroff() does for an internal panel, before powering on. The node outlives the handover, so the cycle is marked done when it runs, and a later bind does not repeat it; a bind that fails before the first power-on leaves it for the retry. Other panels and firmware are unchanged. Measured on a MacBook Air (M1, 2020, J313, DCP firmware 13.5) running linux-aurora 7.2.11: brightness changes reach the panel straight after boot, after s2idle suspend/resume, and after a boot with the lid closed, where the boot loader still hands the panel over and the cycle completes without timeouts. Before, backlight writes had no visible effect until one DPMS cycle. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
3a1194c to
36bef1a
Compare
|
Thanks, force-pushed as one commit, 36bef1a:
|
On a MacBook Air (M1, 2020, J313) with DCP firmware 13.5, the brightness keys, OSD and backlight sysfs all change after boot, but the panel stays at the boot level. One DPMS off/on fixes it until the next boot.
Cause
The boot loader leaves the panel on, so the first
dcp_poweron()finds it already enabled (set_device_enabled_gated: current state: 1, requested state: 1) and only sets a mode. The firmware never runs its own panel power-on: noVideoInterfaceIOAV::power_on, no HPD plug, no LTM block load. It still takes the brightness carried in swaps and publishes it back (actual_brightnessfollows), but the panel doesn't change. A DPMS cycle runs the full power-on, and every brightness change after it reaches the panel.This is the "writes apply only after a modeset" behaviour noted in #225; the 394-nit cap from that PR is unchanged.
Change
On J313 with DCP 13.5, when the boot loader handed the panel over lit (an available
simple-framebufferwhosepanelpoints at it), the first power-on cycles the pipe first, the waydcp_poweroff()does for an internal panel: cancel the swap watchdog, disconnect the AV service,_dcp_poweroff(), then the normal power-on. It logspower-cycling the panel handed over by the boot loader.The framebuffer node outlives the handover, so the cycle is marked done when it runs and a later bind skips it; a bind that fails before the first power-on leaves it for the retry. Reloading
appledrmresets the mark, so a reload can cycle again. Other panels and firmware versions are unchanged. The panel shows black briefly during boot.Testing
Written for this tree; measured on a MacBook Air (M1, 2020, J313, DCP firmware 13.5) running linux-aurora 7.2.11 (aurora12), with
appledrm.kofrom this branch:set_device_enabled1 -> 0 -> 1 and runs its full power-on, and brightness keys change the panel straight after boot. No driver warnings.checkpatch.pl --strictand W=1 clean; the apple-dcp selftests show the same results with and without this commit.