media: rkisp1: Configure quantization using ISP source pad
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Fri, 12 Aug 2022 22:44:14 +0000 (00:44 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sat, 24 Sep 2022 06:35:13 +0000 (08:35 +0200)
The rkisp1_config_isp() function uses the format on the sink pad of the
ISP to configure quantization at the output of the ISP. This is
incorrect, as hinted by the src_frm variable name that stores the
format. Fix it by using the source pad.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Dafna Hirschfeld <dafna@fastmail.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c

index 1798ef85295032f2ca941788a2c779af0b643697..51134f642ef970c69e2ece5a0ffc407df03ee4a7 100644 (file)
@@ -231,7 +231,7 @@ static int rkisp1_config_isp(struct rkisp1_isp *isp,
                struct v4l2_mbus_framefmt *src_frm;
 
                src_frm = rkisp1_isp_get_pad_fmt(isp, NULL,
-                                                RKISP1_ISP_PAD_SINK_VIDEO,
+                                                RKISP1_ISP_PAD_SOURCE_VIDEO,
                                                 V4L2_SUBDEV_FORMAT_ACTIVE);
                rkisp1_params_configure(&rkisp1->params, sink_fmt->bayer_pat,
                                        src_frm->quantization);