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 10:04:24 +0000 (11:04 +0100)
commitd4c0cb23e5b368e9df953948456aa15a0b19f18d
tree6bcad1cc49e76a63d64ddd38aa9b704e723e7d6a
parent7be59e8a666098367574f927c3ba4a8754f419f4
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