linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Federico Vaga <federico.vaga@gmail.com>
To: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
	"'Mauro Carvalho Chehab'" <mchehab@infradead.org>,
	"'Pawel Osciak'" <pawel@osciak.com>,
	"'Hans Verkuil'" <hans.verkuil@cisco.com>,
	"'Giancarlo Asnaghi'" <giancarlo.asnaghi@st.com>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	"'Jonathan Corbet'" <corbet@lwn.net>
Subject: Re: [PATCH v3 2/4] videobuf2-dma-streaming: new videobuf2 memory allocator
Date: Wed, 05 Dec 2012 13:50:33 +0100	[thread overview]
Message-ID: <1685240.Ttn3DTWMJc@harkonnen> (raw)
In-Reply-To: <50BE1F06.10308@redhat.com>

On Tuesday 04 December 2012 14:04:22 Mauro Carvalho Chehab wrote:
> Em 24-09-2012 09:44, Marek Szyprowski escreveu:
> > Hello,
> > 
> > On Monday, September 24, 2012 12:59 PM Federico Vaga wrote:
> >> The DMA streaming allocator is similar to the DMA contig but it use the
> >> DMA streaming interface (dma_map_single, dma_unmap_single). The
> >> allocator allocates buffers and immediately map the memory for DMA
> >> transfer. For each buffer prepare/finish it does a DMA synchronization.
> 
> Hmm.. the explanation didn't convince me, e. g.:
> 	1) why is it needed;

This allocator is needed because some device (like STA2X11 VIP) cannot work 
with DMA sg or DMA coherent. Some other device (like the one used by Jonathan 
when he proposes vb2-dma-nc allocator) can obtain much better performance with 
DMA streaming than coherent.

> 	2) why vb2-dma-config can't be patched to use dma_map_single
> (eventually using a different vb2_io_modes bit?);

I did not modify vb2-dma-contig because I was thinking that each DMA memory 
allocator should reflect a DMA API.

> 	3) what are the usecases for it.
> 
> Could you please detail it? Without that, one that would be needing to
> write a driver will have serious doubts about what would be the right
> driver for its usage. Also, please document it at the driver itself.

I did not write all this details because the reasons to use vb2-dma-contig, 
vb2-dma-sg or vb2-dma-streaming are the same reasons because someone choose 
SG, coherent or streaming API. This is already documented in the DMA-*.txt 
files, so I did not rewrite it to avoid duplication.

-- 
Federico Vaga

  reply	other threads:[~2012-12-05 12:46 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-24 10:58 [PATCH v3 1/4] v4l: vb2: add prepare/finish callbacks to allocators Federico Vaga
2012-09-24 10:58 ` [PATCH v3 2/4] videobuf2-dma-streaming: new videobuf2 memory allocator Federico Vaga
2012-09-24 12:44   ` Marek Szyprowski
2012-12-04 16:04     ` Mauro Carvalho Chehab
2012-12-05 12:50       ` Federico Vaga [this message]
2012-12-05 14:25         ` Mauro Carvalho Chehab
2012-12-11 13:54           ` Federico Vaga
2012-12-18 14:41             ` Marek Szyprowski
2012-12-20 15:37               ` Federico Vaga
2013-01-01 12:52                 ` Mauro Carvalho Chehab
2013-01-03 16:13                   ` Federico Vaga
2013-01-04 13:30                     ` Federico Vaga
2013-01-06 17:04                       ` Federico Vaga
2013-01-06 23:09                       ` Alessandro Rubini
2013-01-07 19:40                         ` Jonathan Corbet
2013-01-07 20:15                           ` Mauro Carvalho Chehab
2013-01-08  6:50                             ` Marek Szyprowski
2013-01-08 14:31                               ` Jonathan Corbet
2013-01-09  7:48                                 ` Michael Olbrich
2012-09-24 10:58 ` [PATCH v3 3/4] sta2x11_vip: convert to videobuf2 and control framework Federico Vaga
2012-12-04 16:15   ` Mauro Carvalho Chehab
2012-12-05  1:12     ` Federico Vaga
2012-12-05 11:34       ` Mauro Carvalho Chehab
2012-12-05 12:24         ` Federico Vaga
2012-12-05 13:10           ` Mauro Carvalho Chehab
2012-12-05 13:27             ` Federico Vaga
2012-12-05 13:37               ` Mauro Carvalho Chehab
2012-12-05 13:45                 ` Federico Vaga
2012-12-06 18:59             ` Federico Vaga
2012-09-24 10:58 ` [PATCH v3 4/4] adv7180: remove {query/g_/s_}ctrl Federico Vaga
2012-09-24 12:46 ` [PATCH v3 1/4] v4l: vb2: add prepare/finish callbacks to allocators Marek Szyprowski
2012-09-25 15:04 ` Federico Vaga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1685240.Ttn3DTWMJc@harkonnen \
    --to=federico.vaga@gmail.com \
    --cc=corbet@lwn.net \
    --cc=giancarlo.asnaghi@st.com \
    --cc=hans.verkuil@cisco.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mchehab@infradead.org \
    --cc=mchehab@redhat.com \
    --cc=pawel@osciak.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).