lkml.org 
[lkml]   [2016]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[RFC PATCH 0/2] [media] vb2: defer part of vb2_buffer_done() and move dma-buf unmap from DQBUF
Date
Hello,

This patch series attempt to do the dma-buf unmap as soon as possible, once
the driver has finished using the buffer. Instead of waiting until DQBUF to
do the unmap.

Patch #1 splits vb2_buffer_done() and moves part of its logic to a workqueue
to avoid calling the vb2 .finish mem ops. Since doing a buffer sync can take
a lot of time so isn't suitable for interrupt context. This was suggested by
Hans Verkuil on a previous patch [0].

Patch #2 then moves the dma-buf unmap out of DQBUF to vb2_done_work() now that
this is executed in process context since the dmabuf unmap operation can sleep.

[0]: https://lkml.org/lkml/2016/8/13/36

Best regards,
Javier


Javier Martinez Canillas (2):
[media] vb2: defer sync buffers from vb2_buffer_done() with a
workqueue
[media] vb2: move dma-buf unmap from __vb2_dqbuf() to vb2_done_work()

drivers/media/v4l2-core/videobuf2-core.c | 114 ++++++++++++++++++++-----------
include/media/videobuf2-core.h | 5 ++
2 files changed, 79 insertions(+), 40 deletions(-)

--
2.5.5

\
 
 \ /
  Last update: 2016-09-17 09:57    [W:0.066 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site