Commit 750ef54b authored by Benoit Parrot's avatar Benoit Parrot Committed by Mauro Carvalho Chehab

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: default avatarBenoit Parrot <bparrot@ti.com>
Acked-by: default avatarLad Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent f60de889
This diff is collapsed.
......@@ -281,8 +281,8 @@ struct vpfe_device {
struct vpfe_cap_buffer *next_frm;
/* Used to store pixel format */
struct v4l2_format fmt;
/* Used to store current bytes per pixel based on current format */
unsigned int bpp;
/* Used to keep a reference to the current vpfe_fmt */
struct vpfe_fmt *current_vpfe_fmt;
struct vpfe_fmt *active_fmt[VPFE_NUM_FORMATS];
unsigned int num_active_fmt;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment