AMD, CPPC, etc

From: Chris Torek <chris.torek_at_gmail.com>
Date: Sat, 23 May 2026 08:55:17 UTC
Commit 80d32a6b1d73 (hwpstate_amd(4): CPPC: Switch the default to
maximum performance) cranks my 7950-based system from its 90-to-100
watt idle draw up to 150+ watts. If I set
dev.hwpstate_amd.0.desired_performance=0, it goes back down, so this
isn't too big a deal, but I see that powerd has no idea about using
the CPPC control knobs.

Should it? If so... the CPPC doesn't do frequency directly, so how
would we adapt that? The dev.cpu.0.freq_levels value is 4500/-1 while
dev.cpu.0.freq is set to 5499 initially (because desired_performance
was set to maximum).

(Other than that, I've upgraded the box to -current as of Friday or
so. Had to hack up some patches for libgtop and lsof ports to build
the ports I use, but it seems to be working fine so far.  Getting the
updated amdgpu firmware installed was a bit annoying as the system
thought that the FreeBSD-15 packages were fine, despite the kernel
version mismatch.)

Chris