All of lore.kernel.org
 help / color / mirror / Atom feed
* RFC: Request API and memory-to-memory devices
@ 2018-05-24  8:44 Hans Verkuil
  2018-05-25  4:15 ` Tomasz Figa
  2018-05-25 14:16 ` Sakari Ailus
  0 siblings, 2 replies; 6+ messages in thread
From: Hans Verkuil @ 2018-05-24  8:44 UTC (permalink / raw)
  To: Linux Media Mailing List, Tomasz Figa, Sakari Ailus,
	Alexandre Courbot, Laurent Pinchart, Nicolas Dufresne

Memory-to-memory devices have one video node, one internal control handler
but two vb2_queues (DMA engines). While often there is one buffer produced
for every buffer consumed, but this is by no means standard. E.g. deinterlacers
will produce on buffer for every two buffers consumed. Codecs that receive
a bit stream and can parse it to discover the framing may have no relation
between the number of buffers consumed and the number of buffers produced.

This poses a few problems for the Request API. Requiring that a request
contains the buffers for both output and capture queue will be difficult
to implement, especially in the latter case where there is no relationship
between the number of consumed and produced buffers.

In addition, userspace can make two requests: one for the capture queue,
one for the output queue, each with associated controls. But since the
controls are shared between capture and output there is an issue of
what to do when the same control is set in both requests.

I propose to restrict the usage of requests for m2m drivers to the output
queue only. This keeps things simple for both kernel and userspace and
avoids complex solutions.

Requests only make sense if there is actually configuration you can apply
for each buffer, and while that's true for the output queue, on the capture
queue you just capture the result of whatever the device delivers. I don't
believe there is much if anything you can or want to control per-buffer.

Am I missing something? Comments?

Regards,

	Hans

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

end of thread, other threads:[~2018-06-04 11:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-24  8:44 RFC: Request API and memory-to-memory devices Hans Verkuil
2018-05-25  4:15 ` Tomasz Figa
2018-05-25 14:16 ` Sakari Ailus
2018-05-25 14:40   ` Tomasz Figa
2018-05-25 15:26   ` Hans Verkuil
2018-06-04 11:42     ` Hans Verkuil

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.