Thread (21 messages) 21 messages, 4 authors, 2025-09-15

Re: [PATCH v4 5/8] media: v4l2-core: Introduce v4l2-params.c

From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Date: 2025-09-15 14:41:08
Also in: linux-media, linux-rockchip, lkml, oe-kbuild-all

On Mon, Sep 15, 2025 at 03:31:58PM +0200, Jacopo Mondi wrote:
Question for media maintainers...

I'm not sure how I should better handle this one

On Sun, Aug 24, 2025 at 07:16:21AM +0800, kernel test robot wrote:
quoted
Hi Jacopo,

kernel test robot noticed the following build errors:

[auto build test ERROR on a75b8d198c55e9eb5feb6f6e155496305caba2dc]

url:    https://github.com/intel-lab-lkp/linux/commits/Jacopo-Mondi/media-uapi-Introduce-V4L2-extensible-params/20250820-210503
base:   a75b8d198c55e9eb5feb6f6e155496305caba2dc
patch link:    https://lore.kernel.org/r/20250820-extensible-parameters-validation-v4-5-30fe5a99cb1f%40ideasonboard.com
patch subject: [PATCH v4 5/8] media: v4l2-core: Introduce v4l2-params.c
config: nios2-randconfig-002-20250824 (https://download.01.org/0day-ci/archive/20250824/202508240704.AZwGXBaw-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 9.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250824/202508240704.AZwGXBaw-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot [off-list ref]
| Closes: https://lore.kernel.org/oe-kbuild-all/202508240704.AZwGXBaw-lkp@intel.com/ (local)

All errors (new ones prefixed by >>):

   nios2-linux-ld: drivers/media/v4l2-core/v4l2-params.o: in function `v4l2_params_buffer_validate':
   v4l2-params.c:(.text+0x124): undefined reference to `vb2_plane_vaddr'
quoted
quoted
v4l2-params.c:(.text+0x124): relocation truncated to fit: R_NIOS2_CALL26 against `vb2_plane_vaddr'
Clearly v4l2-params.c (now v4l2-isp.c) depends on VIDEOBUF2_CORE

Right now v4l2-params.c gets compiled in as part of the
videodev-objs Makefile target. IOW is not gated by a KConfig option.

To select (or better, depend) on VIDEOBUF2_CORE I should guard
v4l2-params.c with a KConfig option so that I can 'depend on
VIDEOBUF2_CORE'. Drivers that use the v4l2-params.c helper would then
have to 'select V4L2_PARAMS` (or similar).
Make it V4L2_ISP :-)
Is this the best approach or are there alternatives I might be missing ?
We don't want VIDEODEV depending on VB2. I think it also makes sense to
have a separate Kconfig option for these helpers, are they will be used
by a small number of drivers.

Make CONFIG_V4L2_ISP an option that drivers select, not depend on.

-- 
Regards,

Laurent Pinchart
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help