cpufreq: amd-pstate: Add quirk for the pstate CPPC capabilities missing
authorPerry Yuan <perry.yuan@amd.com>
Thu, 25 Apr 2024 08:07:58 +0000 (16:07 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 26 Apr 2024 17:35:38 +0000 (19:35 +0200)
commiteb8b6c36820214df96e7e86d8614d93f6b028f28
tree3171ee196cbce85357ee3c43526e97a68a7a19e9
parent5f8f9bc4d7bc8d44031b88b548c2572b746e2611
cpufreq: amd-pstate: Add quirk for the pstate CPPC capabilities missing

Add quirks table to get CPPC capabilities issue fixed by providing
correct perf or frequency values while driver loading.

If CPPC capabilities are not defined in the ACPI tables or wrongly
defined by platform firmware, it needs to use quick to get those
issues fixed with correct workaround values to make pstate driver
can be loaded even though there are CPPC capabilities errors.

The workaround will match the broken BIOS which lack of CPPC capabilities
nominal_freq and lowest_freq definition in the ACPI table.

$ cat /sys/devices/system/cpu/cpu0/acpi_cppc/lowest_freq
0
$ cat /sys/devices/system/cpu/cpu0/acpi_cppc/nominal_freq
0

Acked-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Tested-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com>
Signed-off-by: Perry Yuan <perry.yuan@amd.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/amd-pstate.c
include/linux/amd-pstate.h