diff mbox series

[5/7] media: rkisp1: Configure quantization using ISP source pad

Message ID 20220815065235.23797-6-laurent.pinchart@ideasonboard.com
State Accepted
Commit 81303962da12a1dbb7f81779c2847d055779c46b
Headers show
Series media: rkisp1: Fix and improve color space support | expand

Commit Message

Laurent Pinchart Aug. 15, 2022, 6:52 a.m. UTC
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>
---
 drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Dafna Hirschfeld Aug. 18, 2022, 4:28 a.m. UTC | #1
On 15.08.2022 09:52, Laurent Pinchart wrote:
>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>

>---
> drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
>index 8b93b5c03bce..9d4d018d58b6 100644
>--- a/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
>+++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
>@@ -341,7 +341,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);
>-- 
>Regards,
>
>Laurent Pinchart
>
diff mbox series

Patch

diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
index 8b93b5c03bce..9d4d018d58b6 100644
--- a/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
+++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
@@ -341,7 +341,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);