From: Arnout Vandecappelle <arnout@mind.be>
To: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Cc: linux-media@vger.kernel.org, mchehab@infradead.org
Subject: Re: [PATCH 1/2] V4L/DVB: buf-dma-sg.c: don't assume nr_pages == sglen
Date: Tue, 30 Mar 2010 12:27:49 +0200 [thread overview]
Message-ID: <201003301227.49671.arnout@mind.be> (raw)
In-Reply-To: <4BA9A67A.3070004@maxwell.research.nokia.com>
On Wednesday 24 March 2010 06:43:22, Sakari Ailus wrote:
> Hi Arnout,
>
> Thanks for the patch.
>
> Arnout Vandecappelle wrote:
[snip]
> > - dma_sync_sg_for_cpu(q->dev, dma->sglist, dma->nr_pages, dma->direction);
> > + dma_sync_sg_for_cpu(q->dev, dma->sglist, dma->sglen, dma->direction);
>
> I think the same problem still exists --- dma->sglen is not initialised
> anywhere, is it?
Yes it is.
In videobuf_dma_map (where dma->sglist is set), there are two conditions:
if (dma->bus_addr) {
dma->sglist = kmalloc(sizeof(struct scatterlist), GFP_KERNEL);
if (NULL != dma->sglist) {
dma->sglen = 1;
...
}
}
...
if (!dma->bus_addr) {
dma->sglen = dma_map_sg(q->dev, dma->sglist,
dma->nr_pages, dma->direction);
...
}
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286540
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 31BB CF53 8660 6F88 345D 54CC A836 5879 20D7 CF43
next prev parent reply other threads:[~2010-03-30 10:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-17 22:53 [PATCH v3] Support for zerocopy to DMA buffers Arnout Vandecappelle
2010-03-17 22:53 ` [PATCH 1/2] V4L/DVB: buf-dma-sg.c: don't assume nr_pages == sglen Arnout Vandecappelle
2010-03-24 5:43 ` Sakari Ailus
2010-03-30 10:27 ` Arnout Vandecappelle [this message]
2010-03-17 22:53 ` [PATCH 2/2] V4L/DVB: buf-dma-sg.c: support non-pageable user-allocated memory Arnout Vandecappelle
2010-03-18 11:58 ` Aguirre, Sergio
2010-05-06 4:06 ` Mauro Carvalho Chehab
2010-05-20 19:22 ` Arnout Vandecappelle
-- strict thread matches above, loose matches on Subject: below --
2010-03-03 14:12 Support for zerocopy to DSP on OMAP3 Arnout Vandecappelle
2010-03-04 16:00 ` [PATCH 1/2] V4L/DVB: buf-dma-sg.c: don't assume nr_pages == sglen Arnout Vandecappelle
2010-03-17 20:57 ` Sakari Ailus
2010-03-17 22:50 ` Arnout Vandecappelle
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=201003301227.49671.arnout@mind.be \
--to=arnout@mind.be \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=sakari.ailus@maxwell.research.nokia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.