On 18/04/2021 16:14, Laurent Pinchart wrote:
Hi Tomi,
Thank you for the patch.
On Mon, Apr 12, 2021 at 02:34:51PM +0300, Tomi Valkeinen wrote:
cal_camerarx_sd_set_fmt() accepts any value for the format field, but
there should be no reason to have any other value accepted than
V4L2_FIELD_NONE. So set the field always to V4L2_FIELD_NONE.
What if the source produces V4L2_FIELD_INTERLACED_(TB|BT) ? Shouldn't we
accept that and propagate it ? Same for V4L2_FIELD_TOP and
V4L2_FIELD_BOTTOM I suppose. V4L2_FIELD_SEQ_(TB|BT) is likely not needed
as I doubt sources will send that. V4L2_FIELD_ALTERNATE is a bit more
tricky, as the driver has to report which field a particular buffer
contains, and I'm not sure we could do so (maybe based on the CSI-2
frame number ?).
I'm fine dropping support for interlaced formats until someone wants to
support them though, it's up to you.
To be honest, I kind of presumed that interlace is not supported. But I
can see it mentioned very shortly in the TRM. If I recall right, I added
this because v4l2-compliance complained as the driver accepted any value.
I'll read about the v4l2 interlace handling to understand this better.
Tomi