]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: imx: Unstage the imx7-media-csi driver
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tue, 10 May 2022 18:37:05 +0000 (19:37 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 25 Nov 2022 08:34:39 +0000 (08:34 +0000)
The imx7-media-csi driver, currently in staging, is ready for
prime-time. The staging TODO file lists a few items specific to that
driver, that are already addressed (the "all of the above" part) or can
be addressed later:

- The frame interval monitoring support is a software mechanism to
  monitor the device for unexpected stalls, and should be part of the
  V4L2 core if desired.

- Restricting the support media bus formats based on the SoC integration
  only aims at reducing userspace confusion by not enumerating options
  that are known not to be possible, it won't cause regressions if
  handled later.

Move the description of the media bus format restriction TODO item to
the driver, drop the other TODO items, and move the driver out of
staging.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
MAINTAINERS
drivers/media/platform/nxp/Kconfig
drivers/media/platform/nxp/Makefile
drivers/media/platform/nxp/imx7-media-csi.c [moved from drivers/staging/media/imx/imx7-media-csi.c with 97% similarity]
drivers/staging/media/imx/Kconfig
drivers/staging/media/imx/Makefile
drivers/staging/media/imx/TODO

index 6f1b811eed91bc029654445338ff1d7e5361dc00..045b3f79782b2e6c0352419d39540434ea772c95 100644 (file)
@@ -12736,7 +12736,7 @@ F:      Documentation/admin-guide/media/imx7.rst
 F:     Documentation/devicetree/bindings/media/nxp,imx-mipi-csi2.yaml
 F:     Documentation/devicetree/bindings/media/nxp,imx7-csi.yaml
 F:     drivers/media/platform/nxp/imx-mipi-csis.c
-F:     drivers/staging/media/imx/imx7-media-csi.c
+F:     drivers/media/platform/nxp/imx7-media-csi.c
 
 MEDIA DRIVERS FOR HELENE
 M:     Abylay Ospan <aospan@netup.ru>
index 5917634889b564c149f05f683a3e90ec01dd4c27..730f39971e1cdf6c3f346b91592143d29417ede1 100644 (file)
@@ -4,6 +4,19 @@
 
 comment "NXP media platform drivers"
 
+config VIDEO_IMX7_CSI
+       tristate "NXP CSI Bridge driver"
+       depends on ARCH_MXC || COMPILE_TEST
+       depends on HAS_DMA
+       depends on VIDEO_DEV
+       select MEDIA_CONTROLLER
+       select V4L2_FWNODE
+       select VIDEOBUF2_DMA_CONTIG
+       select VIDEO_V4L2_SUBDEV_API
+       help
+         Driver for the NXP Camera Sensor Interface (CSI) Bridge. This device
+         is found in the i.MX6UL/L, i.MX7 and i.MX8M[MQ] SoCs.
+
 config VIDEO_IMX_MIPI_CSIS
        tristate "NXP MIPI CSI-2 CSIS receiver found on i.MX7 and i.MX8 models"
        depends on ARCH_MXC || COMPILE_TEST
index 81ab304ef31c2997fd9df34f5db8798c5b2a96d9..1a129b58d99eb8fe8ec0f08de2faa7a6d846d96c 100644 (file)
@@ -3,6 +3,7 @@
 obj-y += dw100/
 obj-y += imx-jpeg/
 
+obj-$(CONFIG_VIDEO_IMX7_CSI) += imx7-media-csi.o
 obj-$(CONFIG_VIDEO_IMX_MIPI_CSIS) += imx-mipi-csis.o
 obj-$(CONFIG_VIDEO_IMX_PXP) += imx-pxp.o
 obj-$(CONFIG_VIDEO_MX2_EMMAPRP) += mx2_emmaprp.o
similarity index 97%
rename from drivers/staging/media/imx/imx7-media-csi.c
rename to drivers/media/platform/nxp/imx7-media-csi.c
index 4a24efb83d4621db6acaf34f377fbfe764db8f9c..886374d3a6ff1f8f4657293ac6ff13e136f4f143 100644 (file)
@@ -806,6 +806,30 @@ static irqreturn_t imx7_csi_irq_handler(int irq, void *data)
  * List of supported pixel formats for the subdevs. Keep V4L2_PIX_FMT_UYVY and
  * MEDIA_BUS_FMT_UYVY8_2X8 first to match IMX7_CSI_DEF_PIX_FORMAT and
  * IMX7_CSI_DEF_MBUS_CODE.
+ *
+ * TODO: Restrict the supported formats list based on the SoC integration.
+ *
+ * The CSI bridge can be configured to sample pixel components from the Rx queue
+ * in single (8bpp) or double (16bpp) component modes. Image format variants
+ * with different sample sizes (ie YUYV_2X8 vs YUYV_1X16) determine the pixel
+ * components sampling size per each clock cycle and their packing mode (see
+ * imx7_csi_configure() for details).
+ *
+ * As the CSI bridge can be interfaced with different IP blocks depending on the
+ * SoC model it is integrated on, the Rx queue sampling size should match the
+ * size of the samples transferred by the transmitting IP block. To avoid
+ * misconfigurations of the capture pipeline, the enumeration of the supported
+ * formats should be restricted to match the pixel source transmitting mode.
+ *
+ * Example: i.MX8MM SoC integrates the CSI bridge with the Samsung CSIS CSI-2
+ * receiver which operates in dual pixel sampling mode. The CSI bridge should
+ * only expose the 1X16 formats variant which instructs it to operate in dual
+ * pixel sampling mode. When the CSI bridge is instead integrated on an i.MX7,
+ * which supports both serial and parallel input, it should expose both
+ * variants.
+ *
+ * This currently only applies to YUYV formats, but other formats might need to
+ * be handled in the same way.
  */
 static const struct imx7_csi_pixfmt pixel_formats[] = {
        /*** YUV formats start here ***/
index bfb849701489856591952e44c84a03e13e18e118..21fd79515042317e00ef2fcdc903f1bdb70d8463 100644 (file)
@@ -23,13 +23,6 @@ config VIDEO_IMX_CSI
        default y
        help
          A video4linux camera sensor interface driver for i.MX5/6.
-
-config VIDEO_IMX7_CSI
-       tristate "i.MX6UL/L / i.MX7 / i.MX8M Camera Sensor Interface driver"
-       default y
-       help
-         Enable support for video4linux camera sensor interface driver for
-         i.MX6UL/L, i.MX7 or i.MX8M.
 endmenu
 endif
 
index cef9f30eb40190b175c9a8d67a755c7473b2845e..906a422aa656e3cc04f1d2a880fdcf2f803b1937 100644 (file)
@@ -14,5 +14,4 @@ obj-$(CONFIG_VIDEO_IMX_CSI) += imx6-media.o
 obj-$(CONFIG_VIDEO_IMX_CSI) += imx6-media-csi.o
 obj-$(CONFIG_VIDEO_IMX_CSI) += imx6-mipi-csi2.o
 
-obj-$(CONFIG_VIDEO_IMX7_CSI) += imx7-media-csi.o
 obj-$(CONFIG_VIDEO_IMX8MQ_MIPI_CSI2) += imx8mq-mipi-csi2.o
index 5d3a337c870273fcb140c31c3de573213aae38b4..afee26870af7b833c6d95985b9ec865635abb812 100644 (file)
 - Similarly to the legacy control handling, legacy format handling where
   formats on the video nodes are influenced by the active format of the
   connected subdev should be removed.
-
-- i.MX7: all of the above, since it uses the imx media core
-
-- i.MX7: use Frame Interval Monitor
-
-- imx7-media-csi: Restrict the supported formats list to the SoC version.
-
-  The imx7 CSI bridge can be configured to sample pixel components from the Rx
-  queue in single (8bpp) or double (16bpp) component modes. Image format
-  variants with different sample sizes (ie YUYV_2X8 vs YUYV_1X16) determine the
-  pixel components sampling size per each clock cycle and their packing mode
-  (see imx7_csi_configure() for details).
-
-  As the imx7 CSI bridge can be interfaced with different IP blocks depending on
-  the SoC model it is integrated on, the Rx queue sampling size should match
-  the size of the samples transferred by the transmitting IP block.
-
-  To avoid mis-configurations of the capture pipeline, the enumeration of the
-  supported formats should be restricted to match the pixel source transmitting
-  mode.
-
-  Example: i.MX8MM SoC integrates the CSI bridge with the Samsung CSIS CSI-2
-  receiver which operates in dual pixel sampling mode. The CSI bridge should
-  only expose the 1X16 formats variant which instructs it to operate in dual
-  pixel sampling mode. When the CSI bridge is instead integrated on an i.MX7,
-  which supports both serial and parallel input, it should expose both variants.
-
-  This currently only applies to YUYV formats, but other formats might need
-  to be handled in the same way.