vim2m: make it work properly
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | media: vim2m: fix driver for it to handle different fourcc formatsdrivers/ | +240 | 0 replies | |
| 2/3 | media: vim2m: use per-file handler work queuedrivers/ | +19 | 4 replies | |
| 3/3 | media: vim2m: allow setting the default transaction time via parameterdrivers/ | +11 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] vim2m: make it work properly
The vim2m driver has some issues...
It currently fakes supporting two video formats, when in fact, it just copies the data to the buffer;
It says it supports hflip, when, in fact, it does a 8 tiles flip... that doesn't end well, though, due to the lack of proper video format;
If more than one open() is called, it sometimes go to some dead lock, preventing to stop all pipelines;
By default, it can be used only one instance, as it takes too long to generate data (40 msecs). This is actually by purpose, as it uses a delay work queue for that.
This patch series solve all the above issues. For the last one, a new modprobe parameter was added, in order to allow changing the default. For example, with this:
# sudo modprobe vim2m default_transtime=1
the delay is reduced to 1 ms. On my tests with this pipeline:
$ gst-launch-1.0 videotestsrc ! video/x-raw,format=YUY2 ! v4l2video0convert disable-passthrough=1 extra-controls="s,horizontal_flip=0,vertical_flip=0" ! video/x-raw,format=YUY2 ! videoconvert ! fpsdisplaysink
and a similar one:
$ gst-launch-1.0 videotestsrc ! video/x-raw,format=YUY2 ! v4l2video0convert disable-passthrough=1 extra-controls="s,horizontal_flip=1,vertical_flip=1" ! video/x-raw,format=RGB16 ! videoconvert ! ximagesink
I was able to create 17 such pipelines keeping the frame rate at 30 frames per second, and up to 27 pipelines without losing frames, with a framerate close to 20 fps.
My tests were done on a 3rd generation i7core machine (i7-3630QM).
So, it sounds good enough to be used for testing m2m, even on nowadays CPUs with less performance.
I opted to keep the default time to 40 ms to 1 ms, in order to allow multiple streams, but, in practice, I suspect that just one instance should be enough for most usecases. So, I ended by keping the 40 ms timing.
PS.: the first patch is identical to the one I submitted before, except for a minor change on its description.
This patch series can be found on my development tree:
https://git.linuxtv.org/mchehab/experimental.git/log/?h=vim2m
Mauro Carvalho Chehab (3):
media: vim2m: fix driver for it to handle different fourcc formats
media: vim2m: use per-file handler work queue
media: vim2m: allow setting the default transaction time via parameter
drivers/media/platform/vim2m.c | 434 ++++++++++++++++++++------------- 1 file changed, 270 insertions(+), 164 deletions(-)
Signature · 1 line
2.20.1