Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1508191

Re: [PATCH v5] [media] vb2: Add support for capture_dma_bidirectional queue flag

From Sakari Ailus <sakari.ailus@iki.fi>
Newsgroups linux.kernel
Subject Re: [PATCH v5] [media] vb2: Add support for capture_dma_bidirectional queue flag
Date 2016-10-25 12:50 +0200
Message-ID <sw7sR-4re-13@gated-at.bofh.it> (permalink)
References <sw5ho-35l-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Oct 25, 2016 at 10:22:29AM +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.
> 
> This patch introduces 2 macros:
> VB2_DMA_DIR(q) returns the corresponding dma_dir for the passed queue
> type, tanking care of the capture_dma_birectional flag.
> 
> VB2_DMA_DIR_CAPTURE(d) is a test macro returning true if the passed DMA
> direction refers to a capture buffer. This test is used to map virtual
> addresses for writing and to mark pages as dirty.
> 
> Signed-off-by: Pawel Osciak <posciak@chromium.org>
> Tested-by: Pawel Osciak <posciak@chromium.org>
> Signed-off-by: Thierry Escande <thierry.escande@collabora.com>

Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>

-- 
Sakari Ailus
e-mail: sakari.ailus@iki.fi	XMPP: sailus@retiisi.org.uk

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v5] [media] vb2: Add support for capture_dma_bidirectional queue flag Thierry Escande <thierry.escande@collabora.com> - 2016-10-25 10:30 +0200
  Re: [PATCH v5] [media] vb2: Add support for  capture_dma_bidirectional queue flag Sakari Ailus <sakari.ailus@iki.fi> - 2016-10-25 12:50 +0200

csiph-web