aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorGravatar Hans de Goede <hdegoede@redhat.com> 2024-04-12 15:27:53 +0100
committerGravatar Mauro Carvalho Chehab <mchehab@kernel.org> 2024-04-26 10:53:15 +0100
commit20a7f79982b5437bc8af44785326c59cf2f77378 (patch)
treea12b585c8ea960697c7be3fea52c634a7c06976e /drivers/staging
parentmedia: atomisp: Propagate set_fmt on sensor results to CSI port (diff)
downloadlinux-20a7f79982b5437bc8af44785326c59cf2f77378.tar.gz
linux-20a7f79982b5437bc8af44785326c59cf2f77378.tar.bz2
linux-20a7f79982b5437bc8af44785326c59cf2f77378.zip
media: atomisp: Propagate v4l2_mbus_framefmt.field to CSI port sink pad
Most sensor drivers report V4L2_FIELD_NONE as v4l2_mbus_framefmt.field value. Propagate this to the v4l2_mbus_framefmt for the CSI port to pass the link validation done by media_pipeline_start(). Keep the v4l2_mbus_framefmt.field for the source pad of the CSI port as V4L2_FIELD_ANY to match the ISP sink pad. Reviewed-by: Andy Shevchenko <andy@kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp_csi2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/staging/media/atomisp/pci/atomisp_csi2.c b/drivers/staging/media/atomisp/pci/atomisp_csi2.c
index 89118438a3b6..e939a09a279b 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_csi2.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_csi2.c
@@ -107,9 +107,12 @@ int atomisp_csi2_set_ffmt(struct v4l2_subdev *sd,
actual_ffmt->height = clamp_t(u32, ffmt->height,
ATOM_ISP_MIN_HEIGHT,
ATOM_ISP_MAX_HEIGHT);
+ actual_ffmt->field = ffmt->field;
tmp_ffmt = *ffmt = *actual_ffmt;
+ /* Always use V4L2_FIELD_ANY to match the ISP sink pad */
+ tmp_ffmt.field = V4L2_FIELD_ANY;
return atomisp_csi2_set_ffmt(sd, sd_state, which,
CSI2_PAD_SOURCE,
&tmp_ffmt);