[RFC PATCH 0/2] [media] vb2: defer part of vb2_buffer_done() and move dma-buf unmap from DQBUF

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux