]> 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)
commit1f99efdbe5d69779dd6e6b78a11a317a583196db
treeacced3f16affae221606cdff47dd4e60a4e82b5e
parent9cfc5e7e78bd7a9c9ae4d14842d50d3aec03801a
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