All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: i2c: select V4L2_ASYNC where needed
@ 2021-09-20  9:58 Arnd Bergmann
  2021-09-20 14:23 ` Sakari Ailus
  2021-09-20 20:31 ` Randy Dunlap
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2021-09-20  9:58 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Arnd Bergmann, Sakari Ailus, Daniele Alessandrelli,
	Martina Krasteva, Jacopo Mondi, Paul Kocialkowski, Tianshu Qiu,
	linux-media, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

I came across a link failure from randconfig builds:

x86_64-linux-ld: drivers/media/i2c/ths8200.o: in function `ths8200_remove':
ths8200.c:(.text+0x491): undefined reference to `v4l2_async_unregister_subdev'
x86_64-linux-ld: drivers/media/i2c/ths8200.o: in function `ths8200_probe':
ths8200.c:(.text+0xe49): undefined reference to `v4l2_async_register_subdev'
x86_64-linux-ld: drivers/media/i2c/tw9910.o: in function `tw9910_remove':
tw9910.c:(.text+0x467): undefined reference to `v4l2_async_unregister_subdev'
x86_64-linux-ld: drivers/media/i2c/tw9910.o: in function `tw9910_probe':
tw9910.c:(.text+0x1123): undefined reference to `v4l2_async_register_subdev'

These clearly lack a 'select' statement, but I don't know why
this started happening only now. I had a bit of a look around to find
other configs that have the same problem, but could not come up with
a reliable way and found nothing else through experimentation.
It is likely that other symbols like these exist that need an extra
select.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/media/i2c/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
index 08feb3e8c1bf..d49eecc4fe33 100644
--- a/drivers/media/i2c/Kconfig
+++ b/drivers/media/i2c/Kconfig
@@ -450,6 +450,7 @@ config VIDEO_TW9906
 config VIDEO_TW9910
 	tristate "Techwell TW9910 video decoder"
 	depends on VIDEO_V4L2 && I2C
+	select V4L2_ASYNC
 	help
 	  Support for Techwell TW9910 NTSC/PAL/SECAM video decoder.
 
@@ -597,6 +598,7 @@ config VIDEO_AK881X
 config VIDEO_THS8200
 	tristate "Texas Instruments THS8200 video encoder"
 	depends on VIDEO_V4L2 && I2C
+	select V4L2_ASYNC
 	help
 	  Support for the Texas Instruments THS8200 video encoder.
 
-- 
2.29.2


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

* Re: [PATCH] media: i2c: select V4L2_ASYNC where needed
  2021-09-20  9:58 [PATCH] media: i2c: select V4L2_ASYNC where needed Arnd Bergmann
@ 2021-09-20 14:23 ` Sakari Ailus
  2021-09-20 20:31 ` Randy Dunlap
  1 sibling, 0 replies; 3+ messages in thread
From: Sakari Ailus @ 2021-09-20 14:23 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Mauro Carvalho Chehab, Arnd Bergmann, Daniele Alessandrelli,
	Martina Krasteva, Jacopo Mondi, Paul Kocialkowski, Tianshu Qiu,
	linux-media, linux-kernel

Hi Anrd,

On Mon, Sep 20, 2021 at 11:58:24AM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> I came across a link failure from randconfig builds:
> 
> x86_64-linux-ld: drivers/media/i2c/ths8200.o: in function `ths8200_remove':
> ths8200.c:(.text+0x491): undefined reference to `v4l2_async_unregister_subdev'
> x86_64-linux-ld: drivers/media/i2c/ths8200.o: in function `ths8200_probe':
> ths8200.c:(.text+0xe49): undefined reference to `v4l2_async_register_subdev'
> x86_64-linux-ld: drivers/media/i2c/tw9910.o: in function `tw9910_remove':
> tw9910.c:(.text+0x467): undefined reference to `v4l2_async_unregister_subdev'
> x86_64-linux-ld: drivers/media/i2c/tw9910.o: in function `tw9910_probe':
> tw9910.c:(.text+0x1123): undefined reference to `v4l2_async_register_subdev'
> 
> These clearly lack a 'select' statement, but I don't know why
> this started happening only now. I had a bit of a look around to find
> other configs that have the same problem, but could not come up with
> a reliable way and found nothing else through experimentation.
> It is likely that other symbols like these exist that need an extra
> select.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Probably this one:

commit ff3cc65cadb5d7333fde557b38cbb60b3a6cf496
Author: Sakari Ailus <sakari.ailus@linux.intel.com>
Date:   Fri Mar 5 18:38:39 2021 +0100

    media: v4l: async, fwnode: Improve module organisation
    
    The V4L2 async framework is generally used with the V4L2 fwnode, which
    also depends on the former. There are a few exceptions but they are
    relatively few.
    
    At the same time there is a vast number of systems that need videodev
    module, but have no use for v4l2-async that's now part of videodev.
    
    In order to improve, split the v4l2-async into its own module. Selecting
    V4L2_FWNODE also selects V4L2_ASYNC.
    
    This also moves the initialisation of the debufs entries for async subdevs
    to loading of the v4l2-async module. The directory is named as
    "v4l2-async".
    
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

I think I must have missed some drivers using v4l2-async.

Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>

-- 
Sakari Ailus

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

* Re: [PATCH] media: i2c: select V4L2_ASYNC where needed
  2021-09-20  9:58 [PATCH] media: i2c: select V4L2_ASYNC where needed Arnd Bergmann
  2021-09-20 14:23 ` Sakari Ailus
@ 2021-09-20 20:31 ` Randy Dunlap
  1 sibling, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2021-09-20 20:31 UTC (permalink / raw)
  To: Arnd Bergmann, Mauro Carvalho Chehab
  Cc: Arnd Bergmann, Sakari Ailus, Daniele Alessandrelli,
	Martina Krasteva, Jacopo Mondi, Paul Kocialkowski, Tianshu Qiu,
	linux-media, linux-kernel

On 9/20/21 2:58 AM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> I came across a link failure from randconfig builds:
> 
> x86_64-linux-ld: drivers/media/i2c/ths8200.o: in function `ths8200_remove':
> ths8200.c:(.text+0x491): undefined reference to `v4l2_async_unregister_subdev'
> x86_64-linux-ld: drivers/media/i2c/ths8200.o: in function `ths8200_probe':
> ths8200.c:(.text+0xe49): undefined reference to `v4l2_async_register_subdev'

ths8200 is already fixed.

> x86_64-linux-ld: drivers/media/i2c/tw9910.o: in function `tw9910_remove':
> tw9910.c:(.text+0x467): undefined reference to `v4l2_async_unregister_subdev'
> x86_64-linux-ld: drivers/media/i2c/tw9910.o: in function `tw9910_probe':
> tw9910.c:(.text+0x1123): undefined reference to `v4l2_async_register_subdev'
> 
> These clearly lack a 'select' statement, but I don't know why
> this started happening only now. I had a bit of a look around to find
> other configs that have the same problem, but could not come up with
> a reliable way and found nothing else through experimentation.
> It is likely that other symbols like these exist that need an extra
> select.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>   drivers/media/i2c/Kconfig | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
> index 08feb3e8c1bf..d49eecc4fe33 100644
> --- a/drivers/media/i2c/Kconfig
> +++ b/drivers/media/i2c/Kconfig
> @@ -450,6 +450,7 @@ config VIDEO_TW9906
>   config VIDEO_TW9910
>   	tristate "Techwell TW9910 video decoder"
>   	depends on VIDEO_V4L2 && I2C
> +	select V4L2_ASYNC
>   	help
>   	  Support for Techwell TW9910 NTSC/PAL/SECAM video decoder.
>   
> @@ -597,6 +598,7 @@ config VIDEO_AK881X
>   config VIDEO_THS8200
>   	tristate "Texas Instruments THS8200 video encoder"
>   	depends on VIDEO_V4L2 && I2C
> +	select V4L2_ASYNC
>   	help
>   	  Support for the Texas Instruments THS8200 video encoder.
>   
> 

Thanks.
-- 
~Randy

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

end of thread, other threads:[~2021-09-21  1:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-20  9:58 [PATCH] media: i2c: select V4L2_ASYNC where needed Arnd Bergmann
2021-09-20 14:23 ` Sakari Ailus
2021-09-20 20:31 ` Randy Dunlap

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.