Repository navigation
soc: apple: clpc: clear High Power mode on driver removal - #2085
Merged
Merged
Conversation
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]>
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
df7ed8b01e2a4945f4325e03c3014452f59613d7booted as7.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.7.3.0-m5-intg9boot, exact whole-ESP and system fingerprints, display layout,performanceprofile and the active, enabled power-profiles-daemon state. The hardware lease was released.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.