linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 7/8] dmaengine/dw_dmac: Unmap all memory buffers after completion of slave transfers
Date: Mon, 16 Jan 2012 10:54:48 +0000	[thread overview]
Message-ID: <20120116105448.GT1068@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <5e5d0fcff79b9b78e64c7424317d6b77736eca43.1326707233.git.viresh.kumar@st.com>

On Mon, Jan 16, 2012 at 03:20:35PM +0530, Viresh Kumar wrote:
> Currently, after completion of transfer, source address or destination address
> of only the first LLI descriptor is unmapped. And length passed for unmap is
> total length of all descriptors in the list. Which means unmapping code assumed
> that the memory buffers pointed to by the descriptors will be physically
> contiguous, which might not be the case. It is possible for other drivers to
> pass sglist to slave_sg(), in which all buffers are scattered throughout the
> memory.
> 
> This patch intends to fix this wrong expectation of dw_dmac. Now, first desc
> will not contain total length of transfer. But individual descriptors will
> contain their individual lengths. Finally, we will call unmap for all
> descriptors.

Note that DMA engine drivers are not responsible for unmapping the buffers
when the transfer completes - that is the responsibility of the caller.

The automatic buffer unmapping is required for the async_tx APIs and
offload APIs.

  reply	other threads:[~2012-01-16 10:54 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-16  9:50 [PATCH 0/9] dmaengine: Pl08x and dw_dmac updates Viresh Kumar
2012-01-16  9:50 ` [PATCH 1/8] dmaengine/dw_dmac: Hibernation support in dw_dmac Viresh Kumar
2012-01-16  9:50 ` [PATCH 2/8] dmaengine: Add flow controller information to dma_slave_config Viresh Kumar
2012-01-17  8:37   ` Linus Walleij
2012-01-17  9:07     ` Viresh Kumar
2012-01-18 10:36       ` Linus Walleij
2012-01-18 10:40         ` Viresh Kumar
2012-01-16  9:50 ` [PATCH 3/8] dmaengine/amba-pl08x: Take flow controller info from DMA_SLAVE_CONFIG Viresh Kumar
2012-01-16  9:50 ` [PATCH 4/8] dmaengine/dw_dmac: Don't use magic number for total number of channels Viresh Kumar
2012-01-16  9:50 ` [PATCH 5/8] dmaengine/dw_dmac: Use platform_get_drvdata instead of accessing dev directly Viresh Kumar
2012-01-16 10:47   ` Sergei Shtylyov
2012-01-16 10:52     ` Viresh Kumar
2012-01-16  9:50 ` [PATCH 6/8] dmaengine/dw_dmac: Don't handle block interrupts Viresh Kumar
2012-01-16  9:50 ` [PATCH 7/8] dmaengine/dw_dmac: Unmap all memory buffers after completion of slave transfers Viresh Kumar
2012-01-16 10:54   ` Russell King - ARM Linux [this message]
2012-01-16 11:44     ` Viresh Kumar
2012-01-17  8:52       ` Linus Walleij
2012-01-17  9:07         ` Viresh Kumar
2012-01-18  9:35           ` Russell King - ARM Linux
2012-01-19 17:34           ` Linus Walleij
2012-01-16  9:50 ` [PATCH 8/8] dmaengine/dw_dmac: Add support for DMA_SLAVE_CONFIG Viresh Kumar
2012-01-16 11:42   ` Viresh Kumar
2012-01-17  8:49     ` Linus Walleij
2012-01-17  9:15       ` Viresh Kumar
2012-01-17  9:19         ` Viresh Kumar
2012-01-17 10:19         ` Viresh Kumar
2012-01-17 10:10     ` Jassi Brar
2012-01-17 10:19       ` Viresh Kumar

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=20120116105448.GT1068@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).