Repository navigation
drm/apple: freeze the firmware 27 sleep sequence's switches at their defaults - #2465
RyanTheTide wants to merge 3 commits into
Conversation
The firmware 27 sleep and wake sequence carries 17 bring-up switches from its development (5d46c24, 3ed9757, 69e7e75): v27_two_stage, v27_soft_first, v27_lit_delay_ms, v27_a115, v27_ext_a442, v27_ext_a500_again, v27_ext_cycles, v27_ext_rounds, v27_session_rounds, v27_cycle_power, v27_rtkit_cycles, v27_cycle_hold_ms, v27_cycle_pmc, v27_cycle_disp_rewrite, t6050_ext_services, v27_sleep_power_oob and v27_a442. Their defaults are the sequence that shipped; nothing we ship sets any of them. Remove them and the branches only their non-default values took. v27_cycle_hold_ms becomes a named constant (12 ms) with its old description. v27_rtkit_cycles picked a mode (0-3); the default mode, one coprocessor restart, stays and the dark-wake modes 2 and 3 go. The fallbacks for a DART that can't be found or stopped stay. v27_keep_level is kept: a host test builds against it. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Early note on this draft (no full review yet):
Assisted-by: LLM (Claude:Opus 5.5) |
|
Parked (draft stays open), checked against main @f02bd68a08cb. The branch is 6000+ commits behind and main has grown |
main grew the firmware 27 sleep sequence well past this branch: both conflicted files (dcp-v27-sleep.inc, iomfb.c) are taken from main as they are. The next commit redoes the freeze on main's code. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…defaults The firmware 27 sleep and wake sequence still carries the bring-up switches of its development as writable module parameters: 14 in dcp-v27-sleep.inc (v27_two_stage, v27_soft_first, v27_lit_delay_ms, v27_a115, v27_ext_a442, v27_ext_a500_again, v27_ext_cycles, v27_ext_rounds, v27_session_rounds, v27_cycle_power, v27_rtkit_cycles, v27_cycle_hold_ms, v27_cycle_pmc, v27_cycle_disp_rewrite), plus t6050_ext_services there and v27_keep_level in dcp_backlight.c. Nothing we ship sets any of them, and the driver may not offer tuning switches. Make each a static const at the default it had, with the old parameter descriptions kept as a comment, and drop the module_param()s. The code that reads them is unchanged, so the sequence that runs is the same; the branches only a non-default value took are now dead and are folded away by the compiler. The apple-dcp host test declares v27_keep_level as a const too. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Second pass 12-05 (head 47b668b): not obsolete. main still declares 15 writable |
|
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 47b668b
Checked: All 16 removed module parameters keep their exact default values, including the two zero-initialized values. After accounting for the declarations and module metadata, the code tokens in both driver files are identical to the base. The exact panel takeover fixture passed under GCC and Clang with address and undefined-behavior sanitizers. Hosted Apple build and Host tests are green.
The existing minimum domain-off hold is unchanged. Replacing it with a domain-state wait needs the measurement identified in the PR. The exact K114s and J615 sleep regressions and the display KUnit run remain open.
|
Hardware row at exact head
How: one combined test kernel, not this PR alone. Kernel |
What: the firmware 27 sleep/wake sequence's bring-up switches stop being module parameters. Redone on current main (the branch's Nov 20 version could not be carried: main's
dcp-v27-sleep.incgrew ~1700 lines that use these switches).Each of the 16 parameters becomes a
static constat the default it had, and itsmodule_param()/MODULE_PARM_DESC()goes; the descriptions stay as one comment block:v27_two_stage,v27_soft_first,v27_lit_delay_ms,v27_a115,v27_ext_a442,v27_ext_a500_again,v27_ext_cycles,v27_ext_rounds,v27_session_rounds,v27_cycle_power,v27_rtkit_cycles,v27_cycle_hold_ms,v27_cycle_pmc,v27_cycle_disp_rewrite,t6050_ext_servicesv27_keep_level(review ask 2: the apple-dcp host testdesktop.pynow declares itstatic constas well)The code that reads them is untouched, so the sequence that runs is the one main runs by default; branches only a non-default value took (the dark-wake
v27_rtkit_cycles2/3 forms,v27_lit_delay_ms,v27_ext_a500_again) are dead and folded by the compiler. Removing that dead source is a separate, larger cleanup that should come with a K114s row of its own.Not in this PR (review ask 1):
v27_cycle_hold_msis still a fixed 12 ms minimum off time in a DCP cycle, as on main today. Replacing it with a wait for the domain (or the DCP DART) to report off needs a K114s measurement of that signal; this PR does not change the behaviour.Tested: LLVM W=1
drivers/gpu/drm/apple/dcp.o+dcp_backlight.o(arm64 defconfig + asahi.config, CONFIG_APPLE_SOC_SLEEP=y) clean, no unused-const warnings; checkpatch --strict clean; host tests--only backlight4/4 and--only apple-dcp12/12 pass.Rows: behaviour-identical by construction; the regression row is K114s (T6050, firmware 27.2): s2idle 2x + lid close/open with the internal panel (and an external display if attached): panel back lit at the same level each time. J615 (T8122 27.2) s2idle 2x as a second firmware-27 Mac.