Skip to contentSkip to conversation

media: vivid: fix FB dependency

PATCH In review Arnd Bergmann 3 participants 3 messages Mar 14, 2025 – Mar 17, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: vivid: fix FB dependency

From: Arnd Bergmann <[email protected]>

It's not enough to have a dependency on CONFIG_FB, as that can be in a loadable module when vivid itself is builtin:

drivers/media/test-drivers/vivid/vivid-osd.o: in function `vivid_fb_init':
vivid-osd.c:(.text+0xdc0): undefined reference to fb_alloc_cmap' vivid-osd.c:(.text+0xe26): undefined reference to register_framebuffer'

Change the dependency to only allow configurations that can be built, but change the FB to FB_CORE so this is also possible when using DRM with FB compatibility rather than full fbdev.

Fixes 20889ddede38 ("media: vivid: Introduce VIDEO_VIVID_OSD")
---
 drivers/media/test-drivers/vivid/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/media/test-drivers/vivid/Kconfig +2 -1
index e95edc0f22bf..cc470070a7a5 100644
@@ -32,7 +32,8 @@ config VIDEO_VIVID_CEC
 
 config VIDEO_VIVID_OSD
 	bool "Enable Framebuffer for testing Output Overlay"
-	depends on VIDEO_VIVID && FB
+	depends on VIDEO_VIVID && FB_CORE
+	depends on VIDEO_VIVID=m || FB_CORE=y
 	default y
 	select FB_IOMEM_HELPERS
 	help
Signature · 1 line
2.39.5
Reviewed-by on v1 1/1
#1 lore raw

Thanks for the patch!

Just out of curiosity, how did you found this? make randconfig?

Best regards!

Quoted 10 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

It's not enough to have a dependency on CONFIG_FB, as that can be in a loadable module when vivid itself is builtin:

drivers/media/test-drivers/vivid/vivid-osd.o: in function `vivid_fb_init':
vivid-osd.c:(.text+0xdc0): undefined reference to fb_alloc_cmap' vivid-osd.c:(.text+0xe26): undefined reference to register_framebuffer'

Quoted 5 lines

Change the dependency to only allow configurations that can be built, but change the FB to FB_CORE so this is also possible when using DRM with FB compatibility rather than full fbdev.

Fixes 20889ddede38 ("media: vivid: Introduce VIDEO_VIVID_OSD")
Quoted 22 lines
---
 drivers/media/test-drivers/vivid/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/media/test-drivers/vivid/Kconfig +2 -2
index e95edc0f22bf..cc470070a7a5 100644
@@ -32,7 +32,8 @@ config VIDEO_VIVID_CEC
 
 config VIDEO_VIVID_OSD
        bool "Enable Framebuffer for testing Output Overlay"
-       depends on VIDEO_VIVID && FB
+       depends on VIDEO_VIVID && FB_CORE
+       depends on VIDEO_VIVID=m || FB_CORE=y
        default y
        select FB_IOMEM_HELPERS
        help
--

2.39.5

Signature · 1 line
Ricardo Ribalda
#2 lore raw
Quoted 4 lines · Ricardo Ribalda

Thanks for the patch!

Just out of curiosity, how did you found this? make randconfig?

Yes, I do a lot of randconfig builds.

Arnd