Skip to content

Changes for ARM/Qualcomm - #585

Merged
spandruvada merged 2 commits into
masterfrom
thermald_next
Jul 15, 2026
Merged

Changes for ARM/Qualcomm#585
spandruvada merged 2 commits into
masterfrom
thermald_next

Conversation

@spandruvada

Copy link
Copy Markdown
Contributor

No description provided.

This commit adds complete support for Qualcomm SPEL-based
thermal cooling on Qualcomm SOCs. SPEL stands for
SoC Power Estimation and Limiting and is a power capping
mechanism that allows limiting power consumption at the
SOC and SYS domain levels.

Changes since v1:
- Remove unused dynamic_phy_max_enable member variable
- Fix domain-wide "enabled" sysfs being toggled per-constraint in
  set_curr_state(); power limit writes alone are sufficient for
  thermal control.
- Add thd_cdev_spel_restore.cpp: register an atexit() handler to
  restore SPEL power limits and time windows on daemon exit, keyed
  per domain/constraint path (similar to thd_cdev_rapl_restore.cpp)
- Wire thd_cdev_spel_restore.cpp into Makefile.am and Android.mk

Changes since v2:
- Use std::move() when forwarding _domain_type string parameter in
  the delegating constructor to avoid an unnecessary copy
  (performance-unnecessary-value-param)
- Replace NULL with nullptr in opendir() and readdir() comparisons
  in thd_engine_default.cpp (modernize-use-nullptr)

Signed-off-by: Priyansh Jain <priyansh.jain@oss.qualcomm.com>
Add support for platform-specific thermal configuration matching using
the device tree model string, enabling thermald to apply the correct
thermal rules on ARM/Qualcomm SoCs.

A new <SoCModel> XML element is introduced in thermal-conf.xml Platform
entries. During platform matching, thermald reads the board model string
from /sys/firmware/devicetree/base/model and performs a prefix match
against the configured SoCModel value.

Changes in v2:
 - Add XML documentation for SocModel.
 - Address review comments on logging and code style.

Signed-off-by: Priyansh Jain <priyansh.jain@oss.qualcomm.com>
@spandruvada
spandruvada merged commit 2d93d94 into master Jul 15, 2026
2 checks passed
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.

2 participants