Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1505588
| From | Thierry Escande <thierry.escande@collabora.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3] [media] vb2: Add support for capture_dma_bidirectional queue flag |
| Date | 2016-10-21 11:00 +0200 |
| Message-ID | <suDQe-3aT-29@gated-at.bofh.it> (permalink) |
| References | <suCr7-2ns-1@gated-at.bofh.it> <suCKt-2u7-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Sakari, On 21/10/2016 09:48, Sakari Ailus wrote: > Hi Thierry, > > On Fri, Oct 21, 2016 at 09:25:05AM +0200, Thierry Escande wrote: >> From: Pawel Osciak <posciak@chromium.org> >> >> When this flag is set for CAPTURE queues by the driver on calling >> vb2_queue_init(), it forces the buffers on the queue to be >> allocated/mapped with DMA_BIDIRECTIONAL direction flag instead of >> DMA_FROM_DEVICE. This allows the device not only to write to the >> buffers, but also read out from them. This may be useful e.g. for codec >> hardware which may be using CAPTURE buffers as reference to decode >> other buffers. >> >> This flag is ignored for OUTPUT queues as we don't want to allow HW to >> be able to write to OUTPUT buffers. >> >> Signed-off-by: Pawel Osciak <posciak@chromium.org> >> Tested-by: Pawel Osciak <posciak@chromium.org> >> Signed-off-by: Thierry Escande <thierry.escande@collabora.com> >> > > Please also check where dma_dir is being used especially in memory type > implementation. There are several comparisons to DMA_FROM_DEVICE which will > have a different result if DMA_BIDIRECTIONAL is used instead. Nice catch, thanks. How about a macro like this: #define VB2_DMA_DIR_CAPTURE(d) \ ((d) == DMA_FROM_DEVICE || (d) == DMA_BIDIRECTIONAL) Regards, Thierry
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v3] [media] vb2: Add support for capture_dma_bidirectional queue flag Thierry Escande <thierry.escande@collabora.com> - 2016-10-21 09:30 +0200
Re: [PATCH v3] [media] vb2: Add support for capture_dma_bidirectional queue flag Sakari Ailus <sakari.ailus@iki.fi> - 2016-10-21 09:50 +0200
Re: [PATCH v3] [media] vb2: Add support for capture_dma_bidirectional queue flag Thierry Escande <thierry.escande@collabora.com> - 2016-10-21 11:00 +0200
Re: [PATCH v3] [media] vb2: Add support for capture_dma_bidirectional queue flag Sakari Ailus <sakari.ailus@iki.fi> - 2016-10-21 11:20 +0200
csiph-web