mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sumit Gupta <sumitg@nvidia.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: <rui.zhang@intel.com>, <lenb@kernel.org>, <treding@nvidia.com>,
	<jonathanh@nvidia.com>, <linux-acpi@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <sanjayc@nvidia.com>,
	<ksitaraman@nvidia.com>, <srikars@nvidia.com>,
	<jbrasen@nvidia.com>, <bbasu@nvidia.com>,
	Sumit Gupta <sumitg@nvidia.com>
Subject: Re: [Patch 1/2] ACPI: thermal: Add Thermal fast Sampling Period (_TFP) support
Date: Mon, 21 Aug 2023 17:18:43 +0530	[thread overview]
Message-ID: <bee0e12a-318e-d42c-9879-16c3e8084e68@nvidia.com> (raw)
In-Reply-To: <CAJZ5v0gKtwgu=ysdROapfK-pnr3om8zXH_xsP3i=HVqQSs_d-g@mail.gmail.com>



On 19/08/23 00:03, Rafael J. Wysocki wrote:
> External email: Use caution opening links or attachments
> 
> 
> On Thu, Aug 17, 2023 at 11:30 AM Sumit Gupta <sumitg@nvidia.com> wrote:
>>
>> From: Jeff Brasen <jbrasen@nvidia.com>
>>
>> Add support for Thermal fast Sampling Period (_TFP) for Passive cooling.
>> As per UEFI spec,
> 
> You mean the ACPI spec I suppose?  It would be good to give the
> relevant section number and title.
> 

Yes, It's the ACPI Spec 6.4. Section and title are "11.4.17. _TFP 
(Thermal fast Sampling Period)". I will add it in description in v2.
Thank you for correcting.

>>   _TFP overrides the "Thermal Sampling Period (_TSP)"
>>   if both are present in a Thermal zone.
>>
>> Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
>> Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
>> ---
>>   drivers/acpi/thermal.c | 21 ++++++++++++++-------
>>   1 file changed, 14 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
>> index f9f6ebb08fdb..5dee3722509c 100644
>> --- a/drivers/acpi/thermal.c
>> +++ b/drivers/acpi/thermal.c
>> @@ -111,7 +111,7 @@ struct acpi_thermal_passive {
>>          unsigned long temperature;
>>          unsigned long tc1;
>>          unsigned long tc2;
>> -       unsigned long tsp;
>> +       unsigned long sampling_period;
>>          bool valid;
>>   };
>>
>> @@ -289,11 +289,18 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
>>                                          tz->trips.passive.tc2 = tmp;
>>
>>                                  status = acpi_evaluate_integer(tz->device->handle,
>> -                                                              "_TSP", NULL, &tmp);
>> -                               if (ACPI_FAILURE(status))
>> -                                       tz->trips.passive.valid = false;
>> -                               else
>> -                                       tz->trips.passive.tsp = tmp;
>> +                                                              "_TFP", NULL, &tmp);
>> +                               if (ACPI_FAILURE(status)) {
>> +                                       status = acpi_evaluate_integer(tz->device->handle,
>> +                                                                      "_TSP", NULL, &tmp);
>> +                                       if (ACPI_FAILURE(status))
>> +                                               tz->trips.passive.valid = false;
>> +                                       else
>> +                                               tz->trips.passive.sampling_period = tmp * 100;
>> +
>> +                               } else {
>> +                                       tz->trips.passive.sampling_period = tmp;
>> +                               }
>>                          }
>>                  }
>>          }
>> @@ -765,7 +772,7 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz)
>>          if (tz->trips.passive.valid)
>>                  tz->thermal_zone = thermal_zone_device_register("acpitz", trips, 0, tz,
>>                                                                  &acpi_thermal_zone_ops, NULL,
>> -                                                               tz->trips.passive.tsp * 100,
>> +                                                               tz->trips.passive.sampling_period,
>>                                                                  tz->polling_frequency * 100);
>>          else
>>                  tz->thermal_zone =
>> --
> 
> So this needs to be rebased on top of the current linux-next branch in
> linux-pm.git or on top of the acpi-thermal branch in there.

Will rebase and send v2.

Thank you,
Sumit Gupta


  reply	other threads:[~2023-08-21 11:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-17  9:30 [Patch 0/2] Add support for _TFP and configurable throttle pctg Sumit Gupta
2023-08-17  9:30 ` [Patch 1/2] ACPI: thermal: Add Thermal fast Sampling Period (_TFP) support Sumit Gupta
2023-08-18 18:33   ` Rafael J. Wysocki
2023-08-21 11:48     ` Sumit Gupta [this message]
2023-08-17  9:30 ` [Patch 2/2] ACPI: processor: Add support to configure CPUFREQ reduction pctg Sumit Gupta
2023-08-18 18:40   ` Rafael J. Wysocki
2023-08-21 13:24     ` Sumit Gupta
2023-08-21 17:09       ` Rafael J. Wysocki
2023-08-24 13:18         ` Sumit Gupta

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=bee0e12a-318e-d42c-9879-16c3e8084e68@nvidia.com \
    --to=sumitg@nvidia.com \
    --cc=bbasu@nvidia.com \
    --cc=jbrasen@nvidia.com \
    --cc=jonathanh@nvidia.com \
    --cc=ksitaraman@nvidia.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=sanjayc@nvidia.com \
    --cc=srikars@nvidia.com \
    --cc=treding@nvidia.com \
    /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

all inboxes | Powered by JetHome®