media: atomisp: Propagate set_fmt on sensor results to CSI port
authorHans de Goede <hdegoede@redhat.com>
Fri, 12 Apr 2024 13:51:15 +0000 (14:51 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 26 Apr 2024 09:52:15 +0000 (10:52 +0100)
commit52cc673b8d085255eacaebbf78525e2f33a9f95c
treeac307931926637801d825fa7b5c0801eab33f310
parent2ab6c22d61e49518b6abd10105b747bc11780b95
media: atomisp: Propagate set_fmt on sensor results to CSI port

So far the CSI port sink and source pads have not had their fmt set at all,
leaving things at the default of SBGGR8_1X8/0x0.

This means that pipeline validation such as e.g. done when calling
media_pipeline_start() will fail since the links to / from the CSI
ports have different fmts on each end.

Store a pointer to the CSI port v4l2-subdev in struct atomisp_input_subdev,
and use this in atomisp_set_sensor_crop_and_fmt() to propagate the sensors
new fmt after a successful set_fmt to the CSI port it is connected too.

The input->csi_port pointer also allows simplifying atomisp_link_setup().

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>
drivers/staging/media/atomisp/pci/atomisp_cmd.c
drivers/staging/media/atomisp/pci/atomisp_internal.h
drivers/staging/media/atomisp/pci/atomisp_subdev.c
drivers/staging/media/atomisp/pci/atomisp_v4l2.c