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
Subject: Re: [PATCH 6/7] platform/x86/amd/pmf: Add support to get sps default APTS index values
Date: Tue, 27 Feb 2024 15:59:26 +0200 (EET) [thread overview]
Message-ID: <17f6c260-42c7-a37b-65b3-cbdb85007557@linux.intel.com> (raw)
In-Reply-To: <20240227125520.3153140-7-Shyam-sundar.S-k@amd.com>
On Tue, 27 Feb 2024, Shyam Sundar S K wrote:
> 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>
> @@ -79,11 +80,56 @@ static void amd_pmf_dump_sps_defaults_v2(struct amd_pmf_static_slider_granular_v
> pr_debug("dc_battery_saver: %u\n", data->sps_idx.dc_battery_saver);
> pr_debug("Static Slider APTS state index data - END\n");
> }
> +
> +static void amd_pmf_dump_apts_sps_defaults(struct amd_pmf_apts_granular *info)
> +{
> + int i;
> +
> + pr_debug("Static Slider APTS index default values data - BEGIN");
> +
> + for (i = 0; i < APTS_MAX_STATES; i++) {
> + pr_debug("index[%d]: table_version = %u\n", i, info->val[i].table_version);
> + pr_debug("index[%d]: fan_table_idx = %u\n", i, info->val[i].fan_table_idx);
> + pr_debug("index[%d]: pmf_ppt = %u\n", i, info->val[i].pmf_ppt);
> + pr_debug("index[%d]: ppt_pmf_apu_only = %u\n", i, info->val[i].ppt_pmf_apu_only);
> + pr_debug("index[%d]: stt_min_limit = %u\n", i, info->val[i].stt_min_limit);
> + pr_debug("index[%d]: stt_skin_temp_limit_apu = %u\n",
> + i, info->val[i].stt_skin_temp_limit_apu);
> + pr_debug("index[%d]: stt_skin_temp_limit_hs2 = %u\n",
> + i, info->val[i].stt_skin_temp_limit_hs2);
Again, underscores seem mostly unnecessary. There's also inconsistency in
capitalization and space/underscore usage compared with the existing
printouts now that I looked also the existing pr_debug()s. Please try to
make things mostly consistent.
> + }
> +
> + pr_debug("Static Slider APTS index default values data - END");
> +}
> #else
> static void amd_pmf_dump_sps_defaults(struct amd_pmf_static_slider_granular *data) {}
> static void amd_pmf_dump_sps_defaults_v2(struct amd_pmf_static_slider_granular_v2 *data) {}
> +static void amd_pmf_dump_apts_sps_defaults(struct amd_pmf_apts_granular *info) {}
> #endif
>
> +static void amd_pmf_load_apts_defaults_sps_v2(struct amd_pmf_dev *pdev)
> +{
> + struct amd_pmf_apts_granular_output output;
> + int i;
> +
> + memset(&apts_config_store, 0, sizeof(apts_config_store));
> +
> + for (i = 0; i < APTS_MAX_STATES; i++) {
> + apts_get_static_slider_granular_v2(pdev, &output, i);
> + apts_config_store.val[i].table_version = output.val.table_version;
> + apts_config_store.val[i].fan_table_idx = output.val.fan_table_idx;
> + apts_config_store.val[i].pmf_ppt = output.val.pmf_ppt;
> + apts_config_store.val[i].ppt_pmf_apu_only = output.val.ppt_pmf_apu_only;
> + apts_config_store.val[i].stt_min_limit = output.val.stt_min_limit;
> + apts_config_store.val[i].stt_skin_temp_limit_apu =
> + output.val.stt_skin_temp_limit_apu;
> + apts_config_store.val[i].stt_skin_temp_limit_hs2 =
> + output.val.stt_skin_temp_limit_hs2;
Add a temporary variabled for apts_config_store.val[i] to make these
shorter?
--
i.
next prev parent reply other threads:[~2024-02-27 13:59 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-27 12:55 [PATCH 0/7] platform/x86/amd/pmf: Updates to amd-pmf driver Shyam Sundar S K
2024-02-27 12:55 ` [PATCH 1/7] platform/x86/amd/pmf: Differentiate PMF ACPI versions Shyam Sundar S K
2024-02-27 18:47 ` Kuppuswamy Sathyanarayanan
2024-02-27 12:55 ` [PATCH 2/7] platform/x86/amd/pmf: Disable debugfs support for querying power thermals Shyam Sundar S K
2024-02-27 15:55 ` Kuppuswamy Sathyanarayanan
2024-02-28 6:31 ` Shyam Sundar S K
2024-02-27 12:55 ` [PATCH 3/7] platform/x86/amd/pmf: Add support to get sbios requests in PMF driver Shyam Sundar S K
2024-02-27 13:28 ` Ilpo Järvinen
2024-02-28 6:26 ` Shyam Sundar S K
2024-02-29 13:19 ` Ilpo Järvinen
2024-03-06 5:07 ` Shyam Sundar S K
2024-03-06 10:34 ` Ilpo Järvinen
2024-03-06 10:45 ` Shyam Sundar S K
2024-03-06 10:49 ` Ilpo Järvinen
2024-02-27 12:55 ` [PATCH 4/7] platform/x86/amd/pmf: Add support to notify sbios heart beat event Shyam Sundar S K
2024-02-27 13:36 ` Ilpo Järvinen
2024-02-27 12:55 ` [PATCH 5/7] platform/x86/amd/pmf: Add support to get APTS index numbers for static slider Shyam Sundar S K
2024-02-27 13:48 ` Ilpo Järvinen
2024-02-27 14:13 ` Ilpo Järvinen
2024-02-28 6:31 ` Shyam Sundar S K
2024-02-27 12:55 ` [PATCH 6/7] platform/x86/amd/pmf: Add support to get sps default APTS index values Shyam Sundar S K
2024-02-27 13:59 ` Ilpo Järvinen [this message]
2024-02-27 12:55 ` [PATCH 7/7] platform/x86/amd/pmf: Update sps power thermals according to the platform-profiles Shyam Sundar S K
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=17f6c260-42c7-a37b-65b3-cbdb85007557@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=Patil.Reddy@amd.com \
--cc=Shyam-sundar.S-k@amd.com \
--cc=hdegoede@redhat.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