All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFCv4 PATCH 0/8] vb2: various cleanups and improvements
@ 2013-12-09 13:43 Hans Verkuil
  2013-12-09 13:43 ` [RFCv4 PATCH 1/8] vb2: push the mmap semaphore down to __buf_prepare() Hans Verkuil
                   ` (7 more replies)
  0 siblings, 8 replies; 17+ messages in thread
From: Hans Verkuil @ 2013-12-09 13:43 UTC (permalink / raw)
  To: linux-media
  Cc: m.szyprowski, pawel, laurent.pinchart, awalls, kyungmin.park,
	k.debski, s.nawrocki, g.liakhovetski

This patch series does some cleanups in the qbuf/prepare_buf handling
(the first three patches). The fourth patch removes the 'fileio = NULL'
hack. That hack no longer works when dealing with asynchronous calls
from a kernel thread so it had to be fixed.

The next three patches implement retrying start_streaming() if there are
not enough buffers queued for the DMA engine to start. I know that there
are more drivers that can be simplified with this feature available in
the core. Those drivers do the retry of start_streaming in the buf_queue
op which frankly defeats the purpose of having a central start_streaming
op. But I leave it to the driver developers to decide whether or not to
cleanup their drivers.

The big advantage is that apps can just call STREAMON first, then start
queuing buffers without having to know the minimum number of buffers that
have to be queued before the DMA engine will kick in. It always annoyed
me that vb2 didn't take care of that for me as it is easy enough to do.

The final patch adds a fix based on a patch from Andy that removes the
file I/O emulation assumption that buffers are dequeued in the same
order that they were enqueued.

With regards to patch 7/8 I would appreciate some Acks. See patch 5
how ENODATA is used to implement retrying start_streaming in vb2.

Regards,

        Hans

New in v4:

- Reorder the patches
- Drop the thread/DVB support: postpone until at least one driver will
  need this.

New in v3:

- Added a comment to the thread_start function making it explicit that
  it is for use with videobuf2-dvb only.
- Added patch 10/10 to address yet another race condition.

New in v2:

- Added a PREPARING state in patch 1 to prevent a race condition that Laurent
  mentioned (two QBUF calls with the same index number at the same time).
- Changed some minor issues in patch 4 that Laurent mentioned in his review.
- Added the reworked version of Andy's original patch to remove the order
  assumption in the file I/O emulation.


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

end of thread, other threads:[~2013-12-11 10:29 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-09 13:43 [RFCv4 PATCH 0/8] vb2: various cleanups and improvements Hans Verkuil
2013-12-09 13:43 ` [RFCv4 PATCH 1/8] vb2: push the mmap semaphore down to __buf_prepare() Hans Verkuil
2013-12-09 13:43 ` [RFCv4 PATCH 2/8] vb2: simplify qbuf/prepare_buf by removing callback Hans Verkuil
2013-12-09 13:43 ` [RFCv4 PATCH 3/8] vb2: fix race condition between REQBUFS and QBUF/PREPARE_BUF Hans Verkuil
2013-12-09 13:43 ` [RFCv4 PATCH 4/8] vb2: remove the 'fileio = NULL' hack Hans Verkuil
2013-12-09 13:43 ` [RFCv4 PATCH 5/8] vb2: retry start_streaming in case of insufficient buffers Hans Verkuil
2013-12-10  6:38   ` Guennadi Liakhovetski
2013-12-10  7:42     ` Hans Verkuil
2013-12-09 13:43 ` [RFCv4 PATCH 6/8] vb2: don't set index, don't start streaming for write() Hans Verkuil
2013-12-09 13:43 ` [RFCv4 PATCH 7/8] vb2: return ENODATA in start_streaming in case of too few buffers Hans Verkuil
2013-12-10  7:48   ` Guennadi Liakhovetski
2013-12-10  7:51   ` Hans Verkuil
2013-12-10  9:56     ` Prabhakar Lad
2013-12-10 12:17       ` Prabhakar Lad
2013-12-11 10:27     ` Kamil Debski
2013-12-11 10:28       ` Hans Verkuil
2013-12-09 13:43 ` [RFCv4 PATCH 8/8] vb2: Improve file I/O emulation to handle buffers in any order 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.