linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] rcar-hpbdma: fixup patches for double plane
       [not found] <87k3hc189h.wl%kuninori.morimoto.gx@renesas.com>
@ 2013-10-29  6:51 ` Kuninori Morimoto
  2013-10-29  6:52   ` [PATCH 1/3] rcar-hpbdma: add max transfer size Kuninori Morimoto
                     ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Kuninori Morimoto @ 2013-10-29  6:51 UTC (permalink / raw)
  To: Koul, Vinod
  Cc: Simon, Max Filippov, Magnus, linux-sh, Kuninori Morimoto, linux-kernel


Hi Vinod
Cc: Simon, Max

These patches fixup R-Car HBPDMA driver
for double plane.

I tested these patches on my R-Car sound driver in local environment.
It doesn't work without these patches.

Kuninori Morimoto (3):
      rcar-hpbdma: add max transfer size
      rcar-hpbdma: initialise plane information when halted
      rcar-hpbdma: fixup channel busy check for double plane

 drivers/dma/sh/rcar-hpbdma.c |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)


Best regards
---
Kuninori Morimoto

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/3] rcar-hpbdma: add max transfer size
  2013-10-29  6:51 ` [PATCH 0/3] rcar-hpbdma: fixup patches for double plane Kuninori Morimoto
@ 2013-10-29  6:52   ` Kuninori Morimoto
  2013-10-29  6:52   ` [PATCH 2/3] rcar-hpbdma: initialise plane information when halted Kuninori Morimoto
                     ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Kuninori Morimoto @ 2013-10-29  6:52 UTC (permalink / raw)
  To: Koul, Vinod
  Cc: Simon, Max Filippov, Magnus, linux-sh, Kuninori Morimoto, linux-kernel

shdma_chan_probe() can set max transfer size,
but it will be PAGE_SIZE with out this patch.

Reviewed-by: Max Filippov <max.filippov@cogentembedded.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 drivers/dma/sh/rcar-hpbdma.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/dma/sh/rcar-hpbdma.c b/drivers/dma/sh/rcar-hpbdma.c
index ebad845..496180a 100644
--- a/drivers/dma/sh/rcar-hpbdma.c
+++ b/drivers/dma/sh/rcar-hpbdma.c
@@ -510,6 +510,8 @@ static int hpb_dmae_chan_probe(struct hpb_dmae_device *hpbdev, int id)
 	}
 
 	schan = &new_hpb_chan->shdma_chan;
+	schan->max_xfer_len = HPB_DMA_TCR_MAX;
+
 	shdma_chan_probe(sdev, schan, id);
 
 	if (pdev->id >= 0)
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/3] rcar-hpbdma: initialise plane information when halted
  2013-10-29  6:51 ` [PATCH 0/3] rcar-hpbdma: fixup patches for double plane Kuninori Morimoto
  2013-10-29  6:52   ` [PATCH 1/3] rcar-hpbdma: add max transfer size Kuninori Morimoto
@ 2013-10-29  6:52   ` Kuninori Morimoto
  2013-10-29  6:52   ` [PATCH 3/3] rcar-hpbdma: fixup channel busy check for double plane Kuninori Morimoto
                     ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Kuninori Morimoto @ 2013-10-29  6:52 UTC (permalink / raw)
  To: Koul, Vinod
  Cc: Simon, Max Filippov, Magnus, linux-sh, Kuninori Morimoto, linux-kernel

Plane information should be initialized when halted.
It may restart from the wrong plane without this patch.

Reviewed-by: Max Filippov <max.filippov@cogentembedded.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 drivers/dma/sh/rcar-hpbdma.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/dma/sh/rcar-hpbdma.c b/drivers/dma/sh/rcar-hpbdma.c
index 496180a..19af32d 100644
--- a/drivers/dma/sh/rcar-hpbdma.c
+++ b/drivers/dma/sh/rcar-hpbdma.c
@@ -286,6 +286,9 @@ static void hpb_dmae_halt(struct shdma_chan *schan)
 
 	ch_reg_write(chan, HPB_DMAE_DCMDR_DQEND, HPB_DMAE_DCMDR);
 	ch_reg_write(chan, HPB_DMAE_DSTPR_DMSTP, HPB_DMAE_DSTPR);
+
+	chan->plane_idx = 0;
+	chan->first_desc = true;
 }
 
 static const struct hpb_dmae_slave_config *
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/3] rcar-hpbdma: fixup channel busy check for double plane
  2013-10-29  6:51 ` [PATCH 0/3] rcar-hpbdma: fixup patches for double plane Kuninori Morimoto
  2013-10-29  6:52   ` [PATCH 1/3] rcar-hpbdma: add max transfer size Kuninori Morimoto
  2013-10-29  6:52   ` [PATCH 2/3] rcar-hpbdma: initialise plane information when halted Kuninori Morimoto
@ 2013-10-29  6:52   ` Kuninori Morimoto
  2013-10-29  7:08   ` [PATCH 0/3] rcar-hpbdma: fixup patches " Simon Horman
                     ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Kuninori Morimoto @ 2013-10-29  6:52 UTC (permalink / raw)
  To: Koul, Vinod
  Cc: Simon, Max Filippov, Magnus, linux-sh, Kuninori Morimoto, linux-kernel

The device busy check method is different between
single and double planes.
It will always return "busy" without this patch
if channel used as double plane.

Reviewed-by: Max Filippov <max.filippov@cogentembedded.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 drivers/dma/sh/rcar-hpbdma.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/dma/sh/rcar-hpbdma.c b/drivers/dma/sh/rcar-hpbdma.c
index 19af32d..3083d90 100644
--- a/drivers/dma/sh/rcar-hpbdma.c
+++ b/drivers/dma/sh/rcar-hpbdma.c
@@ -60,6 +60,7 @@
 #define HPB_DMAE_DSTPR_DMSTP	BIT(0)
 
 /* DMA status register (DSTSR) bits */
+#define HPB_DMAE_DSTSR_DQSTS	BIT(2)
 #define HPB_DMAE_DSTSR_DMSTS	BIT(0)
 
 /* DMA common registers */
@@ -388,7 +389,10 @@ static bool hpb_dmae_channel_busy(struct shdma_chan *schan)
 	struct hpb_dmae_chan *chan = to_chan(schan);
 	u32 dstsr = ch_reg_read(chan, HPB_DMAE_DSTSR);
 
-	return (dstsr & HPB_DMAE_DSTSR_DMSTS) == HPB_DMAE_DSTSR_DMSTS;
+	if (chan->xfer_mode == XFER_DOUBLE)
+		return dstsr & HPB_DMAE_DSTSR_DQSTS;
+	else
+		return dstsr & HPB_DMAE_DSTSR_DMSTS;
 }
 
 static int
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/3] rcar-hpbdma: fixup patches for double plane
  2013-10-29  6:51 ` [PATCH 0/3] rcar-hpbdma: fixup patches for double plane Kuninori Morimoto
                     ` (2 preceding siblings ...)
  2013-10-29  6:52   ` [PATCH 3/3] rcar-hpbdma: fixup channel busy check for double plane Kuninori Morimoto
@ 2013-10-29  7:08   ` Simon Horman
  2013-11-12  2:16   ` Kuninori Morimoto
  2013-11-12  4:51   ` Vinod Koul
  5 siblings, 0 replies; 7+ messages in thread
From: Simon Horman @ 2013-10-29  7:08 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Koul, Vinod, Max Filippov, Magnus, linux-sh, Kuninori Morimoto,
	linux-kernel

On Mon, Oct 28, 2013 at 11:51:28PM -0700, Kuninori Morimoto wrote:
> 
> Hi Vinod
> Cc: Simon, Max
> 
> These patches fixup R-Car HBPDMA driver
> for double plane.
> 
> I tested these patches on my R-Car sound driver in local environment.
> It doesn't work without these patches.
> 
> Kuninori Morimoto (3):
>       rcar-hpbdma: add max transfer size
>       rcar-hpbdma: initialise plane information when halted
>       rcar-hpbdma: fixup channel busy check for double plane
> 
>  drivers/dma/sh/rcar-hpbdma.c |   10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)

Thanks Morimoto-san,

these all look good to me.

Acked-by: Simon Horman <horms+renesas@verge.net.au>


Vinod, could you consider applying these?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/3] rcar-hpbdma: fixup patches for double plane
  2013-10-29  6:51 ` [PATCH 0/3] rcar-hpbdma: fixup patches for double plane Kuninori Morimoto
                     ` (3 preceding siblings ...)
  2013-10-29  7:08   ` [PATCH 0/3] rcar-hpbdma: fixup patches " Simon Horman
@ 2013-11-12  2:16   ` Kuninori Morimoto
  2013-11-12  4:51   ` Vinod Koul
  5 siblings, 0 replies; 7+ messages in thread
From: Kuninori Morimoto @ 2013-11-12  2:16 UTC (permalink / raw)
  To: Koul, Vinod
  Cc: Simon, Max Filippov, Magnus, linux-sh, Kuninori Morimoto, linux-kernel


Hi Vinod
Cc: Simon

Please teach me current status of these patches

> These patches fixup R-Car HBPDMA driver
> for double plane.
> 
> I tested these patches on my R-Car sound driver in local environment.
> It doesn't work without these patches.
> 
> Kuninori Morimoto (3):
>       rcar-hpbdma: add max transfer size
>       rcar-hpbdma: initialise plane information when halted
>       rcar-hpbdma: fixup channel busy check for double plane
> 
>  drivers/dma/sh/rcar-hpbdma.c |   10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> 
> Best regards
> ---
> Kuninori Morimoto


Best regards
---
Kuninori Morimoto

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/3] rcar-hpbdma: fixup patches for double plane
  2013-10-29  6:51 ` [PATCH 0/3] rcar-hpbdma: fixup patches for double plane Kuninori Morimoto
                     ` (4 preceding siblings ...)
  2013-11-12  2:16   ` Kuninori Morimoto
@ 2013-11-12  4:51   ` Vinod Koul
  5 siblings, 0 replies; 7+ messages in thread
From: Vinod Koul @ 2013-11-12  4:51 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Simon, Max Filippov, Magnus, linux-sh, Kuninori Morimoto, linux-kernel

On Mon, Oct 28, 2013 at 11:51:28PM -0700, Kuninori Morimoto wrote:
> 
> Hi Vinod
> Cc: Simon, Max
> 
> These patches fixup R-Car HBPDMA driver
> for double plane.
> 
> I tested these patches on my R-Car sound driver in local environment.
> It doesn't work without these patches.
Applied, thanks

--
~Vinod

> 
> Kuninori Morimoto (3):
>       rcar-hpbdma: add max transfer size
>       rcar-hpbdma: initialise plane information when halted
>       rcar-hpbdma: fixup channel busy check for double plane
> 
>  drivers/dma/sh/rcar-hpbdma.c |   10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> 
> Best regards
> ---
> Kuninori Morimoto

-- 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-11-12  5:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <87k3hc189h.wl%kuninori.morimoto.gx@renesas.com>
2013-10-29  6:51 ` [PATCH 0/3] rcar-hpbdma: fixup patches for double plane Kuninori Morimoto
2013-10-29  6:52   ` [PATCH 1/3] rcar-hpbdma: add max transfer size Kuninori Morimoto
2013-10-29  6:52   ` [PATCH 2/3] rcar-hpbdma: initialise plane information when halted Kuninori Morimoto
2013-10-29  6:52   ` [PATCH 3/3] rcar-hpbdma: fixup channel busy check for double plane Kuninori Morimoto
2013-10-29  7:08   ` [PATCH 0/3] rcar-hpbdma: fixup patches " Simon Horman
2013-11-12  2:16   ` Kuninori Morimoto
2013-11-12  4:51   ` 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).