]> git.ipfire.org Git - thirdparty/linux.git/commit
cpufreq/amd-pstate: Remove the unnecessary cpufreq_update_policy call
authorDhananjay Ugwekar <dhananjay.ugwekar@amd.com>
Wed, 5 Feb 2025 11:25:19 +0000 (11:25 +0000)
committerMario Limonciello <mario.limonciello@amd.com>
Mon, 24 Feb 2025 00:54:56 +0000 (18:54 -0600)
commitb899434857b0f1ab460b3c126cbed82ab9b52d43
treee44290e67dd95f32e989f4fee0ba77f72c173cdb
parent620136ced35a9329f4d1ea90e51bee2dfd7ee5b0
cpufreq/amd-pstate: Remove the unnecessary cpufreq_update_policy call

The update_limits callback is only called in two conditions.

* When the preferred core rankings change. In which case, we just need to
change the prefcore ranking in the cpudata struct. As there are no changes
to any of the perf values, there is no need to call cpufreq_update_policy()

* When the _PPC ACPI object changes, i.e. the highest allowed Pstate
changes. The _PPC object is only used for a table based cpufreq driver
like acpi-cpufreq, hence is irrelevant for CPPC based amd-pstate.

Hence, the cpufreq_update_policy() call becomes unnecessary and can be
removed.

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