]> git.baikalelectronics.ru Git - kernel.git/commit
media: am437x-vpfe: TRY_FMT ioctl is not really trying anything
authorBenoit Parrot <bparrot@ti.com>
Fri, 20 Sep 2019 17:05:51 +0000 (14:05 -0300)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Tue, 1 Oct 2019 19:14:43 +0000 (16:14 -0300)
commit2a67ef42addfadfd2edef40caf7be72545da14dc
treeacced3f16affae221606cdff47dd4e60a4e82b5e
parent6349436f9ac713e7af5860d14c12fac84914bdcd
media: am437x-vpfe: TRY_FMT ioctl is not really trying anything

The try_fmt was not actually trying out the provided format
but merely returning the current format basically like get_fmt.
In addition set_fmt should first invoked try_fmt to validate the
given format before applying it to the hardware.

To fix all of these the whole get/try/set ioctl functions had to
be reworked.
When calculating the bytesperline/stride and sizeimage format
member we don't need to locally store the current value of
bytesperpixel as it can easily get derived dynamically.

Signed-off-by: Benoit Parrot <bparrot@ti.com>
Acked-by: Lad Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/am437x/am437x-vpfe.c
drivers/media/platform/am437x/am437x-vpfe.h