media: atomisp: Refactor sensor crop + fmt setting
authorHans de Goede <hdegoede@redhat.com>
Fri, 29 Dec 2023 15:41:55 +0000 (16:41 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Thu, 1 Feb 2024 05:57:35 +0000 (06:57 +0100)
commit26b53392ca0e3c86df9a2bf7eb29a86a72377a37
tree8f0bd174fdcf97fccbbdbdad9935ff74ae1079c0
parent592bb51d048c180ac9f5a52167548f18fe896a43
media: atomisp: Refactor sensor crop + fmt setting

There are 3 code-paths all of 3 which need to do:

1. Get try or active state
2. lock state
3. Call atomisp_set_crop()
4. Call v4l2_subdev_call(input->camera, pad, set_fmt, state, fmt)
5. unlock state

Change atomisp_set_crop into atomisp_set_crop_and_fmt() which does all of
this and change the 3 code-paths which need this to use the new
atomisp_set_crop_and_fmt() function.

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