X86 platform drivers
 help / color / mirror / Atom feed
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
Subject: Re: [PATCH 05/10] platform/x86/amd/pmf: Add helper to verify BIOS input notifications are enable/disable
Date: Tue, 10 Jun 2025 19:01:12 +0300 (EEST)	[thread overview]
Message-ID: <6f77b3ff-959a-a4b6-a7b9-9360f09ac36c@linux.intel.com> (raw)
In-Reply-To: <20250509072654.713629-6-Shyam-sundar.S-k@amd.com>

On Fri, 9 May 2025, Shyam Sundar S K wrote:

> Implement a helper function to check if BIOS input notifications are
> enabled or disabled.
> 
> 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>
> ---
>  drivers/platform/x86/amd/pmf/acpi.c | 7 +++++++
>  drivers/platform/x86/amd/pmf/pmf.h  | 2 ++
>  2 files changed, 9 insertions(+)
> 
> diff --git a/drivers/platform/x86/amd/pmf/acpi.c b/drivers/platform/x86/amd/pmf/acpi.c
> index f75f7ecd8cd9..ab63582c9d0b 100644
> --- a/drivers/platform/x86/amd/pmf/acpi.c
> +++ b/drivers/platform/x86/amd/pmf/acpi.c
> @@ -161,6 +161,11 @@ int is_apmf_func_supported(struct amd_pmf_dev *pdev, unsigned long index)
>  	return !!(pdev->supported_func & BIT(index - 1));
>  }
>  
> +int is_apmf_bios_input_notifications_supported(struct amd_pmf_dev *pdev)
> +{
> +	return !!(pdev->notifications & GENMASK(16, 7));

Name that GENMASK() although I wonder if custom_bios_inputs_v1 you 
introduced later on should be reused here to do this check. It would keep 
the code in cync

> +}
> +
>  int apts_get_static_slider_granular_v2(struct amd_pmf_dev *pdev,
>  				       struct amd_pmf_apts_granular_output *data, u32 apts_idx)
>  {
> @@ -385,6 +390,8 @@ static int apmf_if_verify_interface(struct amd_pmf_dev *pdev)
>  
>  	pdev->pmf_if_version = output.version;
>  
> +	pdev->notifications =  output.notification_mask;

Extra space

> +
>  	return 0;
>  }
>  
> diff --git a/drivers/platform/x86/amd/pmf/pmf.h b/drivers/platform/x86/amd/pmf/pmf.h
> index 27458a7c221b..2deae43aca63 100644
> --- a/drivers/platform/x86/amd/pmf/pmf.h
> +++ b/drivers/platform/x86/amd/pmf/pmf.h
> @@ -377,6 +377,7 @@ struct amd_pmf_dev {
>  	struct resource *res;
>  	struct apmf_sbios_req_v2 req; /* To get custom bios pending request */
>  	struct mutex cb_mutex;
> +	u32 notifications;
>  };
>  
>  struct apmf_sps_prop_granular_v2 {
> @@ -799,6 +800,7 @@ int apmf_install_handler(struct amd_pmf_dev *pmf_dev);
>  int apmf_os_power_slider_update(struct amd_pmf_dev *dev, u8 flag);
>  int amd_pmf_set_dram_addr(struct amd_pmf_dev *dev, bool alloc_buffer);
>  int amd_pmf_notify_sbios_heartbeat_event_v2(struct amd_pmf_dev *dev, u8 flag);
> +int is_apmf_bios_input_notifications_supported(struct amd_pmf_dev *pdev);
>  
>  /* SPS Layer */
>  int amd_pmf_get_pprof_modes(struct amd_pmf_dev *pmf);
> 

-- 
 i.


  reply	other threads:[~2025-06-10 16:01 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
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 [this message]
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=6f77b3ff-959a-a4b6-a7b9-9360f09ac36c@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=Patil.Reddy@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