]> git.baikalelectronics.ru Git - kernel.git/commitdiff
media: imx: imx-mipi-csis: Fix active format initialization on source pad
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Mon, 21 Mar 2022 15:11:35 +0000 (15:11 +0000)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sun, 24 Apr 2022 08:07:08 +0000 (09:07 +0100)
Commit 0b9a113a757b ("media: imx: csis: Store pads format separately")
broke initialization of the active format on the source pad, as it
forgot to update the .init_cfg() handler. Fix it.

Fixes: 0b9a113a757b ("media: imx: csis: Store pads format separately")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/nxp/imx-mipi-csis.c

index 2a03da2f2239fe4c1de68819c21ca270c535b188..80b1c021d14a92928cef7cbe69fa7f30020e0bc4 100644 (file)
@@ -1014,14 +1014,6 @@ static int mipi_csis_init_cfg(struct v4l2_subdev *sd,
                V4L2_MAP_QUANTIZATION_DEFAULT(false, fmt_sink->colorspace,
                                              fmt_sink->ycbcr_enc);
 
-       /*
-        * When called from mipi_csis_subdev_init() to initialize the active
-        * configuration, cfg is NULL, which indicates there's no source pad
-        * configuration to set.
-        */
-       if (!sd_state)
-               return 0;
-
        fmt_source = mipi_csis_get_format(csis, sd_state, which,
                                          CSIS_PAD_SOURCE);
        *fmt_source = *fmt_sink;