public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Armin Wolf <W_Armin@gmx.de>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: rui.zhang@intel.com, lenb@kernel.org, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3] ACPI: thermal: Properly support the _SCP control method
Date: Sat, 17 May 2025 00:51:05 +0200	[thread overview]
Message-ID: <12f63757-d61a-4edf-afaa-e3964d16d91b@gmx.de> (raw)
In-Reply-To: <CAJZ5v0grVpm8MUGYRRhC6VTRRQxvCEmzRJm27F83vJ4a-Wwjhg@mail.gmail.com>

Am 16.05.25 um 18:56 schrieb Rafael J. Wysocki:

> On Fri, May 16, 2025 at 3:59 PM Rafael J. Wysocki <rafael@kernel.org> wrote:
>> On Sat, May 3, 2025 at 12:29 AM Armin Wolf <W_Armin@gmx.de> wrote:
>>> Am 28.04.25 um 14:34 schrieb Rafael J. Wysocki:
>>>
>>>> On Mon, Apr 28, 2025 at 2:31 PM Armin Wolf <W_Armin@gmx.de> wrote:
>>>>> Am 27.04.25 um 00:52 schrieb Armin Wolf:
>>>>>
>>>>>> Am 26.04.25 um 15:12 schrieb Rafael J. Wysocki:
>>>>>>
>>>>>>> On Sat, Apr 26, 2025 at 1:20 AM Armin Wolf <W_Armin@gmx.de> wrote:
>>>>>>>> Am 10.04.25 um 18:54 schrieb Armin Wolf:
>>>>>>>>
>>>>>>>>> The ACPI specification defines an interface for the operating system
>>>>>>>>> to change the preferred cooling mode of a given ACPI thermal zone.
>>>>>>>>> This interface takes the form of a special ACPI control method called
>>>>>>>>> _SCP (see section 11.4.13 for details) and is already supported by the
>>>>>>>>> ACPI thermal driver.
>>>>>>>>>
>>>>>>>>> However this support as many issues:
>>>>>>>>>
>>>>>>>>>      - the kernel advertises support for the "3.0 _SCP Extensions"
>>>>>>>>> yet the
>>>>>>>>>        ACPI thermal driver does not support those extensions. This may
>>>>>>>>>        confuse the ACPI firmware.
>>>>>>>>>
>>>>>>>>>      - the execution of the _SCP control method happens after the driver
>>>>>>>>>        retrieved the trip point values. This conflicts with the ACPI
>>>>>>>>>        specification:
>>>>>>>>>
>>>>>>>>>          "OSPM will automatically evaluate _ACx and _PSV objects after
>>>>>>>>>           executing _SCP."
>>>>>>>>>
>>>>>>>>>      - the cooling mode is hardcoded to active cooling and cannot be
>>>>>>>>>        changed by the user.
>>>>>>>>>
>>>>>>>>> Those issues are fixed in this patch series. In the end the user
>>>>>>>>> will be able to tell the ACPI firmware wether he prefers active or
>>>>>>>>> passive cooling. This setting will also be interesting for
>>>>>>>>> applications like TLP (https://linrunner.de/tlp/index.html).
>>>>>>>>>
>>>>>>>>> The whole series was tested on various devices supporting the _SCP
>>>>>>>>> control method and on a device without the _SCP control method and
>>>>>>>>> appears to work flawlessly.
>>>>>>>> Any updates on this? I can proof that the new interface for setting
>>>>>>>> the cooling mode
>>>>>>>> works. Additionally the first two patches fix two issues inside the
>>>>>>>> underlying code
>>>>>>>> itself, so having them inside the mainline tree would be beneficial
>>>>>>>> to users.
>>>>>>> Sure.
>>>>>>>
>>>>>>> I'm going to get to them next week, probably on Monday.
>>>>>> Ok, thanks.
>>>>>>
>>>>>> Armin Wolf
>>>>>>
>>>>> I am a bit ashamed of myself but i think we need to put this patch series on hold after all :(.
>>>>>
>>>>> The reason of this is that i am confused by the ACPI specification regarding _SCP:
>>>>>
>>>>>           11.1.2.1. OSPM Change of Cooling Policy
>>>>>
>>>>>           When OSPM changes the platform’s cooling policy from one cooling mode to the other, the following occurs:
>>>>>
>>>>>           1. OSPM notifies the platform of the new cooling mode by running the Set Cooling Policy (_SCP) control method in all thermal zones and invoking the OS-specific Set Cooling Policy interface to all participating devices in each thermal zone.
>>>>>
>>>>>           2. Thresholds are updated in the hardware and OSPM is notified of the change.
>>>>>
>>>>>           3. OSPM re-evaluates the active and passive cooling temperature trip points for the zone and all devices in the zone to obtain the new temperature thresholds.
>>>>>
>>>>> This section of the ACPI specification tells me that we need to evaluate the _SCP control method of all ACPI thermal zones
>>>>> at the same time, yet section 11.4.13. tells me that each _SCP control methods belongs to the individual thermal zone.
> It just says "This object may exist under a thermal zone or a device"
> so I don't see any contradiction.  Section 11.4.13 says where it is
> located and Section 11.1.2.1 says when to evaluate it.
>
> However, Section 11.4.13 also says "OSPM will automatically evaluate
> _ACx and _PSV objects after executing _SCP" which is not arranged for
> in your patch [3/3] IIUC.
>
> Thanks!

This is incorrect, i do call acpi_thermal_trips_update() after setting _SCP in cooling_mode_store().

Thanks,
Armin Wolf


  reply	other threads:[~2025-05-16 22:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-10 16:54 [PATCH 0/3] ACPI: thermal: Properly support the _SCP control method Armin Wolf
2025-04-10 16:54 ` [PATCH 1/3] ACPI: OSI: Stop advertising support for "3.0 _SCP Extensions" Armin Wolf
2025-04-10 16:54 ` [PATCH 2/3] ACPI: thermal: Execute _SCP before reading trip points Armin Wolf
2025-04-10 16:54 ` [PATCH 3/3] ACPI: thermal: Allow userspace applications to change the cooling mode Armin Wolf
2025-04-25 23:20 ` [PATCH 0/3] ACPI: thermal: Properly support the _SCP control method Armin Wolf
2025-04-26 13:12   ` Rafael J. Wysocki
2025-04-26 22:52     ` Armin Wolf
2025-04-28 12:31       ` Armin Wolf
2025-04-28 12:34         ` Rafael J. Wysocki
2025-05-02 22:29           ` Armin Wolf
2025-05-16 13:59             ` Rafael J. Wysocki
2025-05-16 16:56               ` Rafael J. Wysocki
2025-05-16 22:51                 ` Armin Wolf [this message]
2025-05-16 23:01               ` Armin Wolf

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=12f63757-d61a-4edf-afaa-e3964d16d91b@gmx.de \
    --to=w_armin@gmx.de \
    --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 \
    /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