V4L2 M2M driver architecture question for a new hardware

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

 



Hi All,

I have hardware that does some sort of image manipulation. The
hardware takes 2 inputs.
- image buffer
- config param buffer
and generates one output which is also an image buffer.
The input and output images formats fall under standard image
definitions of V4L2 like various YUV/RGB formats (interleaved or
multiplanar).

The config param buffer is kind of like a set of instructions for the
hardware that needs to be passed with every input and output image
which tells the hardware how to process the image.
The hardware will be given different input images and output images
every time and possibly different config param buffers too (in some
cases). The config param buffers may have variable sizes too based on
the nature of processing for that frame, but input and output images
are fixed in size for a given context. I should also mention that the
config param buffers are a few KBs in size so zero copy is a
requirement. The config params buffers are written by userspace
(possibly also driver in kernel space) and read by hardware.

Here were two mechanisms I had in mind while trying to design a V4L2
M2M driver for this hardware.
- Use a custom multiplanar input format where one plane is a config
param buffer with remaining planes for input images (in case the input
image is also multiplanar).
- Use dmabuf heaps to allocate config param buffer. Tie this config
param buffer fd to an input buffer (using request API). Driver would
have to attach the config param buffer dmabuf fd, use it and detach.

Any comments/concerns about the above two mechanisms ?
Any other better ideas ?
Are there any existing V4L2 M2M mechanisms present to deal with per
frame param buffers that are also zero copy ?
Is the media request API able to do zero copy for setting compound
controls for large (several KBs) compound controls ? (making the above
dmabuf heap approach unnecessary)

--
Regards,
Karthik Poduval



[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