]> 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)
commit3d9f7b3389014cb4a981d1302583b9b76947c84a
tree85ace0dd68912ab6ff7cb6ecac3d94c75063b1bd
parent753971443c302717aa630f2ccf7065ac9b29a979
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