From: "Limonciello, Mario" <mario.limonciello@amd.com>
To: "Dmitry Baryshkov" <dmitry.baryshkov@linaro.org>,
"Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
linux-kernel@vger.kernel.org,
Chris Bainbridge <chris.bainbridge@gmail.com>,
hughsient@gmail.com
Subject: Re: [PATCH v2] drm/client: Detect when ACPI lid is closed during initialization
Date: Wed, 29 May 2024 23:41:12 -0500 [thread overview]
Message-ID: <873b7a7b-139d-498e-89da-098cb3d7599d@amd.com> (raw)
In-Reply-To: <g34f3sdk22grheq2vaaonkl543dtk7nb5sffqgmkl5ywtj5skk@p5ht5ug33q4z>
>> Also a direct acpi_lid_open() call seems a bit iffy. But I guess if
>> someone needs this to work on non-ACPI system they get to figure out
>> how to abstract it better. acpi_lid_open() does seem to return != 0
>> when ACPI is not supported, so at least it would err on the side
>> of enabling everything.
>
> Thanks. I was going to comment, but you got it first. I think a proper
> implementation should check for SW_LID input device instead of simply
> using acpi_lid_open(). This will handle the issue for other,
> non-ACPI-based laptops.
>
Can you suggest how this would actually work? AFAICT the only way to
discover if input devices support SW_LID would be to iterate all the
input devices in the kernel and look for whether ->swbit has SW_LID set.
This then turns into a dependency problem of whether any myriad of
drivers have started to report SW_LID. It's also a state machine
problem because other drivers can be unloaded at will.
And then what do you if more than one sets SW_LID?
IOW - a lot of complexity for a non-ACPI system. Does such a problem
exist in non-ACPI systems?
next prev parent reply other threads:[~2024-05-30 4:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-28 21:03 [PATCH v2] drm/client: Detect when ACPI lid is closed during initialization Mario Limonciello
2024-05-29 13:33 ` Alex Deucher
2024-05-29 13:51 ` Jani Nikula
2024-05-29 13:55 ` Alex Deucher
2024-05-29 14:34 ` Mario Limonciello
2024-05-29 14:14 ` Ville Syrjälä
2024-05-29 14:45 ` Mario Limonciello
2024-05-29 15:39 ` Ville Syrjälä
2024-05-29 16:26 ` Mario Limonciello
2024-05-29 17:55 ` Dmitry Baryshkov
2024-05-30 4:41 ` Limonciello, Mario [this message]
2024-05-30 8:07 ` Dmitry Baryshkov
2024-05-30 20:44 ` Dmitry Torokhov
2024-06-04 2:02 ` kernel test robot
2024-06-05 15:08 ` Chris Bainbridge
2024-06-06 7:21 ` Jani Nikula
2024-06-06 12:31 ` Ville Syrjälä
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=873b7a7b-139d-498e-89da-098cb3d7599d@amd.com \
--to=mario.limonciello@amd.com \
--cc=airlied@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=chris.bainbridge@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=hughsient@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=tzimmermann@suse.de \
--cc=ville.syrjala@linux.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