[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZNdOoHvIg7HXh7Gg@fedora>
Date: Sat, 12 Aug 2023 17:39:27 +0800
From: Wang Jinchao <wangjinchao@...sion.com>
To: Jani Nikula <jani.nikula@...ux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@...el.com>,
Tvrtko Ursulin <tvrtko.ursulin@...ux.intel.com>,
David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>,
<intel-gfx@...ts.freedesktop.org>,
<dri-devel@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH v2] drm/i915: Fix Kconfig error for CONFIG_DRM_I915
When CONFIG_DRM_I915 is set to 'y' and CONFIG_BACKLIGHT_CLASS_DEVICE
is set to 'm', we encountered an ld.lld error during the build process:
ld.lld: error: undefined symbol: backlight_device_get_by_name
>>> referenced by intel_backlight.c:955
>>> vmlinux.o:(intel_backlight_device_register)
ld.lld: error: undefined symbol: backlight_device_register
>>> referenced by intel_backlight.c:971
>>> vmlinux.o:(intel_backlight_device_register)
ld.lld: error: undefined symbol: backlight_device_unregister
>>> referenced by intel_backlight.c:999
>>> vmlinux.o:(intel_backlight_device_unregister)
This issue occurred because intel_backlight_device_register and
intel_backlight_device_unregister were enclosed within
\#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE) and #endif directives.
However, according to Kconfig, CONFIG_DRM_I915 will select
BACKLIGHT_CLASS_DEVICE only if ACPI is enabled.
This led to an error, which can be resolved by removing the
conditional statements related to ACPI.
v2: Add a line starting with #
Signed-off-by: Wang Jinchao <wangjinchao@...sion.com>
---
drivers/gpu/drm/i915/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
index 01b5a8272a27..5003de921bf7 100644
--- a/drivers/gpu/drm/i915/Kconfig
+++ b/drivers/gpu/drm/i915/Kconfig
@@ -24,7 +24,7 @@ config DRM_I915
select IRQ_WORK
# i915 depends on ACPI_VIDEO when ACPI is enabled
# but for select to work, need to select ACPI_VIDEO's dependencies, ick
- select BACKLIGHT_CLASS_DEVICE if ACPI
+ select BACKLIGHT_CLASS_DEVICE
select INPUT if ACPI
select X86_PLATFORM_DEVICES if ACPI
select ACPI_WMI if ACPI
--
2.40.0
Powered by blists - more mailing lists