Commit c2d88559 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'platform-drivers-x86-v6.9-3' of...

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
parents 8cd26fd9 f609e7b1
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -208,6 +208,15 @@ static const struct dmi_system_id fwbug_list[] = {
			DMI_MATCH(DMI_BIOS_VERSION, "03.03"),
		}
	},
	{
		.ident = "Framework Laptop 13 (Phoenix)",
		.driver_data = &quirk_spurious_8042,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Framework"),
			DMI_MATCH(DMI_PRODUCT_NAME, "Laptop 13 (AMD Ryzen 7040Series)"),
			DMI_MATCH(DMI_BIOS_VERSION, "03.05"),
		}
	},
	{}
};

+1 −1
Original line number Diff line number Diff line
@@ -7,4 +7,4 @@
obj-$(CONFIG_AMD_PMF) += amd-pmf.o
amd-pmf-objs := core.o acpi.o sps.o \
		auto-mode.o cnqf.o \
		tee-if.o spc.o
		tee-if.o spc.o pmf-quirks.o
+5 −2
Original line number Diff line number Diff line
@@ -343,7 +343,10 @@ static int apmf_if_verify_interface(struct amd_pmf_dev *pdev)
	if (err)
		return err;

	/* only set if not already set by a quirk */
	if (!pdev->supported_func)
		pdev->supported_func = output.supported_functions;

	dev_dbg(pdev->dev, "supported functions:0x%x notifications:0x%x version:%u\n",
		output.supported_functions, output.notification_mask, output.version);

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

	status = acpi_walk_resources(ahandle, METHOD_NAME__CRS, apmf_walk_resources, pmf_dev);
	if (ACPI_FAILURE(status)) {
		dev_err(pmf_dev->dev, "acpi_walk_resources failed :%d\n", status);
		dev_dbg(pmf_dev->dev, "acpi_walk_resources failed :%d\n", status);
		return -EINVAL;
	}

+1 −0
Original line number Diff line number Diff line
@@ -445,6 +445,7 @@ static int amd_pmf_probe(struct platform_device *pdev)
	mutex_init(&dev->lock);
	mutex_init(&dev->update_mutex);

	amd_pmf_quirks_init(dev);
	apmf_acpi_init(dev);
	platform_set_drvdata(pdev, dev);
	amd_pmf_dbgfs_register(dev);
+51 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * AMD Platform Management Framework Driver Quirks
 *
 * Copyright (c) 2024, Advanced Micro Devices, Inc.
 * All Rights Reserved.
 *
 * Author: Mario Limonciello <mario.limonciello@amd.com>
 */

#include <linux/dmi.h>

#include "pmf.h"

struct quirk_entry {
	u32 supported_func;
};

static struct quirk_entry quirk_no_sps_bug = {
	.supported_func = 0x4003,
};

static const struct dmi_system_id fwbug_list[] = {
	{
		.ident = "ROG Zephyrus G14",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_PRODUCT_NAME, "GA403UV"),
		},
		.driver_data = &quirk_no_sps_bug,
	},
	{}
};

void amd_pmf_quirks_init(struct amd_pmf_dev *dev)
{
	const struct dmi_system_id *dmi_id;
	struct quirk_entry *quirks;

	dmi_id = dmi_first_match(fwbug_list);
	if (!dmi_id)
		return;

	quirks = dmi_id->driver_data;
	if (quirks->supported_func) {
		dev->supported_func = quirks->supported_func;
		pr_info("Using supported funcs quirk to avoid %s platform firmware bug\n",
			dmi_id->ident);
	}
}
Loading