cpufreq: amd-pstate: add quirk for Ryzen 3000 series processor
Subsystems (2)
Perry Yuan
reviewerPATCH 1/1 cpufreq: amd-pstate: add quirk for Ryzen 3000 series processor
The Ryzen 3000 series processors have been observed lacking the nominal_freq and lowest_freq parameters in their ACPI tables. This absence causes issues with loading the amd-pstate driver on these systems. Introduces a fix to resolve the dependency issue by adding a quirk specifically for the Ryzen 3000 series.
Signed-off-by Perry Yuan <[email protected]>
--- drivers/cpufreq/amd-pstate.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
drivers/cpufreq/amd-pstate.c +30 -0
@@ -142,6 +142,11 @@ static struct quirk_entry quirk_amd_7k62 = { .lowest_freq = 550, }; +static struct quirk_entry quirk_amd_mts = { + .nominal_freq =3600 , + .lowest_freq =550 , +}; +static int __init dmi_matched_7k62_bios_bug (const struct dmi_system_id *dmi) {/**
@@ -158,6 +163,21 @@ static int __init dmi_matched_7k62_bios_bug(const struct dmi_system_id *dmi)return 0 ; } +static int __init dmi_matched_mts_bios_bug (const struct dmi_system_id *dmi) +{ +/** +* match the broken bios for ryzen 3000 series processor support CPPC V2 +* broken BIOS lack of nominal_freq and lowest_freq capabilities +* definition in ACPI tables +*/ +if (cpu_feature_enabled (X86_FEATURE_ZEN2 )) { + quirks = dmi->driver_data; +pr_info ("Overriding nominal and lowest frequencies for %s\n" , dmi->ident); +return 1 ; + } + +return 0 ; +}static const struct dmi_system_id amd_pstate_quirks_table[]__initconst = { { .callback = dmi_matched_7k62_bios_bug,
@@ -168,6 +188,16 @@ static const struct dmi_system_id amd_pstate_quirks_table[] __initconst = { }, .driver_data = &quirk_amd_7k62, }, + { + .callback = dmi_matched_mts_bios_bug, + .ident = "AMD Ryzen 3000", + .matches = { + DMI_MATCH(DMI_PRODUCT_NAME, "B450M MORTAR MAX (MS-7B89)"), + DMI_MATCH(DMI_BIOS_RELEASE, "06/10/2020"), + DMI_MATCH(DMI_BIOS_VERSION, "5.14"), + }, + .driver_data = &quirk_amd_7k62, + }, {} }; MODULE_DEVICE_TABLE(dmi, amd_pstate_quirks_table);
Signature · 1 line
2.34.1