From: Mario Limonciello <mario.limonciello@amd.com>
To: Antheas Kapenekakis <lkml@antheas.dev>
Cc: linux-pm@vger.kernel.org, platform-driver-x86@vger.kernel.org,
luke@ljones.dev, me@kylegospodneti.ch
Subject: Re: [PATCH v1 3/4] acpi/x86: s2idle: call screen on and off as part of callbacks
Date: Thu, 19 Sep 2024 15:51:59 -0500 [thread overview]
Message-ID: <25b14b4f-96b7-453c-b876-6a46c4f3789c@amd.com> (raw)
In-Reply-To: <CAGwozwGSVAExH_9zCCKreC88J0FRU4ZM3RkBk==HvRwCUuuqLw@mail.gmail.com>
On 9/19/2024 15:45, Antheas Kapenekakis wrote:
>> It seems like it would mostly be a programmer error if it was called twice.
>>
>> How about something like this:
>>
>> if (unlikely(WARN_ON(lsp0_dsm_in_screen_off)))
>> return -EINVAL;
>>
>> You could do something similar with the inverse in the other call site
>> too then.
>
> Indeed, under normal operation calling it twice is an error.
>
> 2 concerns here: if I make this change just here, the code on patch 2
> will make the suspend sequence bail. Is this a desired outcome?
>
> Shouldn't we just keep going? And if we should keep going, does that
> include calling Display Off twice?
>
> I am inclined to say the desired outcome is to not call Display Off
> twice and to keep the suspend sequence going. In which case, I will
> merge your suggestion and remove the bail sequence from patch 2.
OK. We'll have to see Rafael's thoughts on your next version.
FYI, he's at LPC, so expect delayed response.
>
> 2nd concern is that I suspect it is very likely firmware vendors will
> want to call this sequence as part of developing devices, so I am
> inclined to allow calling the functions back to back. However, that
> could be achieved differently, e.g., with a module flag.
I think vendors developing devices could rebuild the kernel too. I'm
not really sure this would be a common enough need to justify a module
parameter.
>
>>> + lsp0_dsm_in_screen_off = false;
>>
>> Doesn't it initialize to false already? Is this really needed?
>
> More for my peace of mind. I will remove it.
>
> Antheas
next prev parent reply other threads:[~2024-09-19 20:52 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-19 17:19 [PATCH v1 0/4] acpi/x86: s2idle: move Display off/on calls outside suspend (fixes ROG Ally suspend) Antheas Kapenekakis
2024-09-19 17:19 ` [PATCH v1 1/4] acpi/x86: s2idle: add support for screen off and screen on callbacks Antheas Kapenekakis
2024-09-19 17:29 ` Mario Limonciello
2024-09-19 17:36 ` Antheas Kapenekakis
2024-09-19 20:17 ` Mario Limonciello
2024-09-19 17:19 ` [PATCH v1 2/4] acpi/x86: s2idle: handle screen off/on calls outside of suspend sequence Antheas Kapenekakis
2024-09-19 17:35 ` Mario Limonciello
2024-09-19 18:21 ` Alex Deucher
2024-09-19 18:32 ` Mario Limonciello
2024-09-19 18:35 ` Antheas Kapenekakis
2024-09-19 17:19 ` [PATCH v1 3/4] acpi/x86: s2idle: call screen on and off as part of callbacks Antheas Kapenekakis
2024-09-19 19:01 ` Mario Limonciello
2024-09-19 20:45 ` Antheas Kapenekakis
2024-09-19 20:51 ` Mario Limonciello [this message]
2024-09-19 20:54 ` Antheas Kapenekakis
2024-09-21 1:03 ` Denis Benato
2024-09-21 6:22 ` Antheas Kapenekakis
2024-09-21 14:47 ` Denis Benato
2024-09-21 19:44 ` Antheas Kapenekakis
2024-09-22 2:07 ` Denis Benato
2024-09-22 7:48 ` Antheas Kapenekakis
2024-09-19 17:19 ` [PATCH v1 4/4] platform/x86: asus-wmi: remove Ally (1st gen) and Ally X suspend quirk Antheas Kapenekakis
2024-09-19 18:36 ` 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=25b14b4f-96b7-453c-b876-6a46c4f3789c@amd.com \
--to=mario.limonciello@amd.com \
--cc=linux-pm@vger.kernel.org \
--cc=lkml@antheas.dev \
--cc=luke@ljones.dev \
--cc=me@kylegospodneti.ch \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.