From: Thomas Zimmermann <tzimmermann@suse.de>
To: Helge Deller <deller@gmx.de>,
javierm@redhat.com, arnd@arndb.de, jani.nikula@linux.intel.com,
christophe.leroy@csgroup.eu, 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 v3 1/3] fbdev: Fix recursive dependencies wrt BACKLIGHT_CLASS_DEVICE
Date: Sun, 22 Dec 2024 17:09:29 +0100 [thread overview]
Message-ID: <4e1a06aa-3b00-45b5-a5e3-bb802e774c88@suse.de> (raw)
In-Reply-To: <6ed9693e-e8f5-4786-b440-4e27c6d31da3@gmx.de>
Hi
Am 22.12.24 um 07:31 schrieb Helge Deller:
> On 12/16/24 08:42, 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.
>>
>> v3:
>> - Select BACKLIGHT_CLASS_DEVICE in PowerMac defconfigs (Christophe)
>> - Fix PMAC_BACKLIGHT module dependency corner cases (Christophe)
>> v2:
>> - s/BACKLIGHT_DEVICE_CLASS/BACKLIGHT_CLASS_DEVICE (Helge)
>> - Fix fbdev driver-dependency corner case (Arnd)
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>> ---
>> arch/powerpc/configs/pmac32_defconfig | 1 +
>> arch/powerpc/configs/ppc6xx_defconfig | 1 +
>> drivers/auxdisplay/Kconfig | 2 +-
>> drivers/macintosh/Kconfig | 1 +
>> drivers/staging/fbtft/Kconfig | 1 +
>> drivers/video/fbdev/Kconfig | 18 +++++++++++++-----
>> drivers/video/fbdev/core/Kconfig | 3 +--
>> 7 files changed, 19 insertions(+), 8 deletions(-)
>>
>> ...
>> 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
>
> Seems wrong. BACKLIGHT_CLASS_DEVICE is of type tristate.
> There are more of those, please check.
It's exactly correct. Linking would fail with FB_NVIDIA=y and
BACKLIGHT=m. The above construct avoids this case. Please see Arnd's
review comment at [1].
That's also why I mentioned that 'imply' could be used rather than
'depends on'. It would handle this situation automatically.
Best regards
Thomas
[1] https://patchwork.freedesktop.org/patch/628099/?series=142356&rev=1
>
> Helge
--
--
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)
next prev parent reply other threads:[~2024-12-22 16:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-16 7:42 [PATCH v3 0/3] drm,fbdev: Fix module dependencies Thomas Zimmermann
2024-12-16 7:42 ` [PATCH v3 1/3] fbdev: Fix recursive dependencies wrt BACKLIGHT_CLASS_DEVICE Thomas Zimmermann
2024-12-22 6:31 ` Helge Deller
2024-12-22 16:09 ` Thomas Zimmermann [this message]
2024-12-22 20:15 ` Helge Deller
2024-12-22 20:50 ` Arnd Bergmann
2024-12-22 21:44 ` Helge Deller
2024-12-16 7:42 ` [PATCH v3 2/3] drm/fbdev: Select FB_CORE dependency for fbdev on DMA and TTM Thomas Zimmermann
2024-12-16 7:42 ` [PATCH v3 3/3] drm: rework FB_CORE dependency Thomas Zimmermann
2024-12-16 10:12 ` [PATCH v3 0/3] drm,fbdev: Fix module dependencies Arnd Bergmann
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=4e1a06aa-3b00-45b5-a5e3-bb802e774c88@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@gmail.com \
--cc=arnd@arndb.de \
--cc=christophe.leroy@csgroup.eu \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--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 \
/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).