Re: [PATCHv4 0/3] v4l2-core: Add metadata type to vfl_devnode_type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Hans,

On Tue, Sep 17, 2019 at 03:36:44PM +0200, Hans Verkuil wrote:
> This is a follow-up series from Vandana's "[v3] v4l2-core: Add metadata type to
> vfl_devnode_type" patch: https://patchwork.linuxtv.org/patch/58755/
> 
> While testing that v3 patch with a patched version of vivid that has metadata
> capture support, I realized that metadata should be treated the same way as
> vbi in determine_valid_ioctls(). That makes sense since vbi *is* effectively
> metadata. So I changed Vandana's patch (hence my Co-Developed-by tag) to
> correctly validate the ioctls for metadata.
> 
> I also added two follow-up patches to simplify the SDR code in that function,
> and to fix the code for v4l-touch devices (too many ioctls were enabled for
> such devices). I think the final code is easier to read as well.

Quoting my reply to "[RFC] V4L2 & Metadata: switch to /dev/v4l-metaX
instead of /dev/videoX]" as it may have fell through the cracks, and I
don't want this series to be merged without addressing the issue,

One of the reason [we didn't introduce a metadata video node type] is
CSI-2 sensors and CSI-2 receivers. A CSI-2 link often carries both video
and metadata using two different datatypes. From the point of view of
the CSI-2 receiver or the DMA engines, video and metadata are not
distinguishable, the CSI-2 receiver receives one stream with two data
types, demultiplexes them, and passes them to different DMA engines. A
sensor could send two video datatypes, or even conceptually two metadata
data types, and this would work the exact same way, with each of the two
DMA engines capturing data to buffers without caring about the contents.
Given that the datatype selection happens at runtime, a given DMA engine
is thus not dedicated to video or metadata, any of the DMA engines (and
there could also be more than two) could handle any type of data. For
this type of system we thus can't dedicate device nodes to video or
metadata, they need to support either.

> Hans Verkuil (2):
>   v4l2-dev: simplify the SDR checks
>   v4l2-dev: fix is_tch checks
> 
> Vandana BN (1):
>   v4l2-core: Add metadata type to vfl_devnode_type
> 
>  drivers/media/v4l2-core/v4l2-dev.c   | 97 ++++++++++++++++------------
>  drivers/media/v4l2-core/v4l2-ioctl.c |  5 +-
>  include/media/v4l2-dev.h             |  2 +
>  3 files changed, 61 insertions(+), 43 deletions(-)

-- 
Regards,

Laurent Pinchart



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux