From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
platform-driver-x86@vger.kernel.org, Patil.Reddy@amd.com,
mario.limonciello@amd.com, Yijun.Shen@dell.com,
Sanket Goswami <Sanket.Goswami@amd.com>
Subject: Re: [PATCH 03/10] platform/x86/amd/pmf: Extend custom BIOS inputs for more policies
Date: Tue, 10 Jun 2025 18:58:33 +0300 (EEST) [thread overview]
Message-ID: <a2c8762f-6d40-8dd1-f562-8f1de7a5210d@linux.intel.com> (raw)
In-Reply-To: <20250509072654.713629-4-Shyam-sundar.S-k@amd.com>
On Fri, 9 May 2025, Shyam Sundar S K wrote:
> The existing amd_pmf driver is limited to supporting just two custom BIOS
> inputs. However, with the updates to the latest PMF TA, there's a
> requirement to broaden this capacity to handle 10 inputs, aligning with
> the TA firmware's capabilities.
>
> The necessary logic should be implemented to facilitate this expansion of
> functionality.
>
> Cc: Patil Rajesh Reddy <Patil.Reddy@amd.com>
> Co-developed-by: Sanket Goswami <Sanket.Goswami@amd.com>
> Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com>
> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
> ---
> drivers/platform/x86/amd/pmf/pmf.h | 19 ++++++++++++++++++-
> drivers/platform/x86/amd/pmf/spc.c | 13 ++++++++++++-
> 2 files changed, 30 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/platform/x86/amd/pmf/pmf.h b/drivers/platform/x86/amd/pmf/pmf.h
> index eceed2348165..17b46085726e 100644
> --- a/drivers/platform/x86/amd/pmf/pmf.h
> +++ b/drivers/platform/x86/amd/pmf/pmf.h
> @@ -631,6 +631,14 @@ struct amd_pmf_pb_bitmap {
> static const struct amd_pmf_pb_bitmap custom_bios_inputs[] __used = {
> {"NOTIFY_CUSTOM_BIOS_INPUT1", BIT(5)},
> {"NOTIFY_CUSTOM_BIOS_INPUT2", BIT(6)},
> + {"NOTIFY_CUSTOM_BIOS_INPUT3", BIT(7)},
> + {"NOTIFY_CUSTOM_BIOS_INPUT4", BIT(8)},
> + {"NOTIFY_CUSTOM_BIOS_INPUT5", BIT(9)},
> + {"NOTIFY_CUSTOM_BIOS_INPUT6", BIT(10)},
> + {"NOTIFY_CUSTOM_BIOS_INPUT7", BIT(11)},
> + {"NOTIFY_CUSTOM_BIOS_INPUT8", BIT(12)},
> + {"NOTIFY_CUSTOM_BIOS_INPUT9", BIT(13)},
> + {"NOTIFY_CUSTOM_BIOS_INPUT10", BIT(14)},
> };
>
> enum platform_type {
> @@ -715,7 +723,16 @@ struct ta_pmf_condition_info {
> u32 workload_type;
> u32 display_type;
> u32 display_state;
> - u32 rsvd5[150];
> + u32 rsvd5_1[17];
> + u32 bios_input3;
> + u32 bios_input4;
> + u32 bios_input5;
> + u32 bios_input6;
> + u32 bios_input7;
> + u32 bios_input8;
> + u32 bios_input9;
> + u32 bios_input10;
These really ought to be an array so the copy-paste madness can be
reduced in the code.
> + u32 rsvd5[125];
> };
>
> struct ta_pmf_load_policy_table {
> diff --git a/drivers/platform/x86/amd/pmf/spc.c b/drivers/platform/x86/amd/pmf/spc.c
> index e72c11aba31d..dfb8036671a0 100644
> --- a/drivers/platform/x86/amd/pmf/spc.c
> +++ b/drivers/platform/x86/amd/pmf/spc.c
> @@ -92,6 +92,14 @@ void amd_pmf_dump_ta_inputs(struct amd_pmf_dev *dev, struct ta_pmf_enact_table *
> laptop_placement_as_str(in->ev_info.device_state));
> dev_dbg(dev->dev, "Custom BIOS input1: %u\n", in->ev_info.bios_input1);
> dev_dbg(dev->dev, "Custom BIOS input2: %u\n", in->ev_info.bios_input2);
> + dev_dbg(dev->dev, "Custom BIOS input3: %u\n", in->ev_info.bios_input3);
> + dev_dbg(dev->dev, "Custom BIOS input4: %u\n", in->ev_info.bios_input4);
> + dev_dbg(dev->dev, "Custom BIOS input5: %u\n", in->ev_info.bios_input5);
> + dev_dbg(dev->dev, "Custom BIOS input6: %u\n", in->ev_info.bios_input6);
> + dev_dbg(dev->dev, "Custom BIOS input7: %u\n", in->ev_info.bios_input7);
> + dev_dbg(dev->dev, "Custom BIOS input8: %u\n", in->ev_info.bios_input8);
> + dev_dbg(dev->dev, "Custom BIOS input9: %u\n", in->ev_info.bios_input9);
> + dev_dbg(dev->dev, "Custom BIOS input10: %u\n", in->ev_info.bios_input10);
> dev_dbg(dev->dev, "==== TA inputs END ====\n");
> }
> #else
> @@ -101,7 +109,10 @@ void amd_pmf_dump_ta_inputs(struct amd_pmf_dev *dev, struct ta_pmf_enact_table *
> static void amd_pmf_get_custom_bios_inputs(struct amd_pmf_dev *pdev,
> struct ta_pmf_enact_table *in)
> {
> - u32 *bios_inputs[] = {&in->ev_info.bios_input1, &in->ev_info.bios_input2};
> + u32 *bios_inputs[] = {&in->ev_info.bios_input1, &in->ev_info.bios_input2,
> + &in->ev_info.bios_input3, &in->ev_info.bios_input4, &in->ev_info.bios_input5,
> + &in->ev_info.bios_input6, &in->ev_info.bios_input7, &in->ev_info.bios_input8,
> + &in->ev_info.bios_input9, &in->ev_info.bios_input10};
> int i;
>
> if (!pdev->req.pending_req)
>
--
i.
next prev parent reply other threads:[~2025-06-10 15:58 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-09 7:26 [PATCH 00/10] Enhancements to PMF Driver for Improved Custom BIOS Input Handling Shyam Sundar S K
2025-05-09 7:26 ` [PATCH 01/10] platform/x86/amd/pmf: Add support for adjusting PMF PPT and PPT APU thresholds Shyam Sundar S K
2025-06-10 16:12 ` Ilpo Järvinen
2025-06-17 7:15 ` Shyam Sundar S K
2025-05-09 7:26 ` [PATCH 02/10] platform/x86/amd/pmf: Fix the custom bios input handling mechanism Shyam Sundar S K
2025-05-09 7:26 ` [PATCH 03/10] platform/x86/amd/pmf: Extend custom BIOS inputs for more policies Shyam Sundar S K
2025-06-10 15:58 ` Ilpo Järvinen [this message]
2025-05-09 7:26 ` [PATCH 04/10] platform/x86/amd/pmf: Update ta_pmf_action structure member Shyam Sundar S K
2025-05-09 7:26 ` [PATCH 05/10] platform/x86/amd/pmf: Add helper to verify BIOS input notifications are enable/disable Shyam Sundar S K
2025-06-10 16:01 ` Ilpo Järvinen
2025-05-09 7:26 ` [PATCH 06/10] platform/x86/amd/pmf: Add custom BIOS input support for AMD_CPU_ID_PS Shyam Sundar S K
2025-05-09 7:26 ` [PATCH 07/10] platform/x86/amd/pmf: Use amd_pmf_update_bios_inputs() helper Shyam Sundar S K
2025-06-10 15:56 ` Ilpo Järvinen
2025-05-09 7:26 ` [PATCH 08/10] platform/x86/amd/pmf: Preserve custom BIOS inputs for evaluating the policies Shyam Sundar S K
2025-05-09 7:26 ` [PATCH 09/10] platform/x86/amd/pmf: Call enact function sooner to process early pending requests Shyam Sundar S K
2025-06-10 16:19 ` Ilpo Järvinen
2025-05-09 7:26 ` [PATCH 10/10] platform/x86/amd/pmf: Add debug logs for pending requests and custom BIOS inputs Shyam Sundar S K
2025-05-12 8:13 ` [PATCH 00/10] Enhancements to PMF Driver for Improved Custom BIOS Input Handling Shen, Yijun
2025-05-12 17:26 ` Mario Limonciello
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a2c8762f-6d40-8dd1-f562-8f1de7a5210d@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=Patil.Reddy@amd.com \
--cc=Sanket.Goswami@amd.com \
--cc=Shyam-sundar.S-k@amd.com \
--cc=Yijun.Shen@dell.com \
--cc=hdegoede@redhat.com \
--cc=mario.limonciello@amd.com \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox