Skip to content

soc: apple: clpc: clear High Power mode on driver removal - #2085

Merged
DjDeveloperr merged 5 commits into
integration/aurorafrom
m5-parity8/clpc-hpm-remove
Nov 17, 2026
Merged

DjDeveloperr merged 5 commits into
integration/aurorafrom
m5-parity8/clpc-hpm-remove

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

After performance mode enables High Power in the SMC, removing CLPC drops its platform profile without sending the off record. A rebound instance starts balanced with a cleared sent-state cache, so selecting balanced can skip the write needed to clear the previous instance's mode.

Send the existing High Power off record during cleanup when this qualified instance successfully enabled it. Keep the write out of the sampling halt path, which suspend also uses, so suspend retains the user's profile. This follows up #2056 without expanding the supported machines or changing the record.

Validation:

  • The previous head f012376 passed warm Ryzen and native J714s Image/modules/DTBs builds. Its matching read-only observer module built successfully. The test controller stopped before installation on a missing DTB checksum receipt and verified the original whole ESP and system fingerprints unchanged. That preparation issue is corrected and local real-artifact packing checks pass.
  • Refreshed onto integration 677be39, preserving all prior commits. The functional seven-line CLPC change is unchanged. Both current-head CI workflows passed (Host tests and SEP source checks). Exact refreshed-head native build and runtime results remain pending; the subsequent test admission refused its fresh storage gate before native work, and original system/ESP fingerprints were verified unchanged.
  • Whitespace check passes; checkpatch has zero errors and the required author/sign-off name warning.
  • Exact native M5 Pro runtime candidate df7ed8b01e2a4945f4325e03c3014452f59613d7 booted as 7.3.0-m5-par8h. The headless witness observed High Power on with sequence 3, unbound CLPC, and accepted SMC off with sequence 4 before rebind. After rebind, the fresh on/off sequence and original lab profile passed. The witness unit retired before rollback.
  • Normal reboot restored the stock 7.3.0-m5-intg9 boot, exact whole-ESP and system fingerprints, display layout, performance profile and the active, enabled power-profiles-daemon state. The hardware lease was released.
  • Updated against integration fc9c78fa1b4c5876b0a3d64a35491f33d412d390. The CLPC production source and focused test match the runtime-verified candidate byte for byte. The focused callbacks passed with GCC and Clang. Hosted CI for the refreshed head is running.

Performance mode programs the SMC independently of the CLPC device.
Removing the driver releases its platform profile but leaves High Power
enabled. A new instance starts balanced with a cleared sent-state cache,
so selecting balanced cannot clear the leftover mode.

Send the existing off record during device cleanup if this instance
successfully enabled High Power. Keep suspend's sampling halt separate
so suspend preserves the user's profile.

Signed-off-by: Diljit Singh <[email protected]>
Keep the removal cleanup on the current integration base. The CLPC
source and the seven-line fix are unchanged.

Signed-off-by: Diljit Singh <[email protected]>
Exercise the registered cleanup, profile transitions and SMC failures in a
host harness. Compile the pre-fix control and require the missing off-write
assertion, so the test detects the removal bug independently of its spelling.

Signed-off-by: Diljit Singh <[email protected]>
@DjDeveloperr
DjDeveloperr marked this pull request as ready for review November 17, 2026 20:07
@DjDeveloperr
DjDeveloperr merged commit 59b02d5 into integration/aurora Nov 17, 2026
7 checks passed
@RyanTheTide
RyanTheTide deleted the m5-parity8/clpc-hpm-remove branch November 17, 2026 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant