[PATCH 1/3] fbdev: Fix recursive dependencies wrt BACKLIGHT_CLASS_DEVICE
Thomas Zimmermann
tzimmermann at suse.de
Tue Dec 10 15:42:48 UTC 2024
Hi
Am 10.12.24 um 15:30 schrieb Arnd Bergmann:
> On Tue, Dec 10, 2024, at 15:09, Thomas Zimmermann wrote:
>> 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 at 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/
>
> This is almost the same as your version, except for the
> optional fbdev Kconfig bits
> PERS
>> @@ -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)
More information about the dri-devel
mailing list