From: johannes.goede@oss.qualcomm.com
To: "Armin Wolf" <W_Armin@gmx.de>, "Han Gao" <gaohan@iscas.ac.cn>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Patrik Jakobsson" <patrik.r.jakobsson@gmail.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
linux-acpi@vger.kernel.org, linux-riscv@lists.infradead.org,
Han Gao <rabenda.cn@gmail.com>,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] platform/wmi: Allow consumers to load without ACPI
Date: Wed, 11 Nov 2026 14:17:52 +0100 [thread overview]
Message-ID: <38b7e73d-71a8-49dd-85c7-7cc496c57c8c@oss.qualcomm.com> (raw)
In-Reply-To: <c9a078c9-3b95-47ce-86b1-feefe65a6eaf@gmx.de>
Hi,
On 10-Nov-26 14:57, Armin Wolf wrote:
> Am 10.11.26 um 14:43 schrieb Han Gao:
>> Since commit 4ea18e604272 ("ACPI: video: Remove CONFIG_X86 handling from
>> nvidia_wmi_ec_supported()"), the ACPI video module uses WMI on all
>> architectures. When ACPI is disabled, e.g. on a devicetree boot,
>> acpi_wmi_init() returns -ENODEV, so the wmi module fails to load and so
>> do video, amdgpu and radeon, which depend on it.
>>
>> Return 0 without registering the WMI bus instead. The exported helpers
>> then report that no WMI device exists. Skip the teardown on module exit
>> accordingly.
>
> AFAIK wmi_find_device_by_guid() requires that the WMI bus type is initialized, so we should not skip bus_register(). I wonder whether we really need to check acpi_disabled after all, because the platform driver will not bind anyway if ACPI support is disabled.
I developed the same patch in parallel to the original submitter, but did
not get around to submitting this upstream yet.
I just submitted my version, which does keep the bus registration here:
https://lore.kernel.org/platform-driver-x86/20261111131613.6290-1-johannes.goede@oss.qualcomm.com/
Regards,
Hans
>
> Thanks,
> Armin Wolf
>
>> Fixes: 4ea18e604272 ("ACPI: video: Remove CONFIG_X86 handling from nvidia_wmi_ec_supported()")
>> Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
>> ---
>> Tested on a HiFive Premier P550 booted with devicetree and an RX550,
>> with ACPI_WMI, ACPI_VIDEO and DRM_AMDGPU built as modules. Without
>> this patch, wmi fails to load and so do video and amdgpu. With it,
>> wmi, video and amdgpu load and the RX550 is initialized.
>> ---
>> drivers/platform/wmi/core.c | 6 +++++-
>> 1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/platform/wmi/core.c b/drivers/platform/wmi/core.c
>> index a99da9b7039d787ce3c1e0ece74ffbd79fafd3f7..6668789904a903c8d4e7810976f4e485d7a1b32a 100644
>> --- a/drivers/platform/wmi/core.c
>> +++ b/drivers/platform/wmi/core.c
>> @@ -1598,8 +1598,9 @@ static int __init acpi_wmi_init(void)
>> {
>> int error;
>> + /* ACPI video still needs the exported helpers when ACPI is disabled. */
>> if (acpi_disabled)
>> - return -ENODEV;
>> + return 0;
>> error = class_register(&wmi_bus_class);
>> if (error)
>> @@ -1628,6 +1629,9 @@ static int __init acpi_wmi_init(void)
>> static void __exit acpi_wmi_exit(void)
>> {
>> + if (acpi_disabled)
>> + return;
>> +
>> platform_driver_unregister(&acpi_wmi_driver);
>> bus_unregister(&wmi_bus_type);
>> class_unregister(&wmi_bus_class);
>>
>> ---
>> base-commit: 7475ea8b58616b33c04afb976cf0fbaad9dd63fb
>> change-id: 20261110-wmi-no-acpi-159a4cf19580
>>
>> Best regards,
>
prev parent reply other threads:[~2026-11-11 13:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 13:43 Han Gao
2026-11-10 13:57 ` Armin Wolf
2026-11-11 13:17 ` johannes.goede [this message]
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=38b7e73d-71a8-49dd-85c7-7cc496c57c8c@oss.qualcomm.com \
--to=johannes.goede@oss.qualcomm.com \
--cc=W_Armin@gmx.de \
--cc=gaohan@iscas.ac.cn \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=patrik.r.jakobsson@gmail.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rabenda.cn@gmail.com \
--cc=rafael@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
all inboxes | Powered by JetHome®