public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: vivid: fix FB dependency
@ 2025-03-14 21:38 Arnd Bergmann
  2025-03-17 12:08 ` Ricardo Ribalda
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2025-03-14 21:38 UTC (permalink / raw)
  To: Hans Verkuil, Mauro Carvalho Chehab, Ricardo Ribalda,
	Slawomir Rosek
  Cc: Arnd Bergmann, linux-media, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/media/test-drivers/vivid/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/media/test-drivers/vivid/Kconfig b/drivers/media/test-drivers/vivid/Kconfig
index e95edc0f22bf..cc470070a7a5 100644
--- a/drivers/media/test-drivers/vivid/Kconfig
+++ b/drivers/media/test-drivers/vivid/Kconfig
@@ -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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] media: vivid: fix FB dependency
  2025-03-14 21:38 [PATCH] media: vivid: fix FB dependency Arnd Bergmann
@ 2025-03-17 12:08 ` Ricardo Ribalda
  2025-03-17 12:15   ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Ricardo Ribalda @ 2025-03-17 12:08 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Hans Verkuil, Mauro Carvalho Chehab, Slawomir Rosek,
	Arnd Bergmann, linux-media, linux-kernel

Thanks for the patch!

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

Best regards!

On Fri, 14 Mar 2025 at 22:39, Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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")
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/media/test-drivers/vivid/Kconfig | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/test-drivers/vivid/Kconfig b/drivers/media/test-drivers/vivid/Kconfig
> index e95edc0f22bf..cc470070a7a5 100644
> --- a/drivers/media/test-drivers/vivid/Kconfig
> +++ b/drivers/media/test-drivers/vivid/Kconfig
> @@ -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
>


-- 
Ricardo Ribalda

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] media: vivid: fix FB dependency
  2025-03-17 12:08 ` Ricardo Ribalda
@ 2025-03-17 12:15   ` Arnd Bergmann
  0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2025-03-17 12:15 UTC (permalink / raw)
  To: Ricardo Ribalda, Arnd Bergmann
  Cc: Hans Verkuil, Mauro Carvalho Chehab, Slawomir Rosek, linux-media,
	linux-kernel

On Mon, Mar 17, 2025, at 13:08, Ricardo Ribalda wrote:
> Thanks for the patch!
>
> Just out of curiosity, how did you found this? make randconfig?
>

Yes, I do a lot of randconfig builds.

     Arnd

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-03-17 12:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-14 21:38 [PATCH] media: vivid: fix FB dependency Arnd Bergmann
2025-03-17 12:08 ` Ricardo Ribalda
2025-03-17 12:15   ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox