Linux Media Controller development
 help / color / mirror / Atom feed
From: Federico Vaga <federico.vaga@gmail.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: '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 3/4] videobuf2-dma-streaming: new videobuf2 memory allocator
Date: Thu, 13 Sep 2012 17:46:32 +0200	[thread overview]
Message-ID: <2107949.TNqhOsq2WF@harkonnen> (raw)
In-Reply-To: <002e01cd91b9$2110d160$63327420$%szyprowski@samsung.com>

> On Thursday, September 13, 2012 3:53 PM Federico Vaga wrote:
> > Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
> 
> A few words explaining why this memory handling module is required or
> beneficial will definitely improve the commit :)

ok, I will write some lines

> > +static void *vb2_dma_streaming_cookie(void *buf_priv)
> > +{
> > +	struct vb2_streaming_buf *buf = buf_priv;
> > +
> > +	return (void *)buf->dma_handle;
> > +}
> 
> Please change this function to:
> 
> static void *vb2_dma_streaming_cookie(void *buf_priv)
> {
> 	struct vb2_streaming_buf *buf = buf_priv;
> 	return &buf->dma_handle;
> }
> 
> and add a following static inline to
> include/media/videobuf2-dma-streaming.h:
> 
> static inline dma_addr_t
> vb2_dma_streaming_plane_paddr(struct vb2_buffer *vb, unsigned int
> plane_no) {
>         dma_addr_t *dma_addr = vb2_plane_cookie(vb, plane_no);
>         return *dma_addr;
> }
> 
> Do not use 'cookie' callback directly in the driver, the driver should
> use the above proxy.
> 
> The &buf->dma_handle workaround is required for some possible
> configurations with 64bit dma addresses, see commit 472af2b05bdefc.

ACK.

-- 
Federico Vaga

  reply	other threads:[~2012-09-13 15:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-13 13:52 [PATCH 1/4] v4l: vb2: add prepare/finish callbacks to allocators Federico Vaga
2012-09-13 13:52 ` [PATCH 2/4] adv7180: remove {query/g_/s_}ctrl Federico Vaga
2012-09-13 13:52 ` [PATCH 3/4] videobuf2-dma-streaming: new videobuf2 memory allocator Federico Vaga
2012-09-13 14:07   ` Marek Szyprowski
2012-09-13 15:46     ` Federico Vaga [this message]
2012-09-13 17:45       ` Jonathan Corbet
2012-09-13 18:27         ` Federico Vaga
2012-09-13 14:08   ` Hans Verkuil
2012-09-13 15:42     ` Federico Vaga
2012-09-13 17:54       ` Jonathan Corbet
2012-09-13 18:14         ` Federico Vaga
2012-09-14 18:34         ` Ezequiel Garcia
2012-09-13 13:52 ` [PATCH 4/4] sta2x11_vip: convert to videobuf2 and control framework 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=2107949.TNqhOsq2WF@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=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