[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211027132732.3993279-3-arnd@kernel.org>
Date: Wed, 27 Oct 2021 15:27:14 +0200
From: Arnd Bergmann <arnd@...nel.org>
To: dri-devel@...ts.freedesktop.org,
Jani Nikula <jani.nikula@...ux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@...el.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>
Cc: linux-fbdev@...r.kernel.org, intel-gfx@...ts.freedesktop.org,
Arnd Bergmann <arnd@...db.de>,
Matthew Auld <matthew.auld@...el.com>,
Zhenyu Wang <zhenyuw@...ux.intel.com>,
Alex Williamson <alex.williamson@...hat.com>,
Jason Gunthorpe <jgg@...pe.ca>,
Daniele Ceraolo Spurio <daniele.ceraolospurio@...el.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH 3/3] [v2] i915: fix backlight configuration issue
From: Arnd Bergmann <arnd@...db.de>
The i915 driver can use the backlight subsystem as an option, and usually
selects it when CONFIG_ACPI is set. However it is possible to configure
a kernel with modular backlight classdev support and a built-in i915
driver, which leads to a linker error:
drivers/gpu/drm/i915/display/intel_panel.o: In function `intel_backlight_device_register':
intel_panel.c:(.text+0x2f58): undefined reference to `backlight_device_register'
drivers/gpu/drm/i915/display/intel_panel.o: In function `intel_backlight_device_unregister':
intel_panel.c:(.text+0x2fe4): undefined reference to `backlight_device_unregister'
Change i915 to just 'depends on' for both BACKLIGHT_CLASS_DEVICE
and ACPI_VIDEO, which avoids a lot of the problems.
Link: https://lore.kernel.org/all/20200108140227.3976563-1-arnd@arndb.de/
Link: https://lore.kernel.org/all/20200417155553.675905-1-arnd@arndb.de/
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
This change depends on cleaning up drivers/video/fbdev to no longer
'select' I2C and BACKLIGHT_CLASS_DEVICE, otherwise it causes
dependency loops.
---
drivers/gpu/drm/i915/Kconfig | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
index 84b6fc70cbf5..f427e6d50d9b 100644
--- a/drivers/gpu/drm/i915/Kconfig
+++ b/drivers/gpu/drm/i915/Kconfig
@@ -3,6 +3,8 @@ config DRM_I915
tristate "Intel 8xx/9xx/G3x/G4x/HD Graphics"
depends on DRM
depends on X86 && PCI
+ depends on ACPI_VIDEO || !ACPI
+ depends on BACKLIGHT_CLASS_DEVICE || !BACKLIGHT_CLASS_DEVICE
select INTEL_GTT
select INTERVAL_TREE
# we need shmfs for the swappable backing store, and in particular
@@ -16,10 +18,6 @@ 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 INPUT if ACPI
- select ACPI_VIDEO if ACPI
- select ACPI_BUTTON if ACPI
select SYNC_FILE
select IOSF_MBI
select CRC32
--
2.29.2
Powered by blists - more mailing lists