From: Thomas Zimmermann <tzimmermann@suse.de>
To: Helge Deller <deller@gmx.de>,
Jani Nikula <jani.nikula@linux.intel.com>,
Arnd Bergmann <arnd@arndb.de>,
Javier Martinez Canillas <javierm@redhat.com>,
Simona Vetter <simona@ffwll.ch>, Dave Airlie <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: Fri, 13 Dec 2024 08:26:19 +0100 [thread overview]
Message-ID: <5566a3f5-496a-4b39-a0fa-6a1a5af9a67a@suse.de> (raw)
In-Reply-To: <2701e824-d330-49c0-88fa-a26658a9710c@gmx.de>
Hi
Am 13.12.24 um 00:56 schrieb Helge Deller:
> On 12/13/24 00:24, Jani Nikula wrote:
>> On Thu, 12 Dec 2024, "Arnd Bergmann" <arnd@arndb.de> wrote:
>>> On Thu, Dec 12, 2024, at 19:44, Helge Deller wrote:
>>>> 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?
>>>
>>> The above is generally a mistake and the root cause of the
>>> dependency loops. With very few exceptions, the solution in
>>> these cases is to find the inconsistent 'select' and change
>>> it into 'depends on'.
>>
>> Agreed.
>
> That's fine, but my point is that it should be consistent.
> For example:
>
> ~:/git-kernel/linux$ grep -r "select.*BACKLIGHT_CLASS_DEVICE"
> drivers/gpu/
> drivers/gpu/drm/tilcdc/Kconfig: select BACKLIGHT_CLASS_DEVICE
> drivers/gpu/drm/nouveau/Kconfig: select BACKLIGHT_CLASS_DEVICE
> if DRM_NOUVEAU_BACKLIGHT
> drivers/gpu/drm/nouveau/Kconfig: select BACKLIGHT_CLASS_DEVICE
> if ACPI && X86
> drivers/gpu/drm/tiny/Kconfig: select BACKLIGHT_CLASS_DEVICE
> drivers/gpu/drm/tiny/Kconfig: select BACKLIGHT_CLASS_DEVICE
> drivers/gpu/drm/tiny/Kconfig: select BACKLIGHT_CLASS_DEVICE
> drivers/gpu/drm/tiny/Kconfig: select BACKLIGHT_CLASS_DEVICE
> drivers/gpu/drm/tiny/Kconfig: select BACKLIGHT_CLASS_DEVICE
> drivers/gpu/drm/tiny/Kconfig: select BACKLIGHT_CLASS_DEVICE
> drivers/gpu/drm/tiny/Kconfig: select BACKLIGHT_CLASS_DEVICE
> drivers/gpu/drm/fsl-dcu/Kconfig: select BACKLIGHT_CLASS_DEVICE
> drivers/gpu/drm/i915/Kconfig: select BACKLIGHT_CLASS_DEVICE if ACPI
> drivers/gpu/drm/gma500/Kconfig: select BACKLIGHT_CLASS_DEVICE if ACPI
> drivers/gpu/drm/amd/amdgpu/Kconfig: select BACKLIGHT_CLASS_DEVICE
> drivers/gpu/drm/xe/Kconfig: select BACKLIGHT_CLASS_DEVICE if ACPI
> drivers/gpu/drm/solomon/Kconfig: select BACKLIGHT_CLASS_DEVICE
> drivers/gpu/drm/radeon/Kconfig: select BACKLIGHT_CLASS_DEVICE
> drivers/gpu/drm/renesas/shmobile/Kconfig: select
> BACKLIGHT_CLASS_DEVICE
> drivers/gpu/drm/gud/Kconfig: select BACKLIGHT_CLASS_DEVICE
> drivers/gpu/drm/bridge/Kconfig: select BACKLIGHT_CLASS_DEVICE
>
> All major drm graphics drivers *select* BACKLIGHT_CLASS_DEVICE.
> Are you changing them to "depend on" as well?
All these drivers should be changed to either 'depends on' or maybe 'imply'.
Best regards
Thomas
>
> 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-13 7:26 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
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 [this message]
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=5566a3f5-496a-4b39-a0fa-6a1a5af9a67a@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@gmail.com \
--cc=arnd@arndb.de \
--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