Download raw body.
scmi: hook up to cpu_* to get apm working
Le Thu, May 22, 2025 at 07:16:17AM +0200, Tobias Heider a écrit : > On Snapdragon X Elite chips we have to use ARM SCMI to control cpu performance. > Our driver now supports reading the current performance level, translating > it to HZ and exporting it as a sensor as well as setting initial levels. > > I think it is time to hook everything up to cpu_setperf and cpu_clockspeed to > make those controls available to apm and hw.setperf. > Loosely inspired by aplcpu which deals with a similar problem on Apple machines. > > ok? test feedback? works fine on the omnibook x14. - i have 3 new sysctls for hw, cpuspeed, setperf and perfpolicy. - previously i had 'invalid' for 'Performance adjustment mode' in apm output. now when plugged in i have: Performance adjustment mode: manual (3417 MHz) hw.sensors.scmi0.power0=0.29 W hw.sensors.scmi0.power1=0.30 W hw.sensors.scmi0.power2=0.31 W hw.sensors.scmi0.frequency0=3417600000.00 Hz hw.sensors.scmi0.frequency1=3417600000.00 Hz hw.sensors.scmi0.frequency2=3417600000.00 Hz hw.cpuspeed=3417 hw.setperf=100 hw.perfpolicy=high when unplugged: Performance adjustment mode: auto (710 MHz) hw.sensors.scmi0.power0=0.02 W hw.sensors.scmi0.power1=0.02 W hw.sensors.scmi0.power2=0.02 W hw.sensors.scmi0.frequency0=710400000.00 Hz hw.sensors.scmi0.frequency1=710400000.00 Hz hw.sensors.scmi0.frequency2=710400000.00 Hz hw.cpuspeed=710 hw.setperf=0 hw.perfpolicy=auto great quality of life improvement :) Landry
scmi: hook up to cpu_* to get apm working