[PATCH v5 2/4] media: imx8mq-mipi-csi2: Add output filed in csi2_pix_format
Guoniu Zhou
guoniu.zhou at nxp.com
Wed Aug 20 04:04:57 PDT 2025
Add output filed in csi2_pix_format since the format on the
source pad might change due to unpacking.
Signed-off-by: Guoniu Zhou <guoniu.zhou at nxp.com>
---
drivers/media/platform/nxp/imx8mq-mipi-csi2.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/media/platform/nxp/imx8mq-mipi-csi2.c b/drivers/media/platform/nxp/imx8mq-mipi-csi2.c
index 85700655ecad334c61e9b5f9f073e10b6db2618f..ad7adc677e389e0f35b0cf63195279e197907f8c 100644
--- a/drivers/media/platform/nxp/imx8mq-mipi-csi2.c
+++ b/drivers/media/platform/nxp/imx8mq-mipi-csi2.c
@@ -139,6 +139,7 @@ struct csi_state {
struct csi2_pix_format {
u32 code;
+ u32 output;
};
/* -----------------------------------------------------------------------------
@@ -634,6 +635,9 @@ static int imx8mq_mipi_csi_set_fmt(struct v4l2_subdev *sd,
fmt = v4l2_subdev_state_get_format(sd_state, MIPI_CSI2_PAD_SOURCE);
*fmt = sdformat->format;
+ /* The format on the source pad might change due to unpacking. */
+ fmt->code = csi2_fmt->output ? : csi2_fmt->code;
+
return 0;
}
--
2.34.1
More information about the linux-arm-kernel
mailing list