mbox series

[v2,0/3] drm,fbdev: Fix module dependencies

Message ID 20241212100636.45875-1-tzimmermann@suse.de
Headers show
Series drm,fbdev: Fix module dependencies | expand

Message

Thomas Zimmermann Dec. 12, 2024, 10:04 a.m. UTC
Fix the dependencies among the various graphics modules.

Before addressing the FB_CORE issue, patch 1 first resolves a problem
with BACKLIGHT_CLASS_DEVICE. A number of fbdev drivers select it, which
results in a recursive-dependency error after patch has been applied.
Making these drivers (or parts of them) depend on BACKLIGHT_CLASS_DEVICE
fixes this.

Patch 2 selects FB_CORE for DRM_GEM_DMA_HELPER and DRM_TTM_HELPER.
This is necessary with the recently added DRM client library.

Patch 3 is the second half of the patch provided by Arnd at [1]. It
could not yet be merged because of the issues fixed by patch 1.

Side note: For the majority of graphics drivers, backlight functionality
depends on BACKLIGHT_CLASS_DEVICE. In a few cases drivers select the
Kconfig token automatically. These drivers should be updated to depends
on the token as well, such that backlight functionality is fully user-
controlled.

v2:
- s/BACKLIGHT_DEVICE_CLASS/BACKLIGHT_CLASS_DEVICE (Helge)
- Fix fbdev driver-dependency corner case (Arnd)

[1] https://patchwork.freedesktop.org/series/141411/

Arnd Bergmann (1):
  drm: rework FB_CORE dependency

Thomas Zimmermann (2):
  fbdev: Fix recursive dependencies wrt BACKLIGHT_CLASS_DEVICE
  drm/fbdev: Select FB_CORE dependency for fbdev on DMA and TTM

 drivers/auxdisplay/Kconfig       |  2 +-
 drivers/gpu/drm/Kconfig          |  3 +++
 drivers/macintosh/Kconfig        |  1 +
 drivers/staging/fbtft/Kconfig    |  1 +
 drivers/video/fbdev/Kconfig      | 18 +++++++++++++-----
 drivers/video/fbdev/core/Kconfig |  3 +--
 6 files changed, 20 insertions(+), 8 deletions(-)

Comments

Christophe Leroy Dec. 13, 2024, 7:43 a.m. UTC | #1
Le 13/12/2024 à 08:40, Christophe Leroy a écrit :
> 
> 
> Le 12/12/2024 à 11:04, Thomas Zimmermann a écrit :
>> Select FB_CORE if GEM's DMA and TTM implementations support fbdev
>> emulation. Fixes linker errors about missing symbols from the fbdev
>> subsystem.
>>
>> Also see [1] for a related SHMEM fix.
>>
>> Fixes: dadd28d4142f ("drm/client: Add client-lib module")
>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>> Link: https://patchwork.freedesktop.org/series/141411/ # 1
>> ---
>>   drivers/gpu/drm/Kconfig | 2 ++
>>   1 file changed, 2 insertions(+)
> 
> Build fails which pmac32_defconfig :
> 
>    LD      .tmp_vmlinux1
> powerpc64-linux-ld: drivers/macintosh/via-pmu-backlight.o: in function 
> `pmu_backlight_init':
> via-pmu-backlight.c:(.init.text+0xc0): undefined reference to 
> `backlight_device_register'
> make[2]: *** [scripts/Makefile.vmlinux:77: vmlinux] Error 1
> make[1]: *** [/home/chleroy/linux-powerpc/Makefile:1225: vmlinux] Error 2
> 
> 

Sorry that failure is from patch 1.