* [PATCH v2 0/3] platform/wmi: Add aarch64 support
@ 2026-07-24 2:25 Armin Wolf
2026-07-24 2:25 ` [PATCH v2 1/3] platform/wmi: Remove dependency on CONFIG_X86 Armin Wolf
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Armin Wolf @ 2026-07-24 2:25 UTC (permalink / raw)
To: hansg, ilpo.jarvinen
Cc: platform-driver-x86, linux-kernel, linux, rafael, lenb,
linux-acpi, alexander.deucher, christian.koenig, airlied, simona,
amd-gfx, dri-devel, patrik.r.jakobsson, maarten.lankhorst,
mripard, tzimmermann, jani.nikula, joonas.lahtinen, rodrigo.vivi,
tursulin, intel-gfx, matthew.brost, thomas.hellstrom, intel-xe
The aarch64-laptops project found out that some Windows-on-Arm
notebooks contain WMI-ACPI mapping devices (PNP0C14) that work
exactly like on x86. Those devices however are currently not
supported by the WMI driver core due to only supporting x86.
The first patch removes this restriction and allows the WMI
driver core to run on all architectures that support ACPI.
The second patch updates the acpi-video driver to take advantage
of the improved support for architectures other than x86, and
the last patch enables the generic WMI BMOF driver to support
aarch64 as well.
All patches have been tested on a ACPI-based aarch64 VM and
work just fine.
Changes since v1:
- add additional tags
Armin Wolf (3):
platform/wmi: Remove dependency on CONFIG_X86
ACPI: video: Remove CONFIG_X86 handling from nvidia_wmi_ec_supported()
platform/x86: wmi-bmof: Move to generic WMI code
MAINTAINERS | 2 +-
drivers/acpi/Kconfig | 2 +-
drivers/acpi/video_detect.c | 8 --------
drivers/gpu/drm/amd/amdgpu/Kconfig | 4 +---
drivers/gpu/drm/gma500/Kconfig | 1 -
drivers/gpu/drm/i915/Kconfig | 1 -
drivers/gpu/drm/radeon/Kconfig | 4 +---
drivers/gpu/drm/xe/Kconfig | 5 ++---
drivers/platform/wmi/Kconfig | 14 +++++++++++++-
drivers/platform/wmi/Makefile | 4 ++++
drivers/platform/{x86/wmi-bmof.c => wmi/bmof.c} | 0
drivers/platform/x86/Kconfig | 12 ------------
drivers/platform/x86/Makefile | 3 ---
13 files changed, 23 insertions(+), 37 deletions(-)
rename drivers/platform/{x86/wmi-bmof.c => wmi/bmof.c} (100%)
--
2.39.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/3] platform/wmi: Remove dependency on CONFIG_X86
2026-07-24 2:25 [PATCH v2 0/3] platform/wmi: Add aarch64 support Armin Wolf
@ 2026-07-24 2:25 ` Armin Wolf
2026-07-24 2:25 ` [PATCH v2 2/3] ACPI: video: Remove CONFIG_X86 handling from nvidia_wmi_ec_supported() Armin Wolf
2026-07-24 2:25 ` [PATCH v2 3/3] platform/x86: wmi-bmof: Move to generic WMI code Armin Wolf
2 siblings, 0 replies; 5+ messages in thread
From: Armin Wolf @ 2026-07-24 2:25 UTC (permalink / raw)
To: hansg, ilpo.jarvinen
Cc: platform-driver-x86, linux-kernel, linux, rafael, lenb,
linux-acpi, alexander.deucher, christian.koenig, airlied, simona,
amd-gfx, dri-devel, patrik.r.jakobsson, maarten.lankhorst,
mripard, tzimmermann, jani.nikula, joonas.lahtinen, rodrigo.vivi,
tursulin, intel-gfx, matthew.brost, thomas.hellstrom, intel-xe
The aarch64-laptops project found out that some Windows-on-Arm
notebooks contain WMI-ACPI mapping devices (PNP0C14) that work
exactly like on x86. Remove the dependency on CONFIG_X86 to
make it possible to build the ACPI-WMI driver on arm64.
Link: https://lists.linaro.org/archives/list/aarch64-laptops@lists.linaro.org/thread/U2IZENSIOOHZHGXVN7GM5HX5O3FD5KCF/
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
---
drivers/platform/wmi/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/wmi/Kconfig b/drivers/platform/wmi/Kconfig
index d62f51ff3b7f..36934b5f0194 100644
--- a/drivers/platform/wmi/Kconfig
+++ b/drivers/platform/wmi/Kconfig
@@ -5,7 +5,7 @@
menuconfig ACPI_WMI
tristate "ACPI-WMI support"
- depends on ACPI && X86
+ depends on ACPI
select NLS
help
This option enables support for the ACPI-WMI driver core.
--
2.39.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 2/3] ACPI: video: Remove CONFIG_X86 handling from nvidia_wmi_ec_supported()
2026-07-24 2:25 [PATCH v2 0/3] platform/wmi: Add aarch64 support Armin Wolf
2026-07-24 2:25 ` [PATCH v2 1/3] platform/wmi: Remove dependency on CONFIG_X86 Armin Wolf
@ 2026-07-24 2:25 ` Armin Wolf
2026-07-24 2:38 ` sashiko-bot
2026-07-24 2:25 ` [PATCH v2 3/3] platform/x86: wmi-bmof: Move to generic WMI code Armin Wolf
2 siblings, 1 reply; 5+ messages in thread
From: Armin Wolf @ 2026-07-24 2:25 UTC (permalink / raw)
To: hansg, ilpo.jarvinen
Cc: platform-driver-x86, linux-kernel, linux, rafael, lenb,
linux-acpi, alexander.deucher, christian.koenig, airlied, simona,
amd-gfx, dri-devel, patrik.r.jakobsson, maarten.lankhorst,
mripard, tzimmermann, jani.nikula, joonas.lahtinen, rodrigo.vivi,
tursulin, intel-gfx, matthew.brost, thomas.hellstrom, intel-xe
The WMI-ACPI driver now supports architectures other than x86.
Remove the CONFIG_X86 handling from video-detect and the associated
GPU drivers to simplify the resulting code.
Acked-by: Rafael J. Wysocki (Intel) <rafael@kernel.org>
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
---
drivers/acpi/Kconfig | 2 +-
drivers/acpi/video_detect.c | 8 --------
drivers/gpu/drm/amd/amdgpu/Kconfig | 4 +---
drivers/gpu/drm/gma500/Kconfig | 1 -
drivers/gpu/drm/i915/Kconfig | 1 -
drivers/gpu/drm/radeon/Kconfig | 4 +---
drivers/gpu/drm/xe/Kconfig | 5 ++---
7 files changed, 5 insertions(+), 20 deletions(-)
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index f165d14cf61a..cc1e58fa664b 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -224,7 +224,7 @@ config ACPI_VIDEO
tristate "Video"
depends on BACKLIGHT_CLASS_DEVICE
depends on INPUT
- depends on ACPI_WMI || !X86
+ depends on ACPI_WMI
select THERMAL
help
This driver implements the ACPI Extensions For Display Adapters
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index 458efa4fe9d4..af9280b244f1 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -82,8 +82,6 @@ find_video(acpi_handle handle, u32 lvl, void *context, void **rv)
return AE_OK;
}
-/* This depends on ACPI_WMI which is X86 only */
-#ifdef CONFIG_X86
static bool nvidia_wmi_ec_supported(void)
{
struct wmi_brightness_args args = {
@@ -105,12 +103,6 @@ static bool nvidia_wmi_ec_supported(void)
*/
return args.ret == WMI_BRIGHTNESS_SOURCE_EC;
}
-#else
-static bool nvidia_wmi_ec_supported(void)
-{
- return false;
-}
-#endif
/* Force to use vendor driver when the ACPI device is known to be
* buggy */
diff --git a/drivers/gpu/drm/amd/amdgpu/Kconfig b/drivers/gpu/drm/amd/amdgpu/Kconfig
index 12e4a41bf1f0..50305630f533 100644
--- a/drivers/gpu/drm/amd/amdgpu/Kconfig
+++ b/drivers/gpu/drm/amd/amdgpu/Kconfig
@@ -30,9 +30,7 @@ config DRM_AMDGPU
# ACPI_VIDEO's dependencies must also be selected.
select INPUT if ACPI
select ACPI_VIDEO if ACPI
- # On x86 ACPI_VIDEO also needs ACPI_WMI
- select X86_PLATFORM_DEVICES if ACPI && X86
- select ACPI_WMI if ACPI && X86
+ select ACPI_WMI if ACPI
help
Choose this option if you have a recent AMD Radeon graphics card.
diff --git a/drivers/gpu/drm/gma500/Kconfig b/drivers/gpu/drm/gma500/Kconfig
index a2acaa699dd5..dc4c56638819 100644
--- a/drivers/gpu/drm/gma500/Kconfig
+++ b/drivers/gpu/drm/gma500/Kconfig
@@ -11,7 +11,6 @@ config DRM_GMA500
select ACPI_VIDEO if ACPI
select BACKLIGHT_CLASS_DEVICE if ACPI
select INPUT if ACPI
- select X86_PLATFORM_DEVICES if ACPI
select ACPI_WMI if ACPI
help
Say yes for an experimental 2D KMS framebuffer driver for the
diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
index 5e939004b646..71426b9c91f0 100644
--- a/drivers/gpu/drm/i915/Kconfig
+++ b/drivers/gpu/drm/i915/Kconfig
@@ -28,7 +28,6 @@ config DRM_I915
# but for select to work, need to select ACPI_VIDEO's dependencies, ick
select BACKLIGHT_CLASS_DEVICE if ACPI
select INPUT if ACPI
- select X86_PLATFORM_DEVICES if ACPI
select ACPI_WMI if ACPI
select ACPI_VIDEO if ACPI
select SYNC_FILE
diff --git a/drivers/gpu/drm/radeon/Kconfig b/drivers/gpu/drm/radeon/Kconfig
index c479f0c0dd5c..3cd70aef770e 100644
--- a/drivers/gpu/drm/radeon/Kconfig
+++ b/drivers/gpu/drm/radeon/Kconfig
@@ -25,9 +25,7 @@ config DRM_RADEON
# ACPI_VIDEO's dependencies must also be selected.
select INPUT if ACPI
select ACPI_VIDEO if ACPI
- # On x86 ACPI_VIDEO also needs ACPI_WMI
- select X86_PLATFORM_DEVICES if ACPI && X86
- select ACPI_WMI if ACPI && X86
+ select ACPI_WMI if ACPI
help
Choose this option if you have an ATI Radeon graphics card. There
are both PCI and AGP versions. You don't need to choose this to
diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig
index 4d7dcaff2b91..502c7b3c1f16 100644
--- a/drivers/gpu/drm/xe/Kconfig
+++ b/drivers/gpu/drm/xe/Kconfig
@@ -4,7 +4,6 @@ config DRM_XE
depends on DRM && PCI
depends on KUNIT || !KUNIT
depends on INTEL_VSEC || !INTEL_VSEC
- depends on X86_PLATFORM_DEVICES || !(X86 && ACPI)
depends on PAGE_SIZE_4KB || COMPILE_TEST || BROKEN
select INTERVAL_TREE
# we need shmfs for the swappable backing store, and in particular
@@ -29,8 +28,8 @@ config DRM_XE
# but for select to work, need to select ACPI_VIDEO's dependencies, ick
select BACKLIGHT_CLASS_DEVICE if ACPI
select INPUT if ACPI
- select ACPI_VIDEO if X86 && ACPI
- select ACPI_WMI if X86 && ACPI
+ select ACPI_VIDEO if ACPI
+ select ACPI_WMI if ACPI
select SYNC_FILE
select CRC32
select SND_HDA_I915 if SND_HDA_CORE
--
2.39.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 3/3] platform/x86: wmi-bmof: Move to generic WMI code
2026-07-24 2:25 [PATCH v2 0/3] platform/wmi: Add aarch64 support Armin Wolf
2026-07-24 2:25 ` [PATCH v2 1/3] platform/wmi: Remove dependency on CONFIG_X86 Armin Wolf
2026-07-24 2:25 ` [PATCH v2 2/3] ACPI: video: Remove CONFIG_X86 handling from nvidia_wmi_ec_supported() Armin Wolf
@ 2026-07-24 2:25 ` Armin Wolf
2 siblings, 0 replies; 5+ messages in thread
From: Armin Wolf @ 2026-07-24 2:25 UTC (permalink / raw)
To: hansg, ilpo.jarvinen
Cc: platform-driver-x86, linux-kernel, linux, rafael, lenb,
linux-acpi, alexander.deucher, christian.koenig, airlied, simona,
amd-gfx, dri-devel, patrik.r.jakobsson, maarten.lankhorst,
mripard, tzimmermann, jani.nikula, joonas.lahtinen, rodrigo.vivi,
tursulin, intel-gfx, matthew.brost, thomas.hellstrom, intel-xe
Some Windows-on-Arm notebooks contain embedded Binary MOF data,
accessible using the WMI-ACPI interface. Move the associated driver
to the generic WMI code to make it possible to build it on arm64.
Also rework the Kconfig help text a bit.
Link: https://lists.linaro.org/archives/list/aarch64-laptops@lists.linaro.org/thread/U2IZENSIOOHZHGXVN7GM5HX5O3FD5KCF/
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
---
MAINTAINERS | 2 +-
drivers/platform/wmi/Kconfig | 12 ++++++++++++
drivers/platform/wmi/Makefile | 4 ++++
drivers/platform/{x86/wmi-bmof.c => wmi/bmof.c} | 0
drivers/platform/x86/Kconfig | 12 ------------
drivers/platform/x86/Makefile | 3 ---
6 files changed, 17 insertions(+), 16 deletions(-)
rename drivers/platform/{x86/wmi-bmof.c => wmi/bmof.c} (100%)
diff --git a/MAINTAINERS b/MAINTAINERS
index 3820b286f09f..bbae729a6012 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -29106,7 +29106,7 @@ L: platform-driver-x86@vger.kernel.org
S: Maintained
F: Documentation/ABI/stable/sysfs-platform-wmi-bmof
F: Documentation/wmi/devices/wmi-bmof.rst
-F: drivers/platform/x86/wmi-bmof.c
+F: drivers/platform/wmi/bmof.c
WOLFSON MICROELECTRONICS DRIVERS
L: patches@opensource.cirrus.com
diff --git a/drivers/platform/wmi/Kconfig b/drivers/platform/wmi/Kconfig
index 36934b5f0194..11c221a58e04 100644
--- a/drivers/platform/wmi/Kconfig
+++ b/drivers/platform/wmi/Kconfig
@@ -34,4 +34,16 @@ config ACPI_WMI_LEGACY_DEVICE_NAMES
source "drivers/platform/wmi/tests/Kconfig"
+config WMI_BMOF
+ tristate "WMI embedded Binary MOF driver"
+ default ACPI_WMI
+ help
+ Say Y here if you want to be able to read the firmware-embedded
+ WMI Binary MOF (Managed Object Format) data. Using this requires
+ userspace tools, see Documentation/wmi/devices/wmi-bmof.rst for
+ details.
+
+ To compile this driver as a module, choose M here: the module will
+ be called wmi-bmof.
+
endif # ACPI_WMI
diff --git a/drivers/platform/wmi/Makefile b/drivers/platform/wmi/Makefile
index 2feff94a5594..ee2f27ea20d1 100644
--- a/drivers/platform/wmi/Makefile
+++ b/drivers/platform/wmi/Makefile
@@ -9,3 +9,7 @@ obj-$(CONFIG_ACPI_WMI) += wmi.o
# Unit tests
obj-y += tests/
+
+# Binary MOF driver
+wmi-bmof-y := bmof.o
+obj-$(CONFIG_WMI_BMOF) += wmi-bmof.o
diff --git a/drivers/platform/x86/wmi-bmof.c b/drivers/platform/wmi/bmof.c
similarity index 100%
rename from drivers/platform/x86/wmi-bmof.c
rename to drivers/platform/wmi/bmof.c
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 957034f39e4e..889979034391 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -16,18 +16,6 @@ menuconfig X86_PLATFORM_DEVICES
if X86_PLATFORM_DEVICES
-config WMI_BMOF
- tristate "WMI embedded Binary MOF driver"
- depends on ACPI_WMI
- default ACPI_WMI
- help
- Say Y here if you want to be able to read a firmware-embedded
- WMI Binary MOF (Managed Object Format) data. Using this requires
- userspace tools and may be rather tedious.
-
- To compile this driver as a module, choose M here: the module will
- be called wmi-bmof.
-
config HUAWEI_WMI
tristate "Huawei WMI laptop extras driver"
depends on ACPI_BATTERY
diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
index 872ac3842391..94a5fe4075cb 100644
--- a/drivers/platform/x86/Makefile
+++ b/drivers/platform/x86/Makefile
@@ -4,9 +4,6 @@
# x86 Platform-Specific Drivers
#
-# Windows Management Interface
-obj-$(CONFIG_WMI_BMOF) += wmi-bmof.o
-
# WMI drivers
obj-$(CONFIG_HUAWEI_WMI) += huawei-wmi.o
obj-$(CONFIG_MXM_WMI) += mxm-wmi.o
--
2.39.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 2/3] ACPI: video: Remove CONFIG_X86 handling from nvidia_wmi_ec_supported()
2026-07-24 2:25 ` [PATCH v2 2/3] ACPI: video: Remove CONFIG_X86 handling from nvidia_wmi_ec_supported() Armin Wolf
@ 2026-07-24 2:38 ` sashiko-bot
0 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-07-24 2:38 UTC (permalink / raw)
To: Armin Wolf; +Cc: dri-devel
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The `LOONGSON_LAPTOP` driver selects `ACPI_VIDEO` but does not select `ACPI_WMI`, leading to an unmet direct dependency warning and subsequent build/link failures on LoongArch.
--
--- Patch [2]: [PATCH v2 2/3] ACPI: video: Remove CONFIG_X86 handling from nvidia_wmi_ec_supported() ---
commit 7d6e691f0baea7ff60329d732c8876bffc4d3788
Author: Armin Wolf <W_Armin@gmx.de>
ACPI: video: Remove CONFIG_X86 handling from nvidia_wmi_ec_supported()
The WMI-ACPI driver now supports architectures other than x86.
Remove the CONFIG_X86 handling from video-detect and the associated
GPU drivers to simplify the resulting code.
> diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
> index f165d14cf61a3..cc1e58fa664b0 100644
> --- a/drivers/acpi/Kconfig
> +++ b/drivers/acpi/Kconfig
> @@ -224,7 +224,7 @@ config ACPI_VIDEO
> tristate "Video"
> depends on BACKLIGHT_CLASS_DEVICE
> depends on INPUT
> - depends on ACPI_WMI || !X86
> + depends on ACPI_WMI
[Severity: Low]
Does this change create an unmet direct dependency for drivers on other
architectures that select ACPI_VIDEO?
For instance, in drivers/platform/loongarch/Kconfig, LOONGSON_LAPTOP
unconditionally uses "select ACPI_VIDEO". Since LOONGSON_LAPTOP was not
updated to also select ACPI_WMI, does Kconfig force ACPI_VIDEO to be
enabled without fulfilling this new ACPI_WMI dependency?
> select THERMAL
> help
> This driver implements the ACPI Extensions For Display Adapters
[ ... ]
> diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
> index 458efa4fe9d4b..af9280b244f1b 100644
> --- a/drivers/acpi/video_detect.c
> +++ b/drivers/acpi/video_detect.c
> @@ -82,8 +82,6 @@ find_video(acpi_handle handle, u32 lvl, void *context, void **rv)
> return AE_OK;
> }
>
> -/* This depends on ACPI_WMI which is X86 only */
> -#ifdef CONFIG_X86
> static bool nvidia_wmi_ec_supported(void)
> {
> struct wmi_brightness_args args = {
[ ... ]
> @@ -105,12 +103,6 @@ static bool nvidia_wmi_ec_supported(void)
> */
> return args.ret == WMI_BRIGHTNESS_SOURCE_EC;
> }
> -#else
> -static bool nvidia_wmi_ec_supported(void)
> -{
> - return false;
> -}
> -#endif
[Severity: Low]
Could this result in build or link failures on non-x86 architectures?
Since nvidia_wmi_ec_supported() calls wmi_evaluate_method(), if an
architecture like LoongArch forces ACPI_VIDEO to be built via select, but
ACPI_WMI is not built-in or enabled as a module, wmi_evaluate_method()
might be undeclared or missing during linkage.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260724022526.139370-1-W_Armin@gmx.de?part=2
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-07-24 2:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-24 2:25 [PATCH v2 0/3] platform/wmi: Add aarch64 support Armin Wolf
2026-07-24 2:25 ` [PATCH v2 1/3] platform/wmi: Remove dependency on CONFIG_X86 Armin Wolf
2026-07-24 2:25 ` [PATCH v2 2/3] ACPI: video: Remove CONFIG_X86 handling from nvidia_wmi_ec_supported() Armin Wolf
2026-07-24 2:38 ` sashiko-bot
2026-07-24 2:25 ` [PATCH v2 3/3] platform/x86: wmi-bmof: Move to generic WMI code Armin Wolf
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.