OSDN Git Service

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)
commit6c84a35d781525696fcbeeed8c60d96a63811067
tree85ace0dd68912ab6ff7cb6ecac3d94c75063b1bd
parent331adc2f4081886a6f12392dbcfb17e3512a7160
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