9d893061 | 10-Apr-2024 |
Mario Limonciello <mario.limonciello@amd.com> |
platform/x86/amd: pmf: Add quirk for ROG Zephyrus G14
ROG Zephyrus G14 advertises support for SPS notifications to the BIOS but doesn't actually use them. Instead the asus-nb-wmi driver utilizes suc
platform/x86/amd: pmf: Add quirk for ROG Zephyrus G14
ROG Zephyrus G14 advertises support for SPS notifications to the BIOS but doesn't actually use them. Instead the asus-nb-wmi driver utilizes such events.
Add a quirk to prevent the system from registering for ACPI platform profile when this system is found to avoid conflicts.
Reported-by: al0uette@outlook.com Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218685 Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20240410140956.385-3-mario.limonciello@amd.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
show more ...
|
ed13f622 | 10-Apr-2024 |
Mario Limonciello <mario.limonciello@amd.com> |
platform/x86/amd: pmf: Add infrastructure for quirking supported funcs
In the event of a BIOS bug add infrastructure that will be utilized to override the return value for supported_funcs to avoid e
platform/x86/amd: pmf: Add infrastructure for quirking supported funcs
In the event of a BIOS bug add infrastructure that will be utilized to override the return value for supported_funcs to avoid enabling features.
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20240410140956.385-2-mario.limonciello@amd.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
show more ...
|
8362e862 | 06-Mar-2024 |
Shyam Sundar S K <Shyam-sundar.S-k@amd.com> |
platform/x86/amd/pmf: Update sps power thermals according to the platform-profiles
Update power thermals according to the platform-profiles selected by the user.
Co-developed-by: Patil Rajesh Reddy
platform/x86/amd/pmf: Update sps power thermals according to the platform-profiles
Update power thermals according to the platform-profiles selected by the user.
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-8-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>
show more ...
|
3eecb434 | 06-Mar-2024 |
Shyam Sundar S K <Shyam-sundar.S-k@amd.com> |
platform/x86/amd/pmf: Add support to get sps default APTS index values
During the driver probe, the default cache values for the static slider would be obtained by evaluating the APTS method. Add su
platform/x86/amd/pmf: Add support to get sps default APTS index values
During the driver probe, the default cache values for the static slider would be obtained by evaluating the APTS method. Add support to use these values as the thermal settings to be updated on the system based on the changing platform-profiles.
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-7-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>
show more ...
|
48d38f56 | 06-Mar-2024 |
Shyam Sundar S K <Shyam-sundar.S-k@amd.com> |
platform/x86/amd/pmf: Add support to get APTS index numbers for static slider
APMF spec has a newer section called the APTS (AMD Performance and Thermal State) information, where each slider/power m
platform/x86/amd/pmf: Add support to get APTS index numbers for static slider
APMF spec has a newer section called the APTS (AMD Performance and Thermal State) information, where each slider/power mode is associated with an index number.
Add support to get these indices for the Static Slider.
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@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-6-Shyam-sundar.S-k@amd.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
show more ...
|
6262938e | 06-Mar-2024 |
Shyam Sundar S K <Shyam-sundar.S-k@amd.com> |
platform/x86/amd/pmf: Add support to notify sbios heart beat event
Add support for newer revision of the heart beat notify events. This event is used to notify to the OEM BIOS on driver load/unload/
platform/x86/amd/pmf: Add support to notify sbios heart beat event
Add support for newer revision of the heart beat notify events. This event is used to notify to the OEM BIOS on driver load/unload/suspend/resume scenarios.
If OEM BIOS does not receive the heart beat event from PMF driver, OEM BIOS shall conclude that PMF driver is no more active and BIOS will update to the legacy system power thermals.
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-5-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>
show more ...
|
5fdc8b82 | 06-Mar-2024 |
Shyam Sundar S K <Shyam-sundar.S-k@amd.com> |
platform/x86/amd/pmf: Add support to get sbios requests in PMF driver
Update the APMF function index 2 for family 1Ah, that gets the information of SBIOS requests (like the pending requests from BIO
platform/x86/amd/pmf: Add support to get sbios requests in PMF driver
Update the APMF function index 2 for family 1Ah, that gets the information of SBIOS requests (like the pending requests from BIOS, custom notifications, updation of power limits etc).
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-4-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>
show more ...
|
233f78e1 | 06-Mar-2024 |
Shyam Sundar S K <Shyam-sundar.S-k@amd.com> |
platform/x86/amd/pmf: Disable debugfs support for querying power thermals
The GET interface to receive the active power thermal information from the PMFW has been deprecated. Hence drop the debugfs
platform/x86/amd/pmf: Disable debugfs support for querying power thermals
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>
show more ...
|
a33e9e10 | 06-Mar-2024 |
Shyam Sundar S K <Shyam-sundar.S-k@amd.com> |
platform/x86/amd/pmf: Differentiate PMF ACPI versions
For family 1AH, certain PMF features have been enhanced - leading to a newer APMF (AMD PMF) spec (BIOS and PMF driver interface) called v2.
Thi
platform/x86/amd/pmf: Differentiate PMF ACPI versions
For family 1AH, certain PMF features have been enhanced - leading to a newer APMF (AMD PMF) spec (BIOS and PMF driver interface) called v2.
This information would be fed into the if_version field of the verify_interface method of the APMF call from the BIOS.
Use this information to store the version number to differentiate between v1 or v2 and also store the information into the PMF private data structure, as this information would be required for further code branching to support the latest silicon.
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-2-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>
show more ...
|
8c9be421 | 04-Mar-2024 |
Armin Wolf <W_Armin@gmx.de> |
platform/x86/amd/pmf: Fix possible out-of-bound memory accesses
The length of the policy buffer is not validated before accessing it, which means that multiple out-of-bounds memory accesses can occu
platform/x86/amd/pmf: Fix possible out-of-bound memory accesses
The length of the policy buffer is not validated before accessing it, which means that multiple out-of-bounds memory accesses can occur.
This is especially bad since userspace can load policy binaries over debugfs.
Compile-tested only.
Fixes: 7c45534afa44 ("platform/x86/amd/pmf: Add support for PMF Policy Binary") Signed-off-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Link: https://lore.kernel.org/r/20240304205005.10078-5-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
show more ...
|
9ced1976 | 04-Mar-2024 |
Armin Wolf <W_Armin@gmx.de> |
platform/x86/amd/pmf: Use struct for cookie header
The cookie header consists of a sign field and a length field. Combine both in a single struct to make accesses simpler.
Compile-tested only.
Sug
platform/x86/amd/pmf: Use struct for cookie header
The cookie header consists of a sign field and a length field. Combine both in a single struct to make accesses simpler.
Compile-tested only.
Suggested-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Link: https://lore.kernel.org/r/20240304205005.10078-4-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
show more ...
|
e42dddce | 04-Mar-2024 |
Armin Wolf <W_Armin@gmx.de> |
platform/x86/amd/pmf: Do not use readl() for policy buffer access
The policy buffer is allocated using normal memory allocation functions, so readl() should not be used on it.
Compile-tested only.
platform/x86/amd/pmf: Do not use readl() for policy buffer access
The policy buffer is allocated using normal memory allocation functions, so readl() should not be used on it.
Compile-tested only.
Fixes: 7c45534afa44 ("platform/x86/amd/pmf: Add support for PMF Policy Binary") Signed-off-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Link: https://lore.kernel.org/r/20240304205005.10078-3-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
show more ...
|
d1e33cd6 | 04-Mar-2024 |
Armin Wolf <W_Armin@gmx.de> |
platform/x86/amd/pmf: Fix return value of amd_pmf_start_policy_engine()
amd_pmf_start_policy_engine() returns an negative error code upon failure, so the TA_PMF_* error codes cannot be used here.
R
platform/x86/amd/pmf: Fix return value of amd_pmf_start_policy_engine()
amd_pmf_start_policy_engine() returns an negative error code upon failure, so the TA_PMF_* error codes cannot be used here.
Return -EIO instead. Also stop shadowing the return code in amd_pmf_get_pb_data().
Compile-tested only.
Suggested-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Fixes: 7c45534afa44 ("platform/x86/amd/pmf: Add support for PMF Policy Binary") Signed-off-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Link: https://lore.kernel.org/r/20240304205005.10078-2-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
show more ...
|
0314cebb | 26-Feb-2024 |
Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> |
platform/x86/amd/pmf: Fix missing error code in amd_pmf_init_smart_pc()
On the error path, assign -ENOMEM to ret when memory allocation of "dev->prev_data" fails.
Fixes: e70961505808 ("platform/x86
platform/x86/amd/pmf: Fix missing error code in amd_pmf_init_smart_pc()
On the error path, assign -ENOMEM to ret when memory allocation of "dev->prev_data" fails.
Fixes: e70961505808 ("platform/x86/amd/pmf: Fixup error handling for amd_pmf_init_smart_pc()") Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20240226144011.2100804-1-harshit.m.mogalapalli@oracle.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
show more ...
|
76d41fb0 | 17-Feb-2024 |
Mario Limonciello <mario.limonciello@amd.com> |
platform/x86/amd/pmf: Fix a potential race with policy binary sideload
The debugfs `update_policy` file is created before amd_pmf_start_policy_engine() has completed, and thus there could be a possi
platform/x86/amd/pmf: Fix a potential race with policy binary sideload
The debugfs `update_policy` file is created before amd_pmf_start_policy_engine() has completed, and thus there could be a possible (albeit unlikely) race between sideloading a policy and the BIOS policy getting setup.
Move the debugfs file creation after all BIOS policy is setup.
Fixes: 10817f28e533 ("platform/x86/amd/pmf: Add capability to sideload of policy binary") Reported-by: Hans de Goede <hdegoede@redhat.com> Closes: https://lore.kernel.org/platform-driver-x86/15df7d02-b0aa-457a-954a-9d280a592843@redhat.com/T/#m2c445f135e5ef9b53184be7fc9df84e15f89d4d9 Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20240217015642.113806-1-mario.limonciello@amd.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
show more ...
|
e7096150 | 17-Feb-2024 |
Mario Limonciello <mario.limonciello@amd.com> |
platform/x86/amd/pmf: Fixup error handling for amd_pmf_init_smart_pc()
amd_pmf_init_smart_pc() calls out to amd_pmf_get_bios_buffer() but the error handling flow doesn't clean everything up allocate
platform/x86/amd/pmf: Fixup error handling for amd_pmf_init_smart_pc()
amd_pmf_init_smart_pc() calls out to amd_pmf_get_bios_buffer() but the error handling flow doesn't clean everything up allocated memory.
As amd_pmf_get_bios_buffer() is only called by amd_pmf_init_smart_pc(), fold it into the function and add labels to clean up any step that can fail along the way. Explicitly set everything allocated to NULL as there are other features that may access some of the same variables.
Fixes: 7c45534afa44 ("platform/x86/amd/pmf: Add support for PMF Policy Binary") Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20240217014107.113749-3-mario.limonciello@amd.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
show more ...
|
20545af3 | 17-Feb-2024 |
Mario Limonciello <mario.limonciello@amd.com> |
platform/x86/amd/pmf: Add debugging message for missing policy data
If a machine advertises Smart PC support but is missing policy data show a debugging message to help clarify why Smart PC wasn't e
platform/x86/amd/pmf: Add debugging message for missing policy data
If a machine advertises Smart PC support but is missing policy data show a debugging message to help clarify why Smart PC wasn't enabled.
Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20240217014107.113749-2-mario.limonciello@amd.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
show more ...
|
b2b6fa6f | 17-Feb-2024 |
Mario Limonciello <mario.limonciello@amd.com> |
platform/x86/amd/pmf: Fix a suspend hang on Framework 13
The buffer is cleared in the suspend handler but used in the delayed work for amd_pmf_get_metrics().
Stop clearing it to fix the hang.
Repo
platform/x86/amd/pmf: Fix a suspend hang on Framework 13
The buffer is cleared in the suspend handler but used in the delayed work for amd_pmf_get_metrics().
Stop clearing it to fix the hang.
Reported-by: Trolli Schmittlauch <t.schmittlauch@orlives.de> Closes: https://lore.kernel.org/regressions/ed2226ff-257b-4cfd-afd6-bf3be9785474@localhost/ Closes: https://community.frame.work/t/kernel-6-8-rc-system-freezes-after-resuming-from-suspend-reproducers-wanted/45381 Fixes: 2b3a7f06caaf ("platform/x86/amd/pmf: Change return type of amd_pmf_set_dram_addr()") Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20240217005216.113408-1-mario.limonciello@amd.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
show more ...
|