[PATCH v3 1/2] media: rkisp1-isp: Set correct data mode for YUV bypass
From: Alen Karnil
Date: Tue Oct 06 2026 - 06:31:38 EST
When the ISP sink is YUV, the ISP is in 'bypass' or passthrough mode,
the current isp mode produces a garbled image, and in testing, setting
to data mode produces a correct image.
Replace references to ITU601 to DATA_MODE and add a comment to explain.
Tested with OV5640 and I.MX8MPlus.
Signed-off-by: Alen Karnil <alen.karnil@xxxxxxxxxxxxxxxx>
---
v3:
- Taken over from list and refreshed
- Removed always true conditional check
- Reworded commit mesasge to better represent changes
---
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
index 2311672cedb1..4de44f6ec753 100644
--- a/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
+++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
@@ -240,13 +240,18 @@ static int rkisp1_config_isp(struct rkisp1_isp *isp,
}
} else if (sink_fmt->pixel_enc == V4L2_PIXEL_ENC_YUV) {
acq_mult = 2;
+ /*
+ * The datasheet specifies using ITU601 mode for YUV,
+ * however that results in a garbled image, data mode
+ * does not exhibit this.
+ */
if (mbus_type == V4L2_MBUS_CSI2_DPHY) {
- isp_ctrl = RKISP1_CIF_ISP_CTRL_ISP_MODE_ITU601;
+ isp_ctrl = RKISP1_CIF_ISP_CTRL_ISP_MODE_DATA_MODE;
} else {
if (mbus_type == V4L2_MBUS_BT656)
isp_ctrl = RKISP1_CIF_ISP_CTRL_ISP_MODE_ITU656;
else
- isp_ctrl = RKISP1_CIF_ISP_CTRL_ISP_MODE_ITU601;
+ isp_ctrl = RKISP1_CIF_ISP_CTRL_ISP_MODE_DATA_MODE;
}
irq_mask |= RKISP1_CIF_ISP_DATA_LOSS;
--
2.53.0