Skip to content

Commit c2d8855

Browse files
committed
Merge tag 'platform-drivers-x86-v6.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
Pull x86 platform driver fixes from Ilpo Järvinen: - amd/pmf: Add SPS notifications quirk (+ quirk support) - amd/pmf: Lower Smart PC check message severity - x86/ISST: New HW support - x86/intel-uncore-freq: Bump minor version to avoid "unsupported" message - amd/pmc: New BIOS version still needs Spurious IRQ1 quirk * tag 'platform-drivers-x86-v6.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86/amd/pmc: Extend Framework 13 quirk to more BIOSes platform/x86/intel-uncore-freq: Increase minor number support platform/x86: ISST: Add Granite Rapids-D to HPM CPU list platform/x86/amd: pmf: Add quirk for ROG Zephyrus G14 platform/x86/amd: pmf: Add infrastructure for quirking supported funcs platform/x86/amd: pmf: Decrease error message to debug
2 parents 8cd26fd + f609e7b commit c2d8855

File tree

8 files changed

+73
-5
lines changed

8 files changed

+73
-5
lines changed

drivers/platform/x86/amd/pmc/pmc-quirks.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,15 @@ static const struct dmi_system_id fwbug_list[] = {
208208
DMI_MATCH(DMI_BIOS_VERSION, "03.03"),
209209
}
210210
},
211+
{
212+
.ident = "Framework Laptop 13 (Phoenix)",
213+
.driver_data = &quirk_spurious_8042,
214+
.matches = {
215+
DMI_MATCH(DMI_SYS_VENDOR, "Framework"),
216+
DMI_MATCH(DMI_PRODUCT_NAME, "Laptop 13 (AMD Ryzen 7040Series)"),
217+
DMI_MATCH(DMI_BIOS_VERSION, "03.05"),
218+
}
219+
},
211220
{}
212221
};
213222

drivers/platform/x86/amd/pmf/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
obj-$(CONFIG_AMD_PMF) += amd-pmf.o
88
amd-pmf-objs := core.o acpi.o sps.o \
99
auto-mode.o cnqf.o \
10-
tee-if.o spc.o
10+
tee-if.o spc.o pmf-quirks.o

drivers/platform/x86/amd/pmf/acpi.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,10 @@ static int apmf_if_verify_interface(struct amd_pmf_dev *pdev)
343343
if (err)
344344
return err;
345345

346-
pdev->supported_func = output.supported_functions;
346+
/* only set if not already set by a quirk */
347+
if (!pdev->supported_func)
348+
pdev->supported_func = output.supported_functions;
349+
347350
dev_dbg(pdev->dev, "supported functions:0x%x notifications:0x%x version:%u\n",
348351
output.supported_functions, output.notification_mask, output.version);
349352

@@ -437,7 +440,7 @@ int apmf_check_smart_pc(struct amd_pmf_dev *pmf_dev)
437440

438441
status = acpi_walk_resources(ahandle, METHOD_NAME__CRS, apmf_walk_resources, pmf_dev);
439442
if (ACPI_FAILURE(status)) {
440-
dev_err(pmf_dev->dev, "acpi_walk_resources failed :%d\n", status);
443+
dev_dbg(pmf_dev->dev, "acpi_walk_resources failed :%d\n", status);
441444
return -EINVAL;
442445
}
443446

drivers/platform/x86/amd/pmf/core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,7 @@ static int amd_pmf_probe(struct platform_device *pdev)
445445
mutex_init(&dev->lock);
446446
mutex_init(&dev->update_mutex);
447447

448+
amd_pmf_quirks_init(dev);
448449
apmf_acpi_init(dev);
449450
platform_set_drvdata(pdev, dev);
450451
amd_pmf_dbgfs_register(dev);
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// SPDX-License-Identifier: GPL-2.0-or-later
2+
/*
3+
* AMD Platform Management Framework Driver Quirks
4+
*
5+
* Copyright (c) 2024, Advanced Micro Devices, Inc.
6+
* All Rights Reserved.
7+
*
8+
* Author: Mario Limonciello <[email protected]>
9+
*/
10+
11+
#include <linux/dmi.h>
12+
13+
#include "pmf.h"
14+
15+
struct quirk_entry {
16+
u32 supported_func;
17+
};
18+
19+
static struct quirk_entry quirk_no_sps_bug = {
20+
.supported_func = 0x4003,
21+
};
22+
23+
static const struct dmi_system_id fwbug_list[] = {
24+
{
25+
.ident = "ROG Zephyrus G14",
26+
.matches = {
27+
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
28+
DMI_MATCH(DMI_PRODUCT_NAME, "GA403UV"),
29+
},
30+
.driver_data = &quirk_no_sps_bug,
31+
},
32+
{}
33+
};
34+
35+
void amd_pmf_quirks_init(struct amd_pmf_dev *dev)
36+
{
37+
const struct dmi_system_id *dmi_id;
38+
struct quirk_entry *quirks;
39+
40+
dmi_id = dmi_first_match(fwbug_list);
41+
if (!dmi_id)
42+
return;
43+
44+
quirks = dmi_id->driver_data;
45+
if (quirks->supported_func) {
46+
dev->supported_func = quirks->supported_func;
47+
pr_info("Using supported funcs quirk to avoid %s platform firmware bug\n",
48+
dmi_id->ident);
49+
}
50+
}
51+

drivers/platform/x86/amd/pmf/pmf.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -720,4 +720,7 @@ int apmf_check_smart_pc(struct amd_pmf_dev *pmf_dev);
720720
void amd_pmf_populate_ta_inputs(struct amd_pmf_dev *dev, struct ta_pmf_enact_table *in);
721721
void amd_pmf_dump_ta_inputs(struct amd_pmf_dev *dev, struct ta_pmf_enact_table *in);
722722

723+
/* Quirk infrastructure */
724+
void amd_pmf_quirks_init(struct amd_pmf_dev *dev);
725+
723726
#endif /* PMF_H */

drivers/platform/x86/intel/speed_select_if/isst_if_common.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,7 @@ static struct miscdevice isst_if_char_driver = {
719719
};
720720

721721
static const struct x86_cpu_id hpm_cpu_ids[] = {
722+
X86_MATCH_INTEL_FAM6_MODEL(GRANITERAPIDS_D, NULL),
722723
X86_MATCH_INTEL_FAM6_MODEL(GRANITERAPIDS_X, NULL),
723724
X86_MATCH_INTEL_FAM6_MODEL(ATOM_CRESTMONT_X, NULL),
724725
{}

drivers/platform/x86/intel/uncore-frequency/uncore-frequency-tpmi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include "uncore-frequency-common.h"
3030

3131
#define UNCORE_MAJOR_VERSION 0
32-
#define UNCORE_MINOR_VERSION 1
32+
#define UNCORE_MINOR_VERSION 2
3333
#define UNCORE_HEADER_INDEX 0
3434
#define UNCORE_FABRIC_CLUSTER_OFFSET 8
3535

@@ -329,7 +329,7 @@ static int uncore_probe(struct auxiliary_device *auxdev, const struct auxiliary_
329329
goto remove_clusters;
330330
}
331331

332-
if (TPMI_MINOR_VERSION(pd_info->ufs_header_ver) != UNCORE_MINOR_VERSION)
332+
if (TPMI_MINOR_VERSION(pd_info->ufs_header_ver) > UNCORE_MINOR_VERSION)
333333
dev_info(&auxdev->dev, "Uncore: Ignore: Unsupported minor version:%lx\n",
334334
TPMI_MINOR_VERSION(pd_info->ufs_header_ver));
335335

0 commit comments

Comments
 (0)