]> git.baikalelectronics.ru Git - kernel.git/commit
media: atomisp: properly implement g_fmt
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 26 Oct 2021 13:53:22 +0000 (14:53 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 15 Nov 2021 08:11:41 +0000 (08:11 +0000)
commite73afd187882b0f33d328b93e6c33f68f5043d74
tree85ace0dd68912ab6ff7cb6ecac3d94c75063b1bd
parent48f9535a155a8a4d46a1cd9ae0d090a3f4c8e12c
media: atomisp: properly implement g_fmt

The current logic only initializes pipe->pix after setting up a
pipeline - e. g. after start streaming.

While it makes sense to get the format of the pipeline, when
it is set, this breaks support for generic applications, as they
rely on getting the current sensor format (which is usually the
highest resolution format).

So, implement a call to the sensor's get_fmt, when this is called
before setting up a pipeline.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_cmd.c
drivers/staging/media/atomisp/pci/atomisp_cmd.h
drivers/staging/media/atomisp/pci/atomisp_ioctl.c