From patchwork Tue Jul 23 13:24:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shyam Sundar S K X-Patchwork-Id: 13739999 X-Patchwork-Delegate: ilpo.jarvinen@linux.intel.com Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2050.outbound.protection.outlook.com [40.107.100.50]) (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 3854514EC4D for ; Tue, 23 Jul 2024 13:25:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.100.50 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721741114; cv=fail; b=jGLKk1rzFINM/02qvO/DuioFC9NYwRbtzEWhkiySgPtBcL2+nPS7eFtCkzpbvAuXbtesR8UclVgseo0aGcu9xNQIcFzqM1FsQZwepT8vTY9B/yN3V3Ykp42nMpi34TiT40jcf/7FZsS73CjTTbatuPVAucJHsei+vPEQ6RXQgIA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721741114; c=relaxed/simple; bh=4JVTRxAXiVBzpjZvV3V5YynCAH5VG8htOw1APa/OeE8=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=UQ/c8+SDhkJtzQ8CzGEizeQ+MRFMOE1KCJO9fytzca+c3lI2nDoaJ5sNx2ju9KY2GrCRUmJ2c7qQ8ccdn+GfukZOhsfOxoa6lBoG3jviRiFFSgJDK7V0/PW3P8xwPWwVHL9ROZJ7lrSlVP4pOI3tQ5gNNcghAfS+CwYQR/XqmHc= 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=ppulY0t6; arc=fail smtp.client-ip=40.107.100.50 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="ppulY0t6" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=bENdPvF5evLvbweI0WsZEq1qJGLBk+CP6wymbBv1rU/q7qRku1OcQNZ6bDNCne/VJKPmnwkdYz2P7YaaOeQabX+xuHDHRK2h2eHywG83B2L8jYxd6S+Vp3tx5RbH/VdhJc0wTQyh+1GWmCzHfFYDhKeqtFyxemlxdINlQhYJO0Z/bWAOx/Pcax+oHNh8bAV4gPNB6NLa6vTEcGgkqVtQn2W0JJYzA9PZOFb4emzRsmLoTisjnTXOjERSRduLYtnDLM9BVpbThB9WFF4ygz1nJsXBkskzAwllkzH6tqomlnM3+17GVZcljWYkBElMw/uLQfwUDEyd391ZQHC3/L1MrA== 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=P+ov5qF8c0yeeEhZ0FoJH8hYml6W54u8Vg6xJu1TlBc=; b=hJjV/MJRpRb3tuq9qUY9nzYoQEkvcaO9SMa7vEcEIsIRuqB0Kiuijoyns8XKOp9uZQcS79qPwwBPjE4Nf+UkESeS2XbzGizQmbfQyJwl7Y8Y2FhooBsev8qp4AwcYspe2rSMoVBobKF52bnjkYbRqzMCiHMnkN3xmw2UJo4n8po/Fj6Rqr/y/LemDlzrGiko7EwAeaIZkQWw8CvDaNR38+vOo8P7ZBnenKuvFVUUENktAQ7BgRpx/Zu1PPYFpTURS7zj6FCQZwMHcRCuyKZDO23cLljQprzjUjouTdGf1KCuZCNWB4qPaXuFxpchE8SYOx6029yGArZ2h+T3NoLhHg== 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=P+ov5qF8c0yeeEhZ0FoJH8hYml6W54u8Vg6xJu1TlBc=; b=ppulY0t6JoAp6UgRETY5HoHEN5FDNpgJo7lMs4WWnLsa9TcJjHUeu9EFv1clbW4uEARPKg0KbnVd6afirCAxD+tiA3TY0qhRLCdgtg5AW3sbvmvj8k6w3ZlLAq/amEY4/6l9eiW2y1fHzXA7Rw7OY3bfnaus0jaX5up34Z5Hbks= Received: from MW3PR05CA0026.namprd05.prod.outlook.com (2603:10b6:303:2b::31) by SJ0PR12MB5635.namprd12.prod.outlook.com (2603:10b6:a03:42a::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.28; Tue, 23 Jul 2024 13:25:10 +0000 Received: from CO1PEPF000044FC.namprd21.prod.outlook.com (2603:10b6:303:2b:cafe::78) by MW3PR05CA0026.outlook.office365.com (2603:10b6:303:2b::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.18 via Frontend Transport; Tue, 23 Jul 2024 13:25:09 +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 CO1PEPF000044FC.mail.protection.outlook.com (10.167.241.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7784.5 via Frontend Transport; Tue, 23 Jul 2024 13:25:09 +0000 Received: from jatayu.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; Tue, 23 Jul 2024 08:25:06 -0500 From: Shyam Sundar S K To: , CC: , , "Shyam Sundar S K" Subject: [PATCH 1/2] platform/x86/amd/pmf: Add new ACPI ID AMDI0107 Date: Tue, 23 Jul 2024 18:54:50 +0530 Message-ID: <20240723132451.3488326-1-Shyam-sundar.S-k@amd.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000044FC:EE_|SJ0PR12MB5635:EE_ X-MS-Office365-Filtering-Correlation-Id: 88e9bb6c-4bd5-42c7-6dd2-08dcab1ae029 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|36860700013|376014|1800799024; X-Microsoft-Antispam-Message-Info: bVChIR4NY1iHtEcSM7DjX5bWuwuk8MqzU+E5yHuMaUh6L/K08MdSxwIGeVSjJPuVp8X6uTXYFJ/x7Z06UO4+xRAD7UCsFX8n+ZSemWD4fanSwNmcZ+r7Ndq7G7C7lsZv9e4xxs6GUZDfmalfeaqGjGyILm0XNvJIaIPs6VHDh7ibAQ2ftFMvRRy+L479wnmtxMzCOU2kpGf6HxVMOCCkWt1Y56s0qGzLfGZNHPFclaZ/AVNZQZZW/8vTSaAOPu82H9R0TRUihs7H1ulewbKeQYtkV+EtC3GChLCLrRx7WSXoXl8GJA63UCHNyil/cOPRUPfMpsI63XSbv6rceeLJeb1NsmCHkUna2yPMpau9n8z48CXQTnnv+G4vzE9+Cfv1Ey72Ie2I1YID/M0ITjpHWQOuMCDdHs4JR+N1HO/80lCFeSYrsVAcV3sbgELIAkBwd1KusxUS4ZkXfmuaQGq9Re4RLkBuwVKaoFoOjja45hwSdN9EanYlXMC8/dEZ8E5sHg2Qm5DR5zNDxPza90As+0n9ZKO2paqQTtoaZHxAr++TN2HzJ+VWWG6KXHwaeYyCAvn96VxEaP+i6BfRDUHYu6EZhOoY0Au48C4WjOARdbGhnm/3ZuxJhhAdoDv9GMQ8N0UQxpBBS2JTbAdgzX3W6ubz3xtZNzZYb2ff6NjfAHlRS34RuItFZPNfKzjpVvzBBlk+lHfJ6WD9B+TtNGARv9wpzVoPKKVOdPmlhw++WQU8TuxZapbXgRIqV/fb/J6262XMZO+Vx0OqLKall4/0+pi62x/KrQ5+v86iTv/l+6kWPArKSHTaUeaHgLsvxNJi9WXN+9xkHHxK+Hi7OFzwEcf9N3Ve8qDh2JQaNwIUWTpwZOQuXKe2DkR2ax7JeAcOVmzD3XLSi7bpMh35HD4/HjqvrbK7U6/Uvbx4dKkgjOXcd2O7/9vuCBgqLwuAh7HGwTWBXxAYZy03VnMb6Mlp2Vn0rGIBDolvKIFBmgsz0jhS6XDye+o+MKfI0Aq5buMmt/u2ca7oVXmDojdkvCJPbHhq5eGxO1OFfSgCaLdOvb/6ls23dw9ZIyqJecEudpj7zE98e1qZv1Tew5rMD31E443mzOBG2Sht/7H0P7kBsIv0mRmlo0uunpZCaQ4YQv8hyAfvVb/yIPMl/NzXBPqv6aM845ZWxBDeqQ+TsFFX7FI6UYyG5emTSFCpn5TvtAUamSGJhiOmhoSxiDe9xmOR4k/qgixTgnEAwy03Nvj5Jnd/zqlclt8Uv0+FXHjwQJK5qswD8BoMvJ0tcTvQRgqG2kyqJSSFOV64Whnp5NIWZI1bYxp8Sz2Djh/7Z6yJrI+Gdi636CA5n8bI4bK35RjVthlELFfnGuQTi85Omah5Sn8LgIiqqLXr7nlMnWk4jot28bB3qxEcJTb7lni6K78InjkcdPTAFT/j3Nvf1yWvKSfjpHM8igxG4ZcalT/4OSEi 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);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jul 2024 13:25:09.6516 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 88e9bb6c-4bd5-42c7-6dd2-08dcab1ae029 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: CO1PEPF000044FC.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB5635 Add new ACPI ID AMDI0107 used by upcoming AMD platform to the PMF supported list of devices. Signed-off-by: Shyam Sundar S K --- drivers/platform/x86/amd/pmf/core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/platform/x86/amd/pmf/core.c b/drivers/platform/x86/amd/pmf/core.c index 2d6e2558863c..8f1f719befa3 100644 --- a/drivers/platform/x86/amd/pmf/core.c +++ b/drivers/platform/x86/amd/pmf/core.c @@ -41,6 +41,7 @@ #define AMD_CPU_ID_RMB 0x14b5 #define AMD_CPU_ID_PS 0x14e8 #define PCI_DEVICE_ID_AMD_1AH_M20H_ROOT 0x1507 +#define PCI_DEVICE_ID_AMD_1AH_M60H_ROOT 0x1122 #define PMF_MSG_DELAY_MIN_US 50 #define RESPONSE_REGISTER_LOOP_MAX 20000 @@ -249,6 +250,7 @@ static const struct pci_device_id pmf_pci_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_RMB) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_PS) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M20H_ROOT) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M60H_ROOT) }, { } }; @@ -382,6 +384,7 @@ static const struct acpi_device_id amd_pmf_acpi_ids[] = { {"AMDI0102", 0}, {"AMDI0103", 0}, {"AMDI0105", 0}, + {"AMDI0107", 0}, { } }; MODULE_DEVICE_TABLE(acpi, amd_pmf_acpi_ids); From patchwork Tue Jul 23 13:24:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shyam Sundar S K X-Patchwork-Id: 13740000 X-Patchwork-Delegate: ilpo.jarvinen@linux.intel.com Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2041.outbound.protection.outlook.com [40.107.96.41]) (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 27B181527BE for ; Tue, 23 Jul 2024 13:25:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.96.41 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721741116; cv=fail; b=B8rhbu/hsK6eUa2IKlNjLm2zmIxtUL4R30FS5an13dBGSPFOvBIZ04KNkpk+ZC3sQAeqCmxH1dB41XbVICXedQjn+UkBvGPkq+bLObe7xDv/BMX5lSJvLZzSqyn2W0yuiJskP+gqGb176gpjovEzKB8CCcw6SZxCTBwh/svST8k= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721741116; c=relaxed/simple; bh=Rpjo7SJOqOHmUAOvq7QrLxctT3c2uXI5G5OEY4S4iHQ=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=nNK0XMysczvz4E3+uqkeYsUFfvlDi+lQhad3onr9rHtKEeADLj65AzaqEnINadl5vfSxEFT8qai0G6jN9F5iM0Q30XI2zYGLrTadXkdx9pom6xtHysoMLWTxRmwZExXB5PCBC8Zk0yZhv2vvKxcLcV3NgyrVsXgLKXxcIz93h5c= 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=Bu54HvL9; arc=fail smtp.client-ip=40.107.96.41 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="Bu54HvL9" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=KKbaGHYPFkX4r3vQZwbSZIUrbT8dXH0H2kQhj2gKcqDOS+AteOd7srfkpBTgkBdfuuamXPByuhSUCiODcpWjLnGPUfub3mc6WWrXCxWeO64CJ4gi4BJx45brBBZRKFtEn65T/rrFSZD7B7UQiKR75jIRbrNH1w5gDPhLxVAnmO4jUlwF71tJOELuGtWx26rdLRHCBHLN34gDSRzVb/TEDJN6HFzPB8l97FiNtkP4pcDepNRUpitvHInymyK1dpYknyAt72NBR/LVb7It2p8xlPD6ArRfevOHi1iRgNR/KKBIzC2l9a8PcDFnTTicDR+xjHs8LrYhpK+HBzwZdBBDgA== 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=y7tl3A9QymwEf5uaYsBiQ1Gmzlp60rciQb6zoIRBcHE=; b=rQ4uW8NRyJjU571AGoPxEmiXD8CxHz55BxBgCn6STkgjg+b3dOojrHo+kMP4SKNCvx5fbujHKePaXX+4DxMEih2dGd/fo5kGNRCa4tnq+DHN9Kh2eQHgLWH5rZHK+UnVRja2qloCSEIxLMKtij5090JTuH9EaCOT4g8Gluo2Lp9lE+5bjHhLl9NwKw8KAQ/iccXoXV0DeNe3NSI8Y3a1GyT9QBaCuxYQ1gEPOOQAakhr3L/TUp+FpWsTafd06eCwT+Ik48KrROxGn80yI1X8ICZzq0VN5FbmfNTClNQ9z2hUwzssNav9FMtuDuShisBn0BiQoxigXFunnahLZbETGg== 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=y7tl3A9QymwEf5uaYsBiQ1Gmzlp60rciQb6zoIRBcHE=; b=Bu54HvL9s9e+GJ1wJGW4jvd6xfl8sJ+mTyIwycrO4Kc+JRViXlzYNaWvveajXWJY/MYc75pbhorSABVDu7EthxgsacIkGILXTexDF94mHA4equ+eADvk63/9DWc27S+DRWO4U2snjWzWwkCrW/l25BbdheEHon23s4s3H4M1xdQ= Received: from MW3PR06CA0012.namprd06.prod.outlook.com (2603:10b6:303:2a::17) by IA1PR12MB6330.namprd12.prod.outlook.com (2603:10b6:208:3e4::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.14; Tue, 23 Jul 2024 13:25:11 +0000 Received: from CO1PEPF000044F7.namprd21.prod.outlook.com (2603:10b6:303:2a:cafe::f3) by MW3PR06CA0012.outlook.office365.com (2603:10b6:303:2a::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.29 via Frontend Transport; Tue, 23 Jul 2024 13:25:11 +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 CO1PEPF000044F7.mail.protection.outlook.com (10.167.241.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7784.5 via Frontend Transport; Tue, 23 Jul 2024 13:25:10 +0000 Received: from jatayu.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; Tue, 23 Jul 2024 08:25:08 -0500 From: Shyam Sundar S K To: , CC: , , "Shyam Sundar S K" Subject: [PATCH 2/2] platform/x86/amd/pmf: Fix to Update HPD Data When ALS is Disabled Date: Tue, 23 Jul 2024 18:54:51 +0530 Message-ID: <20240723132451.3488326-2-Shyam-sundar.S-k@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240723132451.3488326-1-Shyam-sundar.S-k@amd.com> References: <20240723132451.3488326-1-Shyam-sundar.S-k@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: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000044F7:EE_|IA1PR12MB6330:EE_ X-MS-Office365-Filtering-Correlation-Id: 70dc00e1-f1c3-4853-da75-08dcab1ae0e0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|1800799024|376014|82310400026; X-Microsoft-Antispam-Message-Info: AjyrxB4dZVTzKJ99XQj8SgsvhhoMAzH4RJ4aje7SQ3Qd+e/m+kJ8QrqDQLi4RltEdb0aNqCd8uHK8sBEEZPpzq9caztwL/CcpfKLufGFlBA0cb7gs/C8jND9AtTVafH/9t31JzHvUdpan5lfPBGXzma3tC0gi14q66S0hfzf0PBLjw05VzdeS4T8J4kpBsmQI+K0FWo8tXktgVqrYfP4ijqysXkFhklHh1DzIL5Tk0/tdOEQu+XlmrslOFoHKxvJfUjEqo1NABHbp2tLvW5FPftfKMm8DKSBGQOfXoLHtBbr53+CVey4RNKk6ivYfztYrVqxOgryZfjfDxu/wjmS1xRuRsaqd00ANy+XYYmeUUisrkxMXv8/+fsKD9nQ+GIjzhqHSpcli3ucLPtCCQdtIKM9tjXaLFBooYPpxlrRU8a+UcsMhUwjNnsIdxsSqFAHFW4aweeaRsUkuPZjW1i2j5lSGGScDyOl82IUc9ZLQ2j0/TEoxRHuBfMLW4lww3uPXYRgYpnhmmGAMmT8VYTVccna7DGKhTB7CF8Uqkst9INmq6fiMEydcR60To0frqDEVk3OryS1Og1mNkgbGF2OlqMBjjGvUApKRI90B135VbBiZUTfRGo9KTM2sPo4DuDF6L5sn8srKBYm3VSmYg+8+/N+9DlJyyMXEdRwcTc6wEuycVWqB/IIxtNMLGKqCdpckUptN4nocxn6UMVOojKP3LW2mAtJMHzvNlOaJCQ0vLjR1xf+apWW+jnwnQUw1d3wG2xIOn6qc8NJdZTMh0DpduHGV0EJEVdvHbJju5zoKdWRkLbtF5DDk7ifP8702lV5jOQSorC7vLqnWCwwWS8tSkL1+8M/MQKRaPEeHHSdwlzeespBH6rB04OnyCtfQtHXmH2PlPsNgLqtYsu6vpdoJsIKHcr6wOcInrLhJ2yapEwVUN6vDxAGva595qlRny4XfTwUu6SfH9zhZp2tBPN2nsFSOWiA8ctkYzaS0DcwIEskgc/EV2YhUKb/fhvfJzNf377v5QU2Lq3A3J0ab2n/r2E4G26aovmmlEX2Aqh99b3b756MEfmwcEVrpLOw/4dNnu+KhpxIqS4RNnvd2Q9K4PW6mPj6OVgK46bwwaAOHwpSI+btd8RbDN+Yh7Dw89ghoJAdt/obDvJgxeqpGaUJBRyZpDIwOTqT2mdrecJ+4Dp6jx7JH7EIHOdrsBsyqZ+IEUy9dDGJ+4eqIFmiVsah8kT/kaIFb4lA0qc036l259fxlCODJ3cfY9MGCvYLSOibO+y996ii6FcFPIDnqmY3G+M5F4ldlNi4PHnplsa8SDzku6aKoMYoLQboQC3styba52wcEfnjRUFqtpNlHoOgCCRD1PR/uQcrhnOkNwIcd8JtFMpb/3bu65c4cxGtQtxOyva5rWe4uWby5lq94Jz2utV3w7cc2S0XfXPuVNLuuvRjUYyAoE88bFZaOs/YrH5p 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)(36860700013)(1800799024)(376014)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jul 2024 13:25:10.8693 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 70dc00e1-f1c3-4853-da75-08dcab1ae0e0 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: CO1PEPF000044F7.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6330 If the Ambient Light Sensor (ALS) is disabled, the current code in the PMF driver does not query for Human Presence Detection (HPD) data in amd_pmf_get_sensor_info(). As a result, stale HPD data is used by PMF-TA to evaluate policy conditions, leading to unexpected behavior in the policy output actions. To resolve this issue, modify the PMF driver to query HPD data independently of ALS. With this change, amd_pmf_get_sensor_info() now returns void instead of int. Fixes: cedecdba60f4 ("platform/x86/amd/pmf: Get ambient light information from AMD SFH driver") Co-developed-by: Patil Rajesh Reddy Signed-off-by: Patil Rajesh Reddy Signed-off-by: Shyam Sundar S K --- drivers/platform/x86/amd/pmf/spc.c | 33 +++++++++++++++--------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/drivers/platform/x86/amd/pmf/spc.c b/drivers/platform/x86/amd/pmf/spc.c index a3dec14c3004..d9e60d63553c 100644 --- a/drivers/platform/x86/amd/pmf/spc.c +++ b/drivers/platform/x86/amd/pmf/spc.c @@ -150,7 +150,7 @@ static int amd_pmf_get_slider_info(struct amd_pmf_dev *dev, struct ta_pmf_enact_ return 0; } -static int amd_pmf_get_sensor_info(struct amd_pmf_dev *dev, struct ta_pmf_enact_table *in) +static void amd_pmf_get_sensor_info(struct amd_pmf_dev *dev, struct ta_pmf_enact_table *in) { struct amd_sfh_info sfh_info; int ret; @@ -160,26 +160,25 @@ static int amd_pmf_get_sensor_info(struct amd_pmf_dev *dev, struct ta_pmf_enact_ if (!ret) in->ev_info.ambient_light = sfh_info.ambient_light; else - return ret; + dev_dbg(dev->dev, "ALS is not enabled\n"); /* get HPD data */ ret = amd_get_sfh_info(&sfh_info, MT_HPD); - if (ret) - return ret; - - switch (sfh_info.user_present) { - case SFH_NOT_DETECTED: - in->ev_info.user_present = 0xff; /* assume no sensors connected */ - break; - case SFH_USER_PRESENT: - in->ev_info.user_present = 1; - break; - case SFH_USER_AWAY: - in->ev_info.user_present = 0; - break; + if (!ret) { + switch (sfh_info.user_present) { + case SFH_NOT_DETECTED: + in->ev_info.user_present = 0xff; /* assume no sensors connected */ + break; + case SFH_USER_PRESENT: + in->ev_info.user_present = 1; + break; + case SFH_USER_AWAY: + in->ev_info.user_present = 0; + break; + } + } else { + dev_dbg(dev->dev, "HPD is not enabled\n"); } - - return 0; } void amd_pmf_populate_ta_inputs(struct amd_pmf_dev *dev, struct ta_pmf_enact_table *in)