From patchwork Fri Dec 6 03:19:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 13896374 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2056.outbound.protection.outlook.com [40.107.95.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 08EC01917C2; Fri, 6 Dec 2024 03:27:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.95.56 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733455664; cv=fail; b=qvuRG7KzbD73w5poiOSe7Ss/DuVPP+mXa032rJ68Jlr0MwaeFa9+TQ8rbnisvMsAfVVNPJyLoWCYt1NYsB+JMoicfVfH8sGsn7IQ+W/8XXj97zro/IOOLH+8Vn+hVGMsvYKE2QNHoXCymVoDBHiZ1KUT6x28Ks13F/cu7/QR6cU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733455664; c=relaxed/simple; bh=T1bYGn0KpwhUd6ZGujBEzj+/hkw4qrWYZL3oi2BdodI=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=rgB7GMFwGhuTWBSaXxaAZqy1NcZOpNwyw7qtqOI4IWNj2G+51g1Lxg13yQcoihdDcRufrzeTwzqSlUJpixVvsWISgm8shJup7Ad9ie9ofAaerLHgc4dLdhRqisAJCUiPasJnj69AZg7JVXvj3+LiOcUkCY6lI7ZdjfJxO3LP9DQ= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=Jh6dTeeu; arc=fail smtp.client-ip=40.107.95.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="Jh6dTeeu" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Aycj2zTL8vcPOwfvCn21xE9OGJ2xnH2+2ASWmEdLb35Uls7Lyhwblacg9MuGL2uLMF9f42tmcyKbws09GXeuL2Jb6rLo4ZGBuo9sIBhPUen9MtASpq++KUwkU83PJkdxZjNNRmDG9MJ6Yauqe79kRb42jDCeLTOFO2L0/1+//HQmzKjD6U4c6GFQU7HO49lUqWRus2k/hvZxJwfAcaEpITPaOoWbv3UhrFnIbFahHHrIE+2gq6nS42pY2oFshP+b8dlUuVvP1JJ7GuYnXhK/d99B6IsEUhjvV8/DFNe5pJD1AE7Eugr9QwC6BBcmDM1wtp7v3AzeIjeCZ5Kg0ek/vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Wb6FvQepg1AVZdVCMCErgELk27WlH2wG4cscML7kY5k=; b=PUzLZYRDA0RZwdeYOlqgxwz/AG6EaO1AkVjB9zu8OE/yGHgMjeA3tPKqiWyytIwK/rmpP3CgU1fiYvUHkQ5de304Uqlg95ZHPYB9efXkqpkFlxe0ZPVfXIMmDrkEET7DVSbAiPRBrUdAmyOOfh0qM7rI23TGTFxdm1iLnT9LRzOQmkmTxiAR9aZBKjqWMQM4uwAGAkHj6Z4izDrAy+AX/blWNewEQGpyaOyKvwTxWPcefbo/Yr4su1kwVm2EcOK0wm64wRq8AhS0kGk2V8FLLTbGJ1vjxrXFaxYD4U4p3iO++0GdWu7gyl+w0fHlJEkmpi4xJGEB4tlyqX+gFPiZHw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Wb6FvQepg1AVZdVCMCErgELk27WlH2wG4cscML7kY5k=; b=Jh6dTeeuvnnWrdCIh8eBARh/bUTkHM9Xs1MgiMF1cpg4+ePNcpJ/XyFJ6/puYD5f7Hijq09VhJlmcxYIzoUTsQUl+4nQpd8YnD2WnHuAaxktCVJMHsBdUcPBQmHvKlUnnSnhsRD89PpuIIrHcBFaoqiKnWhAYHdgPblN0AaI/HE= Received: from SJ0PR05CA0047.namprd05.prod.outlook.com (2603:10b6:a03:33f::22) by CYXPR12MB9338.namprd12.prod.outlook.com (2603:10b6:930:e5::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.11; Fri, 6 Dec 2024 03:27:39 +0000 Received: from SJ1PEPF000023D1.namprd02.prod.outlook.com (2603:10b6:a03:33f:cafe::90) by SJ0PR05CA0047.outlook.office365.com (2603:10b6:a03:33f::22) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8230.11 via Frontend Transport; Fri, 6 Dec 2024 03:27:39 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SJ1PEPF000023D1.mail.protection.outlook.com (10.167.244.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8230.7 via Frontend Transport; Fri, 6 Dec 2024 03:27:38 +0000 Received: from AUS-P9-MLIMONCI.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 5 Dec 2024 21:26:26 -0600 From: Mario Limonciello To: Hans de Goede , =?utf-8?q?Ilpo_J=C3=A4rvinen?= CC: "Rafael J . Wysocki" , Len Brown , Maximilian Luz , Lee Chun-Yi , "Shyam Sundar S K" , Corentin Chary , "Luke D . Jones" , Ike Panhc , Henrique de Moraes Holschuh , "Alexis Belmonte" , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Ai Chao , Gergo Koteles , open list , "open list:ACPI" , "open list:MICROSOFT SURFACE PLATFORM PROFILE DRIVER" , "open list:THINKPAD ACPI EXTRAS DRIVER" , Mark Pearson , Matthew Schwartz , Mario Limonciello , Armin Wolf Subject: [PATCH v10 21/22] platform/x86/amd: pmf: Drop all quirks Date: Thu, 5 Dec 2024 21:19:17 -0600 Message-ID: <20241206031918.1537-22-mario.limonciello@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241206031918.1537-1-mario.limonciello@amd.com> References: <20241206031918.1537-1-mario.limonciello@amd.com> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF000023D1:EE_|CYXPR12MB9338:EE_ X-MS-Office365-Filtering-Correlation-Id: 28084663-3a16-401a-335a-08dd15a5efa3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|36860700013|376014|1800799024|7416014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?V3AwtRxKfyrgyelRgSiBsGniPyiBnZB?= =?utf-8?q?iZjVz8DqZxHH/IH6r/lLA489h8n2Y46MXpfzrUjOsS4I+2JEHkQ9x3AbgjJhWAbM5?= =?utf-8?q?j1dy+iitAKGZxh3PgF1XzVPwfJLKIEcnBFNUcbwB+ExgmKYKUX2XPngBO1+qWfoi5?= =?utf-8?q?fQW+bvo6tAmR+3EqAzl5fUSTP/kxZVJBDGUMCgaAEVVI2lKr2v120YAEktkmtP6Mt?= =?utf-8?q?79E2o2rKuMHe8AO1rBvQ7s77qU3S7LucAiztRa/9Div8qXw2ero9DtBPu0dW3cbQW?= =?utf-8?q?IpVeYaWZC0pBKffdAD77SAWJSY6A0kPPOu1qp7HtdzeMcaCjmVS17kxRFNcfJYnqB?= =?utf-8?q?rAnsbBzwlCjAIZBp+C7WRiJU0htdwyWK2jHgzYDHf/lDizEDGkhfdB6f6Iy0WWkQT?= =?utf-8?q?tx9OEmH06OE648IS6TDkU7y4P3AICJCYMZ683hSZQEnfN1AEHUAI4gkV/Fqx8m2tY?= =?utf-8?q?8jeQsiujokoyc79h9A2cyrqiGPwmmyBJaCg0HNT2SqrMx9Yvn2j5uknPTCDZwil2B?= =?utf-8?q?wgfwjynu5B0aH2gQEYeXy/YpSB0Ueko/mhGfUYxzaxWZXG4BQxtpUrsTpPgu+GyH9?= =?utf-8?q?21ZrsERUS0Kdl2cA4VrVi7aqnXJGs7jfjQdrA17Ad8+ZthUr8p+/vSSVjF8ooUehD?= =?utf-8?q?Qu24dGILg4iOV7P1Z5ohSQ9CG5gSnZfJUzkgZXAIaiShFMP6HxJTIHP2TlARIN4QE?= =?utf-8?q?/qpdPrx5vse2bUa5RBK/YgfrLcOV7VL/nYUdQzpaFxn6ooXlt0WD/lKwaJ6tZu+xd?= =?utf-8?q?mDNjgQokhP9hC+iNC3jPGEpR4TK7AjM2COrd5puc3pD/VVYE5guJhu7VnRI6AqPHy?= =?utf-8?q?okJBPkZOVT+9FK5KZsQDRYiQ1VOZU8g5GbDQvg18Kydp2OJ+wKacepOgi+YbLPqdT?= =?utf-8?q?pJp2WXFYKo8qfexmwz1/2uGn237vFnnwKAjlZCbIZmZ/Ik2AzfCilVCF/oh/INDa3?= =?utf-8?q?zQNdJtkTotugTVBVBaT+GCaFISrU8v3I+Ujno2Zw863Pk5J0RTVJpasw2hwHMssjL?= =?utf-8?q?QMYohIhOB2pDWRce96vgAcUC924XLWKEuUqYQXm2rwCsC3znOhImYsB2fDnYHeLjz?= =?utf-8?q?IDDgWy6fhtBr2UCZ/WT+vuHzGNTt5EgDzUQZ2gyNYK26ZMClLX5viizviSpyVylci?= =?utf-8?q?RzAExVXK+ps2LzAHsJidEEc+X+hdoQB98d8EVnU9qJuS22ECo61OaxJ3vqL68DyQm?= =?utf-8?q?wiuRSEsAwFNmy/fP/Q2jyQzcrlygI7/rF62FS1k3vkpd2Fz/FXnGeYaraACoAw/L6?= =?utf-8?q?dAWknlQFmhaP2Lk4owGy+OVa6XUKJxTufFlTS/Js+MYDk9rMlOKCg62Q71hGXb9wY?= =?utf-8?q?1UmeT56aynu0DYP2pjgUA7CiCkXfajsB6WkLf467AdmVVzYZOHd/k1OfCdL+KRfx3?= =?utf-8?q?GViardlTJl7?= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(36860700013)(376014)(1800799024)(7416014);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Dec 2024 03:27:38.9153 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 28084663-3a16-401a-335a-08dd15a5efa3 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF000023D1.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYXPR12MB9338 As multiple platform profile handlers can now be registered, the quirks to avoid registering amd-pmf as a handler are no longer necessary. Drop them. Reviewed-by: Armin Wolf Tested-by: Mark Pearson Tested-by: Matthew Schwartz Acked-by: Shyam Sundar S K Reviewed-by: Mark Pearson Reviewed-by: Ilpo Järvinen Signed-off-by: Mario Limonciello --- drivers/platform/x86/amd/pmf/Makefile | 2 +- drivers/platform/x86/amd/pmf/core.c | 1 - drivers/platform/x86/amd/pmf/pmf-quirks.c | 66 ----------------------- drivers/platform/x86/amd/pmf/pmf.h | 3 -- 4 files changed, 1 insertion(+), 71 deletions(-) delete mode 100644 drivers/platform/x86/amd/pmf/pmf-quirks.c diff --git a/drivers/platform/x86/amd/pmf/Makefile b/drivers/platform/x86/amd/pmf/Makefile index 7d6079b02589c..6b26e48ce8ad2 100644 --- a/drivers/platform/x86/amd/pmf/Makefile +++ b/drivers/platform/x86/amd/pmf/Makefile @@ -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 pmf-quirks.o + tee-if.o spc.o diff --git a/drivers/platform/x86/amd/pmf/core.c b/drivers/platform/x86/amd/pmf/core.c index 06a97c533cb85..01eb9ee1eccd9 100644 --- a/drivers/platform/x86/amd/pmf/core.c +++ b/drivers/platform/x86/amd/pmf/core.c @@ -456,7 +456,6 @@ 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); diff --git a/drivers/platform/x86/amd/pmf/pmf-quirks.c b/drivers/platform/x86/amd/pmf/pmf-quirks.c deleted file mode 100644 index 7cde5733b9cac..0000000000000 --- a/drivers/platform/x86/amd/pmf/pmf-quirks.c +++ /dev/null @@ -1,66 +0,0 @@ -// 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 - */ - -#include - -#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, "GA403U"), - }, - .driver_data = &quirk_no_sps_bug, - }, - { - .ident = "ROG Ally X", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), - DMI_MATCH(DMI_PRODUCT_NAME, "RC72LA"), - }, - .driver_data = &quirk_no_sps_bug, - }, - { - .ident = "ASUS TUF Gaming A14", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), - DMI_MATCH(DMI_PRODUCT_NAME, "FA401W"), - }, - .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); - } -} diff --git a/drivers/platform/x86/amd/pmf/pmf.h b/drivers/platform/x86/amd/pmf/pmf.h index a79808fda1d89..64ab532550ac3 100644 --- a/drivers/platform/x86/amd/pmf/pmf.h +++ b/drivers/platform/x86/amd/pmf/pmf.h @@ -797,7 +797,4 @@ int amd_pmf_smartpc_apply_bios_output(struct amd_pmf_dev *dev, u32 val, u32 preq void amd_pmf_populate_ta_inputs(struct amd_pmf_dev *dev, struct ta_pmf_enact_table *in); void amd_pmf_dump_ta_inputs(struct amd_pmf_dev *dev, struct ta_pmf_enact_table *in); -/* Quirk infrastructure */ -void amd_pmf_quirks_init(struct amd_pmf_dev *dev); - #endif /* PMF_H */