v4l: async, fwnode: Improve module organisation
Subsystems (18)
Sakari Ailus
maintainerPATCH 1/1 v4l: async, fwnode: Improve module organisation
The V4L2 async framework is generally used with the V4L2 fwnode, which also depends on the former. There is only one exception, the CAFE_CCIC driver, which uses V4L2 async but does not need V4L2 fwnode.
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, build v4l2-async and v4l2-fwnode as a single module called v4l2-async (the v4l2-async.c file is renamed as v4l2-async-core.c). Also the menu item V4L2_FWNODE is renamed as 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".
---
This goes on top of my recent async patches.
drivers/media/i2c/Kconfig | 80 +++++++++----------
drivers/media/i2c/ccs/Kconfig | 2 +-
drivers/media/i2c/et8ek8/Kconfig | 2 +-
drivers/media/pci/intel/ipu3/Kconfig | 2 +-
drivers/media/platform/Kconfig | 16 ++--
drivers/media/platform/am437x/Kconfig | 2 +-
drivers/media/platform/atmel/Kconfig | 4 +-
drivers/media/platform/cadence/Kconfig | 4 +-
drivers/media/platform/davinci/Kconfig | 2 +-
drivers/media/platform/exynos4-is/Kconfig | 4 +-
drivers/media/platform/marvell-ccic/Kconfig | 1 +
drivers/media/platform/rcar-vin/Kconfig | 4 +-
.../media/platform/sunxi/sun4i-csi/Kconfig | 2 +-
.../media/platform/sunxi/sun6i-csi/Kconfig | 2 +-
drivers/media/platform/xilinx/Kconfig | 2 +-
drivers/media/v4l2-core/Kconfig | 3 +-
drivers/media/v4l2-core/Makefile | 6 +-
.../{v4l2-async.c => v4l2-async-core.c} | 23 +++++-
drivers/media/v4l2-core/v4l2-dev.c | 5 --
drivers/staging/media/imx/Kconfig | 2 +-
drivers/staging/media/tegra-video/Kconfig | 2 +-
21 files changed, 94 insertions(+), 76 deletions(-)
rename drivers/media/v4l2-core/{v4l2-async.c => v4l2-async-core.c} (96%)drivers/media/i2c/Kconfig +40 -40
@@ -70,7 +70,7 @@ config VIDEO_TDA1997X depends on SND_SOC select HDMI select SND_PCM - select V4L2_FWNODE + select V4L2_ASYNC select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API help
@@ -240,7 +240,7 @@ config VIDEO_ADV748X select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select REGMAP_I2C - select V4L2_FWNODE + select V4L2_ASYNC help V4L2 subdevice driver for the Analog Devices ADV7481 and ADV7482 HDMI/Analog video decoders.
@@ -256,7 +256,7 @@ config VIDEO_ADV7604 select VIDEO_V4L2_SUBDEV_API select REGMAP_I2C select HDMI - select V4L2_FWNODE + select V4L2_ASYNC help Support for the Analog Devices ADV7604 video decoder.
@@ -369,7 +369,7 @@ config VIDEO_TC358743 select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select HDMI - select V4L2_FWNODE + select V4L2_ASYNC help Support for the Toshiba TC358743 HDMI to MIPI CSI-2 bridge.
@@ -387,7 +387,7 @@ config VIDEO_TC358743_CEC config VIDEO_TVP514X tristate "Texas Instruments TVP514x video decoder" depends on VIDEO_V4L2 && I2C - select V4L2_FWNODE + select V4L2_ASYNC help This is a Video4Linux2 sensor driver for the TI TVP5146/47 decoder. It is currently working with the TI OMAP3 camera
@@ -399,7 +399,7 @@ config VIDEO_TVP514X config VIDEO_TVP5150 tristate "Texas Instruments TVP5150 video decoder" depends on VIDEO_V4L2 && I2C - select V4L2_FWNODE + select V4L2_ASYNC select REGMAP_I2C help Support for the Texas Instruments TVP5150 video decoder.
@@ -410,7 +410,7 @@ config VIDEO_TVP5150 config VIDEO_TVP7002 tristate "Texas Instruments TVP7002 video decoder" depends on VIDEO_V4L2 && I2C - select V4L2_FWNODE + select V4L2_ASYNC help Support for the Texas Instruments TVP7002 video decoder.
@@ -468,7 +468,7 @@ config VIDEO_MAX9286 tristate "Maxim MAX9286 GMSL deserializer support" depends on I2C && I2C_MUX depends on OF_GPIO - select V4L2_FWNODE + select V4L2_ASYNC select VIDEO_V4L2_SUBDEV_API select MEDIA_CONTROLLER help
@@ -702,7 +702,7 @@ config VIDEO_ST_MIPID02 depends on I2C && VIDEO_V4L2 select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API - select V4L2_FWNODE + select V4L2_ASYNC help Support for STMicroelectronics MIPID02 CSI-2 to PARALLEL bridge. It is used to allow usage of CSI-2 sensor with PARALLEL port
@@ -730,7 +730,7 @@ config VIDEO_HI556 depends on I2C && VIDEO_V4L2 select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API - select V4L2_FWNODE + select V4L2_ASYNC help This is a Video4Linux2 sensor driver for the Hynix Hi-556 camera.
@@ -741,7 +741,7 @@ config VIDEO_HI556 config VIDEO_IMX214 tristate "Sony IMX214 sensor support" depends on GPIOLIB && I2C && VIDEO_V4L2 - select V4L2_FWNODE + select V4L2_ASYNC select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select REGMAP_I2C
@@ -757,7 +757,7 @@ config VIDEO_IMX219 depends on I2C && VIDEO_V4L2 select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API - select V4L2_FWNODE + select V4L2_ASYNC help This is a Video4Linux2 sensor driver for the Sony IMX219 camera.
@@ -793,7 +793,7 @@ config VIDEO_IMX290 select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select REGMAP_I2C - select V4L2_FWNODE + select V4L2_ASYNC help This is a Video4Linux2 sensor driver for the Sony IMX290 camera sensor.
@@ -819,7 +819,7 @@ config VIDEO_IMX334 depends on I2C && VIDEO_V4L2 select VIDEO_V4L2_SUBDEV_API select MEDIA_CONTROLLER - select V4L2_FWNODE + select V4L2_ASYNC help This is a Video4Linux2 sensor driver for the Sony IMX334 camera.
@@ -844,7 +844,7 @@ config VIDEO_OV02A10 depends on VIDEO_V4L2 && I2C select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API - select V4L2_FWNODE + select V4L2_ASYNC help This is a Video4Linux2 sensor driver for the OmniVision OV02A10 camera.
@@ -865,7 +865,7 @@ config VIDEO_OV2640 config VIDEO_OV2659 tristate "OmniVision OV2659 sensor support" depends on VIDEO_V4L2 && I2C && GPIOLIB - select V4L2_FWNODE + select V4L2_ASYNC help This is a Video4Linux2 sensor driver for the OmniVision OV2659 camera.
@@ -877,7 +877,7 @@ config VIDEO_OV2680 tristate "OmniVision OV2680 sensor support" depends on VIDEO_V4L2 && I2C select MEDIA_CONTROLLER - select V4L2_FWNODE + select V4L2_ASYNC help This is a Video4Linux2 sensor driver for the OmniVision OV2680 camera.
@@ -889,7 +889,7 @@ config VIDEO_OV2685 tristate "OmniVision OV2685 sensor support" depends on VIDEO_V4L2 && I2C select MEDIA_CONTROLLER - select V4L2_FWNODE + select V4L2_ASYNC help This is a Video4Linux2 sensor driver for the OmniVision OV2685 camera.
@@ -903,7 +903,7 @@ config VIDEO_OV2740 depends on ACPI || COMPILE_TEST select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API - select V4L2_FWNODE + select V4L2_ASYNC select REGMAP_I2C help This is a Video4Linux2 sensor driver for the OmniVision
@@ -918,7 +918,7 @@ config VIDEO_OV5640 depends on GPIOLIB && VIDEO_V4L2 && I2C select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API - select V4L2_FWNODE + select V4L2_ASYNC help This is a Video4Linux2 sensor driver for the Omnivision OV5640 camera sensor with a MIPI CSI-2 interface.
@@ -929,7 +929,7 @@ config VIDEO_OV5645 depends on I2C && VIDEO_V4L2 select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API - select V4L2_FWNODE + select V4L2_ASYNC help This is a Video4Linux2 sensor driver for the OmniVision OV5645 camera.
@@ -942,7 +942,7 @@ config VIDEO_OV5647 depends on I2C && VIDEO_V4L2 select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API - select V4L2_FWNODE + select V4L2_ASYNC help This is a Video4Linux2 sensor driver for the OmniVision OV5647 camera.
@@ -955,7 +955,7 @@ config VIDEO_OV5648 depends on I2C && PM && VIDEO_V4L2 select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API - select V4L2_FWNODE + select V4L2_ASYNC help This is a Video4Linux2 sensor driver for the OmniVision OV5648 camera.
@@ -978,7 +978,7 @@ config VIDEO_OV5670 depends on I2C && VIDEO_V4L2 select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API - select V4L2_FWNODE + select V4L2_ASYNC help This is a Video4Linux2 sensor driver for the OmniVision OV5670 camera.
@@ -991,7 +991,7 @@ config VIDEO_OV5675 depends on I2C && VIDEO_V4L2 select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API - select V4L2_FWNODE + select V4L2_ASYNC help This is a Video4Linux2 sensor driver for the OmniVision OV5675 camera.
@@ -1002,7 +1002,7 @@ config VIDEO_OV5675 config VIDEO_OV5695 tristate "OmniVision OV5695 sensor support" depends on I2C && VIDEO_V4L2 - select V4L2_FWNODE + select V4L2_ASYNC help This is a Video4Linux2 sensor driver for the OmniVision OV5695 camera.
@@ -1015,7 +1015,7 @@ config VIDEO_OV7251 depends on I2C && VIDEO_V4L2 select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API - select V4L2_FWNODE + select V4L2_ASYNC help This is a Video4Linux2 sensor driver for the OmniVision OV7251 camera.
@@ -1027,7 +1027,7 @@ config VIDEO_OV772X tristate "OmniVision OV772x sensor support" depends on I2C && VIDEO_V4L2 select REGMAP_SCCB - select V4L2_FWNODE + select V4L2_ASYNC help This is a Video4Linux2 sensor driver for the OmniVision OV772x camera.
@@ -1048,7 +1048,7 @@ config VIDEO_OV7640 config VIDEO_OV7670 tristate "OmniVision OV7670 sensor support" depends on I2C && VIDEO_V4L2 - select V4L2_FWNODE + select V4L2_ASYNC help This is a Video4Linux2 sensor driver for the OmniVision OV7670 VGA camera. It currently only works with the M88ALP01
@@ -1067,7 +1067,7 @@ config VIDEO_OV8856 depends on I2C && VIDEO_V4L2 select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API - select V4L2_FWNODE + select V4L2_ASYNC help This is a Video4Linux2 sensor driver for the OmniVision OV8856 camera sensor.
@@ -1080,7 +1080,7 @@ config VIDEO_OV8865 depends on I2C && PM && VIDEO_V4L2 select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API - select V4L2_FWNODE + select V4L2_ASYNC help This is a Video4Linux2 sensor driver for OmniVision OV8865 camera sensor.
@@ -1111,7 +1111,7 @@ config VIDEO_OV9734 depends on ACPI || COMPILE_TEST select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API - select V4L2_FWNODE + select V4L2_ASYNC help This is a Video4Linux2 sensor driver for the OmniVision OV9734 camera.
@@ -1124,7 +1124,7 @@ config VIDEO_OV13858 depends on I2C && VIDEO_V4L2 select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API - select V4L2_FWNODE + select V4L2_ASYNC help This is a Video4Linux2 sensor driver for the OmniVision OV13858 camera.
@@ -1161,7 +1161,7 @@ config VIDEO_MT9M032 config VIDEO_MT9M111 tristate "mt9m111, mt9m112 and mt9m131 support" depends on I2C && VIDEO_V4L2 - select V4L2_FWNODE + select V4L2_ASYNC help This driver supports MT9M111, MT9M112 and MT9M131 cameras from Micron/Aptina
@@ -1209,7 +1209,7 @@ config VIDEO_MT9V032 select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select REGMAP_I2C - select V4L2_FWNODE + select V4L2_ASYNC help This is a Video4Linux2 sensor driver for the Micron MT9V032 752x480 CMOS sensor.
@@ -1246,7 +1246,7 @@ config VIDEO_MAX9271_LIB config VIDEO_RDACM20 tristate "IMI RDACM20 camera support" depends on I2C - select V4L2_FWNODE + select V4L2_ASYNC select VIDEO_V4L2_SUBDEV_API select MEDIA_CONTROLLER select VIDEO_MAX9271_LIB
@@ -1260,7 +1260,7 @@ config VIDEO_RDACM20 config VIDEO_RDACM21 tristate "IMI RDACM21 camera support" depends on I2C - select V4L2_FWNODE + select V4L2_ASYNC select VIDEO_V4L2_SUBDEV_API select MEDIA_CONTROLLER select VIDEO_MAX9271_LIB
@@ -1314,7 +1314,7 @@ config VIDEO_S5K5BAF depends on I2C && VIDEO_V4L2 select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API - select V4L2_FWNODE + select V4L2_ASYNC help This is a V4L2 sensor driver for Samsung S5K5BAF 2M camera sensor with an embedded SoC image signal processor.
@@ -1327,7 +1327,7 @@ config VIDEO_S5C73M3 depends on I2C && SPI && VIDEO_V4L2 select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API - select V4L2_FWNODE + select V4L2_ASYNC help This is a V4L2 sensor driver for Samsung S5C73M3 8 Mpixel camera.
@@ -1372,7 +1372,7 @@ config VIDEO_DW9768 depends on I2C && VIDEO_V4L2 select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API - select V4L2_FWNODE + select V4L2_ASYNC help This is a driver for the DW9768 camera lens voice coil. DW9768 is a 10 bit DAC with 100mA output current sink
drivers/media/i2c/ccs/Kconfig +1 -1
@@ -5,7 +5,7 @@ config VIDEO_CCS select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select VIDEO_CCS_PLL - select V4L2_FWNODE + select V4L2_ASYNC help This is a generic driver for MIPI CCS, SMIA++ and SMIA compliant camera sensors.
drivers/media/i2c/et8ek8/Kconfig +1 -1
@@ -4,7 +4,7 @@ config VIDEO_ET8EK8 depends on I2C && VIDEO_V4L2 select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API - select V4L2_FWNODE + select V4L2_ASYNC help This is a driver for the Toshiba ET8EK8 5 MP camera sensor. It is used for example in Nokia N900 (RX-51).
drivers/media/pci/intel/ipu3/Kconfig +1 -1
@@ -6,7 +6,7 @@ config VIDEO_IPU3_CIO2 depends on X86 select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API - select V4L2_FWNODE + select V4L2_ASYNC select VIDEOBUF2_DMA_SG help
drivers/media/platform/Kconfig +8 -8
@@ -67,7 +67,7 @@ config VIDEO_MUX select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select REGMAP - select V4L2_FWNODE + select V4L2_ASYNC help This driver provides support for N:1 video bus multiplexers.
@@ -81,7 +81,7 @@ config VIDEO_OMAP3 select VIDEO_V4L2_SUBDEV_API select VIDEOBUF2_DMA_CONTIG select MFD_SYSCON - select V4L2_FWNODE + select V4L2_ASYNC help Driver for an OMAP 3 camera controller.
@@ -97,7 +97,7 @@ config VIDEO_PXA27x depends on PXA27x || COMPILE_TEST select VIDEOBUF2_DMA_SG select SG_SPLIT - select V4L2_FWNODE + select V4L2_ASYNC help This is a v4l2 driver for the PXA27x Quick Capture Interface
@@ -108,7 +108,7 @@ config VIDEO_QCOM_CAMSS select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select VIDEOBUF2_DMA_SG - select V4L2_FWNODE + select V4L2_ASYNC config VIDEO_S3C_CAMIF tristate "Samsung S3C24XX/S3C64XX SoC Camera Interface driver"
@@ -130,7 +130,7 @@ config VIDEO_STM32_DCMI depends on ARCH_STM32 || COMPILE_TEST select VIDEOBUF2_DMA_CONTIG select MEDIA_CONTROLLER - select V4L2_FWNODE + select V4L2_ASYNC help This module makes the STM32 Digital Camera Memory Interface (DCMI) available as a v4l2 device.
@@ -143,7 +143,7 @@ config VIDEO_RENESAS_CEU depends on VIDEO_DEV && VIDEO_V4L2 depends on ARCH_SHMOBILE || ARCH_R7S72100 || COMPILE_TEST select VIDEOBUF2_DMA_CONTIG - select V4L2_FWNODE + select V4L2_ASYNC help This is a v4l2 driver for the Renesas CEU Interface
@@ -155,7 +155,7 @@ config VIDEO_ROCKCHIP_ISP1 select VIDEO_V4L2_SUBDEV_API select VIDEOBUF2_DMA_CONTIG select VIDEOBUF2_VMALLOC - select V4L2_FWNODE + select V4L2_ASYNC select GENERIC_PHY_MIPI_DPHY default n help
@@ -179,7 +179,7 @@ config VIDEO_TI_CAL select VIDEO_V4L2_SUBDEV_API depends on SOC_DRA7XX || ARCH_K3 || COMPILE_TEST select VIDEOBUF2_DMA_CONTIG - select V4L2_FWNODE + select V4L2_ASYNC help Support for the TI CAL (Camera Adaptation Layer) block found on DRA72X SoC.
drivers/media/platform/am437x/Kconfig +1 -1
@@ -6,7 +6,7 @@ config VIDEO_AM437X_VPFE select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select VIDEOBUF2_DMA_CONTIG - select V4L2_FWNODE + select V4L2_ASYNC help Support for AM437x Video Processing Front End based Video Capture Driver.
drivers/media/platform/atmel/Kconfig +2 -2
@@ -7,7 +7,7 @@ config VIDEO_ATMEL_ISC select VIDEO_V4L2_SUBDEV_API select VIDEOBUF2_DMA_CONTIG select REGMAP_MMIO - select V4L2_FWNODE + select V4L2_ASYNC help This module makes the ATMEL Image Sensor Controller available as a v4l2 device.
@@ -17,7 +17,7 @@ config VIDEO_ATMEL_ISI depends on VIDEO_V4L2 && OF depends on ARCH_AT91 || COMPILE_TEST select VIDEOBUF2_DMA_CONTIG - select V4L2_FWNODE + select V4L2_ASYNC help This module makes the ATMEL Image Sensor Interface available as a v4l2 device.
drivers/media/platform/cadence/Kconfig +2 -2
@@ -15,7 +15,7 @@ config VIDEO_CADENCE_CSI2RX depends on VIDEO_V4L2 select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API - select V4L2_FWNODE + select V4L2_ASYNC help Support for the Cadence MIPI CSI2 Receiver controller.
@@ -27,7 +27,7 @@ config VIDEO_CADENCE_CSI2TX depends on VIDEO_V4L2 select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API - select V4L2_FWNODE + select V4L2_ASYNC help Support for the Cadence MIPI CSI2 Transceiver controller.
drivers/media/platform/davinci/Kconfig +1 -1
@@ -21,7 +21,7 @@ config VIDEO_DAVINCI_VPIF_CAPTURE depends on ARCH_DAVINCI || COMPILE_TEST depends on I2C select VIDEOBUF2_DMA_CONTIG - select V4L2_FWNODE + select V4L2_ASYNC help Enables Davinci VPIF module used for capture devices. This module is used for capture on TI DM6467/DA850/OMAPL138
drivers/media/platform/exynos4-is/Kconfig +2 -2
@@ -6,7 +6,7 @@ config VIDEO_SAMSUNG_EXYNOS4_IS depends on ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API - select V4L2_FWNODE + select V4L2_ASYNC help Say Y here to enable camera host interface devices for Samsung S5P and EXYNOS SoC series.
@@ -35,7 +35,7 @@ config VIDEO_S5P_MIPI_CSIS tristate "S5P/EXYNOS MIPI-CSI2 receiver (MIPI-CSIS) driver" depends on REGULATOR select GENERIC_PHY - select V4L2_FWNODE + select V4L2_ASYNC help This is a V4L2 driver for Samsung S5P and EXYNOS4 SoC MIPI-CSI2 receiver (MIPI-CSIS) devices.
drivers/media/platform/marvell-ccic/Kconfig +1 -0
@@ -7,6 +7,7 @@ config VIDEO_CAFE_CCIC select VIDEOBUF2_VMALLOC select VIDEOBUF2_DMA_CONTIG select VIDEOBUF2_DMA_SG + select V4L2_ASYNC help This is a video4linux2 driver for the Marvell 88ALP01 integrated CMOS camera controller. This is the controller found on first-
drivers/media/platform/rcar-vin/Kconfig +2 -2
@@ -6,7 +6,7 @@ config VIDEO_RCAR_CSI2 select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select RESET_CONTROLLER - select V4L2_FWNODE + select V4L2_ASYNC help Support for Renesas R-Car MIPI CSI-2 receiver. Supports R-Car Gen3 and RZ/G2 SoCs.
@@ -21,7 +21,7 @@ config VIDEO_RCAR_VIN select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select VIDEOBUF2_DMA_CONTIG - select V4L2_FWNODE + select V4L2_ASYNC help Support for Renesas R-Car Video Input (VIN) driver. Supports R-Car Gen{2,3} and RZ/G{1,2} SoCs.
drivers/media/platform/sunxi/sun4i-csi/Kconfig +1 -1
@@ -7,7 +7,7 @@ config VIDEO_SUN4I_CSI select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select VIDEOBUF2_DMA_CONTIG - select V4L2_FWNODE + select V4L2_ASYNC help This is a V4L2 driver for the Allwinner A10 CSI
drivers/media/platform/sunxi/sun6i-csi/Kconfig +1 -1
@@ -7,6 +7,6 @@ config VIDEO_SUN6I_CSI select VIDEO_V4L2_SUBDEV_API select VIDEOBUF2_DMA_CONTIG select REGMAP_MMIO - select V4L2_FWNODE + select V4L2_ASYNC help Support for the Allwinner Camera Sensor Interface Controller on V3s.
drivers/media/platform/xilinx/Kconfig +1 -1
@@ -6,7 +6,7 @@ config VIDEO_XILINX select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select VIDEOBUF2_DMA_CONTIG - select V4L2_FWNODE + select V4L2_ASYNC help Driver for Xilinx Video IP Pipelines
drivers/media/v4l2-core/Kconfig +2 -1
@@ -62,13 +62,14 @@ config V4L2_FLASH_LED_CLASS tristate "V4L2 flash API for LED flash class devices" depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API depends on LEDS_CLASS_FLASH + select V4L2_ASYNC help Say Y here to enable V4L2 flash API support for LED flash class drivers. When in doubt, say N. -config V4L2_FWNODE +config V4L2_ASYNC tristate # Used by drivers that need Videobuf modules
drivers/media/v4l2-core/Makefile +4 -2
@@ -7,14 +7,16 @@ tuner-objs := tuner-core.o videodev-objs := v4l2-dev.o v4l2-ioctl.o v4l2-device.o v4l2-fh.o \ v4l2-event.o v4l2-ctrls.o v4l2-subdev.o \ - v4l2-async.o v4l2-common.o + v4l2-common.o videodev-$(CONFIG_COMPAT) += v4l2-compat-ioctl32.o videodev-$(CONFIG_TRACEPOINTS) += v4l2-trace.o videodev-$(CONFIG_MEDIA_CONTROLLER) += v4l2-mc.o videodev-$(CONFIG_SPI) += v4l2-spi.o videodev-$(CONFIG_VIDEO_V4L2_I2C) += v4l2-i2c.o -obj-$(CONFIG_V4L2_FWNODE) += v4l2-fwnode.o +v4l2-async-objs := v4l2-async-core.o v4l2-fwnode.o + +obj-$(CONFIG_V4L2_ASYNC) += v4l2-async.o obj-$(CONFIG_VIDEO_V4L2) += videodev.o obj-$(CONFIG_VIDEO_V4L2) += v4l2-dv-timings.o
drivers/media/v4l2-core/v4l2-async-core.c renamed from drivers/media/v4l2-core/v4l2-async.c +21 -2
@@ -852,8 +852,27 @@ static int pending_subdevs_show(struct seq_file *s, void *data) }DEFINE_SHOW_ATTRIBUTE (pending_subdevs); -void v4l2_async_debug_init (struct dentry *debugfs_dir) +static struct dentry *v4l2_async_debugfs_dir; + +static int __init v4l2_async_init (void ) { -debugfs_create_file ("pending_async_subdevices" ,0444 , debugfs_dir,NULL , + v4l2_async_debugfs_dir =debugfs_create_dir ("v4l2-async" ,NULL ); +debugfs_create_file ("pending_async_subdevices" ,0444 , + v4l2_async_debugfs_dir,NULL , &pending_subdevs_fops); + +return 0 ; +} + +static void __exit v4l2_async_exit(void) +{ +debugfs_remove_recursive (v4l2_async_debugfs_dir); } + +subsys_initcall (v4l2_async_init); +module_exit (v4l2_async_exit); + +MODULE_AUTHOR ("Guennadi Liakhovetski <[email protected]>" ); +MODULE_AUTHOR ("Sakari Ailus <[email protected]>" ); +MODULE_AUTHOR ("Ezequiel Garcia <[email protected]>" ); +MODULE_LICENSE ("GPL" );
drivers/media/v4l2-core/v4l2-dev.c +0 -5
@@ -39,8 +39,6 @@ __func__, ##arg); \ }while (0 ) -static struct dentry *v4l2_debugfs_dir; -/* * sysfs stuff */
@@ -1120,8 +1118,6 @@ static int __init videodev_init(void)return -EIO ; } - v4l2_debugfs_dir =debugfs_create_dir ("video4linux" ,NULL ); -v4l2_async_debug_init (v4l2_debugfs_dir);return 0 ; }
@@ -1129,7 +1125,6 @@ static void __exit videodev_exit(void) {dev_t dev =MKDEV (VIDEO_MAJOR ,0 ); -debugfs_remove_recursive (v4l2_debugfs_dir);class_unregister (&video_class);unregister_chrdev_region (dev,VIDEO_NUM_DEVICES ); }
drivers/staging/media/imx/Kconfig +1 -1
@@ -7,7 +7,7 @@ config VIDEO_IMX_MEDIA select VIDEO_V4L2_SUBDEV_API depends on HAS_DMA select VIDEOBUF2_DMA_CONTIG - select V4L2_FWNODE + select V4L2_ASYNC select V4L2_MEM2MEM_DEV help Say yes here to enable support for video4linux media controller
drivers/staging/media/tegra-video/Kconfig +1 -1
@@ -5,7 +5,7 @@ config VIDEO_TEGRA depends on VIDEO_V4L2 select MEDIA_CONTROLLER select VIDEOBUF2_DMA_CONTIG - select V4L2_FWNODE + select V4L2_ASYNC help Choose this option if you have an NVIDIA Tegra SoC.
Signature · 1 line
2.29.2
Hi Sakari,
Thanks a lot for the patch. I like where this is going.
Quoted 43 lines · Sakari Ailus
The V4L2 async framework is generally used with the V4L2 fwnode, which also depends on the former. There is only one exception, the
CAFE_CCICdriver, which uses V4L2 async but does not need V4L2 fwnode.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, build v4l2-async and v4l2-fwnode as a single module called v4l2-async (the
v4l2-async.cfile is renamed asv4l2-async-core.c). Also the menu itemV4L2_FWNODEis renamed asV4L2_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 <[email protected]>---
This goes on top of my recent async patches.drivers/media/i2c/Kconfig | 80 +++++++++---------- drivers/media/i2c/ccs/Kconfig | 2 +- drivers/media/i2c/et8ek8/Kconfig | 2 +- drivers/media/pci/intel/ipu3/Kconfig | 2 +- drivers/media/platform/Kconfig | 16 ++-- drivers/media/platform/am437x/Kconfig | 2 +- drivers/media/platform/atmel/Kconfig | 4 +- drivers/media/platform/cadence/Kconfig | 4 +- drivers/media/platform/davinci/Kconfig | 2 +- drivers/media/platform/exynos4-is/Kconfig | 4 +- drivers/media/platform/marvell-ccic/Kconfig | 1 + drivers/media/platform/rcar-vin/Kconfig | 4 +- .../media/platform/sunxi/sun4i-csi/Kconfig | 2 +- .../media/platform/sunxi/sun6i-csi/Kconfig | 2 +- drivers/media/platform/xilinx/Kconfig | 2 +- drivers/media/v4l2-core/Kconfig | 3 +- drivers/media/v4l2-core/Makefile | 6 +-
.../{v4l2-async.c=> v4l2-async-core.c} | 23 +++++- drivers/media/v4l2-core/v4l2-dev.c | 5 -- drivers/staging/media/imx/Kconfig | 2 +- drivers/staging/media/tegra-video/Kconfig | 2 +-21 files changed, 94 insertions(+), 76 deletions(-)rename
drivers/media/v4l2-core/{v4l2-async.c=>v4l2-async-core.c} (96%)
[..]
Quoted 17 lines
drivers/media/v4l2-core/Kconfig +0
-0@@ -62,13 +62,14 @@ config V4L2_FLASH_LED_CLASStristate "V4L2 flash API for LED flash class devices" depends on
VIDEO_V4L2&&VIDEO_V4L2_SUBDEV_APIdepends onLEDS_CLASS_FLASH
+ selectV4L2_ASYNC
help
Say Y here to enable V4L2 flash API support for LED flash class drivers.
When in doubt, say N.drivers/media/v4l2-core/Kconfig +1
-1-config V4L2_FWNODE +config V4L2_ASYNC
Quoted 2 lines
tristate
So we don't expect (or want) out-of-tree drivers to be able to use this. Is that correct?
Quoted 17 lines
# Used by drivers that need Videobuf modules
drivers/media/v4l2-core/Makefile +0
-0@@ -7,14 +7,16 @@ tuner-objs := tuner-core.o
videodev-objs := v4l2-dev.o v4l2-ioctl.o v4l2-device.o v4l2-fh.o \
v4l2-event.o v4l2-ctrls.o v4l2-subdev.o \
- v4l2-async.o v4l2-common.o
+ v4l2-common.o videodev-$(CONFIG_COMPAT) += v4l2-compat-ioctl32.o videodev-$(CONFIG_TRACEPOINTS) += v4l2-trace.o videodev-$(CONFIG_MEDIA_CONTROLLER) += v4l2-mc.o videodev-$(CONFIG_SPI) += v4l2-spi.o videodev-$(CONFIG_VIDEO_V4L2_I2C) += v4l2-i2c.o
drivers/media/v4l2-core/Makefile tuner-objs := tuner-core.o · line 18
Quoted 3 lines
drivers/media/v4l2-core/Makefile +2
-1-obj-$(CONFIG_V4L2_FWNODE) += v4l2-fwnode.o +v4l2-async-objs := v4l2-async-core.o v4l2-fwnode.o +
Looks good.
Quoted 19 lines
+obj-$(CONFIG_V4L2_ASYNC) += v4l2-async.o
obj-$(CONFIG_VIDEO_V4L2) += videodev.o
obj-$(CONFIG_VIDEO_V4L2) += v4l2-dv-timings.odrivers/media/v4l2-core/v4l2-async-core.c renamed from drivers/media/v4l2-core/v4l2-async.c +0
-0@@ -852,8 +852,27 @@ static int pending_subdevs_show(struct seq_file *s, void *data) } DEFINE_SHOW_ATTRIBUTE(pending_subdevs);drivers/media/v4l2-core/v4l2-async-core.c renamed from drivers/media/v4l2-core/v4l2-async.c +3
-1-void v4l2_async_debug_init (struct dentry *debugfs_dir) +static struct dentry *v4l2_async_debugfs_dir; + +static int __init v4l2_async_init (void )
Quoted 6 lines
{
- debugfs_create_file("pending_async_subdevices", 0444,debugfs_dir, NULL, + v4l2_async_debugfs_dir =debugfs_create_dir("v4l2-async", NULL); + debugfs_create_file("pending_async_subdevices", 0444,
+v4l2_async_debugfs_dir, NULL,&pending_subdevs_fops);
I guess we could have kept the previous path,
but OTOH it's not really a big deal for debugfs.
Once we figure out the above about exposing V4L2_ASYNC:
Thanks,
Ezequiel
Sakari Ailus
maintainerHi Ezequiel,
Quoted 3 lines · Ezequiel Garcia
Hi Sakari,
Thanks a lot for the patch. I like where this is going.
Thanks for the review, too!
Quoted 60 lines · Sakari Ailus
Quoted 43 lines
The V4L2 async framework is generally used with the V4L2 fwnode, which also depends on the former. There is only one exception, the
CAFE_CCICdriver, which uses V4L2 async but does not need V4L2 fwnode.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, build v4l2-async and v4l2-fwnode as a single module called v4l2-async (the
v4l2-async.cfile is renamed asv4l2-async-core.c). Also the menu itemV4L2_FWNODEis renamed asV4L2_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 <[email protected]>---
This goes on top of my recent async patches.drivers/media/i2c/Kconfig | 80 +++++++++---------- drivers/media/i2c/ccs/Kconfig | 2 +- drivers/media/i2c/et8ek8/Kconfig | 2 +- drivers/media/pci/intel/ipu3/Kconfig | 2 +- drivers/media/platform/Kconfig | 16 ++-- drivers/media/platform/am437x/Kconfig | 2 +- drivers/media/platform/atmel/Kconfig | 4 +- drivers/media/platform/cadence/Kconfig | 4 +- drivers/media/platform/davinci/Kconfig | 2 +- drivers/media/platform/exynos4-is/Kconfig | 4 +- drivers/media/platform/marvell-ccic/Kconfig | 1 + drivers/media/platform/rcar-vin/Kconfig | 4 +- .../media/platform/sunxi/sun4i-csi/Kconfig | 2 +- .../media/platform/sunxi/sun6i-csi/Kconfig | 2 +- drivers/media/platform/xilinx/Kconfig | 2 +- drivers/media/v4l2-core/Kconfig | 3 +- drivers/media/v4l2-core/Makefile | 6 +-
.../{v4l2-async.c=> v4l2-async-core.c} | 23 +++++- drivers/media/v4l2-core/v4l2-dev.c | 5 -- drivers/staging/media/imx/Kconfig | 2 +- drivers/staging/media/tegra-video/Kconfig | 2 +-21 files changed, 94 insertions(+), 76 deletions(-)rename
drivers/media/v4l2-core/{v4l2-async.c=>v4l2-async-core.c} (96%)[..]
Quoted 14 lines
drivers/media/v4l2-core/Kconfig +0
-0@@ -62,13 +62,14 @@ config V4L2_FLASH_LED_CLASStristate "V4L2 flash API for LED flash class devices" depends on
VIDEO_V4L2&&VIDEO_V4L2_SUBDEV_APIdepends onLEDS_CLASS_FLASH
+ selectV4L2_ASYNC
help
Say Y here to enable V4L2 flash API support for LED flash class drivers.
When in doubt, say N.
Quoted 8 lines
Quoted 5 lines
drivers/media/v4l2-core/Kconfig +1
-1-config V4L2_FWNODE +config V4L2_ASYNCtristate
So we don't expect (or want) out-of-tree drivers to be able to use this. Is that correct?
Hmm. I somehow manage to miss how this is related to out-of-tree drivers.
They do need to be adapted to the change though.
Quoted 44 lines
Quoted 18 lines
# Used by drivers that need Videobuf modules
drivers/media/v4l2-core/Makefile +0
-0@@ -7,14 +7,16 @@ tuner-objs := tuner-core.o
videodev-objs := v4l2-dev.o v4l2-ioctl.o v4l2-device.o v4l2-fh.o \
v4l2-event.o v4l2-ctrls.o v4l2-subdev.o \
- v4l2-async.o v4l2-common.o
+ v4l2-common.o videodev-$(CONFIG_COMPAT) += v4l2-compat-ioctl32.o videodev-$(CONFIG_TRACEPOINTS) += v4l2-trace.o videodev-$(CONFIG_MEDIA_CONTROLLER) += v4l2-mc.o videodev-$(CONFIG_SPI) += v4l2-spi.o videodev-$(CONFIG_VIDEO_V4L2_I2C) += v4l2-i2c.odrivers/media/v4l2-core/Makefile tuner-objs := tuner-core.o · line 18
Quoted 3 lines
drivers/media/v4l2-core/Makefile +2
-1-obj-$(CONFIG_V4L2_FWNODE) += v4l2-fwnode.o +v4l2-async-objs := v4l2-async-core.o v4l2-fwnode.o +Looks good.
Quoted 20 lines
+obj-$(CONFIG_V4L2_ASYNC) += v4l2-async.o
obj-$(CONFIG_VIDEO_V4L2) += videodev.o
obj-$(CONFIG_VIDEO_V4L2) += v4l2-dv-timings.odrivers/media/v4l2-core/v4l2-async-core.c renamed from drivers/media/v4l2-core/v4l2-async.c +0
-0@@ -852,8 +852,27 @@ static int pending_subdevs_show(struct seq_file *s, void *data) } DEFINE_SHOW_ATTRIBUTE(pending_subdevs);drivers/media/v4l2-core/v4l2-async-core.c renamed from drivers/media/v4l2-core/v4l2-async.c +3
-1-void v4l2_async_debug_init (struct dentry *debugfs_dir) +static struct dentry *v4l2_async_debugfs_dir; + +static int __init v4l2_async_init (void ){
Quoted 8 lines
Quoted 5 lines
- debugfs_create_file("pending_async_subdevices", 0444,
debugfs_dir, NULL, + v4l2_async_debugfs_dir =debugfs_create_dir("v4l2-async", NULL); + debugfs_create_file("pending_async_subdevices", 0444,
+v4l2_async_debugfs_dir, NULL,&pending_subdevs_fops);I guess we could have kept the previous path,
but OTOH it's not really a big deal for debugfs.
If debugfs bits are added to V4L2 framework, it will be different from the above debugfs path. Otherwise the two will in practice be part of the same module. And if it's going to change, it's better to change it now than later.
Quoted 4 lines
Once we figure out the above about exposing
V4L2_ASYNC:Reviewed-by Ezequiel Garcia <[email protected]>
Thanks!
Signature · 3 lines
Kind regards, Sakari Ailus
Quoted 78 lines · Sakari Ailus
Hi Ezequiel,
Quoted 3 lines · Ezequiel Garcia
Hi Sakari,
Thanks a lot for the patch. I like where this is going.
Thanks for the review, too!
Quoted 60 lines · Sakari Ailus
Quoted 43 lines
The V4L2 async framework is generally used with the V4L2 fwnode, which also depends on the former. There is only one exception, the
CAFE_CCICdriver, which uses V4L2 async but does not need V4L2 fwnode.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, build v4l2-async and v4l2-fwnode as a single module called v4l2-async (the
v4l2-async.cfile is renamed asv4l2-async-core.c). Also the menu itemV4L2_FWNODEis renamed asV4L2_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 <[email protected]>---
This goes on top of my recent async patches.drivers/media/i2c/Kconfig | 80 +++++++++---------- drivers/media/i2c/ccs/Kconfig | 2 +- drivers/media/i2c/et8ek8/Kconfig | 2 +- drivers/media/pci/intel/ipu3/Kconfig | 2 +- drivers/media/platform/Kconfig | 16 ++-- drivers/media/platform/am437x/Kconfig | 2 +- drivers/media/platform/atmel/Kconfig | 4 +- drivers/media/platform/cadence/Kconfig | 4 +- drivers/media/platform/davinci/Kconfig | 2 +- drivers/media/platform/exynos4-is/Kconfig | 4 +- drivers/media/platform/marvell-ccic/Kconfig | 1 + drivers/media/platform/rcar-vin/Kconfig | 4 +- .../media/platform/sunxi/sun4i-csi/Kconfig | 2 +- .../media/platform/sunxi/sun6i-csi/Kconfig | 2 +- drivers/media/platform/xilinx/Kconfig | 2 +- drivers/media/v4l2-core/Kconfig | 3 +- drivers/media/v4l2-core/Makefile | 6 +-
.../{v4l2-async.c=> v4l2-async-core.c} | 23 +++++- drivers/media/v4l2-core/v4l2-dev.c | 5 -- drivers/staging/media/imx/Kconfig | 2 +- drivers/staging/media/tegra-video/Kconfig | 2 +-21 files changed, 94 insertions(+), 76 deletions(-)rename
drivers/media/v4l2-core/{v4l2-async.c=>v4l2-async-core.c} (96%)[..]
Quoted 14 lines
drivers/media/v4l2-core/Kconfig +0
-0@@ -62,13 +62,14 @@ config V4L2_FLASH_LED_CLASStristate "V4L2 flash API for LED flash class devices" depends on
VIDEO_V4L2&&VIDEO_V4L2_SUBDEV_APIdepends onLEDS_CLASS_FLASH
+ selectV4L2_ASYNC
help
Say Y here to enable V4L2 flash API support for LED flash class drivers.
When in doubt, say N.Quoted 8 lines
Quoted 5 lines
drivers/media/v4l2-core/Kconfig +1
-1-config V4L2_FWNODE +config V4L2_ASYNCtristate
So we don't expect (or want) out-of-tree drivers to be able to use this. Is that correct?
Quoted 2 lines
Hmm. I somehow manage to miss how this is related to out-of-tree drivers.
As it is, the v4l2-async module is not user-selectable, because V4L2_ASYNC has no prompt (the symbol is non-visible).
For the user to be able to select the v4l2-async module, even if no driver is selecting it, it needs a prompt:
config V4L2_ASYNC
tristate "V4L2 asynchronous subdevice support"
This is usually useful for out-of-tree drivers, AFAIK.
Cheers,
Eze
Sakari Ailus
maintainerHi Ezequiel,
Quoted 82 lines · Ezequiel Garcia
Quoted 78 lines · Sakari Ailus
Hi Ezequiel,
Quoted 3 lines · Ezequiel Garcia
Hi Sakari,
Thanks a lot for the patch. I like where this is going.
Thanks for the review, too!
Quoted 60 lines · Sakari Ailus
Quoted 43 lines
The V4L2 async framework is generally used with the V4L2 fwnode, which also depends on the former. There is only one exception, the
CAFE_CCICdriver, which uses V4L2 async but does not need V4L2 fwnode.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, build v4l2-async and v4l2-fwnode as a single module called v4l2-async (the
v4l2-async.cfile is renamed asv4l2-async-core.c). Also the menu itemV4L2_FWNODEis renamed asV4L2_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 <[email protected]>---
This goes on top of my recent async patches.drivers/media/i2c/Kconfig | 80 +++++++++---------- drivers/media/i2c/ccs/Kconfig | 2 +- drivers/media/i2c/et8ek8/Kconfig | 2 +- drivers/media/pci/intel/ipu3/Kconfig | 2 +- drivers/media/platform/Kconfig | 16 ++-- drivers/media/platform/am437x/Kconfig | 2 +- drivers/media/platform/atmel/Kconfig | 4 +- drivers/media/platform/cadence/Kconfig | 4 +- drivers/media/platform/davinci/Kconfig | 2 +- drivers/media/platform/exynos4-is/Kconfig | 4 +- drivers/media/platform/marvell-ccic/Kconfig | 1 + drivers/media/platform/rcar-vin/Kconfig | 4 +- .../media/platform/sunxi/sun4i-csi/Kconfig | 2 +- .../media/platform/sunxi/sun6i-csi/Kconfig | 2 +- drivers/media/platform/xilinx/Kconfig | 2 +- drivers/media/v4l2-core/Kconfig | 3 +- drivers/media/v4l2-core/Makefile | 6 +-
.../{v4l2-async.c=> v4l2-async-core.c} | 23 +++++- drivers/media/v4l2-core/v4l2-dev.c | 5 -- drivers/staging/media/imx/Kconfig | 2 +- drivers/staging/media/tegra-video/Kconfig | 2 +-21 files changed, 94 insertions(+), 76 deletions(-)rename
drivers/media/v4l2-core/{v4l2-async.c=>v4l2-async-core.c} (96%)[..]
Quoted 14 lines
drivers/media/v4l2-core/Kconfig +0
-0@@ -62,13 +62,14 @@ config V4L2_FLASH_LED_CLASStristate "V4L2 flash API for LED flash class devices" depends on
VIDEO_V4L2&&VIDEO_V4L2_SUBDEV_APIdepends onLEDS_CLASS_FLASH
+ selectV4L2_ASYNC
help
Say Y here to enable V4L2 flash API support for LED flash class drivers.
When in doubt, say N.Quoted 8 lines
Quoted 5 lines
drivers/media/v4l2-core/Kconfig +1
-1-config V4L2_FWNODE +config V4L2_ASYNCtristate
So we don't expect (or want) out-of-tree drivers to be able to use this. Is that correct?
Quoted 2 lines
Hmm. I somehow manage to miss how this is related to out-of-tree drivers.
Quoted 8 lines
As it is, the v4l2-async module is not user-selectable, because
V4L2_ASYNChas no prompt (the symbol is non-visible).For the user to be able to select the v4l2-async module, even if no driver is selecting it, it needs a prompt:
config
V4L2_ASYNC
tristate "V4L2 asynchronous subdevice support"
Well, yes, you could do this in principle.
But this patch does not change this in any way, does it?
Quoted 2 lines
This is usually useful for out-of-tree drivers, AFAIK.
If someone needs this out-of-tree, they could also enable one of the drivers that need v4l2-async in the kernel.
Signature · 3 lines
Regards, Sakari Ailus
Hi Sakari,
Just saw the v2 and remembered I didn't follow-up on your questions here. Sorry about that.
Quoted 91 lines · Sakari Ailus
Hi Ezequiel,
Quoted 88 lines · Ezequiel Garcia
Quoted 78 lines · Sakari Ailus
Hi Ezequiel,
Quoted 3 lines · Ezequiel Garcia
Hi Sakari,
Thanks a lot for the patch. I like where this is going.
Thanks for the review, too!
Quoted 60 lines · Sakari Ailus
Quoted 43 lines
The V4L2 async framework is generally used with the V4L2 fwnode, which also depends on the former. There is only one exception, the
CAFE_CCICdriver, which uses V4L2 async but does not need V4L2 fwnode.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, build v4l2-async and v4l2-fwnode as a single module called v4l2-async (the
v4l2-async.cfile is renamed asv4l2-async-core.c). Also the menu itemV4L2_FWNODEis renamed asV4L2_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 <[email protected]>---
This goes on top of my recent async patches.drivers/media/i2c/Kconfig | 80 +++++++++---------- drivers/media/i2c/ccs/Kconfig | 2 +- drivers/media/i2c/et8ek8/Kconfig | 2 +- drivers/media/pci/intel/ipu3/Kconfig | 2 +- drivers/media/platform/Kconfig | 16 ++-- drivers/media/platform/am437x/Kconfig | 2 +- drivers/media/platform/atmel/Kconfig | 4 +- drivers/media/platform/cadence/Kconfig | 4 +- drivers/media/platform/davinci/Kconfig | 2 +- drivers/media/platform/exynos4-is/Kconfig | 4 +- drivers/media/platform/marvell-ccic/Kconfig | 1 + drivers/media/platform/rcar-vin/Kconfig | 4 +- .../media/platform/sunxi/sun4i-csi/Kconfig | 2 +- .../media/platform/sunxi/sun6i-csi/Kconfig | 2 +- drivers/media/platform/xilinx/Kconfig | 2 +- drivers/media/v4l2-core/Kconfig | 3 +- drivers/media/v4l2-core/Makefile | 6 +-
.../{v4l2-async.c=> v4l2-async-core.c} | 23 +++++- drivers/media/v4l2-core/v4l2-dev.c | 5 -- drivers/staging/media/imx/Kconfig | 2 +- drivers/staging/media/tegra-video/Kconfig | 2 +-21 files changed, 94 insertions(+), 76 deletions(-)rename
drivers/media/v4l2-core/{v4l2-async.c=>v4l2-async-core.c} (96%)[..]
Quoted 14 lines
drivers/media/v4l2-core/Kconfig +0
-0@@ -62,13 +62,14 @@ config V4L2_FLASH_LED_CLASStristate "V4L2 flash API for LED flash class devices" depends on
VIDEO_V4L2&&VIDEO_V4L2_SUBDEV_APIdepends onLEDS_CLASS_FLASH
+ selectV4L2_ASYNC
help
Say Y here to enable V4L2 flash API support for LED flash class drivers.
When in doubt, say N.Quoted 8 lines
Quoted 5 lines
drivers/media/v4l2-core/Kconfig +1
-1-config V4L2_FWNODE +config V4L2_ASYNCtristate
So we don't expect (or want) out-of-tree drivers to be able to use this. Is that correct?
Quoted 2 lines
Hmm. I somehow manage to miss how this is related to out-of-tree drivers.
As it is, the v4l2-async module is not user-selectable, because
V4L2_ASYNChas no prompt (the symbol is non-visible).For the user to be able to select the v4l2-async module, even if no driver is selecting it, it needs a prompt:
Quoted 7 lines
Quoted 2 lines
config
V4L2_ASYNC
tristate "V4L2 asynchronous subdevice support"Well, yes, you could do this in principle.
But this patch does not change this in any way, does it?
I can be wrong, but it does change it. Before the patch, v4l2-async kernel API is in the videodev module, which is built with CONFIG_VIDEO_V4L2, which is enabled when the user selects CONFIG_MEDIA_SUPPORT.
If the kernel was built with CONFIG_VIDEO_V4L2, out-of-tree drivers gets support for v4l2-async.
After this patch, the v4l2-async kernel API is now selected by drivers that need it, and can't be enabled. If there are no such drivers, out-of-tree drivers won't get it.
I guess this is a bit subtle, and perhaps not worth considering.
Quoted 6 lines
Quoted 2 lines
This is usually useful for out-of-tree drivers, AFAIK.
If someone needs this out-of-tree, they could also enable one of the drivers that need v4l2-async in the kernel.
True :)
Thanks,
Ezequiel
Sakari Ailus
maintainerHi Ezequiel,
Quoted 110 lines · Ezequiel Garcia
Hi Sakari,
Just saw the v2 and remembered I didn't follow-up on your questions here. Sorry about that.
Quoted 91 lines · Sakari Ailus
Hi Ezequiel,
Quoted 88 lines · Ezequiel Garcia
Quoted 78 lines · Sakari Ailus
Hi Ezequiel,
Quoted 3 lines · Ezequiel Garcia
Hi Sakari,
Thanks a lot for the patch. I like where this is going.
Thanks for the review, too!
Quoted 60 lines · Sakari Ailus
Quoted 43 lines
The V4L2 async framework is generally used with the V4L2 fwnode, which also depends on the former. There is only one exception, the
CAFE_CCICdriver, which uses V4L2 async but does not need V4L2 fwnode.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, build v4l2-async and v4l2-fwnode as a single module called v4l2-async (the
v4l2-async.cfile is renamed asv4l2-async-core.c). Also the menu itemV4L2_FWNODEis renamed asV4L2_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 <[email protected]>---
This goes on top of my recent async patches.drivers/media/i2c/Kconfig | 80 +++++++++---------- drivers/media/i2c/ccs/Kconfig | 2 +- drivers/media/i2c/et8ek8/Kconfig | 2 +- drivers/media/pci/intel/ipu3/Kconfig | 2 +- drivers/media/platform/Kconfig | 16 ++-- drivers/media/platform/am437x/Kconfig | 2 +- drivers/media/platform/atmel/Kconfig | 4 +- drivers/media/platform/cadence/Kconfig | 4 +- drivers/media/platform/davinci/Kconfig | 2 +- drivers/media/platform/exynos4-is/Kconfig | 4 +- drivers/media/platform/marvell-ccic/Kconfig | 1 + drivers/media/platform/rcar-vin/Kconfig | 4 +- .../media/platform/sunxi/sun4i-csi/Kconfig | 2 +- .../media/platform/sunxi/sun6i-csi/Kconfig | 2 +- drivers/media/platform/xilinx/Kconfig | 2 +- drivers/media/v4l2-core/Kconfig | 3 +- drivers/media/v4l2-core/Makefile | 6 +-
.../{v4l2-async.c=> v4l2-async-core.c} | 23 +++++- drivers/media/v4l2-core/v4l2-dev.c | 5 -- drivers/staging/media/imx/Kconfig | 2 +- drivers/staging/media/tegra-video/Kconfig | 2 +-21 files changed, 94 insertions(+), 76 deletions(-)rename
drivers/media/v4l2-core/{v4l2-async.c=>v4l2-async-core.c} (96%)[..]
Quoted 14 lines
drivers/media/v4l2-core/Kconfig +0
-0@@ -62,13 +62,14 @@ config V4L2_FLASH_LED_CLASStristate "V4L2 flash API for LED flash class devices" depends on
VIDEO_V4L2&&VIDEO_V4L2_SUBDEV_APIdepends onLEDS_CLASS_FLASH
+ selectV4L2_ASYNC
help
Say Y here to enable V4L2 flash API support for LED flash class drivers.
When in doubt, say N.Quoted 8 lines
Quoted 5 lines
drivers/media/v4l2-core/Kconfig +1
-1-config V4L2_FWNODE +config V4L2_ASYNCtristate
So we don't expect (or want) out-of-tree drivers to be able to use this. Is that correct?
Quoted 2 lines
Hmm. I somehow manage to miss how this is related to out-of-tree drivers.
As it is, the v4l2-async module is not user-selectable, because
V4L2_ASYNChas no prompt (the symbol is non-visible).For the user to be able to select the v4l2-async module, even if no driver is selecting it, it needs a prompt:
Quoted 7 lines
Quoted 2 lines
config
V4L2_ASYNC
tristate "V4L2 asynchronous subdevice support"Well, yes, you could do this in principle.
But this patch does not change this in any way, does it?
I can be wrong, but it does change it. Before the patch, v4l2-async kernel API is in the videodev module, which is built with
CONFIG_VIDEO_V4L2, which is enabled when the user selectsCONFIG_MEDIA_SUPPORT.
Quoted 6 lines
If the kernel was built with
CONFIG_VIDEO_V4L2, out-of-tree drivers gets support for v4l2-async.After this patch, the v4l2-async kernel API is now selected by drivers that need it, and can't be enabled. If there are no such drivers, out-of-tree drivers won't get it.
Yes, this is true with V4L2_ASYNC but it was true for V4L2_FWNODE previously, too.
Quoted 2 lines
I guess this is a bit subtle, and perhaps not worth considering.
I'm not sure how common proper out-of-tree drivers are anyway, most live in some random kernel tree that contains a bunch of non-upstreamed stuff.
Quoted 5 lines
Quoted 3 lines
If someone needs this out-of-tree, they could also enable one of the drivers that need v4l2-async in the kernel.
True :)
\o/
Signature · 3 lines
Regards, Sakari Ailus
kernel test robot
build botI love your patch! Yet something to improve:
Hi Sakari,
I love your patch! Yet something to improve:
[auto build test ERROR on v5.12-rc2]
[cannot apply to linuxtv-media/master tegra/for-next next-20210309] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Sakari-Ailus/v4l-async-fwnode-Improve-module-organisation/20210308-180511 base: a38fd8748464831584a19438cbb3082b5a2dab15 config: x86_64-randconfig-a002-20200405 (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=1 build): # https://github.com/0day-ci/linux/commit/bc53c52b3ccb2fb944e8ffde8557129640fb2781 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Sakari-Ailus/v4l-async-fwnode-Improve-module-organisation/20210308-180511 git checkout bc53c52b3ccb2fb944e8ffde8557129640fb2781 # save the attached .config to linux build tree make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
All errors (new ones prefixed by >>):
ld: warning: orphan section .data..decrypted' from arch/x86/kernel/cpu/vmware.o' being placed in section `.data..decrypted'
ld: warning: orphan section .data..decrypted' from arch/x86/kernel/kvm.o' being placed in section `.data..decrypted'
ld: drivers/media/i2c/adv7343.o: in function `adv7343_remove':
>> drivers/media/i2c/adv7343.c:500: undefined reference to `v4l2_async_unregister_subdev' ld: drivers/media/i2c/adv7343.o: in function `adv7343_probe': >> drivers/media/i2c/adv7343.c:486: undefined reference to `v4l2_async_register_subdev' ld: drivers/media/i2c/max2175.o: in function `max2175_remove': >> drivers/media/i2c/max2175.c:1413: undefined reference to `v4l2_async_unregister_subdev' ld: drivers/media/i2c/max2175.o: in function `max2175_probe': >> drivers/media/i2c/max2175.c:1382: undefined reference to `v4l2_async_register_subdev' >> ld: drivers/media/i2c/max2175.c:1400: undefined reference to `v4l2_async_unregister_subdev'
vim +500 drivers/media/i2c/adv7343.c
187d42d6da62aa drivers/media/i2c/adv7343.c Lad, Prabhakar 2013-07-20 430
e671499303e4c0 drivers/media/i2c/adv7343.c Kieran Bingham 2019-07-10 431 static int adv7343_probe(struct i2c_client *client)
06e61f8d5f5df6 drivers/media/video/adv7343.c Chaithrika U S 2009-05-07 432 {
06e61f8d5f5df6 drivers/media/video/adv7343.c Chaithrika U S 2009-05-07 433 struct adv7343_state *state;
ceed52d67e1cf7 drivers/media/video/adv7343.c Hans Verkuil 2010-12-12 434 int err;
06e61f8d5f5df6 drivers/media/video/adv7343.c Chaithrika U S 2009-05-07 435
06e61f8d5f5df6 drivers/media/video/adv7343.c Chaithrika U S 2009-05-07 436 if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
06e61f8d5f5df6 drivers/media/video/adv7343.c Chaithrika U S 2009-05-07 437 return -ENODEV;
06e61f8d5f5df6 drivers/media/video/adv7343.c Chaithrika U S 2009-05-07 438
06e61f8d5f5df6 drivers/media/video/adv7343.c Chaithrika U S 2009-05-07 439 v4l_info(client, "chip found @ 0x%x (%s)\n",
06e61f8d5f5df6 drivers/media/video/adv7343.c Chaithrika U S 2009-05-07 440 client->addr << 1, client->adapter->name);
06e61f8d5f5df6 drivers/media/video/adv7343.c Chaithrika U S 2009-05-07 441
c7a857a09f1f00 drivers/media/i2c/adv7343.c Lad, Prabhakar 2013-01-03 442 state = devm_kzalloc(&client->dev, sizeof(struct adv7343_state),
c7a857a09f1f00 drivers/media/i2c/adv7343.c Lad, Prabhakar 2013-01-03 443 GFP_KERNEL);
06e61f8d5f5df6 drivers/media/video/adv7343.c Chaithrika U S 2009-05-07 444 if (state == NULL)
06e61f8d5f5df6 drivers/media/video/adv7343.c Chaithrika U S 2009-05-07 445 return -ENOMEM;
06e61f8d5f5df6 drivers/media/video/adv7343.c Chaithrika U S 2009-05-07 446
0b302d88534f08 drivers/media/i2c/adv7343.c Lad, Prabhakar 2013-01-22 447 /* Copy board specific information here */
187d42d6da62aa drivers/media/i2c/adv7343.c Lad, Prabhakar 2013-07-20 448 state->pdata = adv7343_get_pdata(client);
0b302d88534f08 drivers/media/i2c/adv7343.c Lad, Prabhakar 2013-01-22 449
06e61f8d5f5df6 drivers/media/video/adv7343.c Chaithrika U S 2009-05-07 450 state->reg00 = 0x80;
06e61f8d5f5df6 drivers/media/video/adv7343.c Chaithrika U S 2009-05-07 451 state->reg01 = 0x00;
06e61f8d5f5df6 drivers/media/video/adv7343.c Chaithrika U S 2009-05-07 452 state->reg02 = 0x20;
06e61f8d5f5df6 drivers/media/video/adv7343.c Chaithrika U S 2009-05-07 453 state->reg35 = 0x00;
06e61f8d5f5df6 drivers/media/video/adv7343.c Chaithrika U S 2009-05-07 454 state->reg80 = ADV7343_SD_MODE_REG1_DEFAULT;
06e61f8d5f5df6 drivers/media/video/adv7343.c Chaithrika U S 2009-05-07 455 state->reg82 = ADV7343_SD_MODE_REG2_DEFAULT;
06e61f8d5f5df6 drivers/media/video/adv7343.c Chaithrika U S 2009-05-07 456
06e61f8d5f5df6 drivers/media/video/adv7343.c Chaithrika U S 2009-05-07 457 state->output = ADV7343_COMPOSITE_ID;
06e61f8d5f5df6 drivers/media/video/adv7343.c Chaithrika U S 2009-05-07 458 state->std = V4L2_STD_NTSC;
06e61f8d5f5df6 drivers/media/video/adv7343.c Chaithrika U S 2009-05-07 459
06e61f8d5f5df6 drivers/media/video/adv7343.c Chaithrika U S 2009-05-07 460 v4l2_i2c_subdev_init(&state->sd, client, &adv7343_ops);
ceed52d67e1cf7 drivers/media/video/adv7343.c Hans Verkuil 2010-12-12 461
ceed52d67e1cf7 drivers/media/video/adv7343.c Hans Verkuil 2010-12-12 462 v4l2_ctrl_handler_init(&state->hdl, 2);
ceed52d67e1cf7 drivers/media/video/adv7343.c Hans Verkuil 2010-12-12 463 v4l2_ctrl_new_std(&state->hdl, &adv7343_ctrl_ops,
ceed52d67e1cf7 drivers/media/video/adv7343.c Hans Verkuil 2010-12-12 464 V4L2_CID_BRIGHTNESS, ADV7343_BRIGHTNESS_MIN,
ceed52d67e1cf7 drivers/media/video/adv7343.c Hans Verkuil 2010-12-12 465 ADV7343_BRIGHTNESS_MAX, 1,
ceed52d67e1cf7 drivers/media/video/adv7343.c Hans Verkuil 2010-12-12 466 ADV7343_BRIGHTNESS_DEF);
ceed52d67e1cf7 drivers/media/video/adv7343.c Hans Verkuil 2010-12-12 467 v4l2_ctrl_new_std(&state->hdl, &adv7343_ctrl_ops,
ceed52d67e1cf7 drivers/media/video/adv7343.c Hans Verkuil 2010-12-12 468 V4L2_CID_HUE, ADV7343_HUE_MIN,
ceed52d67e1cf7 drivers/media/video/adv7343.c Hans Verkuil 2010-12-12 469 ADV7343_HUE_MAX, 1,
ceed52d67e1cf7 drivers/media/video/adv7343.c Hans Verkuil 2010-12-12 470 ADV7343_HUE_DEF);
ceed52d67e1cf7 drivers/media/video/adv7343.c Hans Verkuil 2010-12-12 471 v4l2_ctrl_new_std(&state->hdl, &adv7343_ctrl_ops,
ceed52d67e1cf7 drivers/media/video/adv7343.c Hans Verkuil 2010-12-12 472 V4L2_CID_GAIN, ADV7343_GAIN_MIN,
ceed52d67e1cf7 drivers/media/video/adv7343.c Hans Verkuil 2010-12-12 473 ADV7343_GAIN_MAX, 1,
ceed52d67e1cf7 drivers/media/video/adv7343.c Hans Verkuil 2010-12-12 474 ADV7343_GAIN_DEF);
ceed52d67e1cf7 drivers/media/video/adv7343.c Hans Verkuil 2010-12-12 475 state->sd.ctrl_handler = &state->hdl;
ceed52d67e1cf7 drivers/media/video/adv7343.c Hans Verkuil 2010-12-12 476 if (state->hdl.error) {
6555cfc5e7f808 drivers/media/i2c/adv7343.c Lad, Prabhakar 2013-06-22 477 err = state->hdl.error;
6555cfc5e7f808 drivers/media/i2c/adv7343.c Lad, Prabhakar 2013-06-22 478 goto done;
ceed52d67e1cf7 drivers/media/video/adv7343.c Hans Verkuil 2010-12-12 479 }
ceed52d67e1cf7 drivers/media/video/adv7343.c Hans Verkuil 2010-12-12 480 v4l2_ctrl_handler_setup(&state->hdl);
ceed52d67e1cf7 drivers/media/video/adv7343.c Hans Verkuil 2010-12-12 481
ceed52d67e1cf7 drivers/media/video/adv7343.c Hans Verkuil 2010-12-12 482 err = adv7343_initialize(&state->sd);
c7a857a09f1f00 drivers/media/i2c/adv7343.c Lad, Prabhakar 2013-01-03 483 if (err)
6555cfc5e7f808 drivers/media/i2c/adv7343.c Lad, Prabhakar 2013-06-22 484 goto done;
6555cfc5e7f808 drivers/media/i2c/adv7343.c Lad, Prabhakar 2013-06-22 485
6555cfc5e7f808 drivers/media/i2c/adv7343.c Lad, Prabhakar 2013-06-22 @486 err = v4l2_async_register_subdev(&state->sd);
6555cfc5e7f808 drivers/media/i2c/adv7343.c Lad, Prabhakar 2013-06-22 487
6555cfc5e7f808 drivers/media/i2c/adv7343.c Lad, Prabhakar 2013-06-22 488 done:
6555cfc5e7f808 drivers/media/i2c/adv7343.c Lad, Prabhakar 2013-06-22 489 if (err < 0)
ceed52d67e1cf7 drivers/media/video/adv7343.c Hans Verkuil 2010-12-12 490 v4l2_ctrl_handler_free(&state->hdl);
6555cfc5e7f808 drivers/media/i2c/adv7343.c Lad, Prabhakar 2013-06-22 491
ceed52d67e1cf7 drivers/media/video/adv7343.c Hans Verkuil 2010-12-12 492 return err;
06e61f8d5f5df6 drivers/media/video/adv7343.c Chaithrika U S 2009-05-07 493 }
06e61f8d5f5df6 drivers/media/video/adv7343.c Chaithrika U S 2009-05-07 494
06e61f8d5f5df6 drivers/media/video/adv7343.c Chaithrika U S 2009-05-07 495 static int adv7343_remove(struct i2c_client *client)
06e61f8d5f5df6 drivers/media/video/adv7343.c Chaithrika U S 2009-05-07 496 {
06e61f8d5f5df6 drivers/media/video/adv7343.c Chaithrika U S 2009-05-07 497 struct v4l2_subdev *sd = i2c_get_clientdata(client);
ceed52d67e1cf7 drivers/media/video/adv7343.c Hans Verkuil 2010-12-12 498 struct adv7343_state *state = to_state(sd);
06e61f8d5f5df6 drivers/media/video/adv7343.c Chaithrika U S 2009-05-07 499
6555cfc5e7f808 drivers/media/i2c/adv7343.c Lad, Prabhakar 2013-06-22 @500 v4l2_async_unregister_subdev(&state->sd);
ceed52d67e1cf7 drivers/media/video/adv7343.c Hans Verkuil 2010-12-12 501 v4l2_ctrl_handler_free(&state->hdl);
06e61f8d5f5df6 drivers/media/video/adv7343.c Chaithrika U S 2009-05-07 502
06e61f8d5f5df6 drivers/media/video/adv7343.c Chaithrika U S 2009-05-07 503 return 0;
06e61f8d5f5df6 drivers/media/video/adv7343.c Chaithrika U S 2009-05-07 504 }
06e61f8d5f5df6 drivers/media/video/adv7343.c Chaithrika U S 2009-05-07 505 ---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org