media: atomisp: fix try_fmt logic
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 4 Nov 2021 11:45:27 +0000 (11:45 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 09:54:10 +0000 (10:54 +0100)
commitac08140677c0b4e9d1670030eb60ea277d1fdde9
tree4d45249629d56e6c0f400deb8068720495495ee7
parent518e059789f6d114bc304edeea913da0bfc5e937
media: atomisp: fix try_fmt logic

[ Upstream commit c9e9094c4e42124af909b2f5f6ded0498e0854ac ]

The internal try_fmt logic is not meant to provide everything
that the V4L2 API should provide. Also, it doesn't decrement
the pads that are used only internally by the driver, but aren't
part of the device's output.

Fix it.

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