cpufreq: amd-pstate: Set a fallback policy based on preferred_profile
authorMario Limonciello <mario.limonciello@amd.com>
Tue, 20 Jun 2023 17:24:32 +0000 (12:24 -0500)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 21 Jun 2023 16:44:56 +0000 (18:44 +0200)
commit32f80b9adfdb43f8af248596724f59dde938a190
tree553630058cdbeea21de3514995d60cd349112524
parent965262ef71c475857d0984a5eee57694b207a113
cpufreq: amd-pstate: Set a fallback policy based on preferred_profile

If a user's configuration doesn't explicitly specify the cpufreq
scaling governor then the code currently explicitly falls back to
'powersave'. This default is fine for notebooks and desktops, but
servers and undefined machines should default to 'performance'.

Look at the 'preferred_profile' field from the FADT to set this
policy accordingly.

Link: https://uefi.org/htmlspecs/ACPI_Spec_6_4_html/05_ACPI_Software_Programming_Model/ACPI_Software_Programming_Model.html#fixed-acpi-description-table-fadt
Acked-by: Huang Rui <ray.huang@amd.com>
Suggested-by: Wyes Karny <Wyes.Karny@amd.com>
Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Perry Yuan <Perry.Yuan@amd.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/amd-pstate.c