]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cpufreq/amd-pstate: Cache EPP value and use that everywhere
authorMario Limonciello <mario.limonciello@amd.com>
Mon, 9 Dec 2024 18:52:44 +0000 (12:52 -0600)
committerMario Limonciello <mario.limonciello@amd.com>
Wed, 11 Dec 2024 16:44:53 +0000 (10:44 -0600)
commitb3781f30bfcfd7db12de2595adb01779e565e1c6
treec2eb899a2e51150446d5cbf9d6659c4756109321
parent3f7b835fa4d0d06f82249a3aca989fdf9bdf4656
cpufreq/amd-pstate: Cache EPP value and use that everywhere

Cache the value in cpudata->epp_cached, and use that for all callers.
As all callers use cached value merge amd_pstate_get_energy_pref_index()
into show_energy_performance_preference().

Check if the EPP value is changed before writing it to MSR or
shared memory region.

Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Link: https://lore.kernel.org/r/20241209185248.16301-12-mario.limonciello@amd.com
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
drivers/cpufreq/amd-pstate.c