* [PATCH] fix starting of transfers in i.MX dma drivers
@ 2012-01-09 9:32 Sascha Hauer
2012-01-09 9:32 ` [PATCH 1/4] mmc: mxcmmc: add missing dma_async_issue_pending Sascha Hauer
` (5 more replies)
0 siblings, 6 replies; 13+ messages in thread
From: Sascha Hauer @ 2012-01-09 9:32 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Vinod Koul, Javier Martin, linux-kernel, Mark Brown, Chris Ball
This moves the start of transfers from tx_submit to issue_pending
for the i.MX dma drivers as requested by Vinoud here:
https://lkml.org/lkml/2012/1/7/23
This requires the users (mxcmmc and i.MX sound) to be fixed first.
So Chris, Mark, given your Ack I would suggest to send this via
Vinouds DMA tree.
Sascha
Sascha Hauer (4):
mmc: mxcmmc: add missing dma_async_issue_pending
ASoC: i.MX: Add missing dma_async_issue_pending
dma: imx-dma: start transfer in issue_pending
dma: imx-sdma: start transfer in issue_pending
drivers/dma/imx-dma.c | 9 ++++-----
drivers/dma/imx-sdma.c | 11 +++++------
drivers/mmc/host/mxcmmc.c | 1 +
sound/soc/imx/imx-pcm-dma-mx2.c | 1 +
4 files changed, 11 insertions(+), 11 deletions(-)
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 1/4] mmc: mxcmmc: add missing dma_async_issue_pending
2012-01-09 9:32 [PATCH] fix starting of transfers in i.MX dma drivers Sascha Hauer
@ 2012-01-09 9:32 ` Sascha Hauer
2012-01-09 9:32 ` [PATCH 2/4] ASoC: i.MX: Add " Sascha Hauer
` (4 subsequent siblings)
5 siblings, 0 replies; 13+ messages in thread
From: Sascha Hauer @ 2012-01-09 9:32 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Vinod Koul, Javier Martin, linux-kernel, Mark Brown, Chris Ball,
Sascha Hauer
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/mmc/host/mxcmmc.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c
index 8e0fbe9..d1c2c31 100644
--- a/drivers/mmc/host/mxcmmc.c
+++ b/drivers/mmc/host/mxcmmc.c
@@ -263,6 +263,7 @@ static int mxcmci_setup_data(struct mxcmci_host *host, struct mmc_data *data)
wmb();
dmaengine_submit(host->desc);
+ dma_async_issue_pending(host->dma);
return 0;
}
--
1.7.7.3
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 2/4] ASoC: i.MX: Add missing dma_async_issue_pending
2012-01-09 9:32 [PATCH] fix starting of transfers in i.MX dma drivers Sascha Hauer
2012-01-09 9:32 ` [PATCH 1/4] mmc: mxcmmc: add missing dma_async_issue_pending Sascha Hauer
@ 2012-01-09 9:32 ` Sascha Hauer
2012-01-09 16:13 ` Mark Brown
2012-01-09 9:32 ` [PATCH 3/4] dma: imx-dma: start transfer in issue_pending Sascha Hauer
` (3 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: Sascha Hauer @ 2012-01-09 9:32 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Vinod Koul, Javier Martin, linux-kernel, Mark Brown, Chris Ball,
Sascha Hauer
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
sound/soc/imx/imx-pcm-dma-mx2.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/sound/soc/imx/imx-pcm-dma-mx2.c b/sound/soc/imx/imx-pcm-dma-mx2.c
index 43fdc24f..88aa95c 100644
--- a/sound/soc/imx/imx-pcm-dma-mx2.c
+++ b/sound/soc/imx/imx-pcm-dma-mx2.c
@@ -204,6 +204,7 @@ static int snd_imx_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
case SNDRV_PCM_TRIGGER_RESUME:
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
dmaengine_submit(iprtd->desc);
+ dma_async_issue_pending(iprtd->dma_chan);
break;
--
1.7.7.3
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 3/4] dma: imx-dma: start transfer in issue_pending
2012-01-09 9:32 [PATCH] fix starting of transfers in i.MX dma drivers Sascha Hauer
2012-01-09 9:32 ` [PATCH 1/4] mmc: mxcmmc: add missing dma_async_issue_pending Sascha Hauer
2012-01-09 9:32 ` [PATCH 2/4] ASoC: i.MX: Add " Sascha Hauer
@ 2012-01-09 9:32 ` Sascha Hauer
2012-01-09 10:51 ` Russell King - ARM Linux
2012-01-09 9:32 ` [PATCH 4/4] dma: imx-sdma: " Sascha Hauer
` (2 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: Sascha Hauer @ 2012-01-09 9:32 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Vinod Koul, Javier Martin, linux-kernel, Mark Brown, Chris Ball,
Sascha Hauer
The DMA API requires that transfers are started in issue_pending
instead of tx_submit. Fix this.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/dma/imx-dma.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c
index 4be55f9..217207b 100644
--- a/drivers/dma/imx-dma.c
+++ b/drivers/dma/imx-dma.c
@@ -186,8 +186,6 @@ static dma_cookie_t imxdma_tx_submit(struct dma_async_tx_descriptor *tx)
cookie = imxdma_assign_cookie(imxdmac);
- imx_dma_enable(imxdmac->imxdma_channel);
-
spin_unlock_irq(&imxdmac->lock);
return cookie;
@@ -332,9 +330,10 @@ static struct dma_async_tx_descriptor *imxdma_prep_dma_cyclic(
static void imxdma_issue_pending(struct dma_chan *chan)
{
- /*
- * Nothing to do. We only have a single descriptor
- */
+ struct imxdma_channel *imxdmac = to_imxdma_chan(chan);
+
+ if (imxdmac->status == DMA_IN_PROGRESS)
+ imx_dma_enable(imxdmac->imxdma_channel);
}
static int __init imxdma_probe(struct platform_device *pdev)
--
1.7.7.3
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 4/4] dma: imx-sdma: start transfer in issue_pending
2012-01-09 9:32 [PATCH] fix starting of transfers in i.MX dma drivers Sascha Hauer
` (2 preceding siblings ...)
2012-01-09 9:32 ` [PATCH 3/4] dma: imx-dma: start transfer in issue_pending Sascha Hauer
@ 2012-01-09 9:32 ` Sascha Hauer
2012-01-12 12:25 ` [PATCH] fix starting of transfers in i.MX dma drivers javier Martin
2012-01-30 9:12 ` Vinod Koul
5 siblings, 0 replies; 13+ messages in thread
From: Sascha Hauer @ 2012-01-09 9:32 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Vinod Koul, Javier Martin, linux-kernel, Mark Brown, Chris Ball,
Sascha Hauer
The DMA API requires that transfers are started in issue_pending
instead of tx_submit. Fix this.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/dma/imx-sdma.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index f993955..eb28bb0 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -833,15 +833,12 @@ static struct sdma_channel *to_sdma_chan(struct dma_chan *chan)
static dma_cookie_t sdma_tx_submit(struct dma_async_tx_descriptor *tx)
{
struct sdma_channel *sdmac = to_sdma_chan(tx->chan);
- struct sdma_engine *sdma = sdmac->sdma;
dma_cookie_t cookie;
spin_lock_irq(&sdmac->lock);
cookie = sdma_assign_cookie(sdmac);
- sdma_enable_channel(sdma, sdmac->channel);
-
spin_unlock_irq(&sdmac->lock);
return cookie;
@@ -1126,9 +1123,11 @@ static enum dma_status sdma_tx_status(struct dma_chan *chan,
static void sdma_issue_pending(struct dma_chan *chan)
{
- /*
- * Nothing to do. We only have a single descriptor
- */
+ struct sdma_channel *sdmac = to_sdma_chan(chan);
+ struct sdma_engine *sdma = sdmac->sdma;
+
+ if (sdmac->status == DMA_IN_PROGRESS)
+ sdma_enable_channel(sdma, sdmac->channel);
}
#define SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V1 34
--
1.7.7.3
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 3/4] dma: imx-dma: start transfer in issue_pending
2012-01-09 9:32 ` [PATCH 3/4] dma: imx-dma: start transfer in issue_pending Sascha Hauer
@ 2012-01-09 10:51 ` Russell King - ARM Linux
0 siblings, 0 replies; 13+ messages in thread
From: Russell King - ARM Linux @ 2012-01-09 10:51 UTC (permalink / raw)
To: Sascha Hauer
Cc: linux-arm-kernel, Vinod Koul, Mark Brown, linux-kernel,
Javier Martin, Chris Ball
On Mon, Jan 09, 2012 at 10:32:49AM +0100, Sascha Hauer wrote:
> The DMA API requires that transfers are started in issue_pending
DMA engine API != DMA API.
> instead of tx_submit. Fix this.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> drivers/dma/imx-dma.c | 9 ++++-----
> 1 files changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c
> index 4be55f9..217207b 100644
> --- a/drivers/dma/imx-dma.c
> +++ b/drivers/dma/imx-dma.c
> @@ -186,8 +186,6 @@ static dma_cookie_t imxdma_tx_submit(struct dma_async_tx_descriptor *tx)
>
> cookie = imxdma_assign_cookie(imxdmac);
>
> - imx_dma_enable(imxdmac->imxdma_channel);
> -
> spin_unlock_irq(&imxdmac->lock);
>
> return cookie;
> @@ -332,9 +330,10 @@ static struct dma_async_tx_descriptor *imxdma_prep_dma_cyclic(
>
> static void imxdma_issue_pending(struct dma_chan *chan)
> {
> - /*
> - * Nothing to do. We only have a single descriptor
> - */
> + struct imxdma_channel *imxdmac = to_imxdma_chan(chan);
> +
> + if (imxdmac->status == DMA_IN_PROGRESS)
> + imx_dma_enable(imxdmac->imxdma_channel);
> }
>
> static int __init imxdma_probe(struct platform_device *pdev)
> --
> 1.7.7.3
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/4] ASoC: i.MX: Add missing dma_async_issue_pending
2012-01-09 9:32 ` [PATCH 2/4] ASoC: i.MX: Add " Sascha Hauer
@ 2012-01-09 16:13 ` Mark Brown
2012-01-10 8:39 ` Sascha Hauer
0 siblings, 1 reply; 13+ messages in thread
From: Mark Brown @ 2012-01-09 16:13 UTC (permalink / raw)
To: Sascha Hauer
Cc: linux-arm-kernel, Vinod Koul, Javier Martin, linux-kernel, Chris Ball
On Mon, Jan 09, 2012 at 10:32:48AM +0100, Sascha Hauer wrote:
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
but I guess I can just apply it immediately?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/4] ASoC: i.MX: Add missing dma_async_issue_pending
2012-01-09 16:13 ` Mark Brown
@ 2012-01-10 8:39 ` Sascha Hauer
0 siblings, 0 replies; 13+ messages in thread
From: Sascha Hauer @ 2012-01-10 8:39 UTC (permalink / raw)
To: Mark Brown
Cc: linux-arm-kernel, Vinod Koul, Javier Martin, linux-kernel, Chris Ball
On Mon, Jan 09, 2012 at 08:13:02AM -0800, Mark Brown wrote:
> On Mon, Jan 09, 2012 at 10:32:48AM +0100, Sascha Hauer wrote:
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
>
> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
>
> but I guess I can just apply it immediately?
The ASoC patch (also the mmc driver patch) have to be applied
before the dma driver patches. To make this sure I think it's
best when Vinoud applies the whole series.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] fix starting of transfers in i.MX dma drivers
2012-01-09 9:32 [PATCH] fix starting of transfers in i.MX dma drivers Sascha Hauer
` (3 preceding siblings ...)
2012-01-09 9:32 ` [PATCH 4/4] dma: imx-sdma: " Sascha Hauer
@ 2012-01-12 12:25 ` javier Martin
2012-01-15 17:07 ` Koul, Vinod
2012-01-30 9:12 ` Vinod Koul
5 siblings, 1 reply; 13+ messages in thread
From: javier Martin @ 2012-01-12 12:25 UTC (permalink / raw)
To: Sascha Hauer
Cc: linux-arm-kernel, Vinod Koul, linux-kernel, Mark Brown, Chris Ball
Hi,
Vinod, are you OK with Sascha's patches?
I'm just waiting to resend memcpy support when they are merged.
--
Javier Martin
Vista Silicon S.L.
CDTUC - FASE C - Oficina S-345
Avda de los Castros s/n
39005- Santander. Cantabria. Spain
+34 942 25 32 60
www.vista-silicon.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: [PATCH] fix starting of transfers in i.MX dma drivers
2012-01-12 12:25 ` [PATCH] fix starting of transfers in i.MX dma drivers javier Martin
@ 2012-01-15 17:07 ` Koul, Vinod
0 siblings, 0 replies; 13+ messages in thread
From: Koul, Vinod @ 2012-01-15 17:07 UTC (permalink / raw)
To: javier Martin, Sascha Hauer
Cc: linux-arm-kernel, linux-kernel, Mark Brown, Chris Ball
>
> Hi,
> Vinod, are you OK with Sascha's patches?
> I'm just waiting to resend memcpy support when they are merged.
I am back from my vacation, with a huge amount of emails/patches to catch
up, and am travelling this week. Would prefer you to send these next
week, anyways all of these are late for current merge cycle...
--
~Vinod
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] fix starting of transfers in i.MX dma drivers
2012-01-09 9:32 [PATCH] fix starting of transfers in i.MX dma drivers Sascha Hauer
` (4 preceding siblings ...)
2012-01-12 12:25 ` [PATCH] fix starting of transfers in i.MX dma drivers javier Martin
@ 2012-01-30 9:12 ` Vinod Koul
2012-01-30 12:22 ` javier Martin
5 siblings, 1 reply; 13+ messages in thread
From: Vinod Koul @ 2012-01-30 9:12 UTC (permalink / raw)
To: Sascha Hauer
Cc: linux-arm-kernel, Chris Ball, Mark Brown, Javier Martin, linux-kernel
On Mon, 2012-01-09 at 10:32 +0100, Sascha Hauer wrote:
> This moves the start of transfers from tx_submit to issue_pending
> for the i.MX dma drivers as requested by Vinoud here:
>
> https://lkml.org/lkml/2012/1/7/23
>
> This requires the users (mxcmmc and i.MX sound) to be fixed first.
> So Chris, Mark, given your Ack I would suggest to send this via
> Vinouds DMA tree.
>
> Sascha
>
> Sascha Hauer (4):
> mmc: mxcmmc: add missing dma_async_issue_pending
> ASoC: i.MX: Add missing dma_async_issue_pending
> dma: imx-dma: start transfer in issue_pending
> dma: imx-sdma: start transfer in issue_pending
>
> drivers/dma/imx-dma.c | 9 ++++-----
> drivers/dma/imx-sdma.c | 11 +++++------
> drivers/mmc/host/mxcmmc.c | 1 +
> sound/soc/imx/imx-pcm-dma-mx2.c | 1 +
> 4 files changed, 11 insertions(+), 11 deletions(-)
Thanks applied all.
Fixed change log in 3 & 4, as Russell pointed out
Got a conflict in 4, pls see that fix is right.
--
~Vinod
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] fix starting of transfers in i.MX dma drivers
2012-01-30 9:12 ` Vinod Koul
@ 2012-01-30 12:22 ` javier Martin
2012-01-30 14:03 ` Vinod Koul
0 siblings, 1 reply; 13+ messages in thread
From: javier Martin @ 2012-01-30 12:22 UTC (permalink / raw)
To: Vinod Koul
Cc: Sascha Hauer, linux-arm-kernel, Chris Ball, Mark Brown, linux-kernel
On 30 January 2012 10:12, Vinod Koul <vinod.koul@intel.com> wrote:
> On Mon, 2012-01-09 at 10:32 +0100, Sascha Hauer wrote:
>> This moves the start of transfers from tx_submit to issue_pending
>> for the i.MX dma drivers as requested by Vinoud here:
>>
>> https://lkml.org/lkml/2012/1/7/23
>>
>> This requires the users (mxcmmc and i.MX sound) to be fixed first.
>> So Chris, Mark, given your Ack I would suggest to send this via
>> Vinouds DMA tree.
>>
>> Sascha
>>
>> Sascha Hauer (4):
>> mmc: mxcmmc: add missing dma_async_issue_pending
>> ASoC: i.MX: Add missing dma_async_issue_pending
>> dma: imx-dma: start transfer in issue_pending
>> dma: imx-sdma: start transfer in issue_pending
>>
>> drivers/dma/imx-dma.c | 9 ++++-----
>> drivers/dma/imx-sdma.c | 11 +++++------
>> drivers/mmc/host/mxcmmc.c | 1 +
>> sound/soc/imx/imx-pcm-dma-mx2.c | 1 +
>> 4 files changed, 11 insertions(+), 11 deletions(-)
>
> Thanks applied all.
>
> Fixed change log in 3 & 4, as Russell pointed out
>
> Got a conflict in 4, pls see that fix is right.
Hi Vinod,
could you please tell me where has this been merged?
I can't see it at git://git.infradead.org/users/vkoul/slave-dma.git
Thank you.
--
Javier Martin
Vista Silicon S.L.
CDTUC - FASE C - Oficina S-345
Avda de los Castros s/n
39005- Santander. Cantabria. Spain
+34 942 25 32 60
www.vista-silicon.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] fix starting of transfers in i.MX dma drivers
2012-01-30 12:22 ` javier Martin
@ 2012-01-30 14:03 ` Vinod Koul
0 siblings, 0 replies; 13+ messages in thread
From: Vinod Koul @ 2012-01-30 14:03 UTC (permalink / raw)
To: javier Martin
Cc: Sascha Hauer, linux-arm-kernel, Chris Ball, Mark Brown, linux-kernel
On Mon, 2012-01-30 at 13:22 +0100, javier Martin wrote:
> On 30 January 2012 10:12, Vinod Koul <vinod.koul@intel.com> wrote:
> > On Mon, 2012-01-09 at 10:32 +0100, Sascha Hauer wrote:
> >> This moves the start of transfers from tx_submit to issue_pending
> >> for the i.MX dma drivers as requested by Vinoud here:
> >>
> >> https://lkml.org/lkml/2012/1/7/23
> >>
> >> This requires the users (mxcmmc and i.MX sound) to be fixed first.
> >> So Chris, Mark, given your Ack I would suggest to send this via
> >> Vinouds DMA tree.
> >>
> >> Sascha
> >>
> >> Sascha Hauer (4):
> >> mmc: mxcmmc: add missing dma_async_issue_pending
> >> ASoC: i.MX: Add missing dma_async_issue_pending
> >> dma: imx-dma: start transfer in issue_pending
> >> dma: imx-sdma: start transfer in issue_pending
> >>
> >> drivers/dma/imx-dma.c | 9 ++++-----
> >> drivers/dma/imx-sdma.c | 11 +++++------
> >> drivers/mmc/host/mxcmmc.c | 1 +
> >> sound/soc/imx/imx-pcm-dma-mx2.c | 1 +
> >> 4 files changed, 11 insertions(+), 11 deletions(-)
> >
> > Thanks applied all.
> >
> > Fixed change log in 3 & 4, as Russell pointed out
> >
> > Got a conflict in 4, pls see that fix is right.
>
> Hi Vinod,
> could you please tell me where has this been merged?
>
> I can't see it at git://git.infradead.org/users/vkoul/slave-dma.git
>
Sorry had forgot to push..... pushed now.
--
~Vinod
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2012-01-30 14:02 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-09 9:32 [PATCH] fix starting of transfers in i.MX dma drivers Sascha Hauer
2012-01-09 9:32 ` [PATCH 1/4] mmc: mxcmmc: add missing dma_async_issue_pending Sascha Hauer
2012-01-09 9:32 ` [PATCH 2/4] ASoC: i.MX: Add " Sascha Hauer
2012-01-09 16:13 ` Mark Brown
2012-01-10 8:39 ` Sascha Hauer
2012-01-09 9:32 ` [PATCH 3/4] dma: imx-dma: start transfer in issue_pending Sascha Hauer
2012-01-09 10:51 ` Russell King - ARM Linux
2012-01-09 9:32 ` [PATCH 4/4] dma: imx-sdma: " Sascha Hauer
2012-01-12 12:25 ` [PATCH] fix starting of transfers in i.MX dma drivers javier Martin
2012-01-15 17:07 ` Koul, Vinod
2012-01-30 9:12 ` Vinod Koul
2012-01-30 12:22 ` javier Martin
2012-01-30 14:03 ` Vinod Koul
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).