platform/surface: add SP11 platform profile and low-power cap - #91
Draft
ooaklee wants to merge 3 commits into
Draft
platform/surface: add SP11 platform profile and low-power cap#91ooaklee wants to merge 3 commits into
ooaklee wants to merge 3 commits into
Conversation
Device-tree systems can use platform-profile providers even when ACPI is disabled, but the framework currently declines to register its class in that case. Register the class unconditionally and create the legacy ACPI attribute group only after ACPI has initialized successfully. Record that group registration and use it to guard legacy notifications and teardown. This keeps the class path independent of ACPI while also avoiding a stale acpi_kobj after an ACPI initialization failure. This exposes the native /sys/class/platform-profile/ interface without creating a synthetic /sys/firmware/acpi hierarchy. Existing ACPI systems retain the legacy aggregate attributes unchanged. This is a contained rework of the original SP11 non-ACPI enablement. Link: 106ad0d Signed-off-by: Leon Silcott <leon@boasi.io>
The Surface Pro 11 has active cooling and supports SAM performance profiles, but its registry group does not instantiate the existing platform-profile and fan-speed devices. Add the existing fan-capable profile node and fan-speed node only to the Denali software-node group. Other Surface device groups are unchanged. Link: 5c513ff Signed-off-by: Leon Silcott <leon@boasi.io>
The Surface Pro 11 needs a lower CPU-frequency ceiling in its low-power profile to match the validated cool-running baseline. Describe the 2.515 GHz ceiling and default low-power selection on an SP11-only software node. Set up frequency-QoS only when that per-device property is present. Devices without it retain the legacy TMP-then-fan write order, including writes that repeat the current profile. Track cpufreq policies through CREATE and REMOVE notifications plus a per-device CPU-hotplug state, so a policy that is fully offline at probe is capped when a CPU returns. Hold policy references while attaching requests, clear stored raw pointers synchronously on REMOVE, and stop hotplug callbacks before tearing down requests and the notifier. When entering low power, apply the cap before fan and TMP changes; when leaving, restore fan and TMP before dropping the cap. If a SAM write fails, read TMP back and reconcile fan and cap conservatively. An unavailable cpufreq subsystem degrades to profile-only operation. Omit the staging implementation’s no-op power-supply notifier. This is a contained rework of the original SP11 low-power implementation. Link: 30972bd Signed-off-by: Leon Silcott <leon@boasi.io>
ooaklee
added a commit
to ooaklee/linux_ms_dev_kit-sp11
that referenced
this pull request
Sep 1, 2026
Integrate jglathe#91 for combined SP11 testing. Resolve the jglathe#90 prerequisite overlap by retaining the Denali-scoped battery-provider omissions alongside the profile and fan nodes. Signed-off-by: Leon Silcott <leon@boasi.io>
jglathe
force-pushed
the
jg/ubuntu-qcom-x1e-7.2.y
branch
from
September 3, 2026 10:32
87bcf07 to
4943ee7
Compare
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.
Summary
Dependency and status
This PR targets
jg/ubuntu-qcom-x1e-7.2.ydirectly and is the final contained platform-profile topic in the ordered SP11 extraction:The branch is based directly on the current release branch, including the volume-key work merged through #82. It does not merge the #90 prerequisite head, the broad
-sp11staging branch, or #81's staging-fix branch.The battery topic and this topic both edit
ssam_node_group_sp11. This direct-base branch keeps the platform-profile diff independently reviewable, but it must be rebased/re-lifted after #90 merges. That re-lift must preserve both battery-provider omissions from #90 as well as the profile and fan additions here before this PR can leave draft status.This PR is a draft because it touches shared platform-profile framework code and requires the SP11 and cross-device checks below before it is ready.
Containment
CONFIG_ACPI=y, the platform-profile class remains available to device-tree providers when ACPI is disabled at runtime, including anacpi=offboot; the legacy ACPI attribute group is still created only when ACPI has initialized successfully and its kobject is availableCONFIG_ACPI=nis not a supported build case for this change: bothACPI_PLATFORM_PROFILEandSURFACE_PLATFORM_PROFILEare selected from ACPI-dependent Kconfig paths, so relocating those subsystems is outside this topiclow-power-max-frequency-khzpropertycpufreq.off=1boot or notifier-registration failure, only the optional frequency cap is disabled; platform-profile and fan control remain registeredProvenance
All three focused rewrites are authored by Leon Silcott, retain immutable links to their corresponding integration commits, and carry the authorized
Signed-off-by: Leon Silcott <leon@boasi.io>.Validation
git diff --check e3bd10a401d9..HEADubuntu_x1e_defconfigW=1builds, with 10 jobs, ofdrivers/acpi/platform_profile.o,drivers/platform/surface/surface_aggregator_registry.o, anddrivers/platform/surface/surface_platform_profile.oW=1object targets build with 10 jobs andCONFIG_CPU_FREQ=n, covering the optional QoS pathThese are targeted object-build checks. They do not claim a complete kernel package build or a successful standalone module/modpost pass.
Userspace integration
Ubuntu Resolute's stock Power Profiles Daemon 0.30-2 probes only the legacy
/sys/firmware/acpi/platform_profileand/sys/firmware/acpi/platform_profile_choicespaths. It does not discover the native/sys/class/platform-profileprovider added here.Direct native-sysfs testing is therefore available with this kernel alone, but desktop integration and
powerprofilesctlrequire the pinned companion userspace change or an equivalent backport. That userspace combination must be tested before this PR is marked ready.Hardware checks still required
cpufreq.off=1and confirm profile selection and fan control still work while no frequency cap is advertised or attemptedpowerprofilesctl