Skip to content

underclock: add a single generic recipe for all watches - #292

Open
FlorentRevest wants to merge 1 commit into
masterfrom
underclock
Open

underclock: add a single generic recipe for all watches#292
FlorentRevest wants to merge 1 commit into
masterfrom
underclock

Conversation

@FlorentRevest

Copy link
Copy Markdown
Member

Every watch shipped its own recipes-core/underclock recipe that was identical apart from a device-tuned script. Introduce one generic, machine-independent recipe here so the per-device copies in meta-smartwatch can be dropped.

The script guards every sysfs write behind an existence/writability check, so a single script adapts to whatever a given kernel exposes:

  • offline every CPU core except cpu0 (adapts to the core count, so dual-core watches only drop cpu1)
  • pick the best available CPU governor: schedutil (mainline since 4.7) when offered, else ondemand -- this reproduces each watch's previous choice from kernel age alone, with no per-device configuration
  • pin the GPU to its lowest available frequency, read from kgsl-3d0/devfreq/available_frequencies (no hardcoded MHz)
  • enable the lpm_levels / lpm_levels_legacy sleep and idle knobs
  • prime MediaTek deep sleep via /dev/spm where present
  • apply tetra's PowerHAL fixups (interactive governor + chown of the kona-fb / interactive tunables) only when the tetra-only kona-fb platform device exists

Every watch shipped its own recipes-core/underclock recipe that was
identical apart from a device-tuned script. Introduce one generic,
machine-independent recipe here so the per-device copies in
meta-smartwatch can be dropped.

The script guards every sysfs write behind an existence/writability
check, so a single script adapts to whatever a given kernel exposes:

- offline every CPU core except cpu0 (adapts to the core count, so
  dual-core watches only drop cpu1)
- pick the best available CPU governor: schedutil (mainline since 4.7)
  when offered, else ondemand -- this reproduces each watch's previous
  choice from kernel age alone, with no per-device configuration
- pin the GPU to its lowest available frequency, read from
  kgsl-3d0/devfreq/available_frequencies (no hardcoded MHz)
- enable the lpm_levels / lpm_levels_legacy sleep and idle knobs
- prime MediaTek deep sleep via /dev/spm where present
- apply tetra's PowerHAL fixups (interactive governor + chown of the
  kona-fb / interactive tunables) only when the tetra-only kona-fb
  platform device exists
@FlorentRevest

Copy link
Copy Markdown
Member Author

This goes hand in hand with AsteroidOS/meta-smartwatch#329

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