Skip to content

[allwinner-aiot-linux-5.15] thermal: power_allocator: step non actor cooling devices; opp: quiet log - #617

Open
Pranav0-0Aggarwal wants to merge 2 commits into
radxa:allwinner-aiot-linux-5.15from
Pranav0-0Aggarwal:fix/ipa-non-actor-cdev-and-opp-log
Open

Pranav0-0Aggarwal wants to merge 2 commits into
radxa:allwinner-aiot-linux-5.15from
Pranav0-0Aggarwal:fix/ipa-non-actor-cdev-and-opp-log

Conversation

@Pranav0-0Aggarwal

Copy link
Copy Markdown

Two independent fixes, found on a Cubie A7S (A733).
Closes #616

  1. power_allocator: step non actor cooling devices. power_allocator only drives power actors, so a pwm-fan bound to a trip of an IPA zone stays at its probe state, which is max. The fan never slows down. New step_non_actors() runs at the top of power_allocator_throttle(): at or above the trip it steps the cdev up by one, below trip minus hysteresis it releases it, in between it holds; locking follows step_wise. On the A7S the fan cooling device sat at 4/4 in every idle sample on stock, and at 0 at idle and 4 under load (above the 65 C trip) with this patch. Mainline gov_power_allocator.c has the same gap.
  2. opp: log unsupported OPPs at debug level. The A733 tables carry OPPs with no voltage, which print 111 warning lines per boot. They stay unavailable and cpufreq is unchanged (1794 / 2002 MHz max); only the log level changes.

Tested by building linux-a733 5.15.147-21 with both commits and booting it on a Cubie A7S. No fan was fitted, so only the cooling device state was observed, not fan RPM. The IPA change affects every IPA zone with a non actor cooling device on any board using this kernel.

Cooling devices that are not power actors (e.g. pwm-fan) were never
updated and stayed at max. Step them up at the trip and release them
below the trip minus its hysteresis.

Signed-off-by: Pranav0-0Aggarwal <96537779+Pranav0-0Aggarwal@users.noreply.github.com>
OPPs with no voltage fail the regulator check on every add and flood
the boot log with warnings; cpufreq is unaffected.

Signed-off-by: Pranav0-0Aggarwal <96537779+Pranav0-0Aggarwal@users.noreply.github.com>
@Pranav0-0Aggarwal

Copy link
Copy Markdown
Author

@RadxaYuntian @RadxaStephen could you review when you have time? This lets power_allocator step cooling devices that are not power actors (e.g. pwm fan), tested on Cubie A7S. Thanks!

@Pranav0-0Aggarwal

Copy link
Copy Markdown
Author

Also tested on a Cubie A7A, which has a pwm-fan mapped to cpul_threshold/cpub_threshold. Stock 5.15.147-21: the fan cooling device sits at cur_state 4/4 from boot at idle (about 35 C) and power_allocator never changes it. With this patch it reads 0/4 at idle and is stepped by the zone trips like any other non power actor.

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