From: Helge Deller <deller@gmx.de>
To: Thomas Zimmermann <tzimmermann@suse.de>,
javierm@redhat.com, arnd@arndb.de, simona@ffwll.ch,
airlied@gmail.com
Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
linux-staging@lists.linux.dev, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v2 1/3] fbdev: Fix recursive dependencies wrt BACKLIGHT_CLASS_DEVICE
Date: Thu, 12 Dec 2024 19:44:08 +0100 [thread overview]
Message-ID: <09edb59a-527a-4ddb-bfaf-ea74fb5a3023@gmx.de> (raw)
In-Reply-To: <20241212100636.45875-2-tzimmermann@suse.de>
On 12/12/24 11:04, 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 [...]
I think in the fbdev drivers themselves you should do:
select BACKLIGHT_CLASS_DEVICE
instead of "depending" on it.
This is the way as it's done in the DRM tiny and the i915/gma500 DRM drivers.
So, something like:
--- a/drivers/staging/fbtft/Kconfig
tristate "Support for small TFT LCD display modules"
depends on FB && SPI
depends on FB_DEVICE
+ select BACKLIGHT_DEVICE_CLASS
depends on GPIOLIB || COMPILE_TEST
select FB_BACKLIGHT
config FB_BACKLIGHT
tristate
depends on FB
- select BACKLIGHT_CLASS_DEVICE
+ depends on BACKLIGHT_CLASS_DEVICE
Would that fix the dependency warning?
Helge
>
> 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.
>
> v2:
> - s/BACKLIGHT_DEVICE_CLASS/BACKLIGHT_CLASS_DEVICE (Helge)
> - Fix fbdev driver-dependency corner case (Arnd)
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
> drivers/auxdisplay/Kconfig | 2 +-
> drivers/macintosh/Kconfig | 1 +
> drivers/staging/fbtft/Kconfig | 1 +
> drivers/video/fbdev/Kconfig | 18 +++++++++++++-----
> drivers/video/fbdev/core/Kconfig | 3 +--
> 5 files changed, 17 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/auxdisplay/Kconfig b/drivers/auxdisplay/Kconfig
> index 21545ffba065..8934e6ad5772 100644
> --- a/drivers/auxdisplay/Kconfig
> +++ b/drivers/auxdisplay/Kconfig
> @@ -489,7 +489,7 @@ config IMG_ASCII_LCD
>
> config HT16K33
> tristate "Holtek Ht16K33 LED controller with keyscan"
> - depends on FB && I2C && INPUT
> + depends on FB && I2C && INPUT && BACKLIGHT_CLASS_DEVICE
> select FB_SYSMEM_HELPERS
> select INPUT_MATRIXKMAP
> select FB_BACKLIGHT
> diff --git a/drivers/macintosh/Kconfig b/drivers/macintosh/Kconfig
> index fb38f684444f..bf3824032d61 100644
> --- a/drivers/macintosh/Kconfig
> +++ b/drivers/macintosh/Kconfig
> @@ -120,6 +120,7 @@ config PMAC_MEDIABAY
> config PMAC_BACKLIGHT
> bool "Backlight control for LCD screens"
> depends on PPC_PMAC && ADB_PMU && FB = y && (BROKEN || !PPC64)
> + depends on BACKLIGHT_CLASS_DEVICE
> select FB_BACKLIGHT
> help
> Say Y here to enable Macintosh specific extensions of the generic
> diff --git a/drivers/staging/fbtft/Kconfig b/drivers/staging/fbtft/Kconfig
> index 77ab44362f16..dcf6a70455cc 100644
> --- a/drivers/staging/fbtft/Kconfig
> +++ b/drivers/staging/fbtft/Kconfig
> @@ -3,6 +3,7 @@ menuconfig FB_TFT
> tristate "Support for small TFT LCD display modules"
> depends on FB && SPI
> depends on FB_DEVICE
> + depends on BACKLIGHT_CLASS_DEVICE
> depends on GPIOLIB || COMPILE_TEST
> select FB_BACKLIGHT
> select FB_SYSMEM_HELPERS_DEFERRED
> diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
> index de035071fedb..55c6686f091e 100644
> --- a/drivers/video/fbdev/Kconfig
> +++ b/drivers/video/fbdev/Kconfig
> @@ -649,6 +649,7 @@ config FB_S1D13XXX
> config FB_ATMEL
> tristate "AT91 LCD Controller support"
> depends on FB && OF && HAVE_CLK && HAS_IOMEM
> + depends on BACKLIGHT_CLASS_DEVICE
> depends on HAVE_FB_ATMEL || COMPILE_TEST
> select FB_BACKLIGHT
> select FB_IOMEM_HELPERS
> @@ -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=y || BACKLIGHT_CLASS_DEVICE=FB_NVIDIA
> + select FB_BACKLIGHT
> default y
> help
> Say Y here if you want to control the backlight of your display.
> @@ -707,7 +709,6 @@ config FB_NVIDIA_BACKLIGHT
> config FB_RIVA
> tristate "nVidia Riva support"
> depends on FB && PCI
> - select FB_BACKLIGHT if FB_RIVA_BACKLIGHT
> select FB_CFB_FILLRECT
> select FB_CFB_COPYAREA
> select FB_CFB_IMAGEBLIT
> @@ -747,6 +748,8 @@ config FB_RIVA_DEBUG
> config FB_RIVA_BACKLIGHT
> bool "Support for backlight control"
> depends on FB_RIVA
> + depends on BACKLIGHT_CLASS_DEVICE=y || BACKLIGHT_CLASS_DEVICE=FB_RIVA
> + select FB_BACKLIGHT
> default y
> help
> Say Y here if you want to control the backlight of your display.
> @@ -934,7 +937,6 @@ config FB_MATROX_MAVEN
> config FB_RADEON
> tristate "ATI Radeon display support"
> depends on FB && PCI
> - select FB_BACKLIGHT if FB_RADEON_BACKLIGHT
> select FB_CFB_FILLRECT
> select FB_CFB_COPYAREA
> select FB_CFB_IMAGEBLIT
> @@ -960,6 +962,8 @@ config FB_RADEON_I2C
> config FB_RADEON_BACKLIGHT
> bool "Support for backlight control"
> depends on FB_RADEON
> + depends on BACKLIGHT_CLASS_DEVICE=y || BACKLIGHT_CLASS_DEVICE=FB_RADEON
> + select FB_BACKLIGHT
> default y
> help
> Say Y here if you want to control the backlight of your display.
> @@ -975,7 +979,6 @@ config FB_RADEON_DEBUG
> config FB_ATY128
> tristate "ATI Rage128 display support"
> depends on FB && PCI
> - select FB_BACKLIGHT if FB_ATY128_BACKLIGHT
> select FB_IOMEM_HELPERS
> select FB_MACMODES if PPC_PMAC
> help
> @@ -989,6 +992,8 @@ config FB_ATY128
> config FB_ATY128_BACKLIGHT
> bool "Support for backlight control"
> depends on FB_ATY128
> + depends on BACKLIGHT_CLASS_DEVICE=y || BACKLIGHT_CLASS_DEVICE=FB_ATY128
> + select FB_BACKLIGHT
> default y
> help
> Say Y here if you want to control the backlight of your display.
> @@ -999,7 +1004,6 @@ config FB_ATY
> select FB_CFB_FILLRECT
> select FB_CFB_COPYAREA
> select FB_CFB_IMAGEBLIT
> - select FB_BACKLIGHT if FB_ATY_BACKLIGHT
> select FB_IOMEM_FOPS
> select FB_MACMODES if PPC
> select FB_ATY_CT if SPARC64 && PCI
> @@ -1040,6 +1044,8 @@ config FB_ATY_GX
> config FB_ATY_BACKLIGHT
> bool "Support for backlight control"
> depends on FB_ATY
> + depends on BACKLIGHT_CLASS_DEVICE=y || BACKLIGHT_CLASS_DEVICE=FB_ATY
> + select FB_BACKLIGHT
> default y
> help
> Say Y here if you want to control the backlight of your display.
> @@ -1528,6 +1534,7 @@ config FB_SH_MOBILE_LCDC
> depends on FB && HAVE_CLK && HAS_IOMEM
> depends on SUPERH || COMPILE_TEST
> depends on FB_DEVICE
> + depends on BACKLIGHT_CLASS_DEVICE
> select FB_BACKLIGHT
> select FB_DEFERRED_IO
> select FB_DMAMEM_HELPERS
> @@ -1793,6 +1800,7 @@ config FB_SSD1307
> tristate "Solomon SSD1307 framebuffer support"
> depends on FB && I2C
> depends on GPIOLIB || COMPILE_TEST
> + depends on BACKLIGHT_CLASS_DEVICE
> select FB_BACKLIGHT
> select FB_SYSMEM_HELPERS_DEFERRED
> help
> diff --git a/drivers/video/fbdev/core/Kconfig b/drivers/video/fbdev/core/Kconfig
> index 0ab8848ba2f1..d554d8c543d4 100644
> --- a/drivers/video/fbdev/core/Kconfig
> +++ b/drivers/video/fbdev/core/Kconfig
> @@ -183,9 +183,8 @@ config FB_SYSMEM_HELPERS_DEFERRED
> select FB_SYSMEM_HELPERS
>
> config FB_BACKLIGHT
> - tristate
> + bool
> depends on FB
> - select BACKLIGHT_CLASS_DEVICE
>
> config FB_MODE_HELPERS
> bool "Enable Video Mode Handling Helpers"
next prev parent reply other threads:[~2024-12-12 18:44 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-12 10:04 [PATCH v2 0/3] drm,fbdev: Fix module dependencies Thomas Zimmermann
2024-12-12 10:04 ` [PATCH v2 1/3] fbdev: Fix recursive dependencies wrt BACKLIGHT_CLASS_DEVICE Thomas Zimmermann
2024-12-12 18:44 ` Helge Deller [this message]
2024-12-12 21:04 ` Arnd Bergmann
2024-12-12 23:24 ` Jani Nikula
2024-12-12 23:56 ` Helge Deller
2024-12-13 7:26 ` Thomas Zimmermann
2024-12-16 14:41 ` Simona Vetter
2024-12-13 7:28 ` Thomas Zimmermann
2024-12-13 7:44 ` Christophe Leroy
2024-12-13 8:05 ` Thomas Zimmermann
2024-12-13 8:33 ` Christophe Leroy
2024-12-13 8:35 ` Thomas Zimmermann
2024-12-13 8:41 ` Christophe Leroy
2024-12-13 8:41 ` Thomas Zimmermann
2024-12-13 10:15 ` Christophe Leroy
2024-12-13 10:24 ` Thomas Zimmermann
2024-12-22 6:25 ` Helge Deller
2024-12-12 10:04 ` [PATCH v2 2/3] drm/fbdev: Select FB_CORE dependency for fbdev on DMA and TTM Thomas Zimmermann
2024-12-13 7:40 ` LEROY Christophe
2024-12-13 7:43 ` Christophe Leroy
2024-12-12 10:04 ` [PATCH v2 3/3] drm: rework FB_CORE dependency Thomas Zimmermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=09edb59a-527a-4ddb-bfaf-ea74fb5a3023@gmx.de \
--to=deller@gmx.de \
--cc=airlied@gmail.com \
--cc=arnd@arndb.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).