platform/x86/amd/pmf: Disable debugfs support for querying power thermals
authorShyam Sundar S K <Shyam-sundar.S-k@amd.com>
Wed, 6 Mar 2024 11:44:10 +0000 (17:14 +0530)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 12 Mar 2024 10:48:25 +0000 (12:48 +0200)
The GET interface to receive the active power thermal information from
the PMFW has been deprecated. Hence drop the debugfs support from
version2 onwards.

Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Co-developed-by: Patil Rajesh Reddy <Patil.Reddy@amd.com>
Signed-off-by: Patil Rajesh Reddy <Patil.Reddy@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Link: https://lore.kernel.org/r/20240306114415.3267603-3-Shyam-sundar.S-k@amd.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/amd/pmf/core.c
drivers/platform/x86/amd/pmf/pmf.h

index feaa09f5b35a125c9c704a432f82c7672b7bc139..a6bdde4f1c68e2b99cfabbdec6c1221b02b68ea2 100644 (file)
@@ -113,8 +113,9 @@ static void amd_pmf_dbgfs_unregister(struct amd_pmf_dev *dev)
 static void amd_pmf_dbgfs_register(struct amd_pmf_dev *dev)
 {
        dev->dbgfs_dir = debugfs_create_dir("amd_pmf", NULL);
-       debugfs_create_file("current_power_limits", 0644, dev->dbgfs_dir, dev,
-                           &current_power_limits_fops);
+       if (dev->pmf_if_version == PMF_IF_V1)
+               debugfs_create_file("current_power_limits", 0644, dev->dbgfs_dir, dev,
+                                   &current_power_limits_fops);
 }
 
 int amd_pmf_get_power_source(void)
index 2f23ced7da66d2e65b0f0f4134a8fd39e12ccb22..51e31d008ef9967f92176ec38b960d915a82df24 100644 (file)
@@ -87,6 +87,8 @@ struct cookie_header {
 #define TA_OUTPUT_RESERVED_MEM                         906
 #define MAX_OPERATION_PARAMS                                   4
 
+#define PMF_IF_V1              1
+
 /* AMD PMF BIOS interfaces */
 struct apmf_verify_interface {
        u16 size;