Thread (14 messages) 14 messages, 4 authors, 2024-12-11

Re: [PATCH 1/3] fbdev: Fix recursive dependencies wrt BACKLIGHT_CLASS_DEVICE

From: Thomas Zimmermann <tzimmermann@suse.de>
Date: 2024-12-10 15:42:52
Also in: dri-devel, linux-fbdev, linux-staging

Hi


Am 10.12.24 um 15:30 schrieb Arnd Bergmann:
quoted hunk ↗ jump to hunk
On Tue, Dec 10, 2024, at 15:09, Thomas Zimmermann wrote:
quoted
Do not select BACKLIGHT_CLASS_DEVICE from FB_BACKLIGHT. The latter
only controls backlight support within fbdev core code and data
structures.

Make fbdev drivers depend on BACKLIGHT_CLASS_DEVICE and let users
select it explicitly. Fixes warnings about recursive dependencies,
such as

error: recursive dependency detected!
	symbol BACKLIGHT_CLASS_DEVICE is selected by FB_BACKLIGHT
	symbol FB_BACKLIGHT is selected by FB_SH_MOBILE_LCDC
	symbol FB_SH_MOBILE_LCDC depends on FB_DEVICE
	symbol FB_DEVICE depends on FB_CORE
	symbol FB_CORE is selected by DRM_GEM_DMA_HELPER
	symbol DRM_GEM_DMA_HELPER is selected by DRM_PANEL_ILITEK_ILI9341
	symbol DRM_PANEL_ILITEK_ILI9341 depends on BACKLIGHT_CLASS_DEVICE

BACKLIGHT_CLASS_DEVICE is user-selectable, so making drivers adapt to
it is the correct approach in any case. For most drivers, backlight
support is also configurable separately.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Thanks for revisiting this!

My patch that failed to work correctly happened to work on my
randconfig tree because I still have an old variant of this
change, see

https://lore.kernel.org/linux-fbdev/20200417155553.675905-8-arnd@arndb.de/ (local)

This is almost the same as your version, except for the
optional fbdev Kconfig bits
PERS
quoted
@@ -660,7 +661,6 @@ config FB_ATMEL
  config FB_NVIDIA
  	tristate "nVidia Framebuffer Support"
  	depends on FB && PCI
-	select FB_BACKLIGHT if FB_NVIDIA_BACKLIGHT
  	select FB_CFB_FILLRECT
  	select FB_CFB_COPYAREA
  	select FB_CFB_IMAGEBLIT
@@ -700,6 +700,8 @@ config FB_NVIDIA_DEBUG
  config FB_NVIDIA_BACKLIGHT
  	bool "Support for backlight control"
  	depends on FB_NVIDIA
+	depends on BACKLIGHT_CLASS_DEVICE
+	select FB_BACKLIGHT
  	default y
  	help
  	  Say Y here if you want to control the backlight of your display.
For instance here I used
@@ -702,6 +703,7 @@ config FB_NVIDIA_DEBUG
  config FB_NVIDIA_BACKLIGHT
         bool "Support for backlight control"
         depends on FB_NVIDIA
+       depends on BACKLIGHT_CLASS_DEVICE=y || BACKLIGHT_CLASS_DEVICE=FB_NVIDIA
         default y
         help
           Say Y here if you want to control the backlight of your display.
while your patch causes a link failure with

CONFIG_FB_NVIDIA=y
CONFIG_FB_NVIDIA_BACKLIGHT=y
CONFIG_BACKLIGHT_CLASS_DEVICE=m
Ah, right. I'll update the series to use your approach.

Best regards
Thomas
        Arnd
-- 
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help