[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161025103935.GN9460@valkosipuli.retiisi.org.uk>
Date: Tue, 25 Oct 2016 13:39:36 +0300
From: Sakari Ailus <sakari.ailus@....fi>
To: Thierry Escande <thierry.escande@...labora.com>
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>,
linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
Pawel Osciak <pawel@...iak.com>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Kyungmin Park <kyungmin.park@...sung.com>
Subject: Re: [PATCH v5] [media] vb2: Add support for
capture_dma_bidirectional queue flag
On Tue, Oct 25, 2016 at 10:22:29AM +0200, Thierry Escande wrote:
> From: Pawel Osciak <posciak@...omium.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@...omium.org>
> Tested-by: Pawel Osciak <posciak@...omium.org>
> Signed-off-by: Thierry Escande <thierry.escande@...labora.com>
Acked-by: Sakari Ailus <sakari.ailus@...ux.intel.com>
--
Sakari Ailus
e-mail: sakari.ailus@....fi XMPP: sailus@...iisi.org.uk
Powered by blists - more mailing lists