linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] vim2m: make it work properly
@ 2019-01-29 16:00 Mauro Carvalho Chehab
  2019-01-29 16:00 ` [PATCH 1/3] media: vim2m: fix driver for it to handle different fourcc formats Mauro Carvalho Chehab
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Mauro Carvalho Chehab @ 2019-01-29 16:00 UTC (permalink / raw)
  To: Linux Media Mailing List, Jonathan Corbet
  Cc: Mauro Carvalho Chehab, Mauro Carvalho Chehab,
	Linux Doc Mailing List, Ezequiel Garcia, Anton Leontiev,
	Tomasz Figa, Sakari Ailus, Hans Verkuil

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(-)

-- 
2.20.1



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-01-30 18:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-29 16:00 [PATCH 0/3] vim2m: make it work properly Mauro Carvalho Chehab
2019-01-29 16:00 ` [PATCH 1/3] media: vim2m: fix driver for it to handle different fourcc formats Mauro Carvalho Chehab
2019-01-29 16:00 ` [PATCH 2/3] media: vim2m: use per-file handler work queue Mauro Carvalho Chehab
2019-01-30 12:41   ` Ezequiel Garcia
2019-01-30 13:19     ` Mauro Carvalho Chehab
2019-01-30 14:56       ` Ezequiel Garcia
2019-01-30 18:00         ` Mauro Carvalho Chehab
2019-01-29 16:00 ` [PATCH 3/3] media: vim2m: allow setting the default transaction time via parameter Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).