Skip to contentSkip to conversation

V4L-DVB Summit Day 2

DISCUSSION Hans Verkuil 2 participants 2 messages Sep 25, 2009 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

Hi all,

A quick update on day 2 of the summit.

We started off with a discussion on the memory pool API. It was soon obvious that we really should attempt to make this a global memory pool as opposed to one pool per device. If it is global then we can do some really fancy stuff that would be hard to do otherwise.

What also became clear quite soon is that a lot more research is needed in how to allocate and keep track of the memory and how to handle caches etc.

We got some info from Samsung as well on how they solved this issue. We will need to look at this in more detail. I will make two presentations from Samsung available on my website later.

After discussing the memory pool API we continued with the Media Controller.

Some conclusions:

- Everyone likes that concept of the media controller.

- Nobody likes using sysfs for link enumeration and setting (sorry Mauro :-) )

- We do need to introduce something like a group ID in the entity information to group related entities together. The idea is that application can use that ID to discover which video node is associated with which audio node.

- In order to allow data to flow between two endpoints the dataformat needs to be setup correctly. This needs to be set for both endpoints as that is the most general solution. But in 99% if not all cases the dataformat will be the same for both endpoints. So initially the API will set the dataformat for both endpoints at the same time for ease of use.

- Currently the entity has a 'descr' field that contains what is effectively tooltip-type information about the entity. This is better handled as a string control of that entity.

- Rather than using the mc to select a 'target' subdev and pass ioctls on to that, we decided that creating a node for each sub-device is better. But only if there is anything to control for that sub-device.

- We agreed that the basic premise should be to keep the driver for a SoC as simple as possible, and to move a lot of the intelligence in setting up the SoC to SoC-specific userspace libraries. So the driver in the kernel is responsible for programming the various sub-devices and buffer I/O, while configuring the various sub-devices into a working pipeline is the job of the userspace library. This prevents the kernel driver from becoming a mess.

Obviously, nothing is final, but all of these points should appear in future RFCs for further discussion on the mailinglists.

Regards,

Hans

Signature · 1 line
Hans Verkuil - video4linux developer - sponsored by TANDBERG Telecom
#1 lore raw

Hi everybody,

Hans asked me to write a quick update on the global video buffers pool discussions. so here it is.

We started with a presentation of the global video buffers pool RFC[1], The proposal aimed at solving different problems related to video buffers allocation and management depending on the target platform. Everybody agreed that a video buffers pool was indeed needed.

The original proposal was to create pools at the media controller level for implementation ease (or maybe because I'm lazy at times :-)). It soon became clear that a truly global pool was desirable, and probably not more complex to implement.

Moving one more level upwards, it was proposed to make the buffers pool video- agnostic so that it could be used for generic buffers, not only v4l2_buffers. However, such a global pool might have a hard time entering the mainline kernel, and using v4l2_buffers would be easier for V4L2 driver writers as the drivers already use those objects. The first implementation will thus likely be V4L2-specific.

As video buffers need to be shared with the GPU for some use cases (Xv video rendering, OpenGL textures, ...) the video buffers manager might need to interact with the GEM GPU memory manager. As no attendee was familiar with GEM this topic needs to be researched.

The conclusion was that the video buffers pool needs a lot more research followed by another RFC. The implementation will likely first focus on buffers allocation and management, and then move on video queuing latency issues (cache management).

[1] http://osdir.com/ml/linux-media/2009-09/msg00693.html

Signature · 3 lines
Regards,

Laurent Pinchart