All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi-l0cyMroinI0@public.gmane.org>
To: Joel Fernandes <joelf-l0cyMroinI0@public.gmane.org>,
	Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
Cc: "davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org"
	<davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org>,
	"Koul,
	 Vinod" <vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Dan Williams
	<dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	linux-omap <linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [PATCH v3 01/10] platform_data: edma: Be precise with the paRAM struct
Date: Wed, 28 May 2014 13:31:48 +0300	[thread overview]
Message-ID: <5385BB14.9010804@ti.com> (raw)
In-Reply-To: <5384A92B.4080606-l0cyMroinI0@public.gmane.org>

On 05/27/2014 06:03 PM, Joel Fernandes wrote:
> On 05/27/2014 05:22 AM, Peter Ujfalusi wrote:
>> On 05/27/2014 12:32 AM, Olof Johansson wrote:
> [..]
>>>
>>> I came across this patch when I was looking at a pull request from
>>> Sekhar for EDMA cleanups, and it made me look closer at the contents
>>> of this file.
>>>
>>> The include/linux/platform_data/ directory is meant to hold
>>> platform_data definitions for drivers, and nothing more.
>>> platform_data/edma.h also contains a whole bunch of interface
>>> definitions for the driver. They do not belong there, and should be
>>> moved to a different include file.
>>>
>>> That also includes the above struct, because as far as I can tell it's
>>> a runtime state structure, not something that is passed in with
>>> platform data.
>>>
>>> Can someone please clean this up? Thanks.
>>
>> I think Joel is working on to move/merge the code from arch/arm/common/edma.c
>> to drivers/dma/edma.c
> 
> Yes, I am planning to work on that soon. But there is an issue, more on
> that discussed below..
> 
>> I'm sure within this work he is going to clean up the header file as well.
> 
> Agreed. The private API should not be expored in any header and should
> be exclusive for the EDMA dmaengine driver ideally.
> 
>> As a first step I think the non platform_data content can be moved as
>> include/linux/edma.h or probably as ti-edma.h?
>>
> 
> sound/soc/davinci/davinci-pcm.c: This still uses the EDMA private API in
> arch/arm/common/edma.c. Peter, any idea when the private usage will be
> removed fully, and we switch to dmaengine for ASoC? Before that can
> happen, we can't clean up or do any merges.

We have the edma-pcm platform driver upstream already which I'm using locally
for a long time now on AM335x/AM437x. I'm planning to send a patch to do the
same upstream after the 3.16 window closes.
But, davinci-pcm has a mode called 'ping-pong' which is not available via
dmaengine and this mode is used by several daVinci SoCs to overcome buffer
underflow/overflow issues. This mode essentially means in playback case:
      dma_ch1       dma_ch2
SDRAM -------> SRAM -------> McASP

ch1 is to move a block of samples to SRAM from where ch2 will copy the samples
word by word to McASP.

If we move all davinci SoCs to use the edma-pcm, we are going to loose this
mode. As a note: the edma-pcm is confirmed to work fine on the tested daVinci
boards.
I think what we need to do first: find a board which is using ping-pong mode,
put under stress test in:
- davinci-pcm, ping-pong mode
- davinci-pcm, no ping-pong mode
- edma-pcm

and see how edma-pcm behaves compared to the davinci-pcm. One of the issue
with davinci-pcm is that in non ping-pong mode it reconfigures the eDMA after
every period, which is a bad thing. The dmaengine implementation does not need
to do that, so we might be fine there.

> What I'd like to do is fold the private API into the dmaengine driver
> and eliminate the need to expose the private API, thus also getting rid
> of the interface declarations Olof referred to.
> 
> thanks,
> 
> -Joel
> 


-- 
Péter
_______________________________________________
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

WARNING: multiple messages have this Message-ID (diff)
From: peter.ujfalusi@ti.com (Peter Ujfalusi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 01/10] platform_data: edma: Be precise with the paRAM struct
Date: Wed, 28 May 2014 13:31:48 +0300	[thread overview]
Message-ID: <5385BB14.9010804@ti.com> (raw)
In-Reply-To: <5384A92B.4080606@ti.com>

On 05/27/2014 06:03 PM, Joel Fernandes wrote:
> On 05/27/2014 05:22 AM, Peter Ujfalusi wrote:
>> On 05/27/2014 12:32 AM, Olof Johansson wrote:
> [..]
>>>
>>> I came across this patch when I was looking at a pull request from
>>> Sekhar for EDMA cleanups, and it made me look closer at the contents
>>> of this file.
>>>
>>> The include/linux/platform_data/ directory is meant to hold
>>> platform_data definitions for drivers, and nothing more.
>>> platform_data/edma.h also contains a whole bunch of interface
>>> definitions for the driver. They do not belong there, and should be
>>> moved to a different include file.
>>>
>>> That also includes the above struct, because as far as I can tell it's
>>> a runtime state structure, not something that is passed in with
>>> platform data.
>>>
>>> Can someone please clean this up? Thanks.
>>
>> I think Joel is working on to move/merge the code from arch/arm/common/edma.c
>> to drivers/dma/edma.c
> 
> Yes, I am planning to work on that soon. But there is an issue, more on
> that discussed below..
> 
>> I'm sure within this work he is going to clean up the header file as well.
> 
> Agreed. The private API should not be expored in any header and should
> be exclusive for the EDMA dmaengine driver ideally.
> 
>> As a first step I think the non platform_data content can be moved as
>> include/linux/edma.h or probably as ti-edma.h?
>>
> 
> sound/soc/davinci/davinci-pcm.c: This still uses the EDMA private API in
> arch/arm/common/edma.c. Peter, any idea when the private usage will be
> removed fully, and we switch to dmaengine for ASoC? Before that can
> happen, we can't clean up or do any merges.

We have the edma-pcm platform driver upstream already which I'm using locally
for a long time now on AM335x/AM437x. I'm planning to send a patch to do the
same upstream after the 3.16 window closes.
But, davinci-pcm has a mode called 'ping-pong' which is not available via
dmaengine and this mode is used by several daVinci SoCs to overcome buffer
underflow/overflow issues. This mode essentially means in playback case:
      dma_ch1       dma_ch2
SDRAM -------> SRAM -------> McASP

ch1 is to move a block of samples to SRAM from where ch2 will copy the samples
word by word to McASP.

If we move all davinci SoCs to use the edma-pcm, we are going to loose this
mode. As a note: the edma-pcm is confirmed to work fine on the tested daVinci
boards.
I think what we need to do first: find a board which is using ping-pong mode,
put under stress test in:
- davinci-pcm, ping-pong mode
- davinci-pcm, no ping-pong mode
- edma-pcm

and see how edma-pcm behaves compared to the davinci-pcm. One of the issue
with davinci-pcm is that in non ping-pong mode it reconfigures the eDMA after
every period, which is a bad thing. The dmaengine implementation does not need
to do that, so we might be fine there.

> What I'd like to do is fold the private API into the dmaengine driver
> and eliminate the need to expose the private API, thus also getting rid
> of the interface declarations Olof referred to.
> 
> thanks,
> 
> -Joel
> 


-- 
P?ter

WARNING: multiple messages have this Message-ID (diff)
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Joel Fernandes <joelf@ti.com>, Olof Johansson <olof@lixom.net>
Cc: Dan Williams <dan.j.williams@intel.com>,
	"Koul, Vinod" <vinod.koul@intel.com>,
	Sekhar Nori <nsekhar@ti.com>,
	"dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	linux-omap <linux-omap@vger.kernel.org>,
	"davinci-linux-open-source@linux.davincidsp.com" 
	<davinci-linux-open-source@linux.davincidsp.com>
Subject: Re: [PATCH v3 01/10] platform_data: edma: Be precise with the paRAM struct
Date: Wed, 28 May 2014 13:31:48 +0300	[thread overview]
Message-ID: <5385BB14.9010804@ti.com> (raw)
In-Reply-To: <5384A92B.4080606@ti.com>

On 05/27/2014 06:03 PM, Joel Fernandes wrote:
> On 05/27/2014 05:22 AM, Peter Ujfalusi wrote:
>> On 05/27/2014 12:32 AM, Olof Johansson wrote:
> [..]
>>>
>>> I came across this patch when I was looking at a pull request from
>>> Sekhar for EDMA cleanups, and it made me look closer at the contents
>>> of this file.
>>>
>>> The include/linux/platform_data/ directory is meant to hold
>>> platform_data definitions for drivers, and nothing more.
>>> platform_data/edma.h also contains a whole bunch of interface
>>> definitions for the driver. They do not belong there, and should be
>>> moved to a different include file.
>>>
>>> That also includes the above struct, because as far as I can tell it's
>>> a runtime state structure, not something that is passed in with
>>> platform data.
>>>
>>> Can someone please clean this up? Thanks.
>>
>> I think Joel is working on to move/merge the code from arch/arm/common/edma.c
>> to drivers/dma/edma.c
> 
> Yes, I am planning to work on that soon. But there is an issue, more on
> that discussed below..
> 
>> I'm sure within this work he is going to clean up the header file as well.
> 
> Agreed. The private API should not be expored in any header and should
> be exclusive for the EDMA dmaengine driver ideally.
> 
>> As a first step I think the non platform_data content can be moved as
>> include/linux/edma.h or probably as ti-edma.h?
>>
> 
> sound/soc/davinci/davinci-pcm.c: This still uses the EDMA private API in
> arch/arm/common/edma.c. Peter, any idea when the private usage will be
> removed fully, and we switch to dmaengine for ASoC? Before that can
> happen, we can't clean up or do any merges.

We have the edma-pcm platform driver upstream already which I'm using locally
for a long time now on AM335x/AM437x. I'm planning to send a patch to do the
same upstream after the 3.16 window closes.
But, davinci-pcm has a mode called 'ping-pong' which is not available via
dmaengine and this mode is used by several daVinci SoCs to overcome buffer
underflow/overflow issues. This mode essentially means in playback case:
      dma_ch1       dma_ch2
SDRAM -------> SRAM -------> McASP

ch1 is to move a block of samples to SRAM from where ch2 will copy the samples
word by word to McASP.

If we move all davinci SoCs to use the edma-pcm, we are going to loose this
mode. As a note: the edma-pcm is confirmed to work fine on the tested daVinci
boards.
I think what we need to do first: find a board which is using ping-pong mode,
put under stress test in:
- davinci-pcm, ping-pong mode
- davinci-pcm, no ping-pong mode
- edma-pcm

and see how edma-pcm behaves compared to the davinci-pcm. One of the issue
with davinci-pcm is that in non ping-pong mode it reconfigures the eDMA after
every period, which is a bad thing. The dmaengine implementation does not need
to do that, so we might be fine there.

> What I'd like to do is fold the private API into the dmaengine driver
> and eliminate the need to expose the private API, thus also getting rid
> of the interface declarations Olof referred to.
> 
> thanks,
> 
> -Joel
> 


-- 
Péter

  parent reply	other threads:[~2014-05-28 10:31 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-14 11:41 [PATCH v3 00/10] dma: edma: Fixes for cyclic (audio) operation Peter Ujfalusi
2014-04-14 11:41 ` Peter Ujfalusi
2014-04-14 11:41 ` Peter Ujfalusi
2014-04-14 11:41 ` [PATCH v3 01/10] platform_data: edma: Be precise with the paRAM struct Peter Ujfalusi
2014-04-14 11:41   ` Peter Ujfalusi
2014-04-14 11:41   ` Peter Ujfalusi
2014-05-26 21:32   ` Olof Johansson
2014-05-26 21:32     ` Olof Johansson
     [not found]     ` <CAOesGMg43jT6D_ot2tKfRXXgAgwqs5Pu_tAFKc35yxLAczrzGQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-27 10:22       ` Peter Ujfalusi
2014-05-27 10:22         ` Peter Ujfalusi
2014-05-27 10:22         ` Peter Ujfalusi
     [not found]         ` <53846779.4070204-l0cyMroinI0@public.gmane.org>
2014-05-27 15:03           ` Joel Fernandes
2014-05-27 15:03             ` Joel Fernandes
2014-05-27 15:03             ` Joel Fernandes
     [not found]             ` <5384A92B.4080606-l0cyMroinI0@public.gmane.org>
2014-05-28 10:31               ` Peter Ujfalusi [this message]
2014-05-28 10:31                 ` Peter Ujfalusi
2014-05-28 10:31                 ` Peter Ujfalusi
2014-04-14 11:41 ` [PATCH v3 02/10] arm: common: edma: Save the number of event queues/TCs Peter Ujfalusi
2014-04-14 11:41   ` Peter Ujfalusi
2014-04-14 11:41   ` Peter Ujfalusi
2014-04-14 11:41 ` [PATCH v3 03/10] dmaengine: edma: Correct the handling of src/dst_maxburst == 0 Peter Ujfalusi
2014-04-14 11:41   ` Peter Ujfalusi
2014-04-14 11:41   ` Peter Ujfalusi
2014-04-14 11:41 ` [PATCH v3 04/10] dmaengine: edma: Add support for DMA_PAUSE/RESUME operation Peter Ujfalusi
2014-04-14 11:41   ` Peter Ujfalusi
2014-04-14 11:41   ` Peter Ujfalusi
2014-04-14 11:42 ` [PATCH v3 05/10] dmaengine: edma: Set DMA_CYCLIC capability flag Peter Ujfalusi
2014-04-14 11:42   ` Peter Ujfalusi
2014-04-14 11:42   ` Peter Ujfalusi
2014-04-14 11:42 ` [PATCH v3 06/10] dmaengine: edma: Implement device_slave_caps callback Peter Ujfalusi
2014-04-14 11:42   ` Peter Ujfalusi
2014-04-14 11:42   ` Peter Ujfalusi
2014-04-14 11:42 ` [PATCH v3 07/10] dmaengine: edma: Reduce debug print verbosity for non verbose debugging Peter Ujfalusi
2014-04-14 11:42   ` Peter Ujfalusi
2014-04-14 11:42   ` Peter Ujfalusi
2014-04-14 11:42 ` [PATCH v3 08/10] dmaengine: edma: Prefix debug prints where the text were identical in prep callbacks Peter Ujfalusi
2014-04-14 11:42   ` Peter Ujfalusi
2014-04-14 11:42   ` Peter Ujfalusi
2014-04-14 11:42 ` [PATCH v3 09/10] dmaengine: edma: Add channel number to debug prints Peter Ujfalusi
2014-04-14 11:42   ` Peter Ujfalusi
2014-04-14 11:42   ` Peter Ujfalusi
     [not found]   ` <1397475725-5036-10-git-send-email-peter.ujfalusi-l0cyMroinI0@public.gmane.org>
2014-04-22 16:02     ` Vinod Koul
2014-04-22 16:02       ` Vinod Koul
2014-04-22 16:02       ` Vinod Koul
2014-04-14 11:42 ` [PATCH v3 10/10] dmaengine: edma: Print the direction value as well when it is not supported Peter Ujfalusi
2014-04-14 11:42   ` Peter Ujfalusi
2014-04-14 11:42   ` Peter Ujfalusi
2014-04-16 18:11 ` [PATCH v3 00/10] dma: edma: Fixes for cyclic (audio) operation Joel Fernandes
2014-04-16 18:11   ` Joel Fernandes
2014-04-16 18:11   ` Joel Fernandes
     [not found] ` <1397475725-5036-1-git-send-email-peter.ujfalusi-l0cyMroinI0@public.gmane.org>
2014-04-21 16:54   ` Joel Fernandes
2014-04-21 16:54     ` Joel Fernandes
2014-04-21 16:54     ` Joel Fernandes
2014-04-22 16:03   ` Vinod Koul
2014-04-22 16:03     ` Vinod Koul
2014-04-22 16:03     ` Vinod Koul

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=5385BB14.9010804@ti.com \
    --to=peter.ujfalusi-l0cymroini0@public.gmane.org \
    --cc=dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org \
    --cc=dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=joelf-l0cyMroinI0@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
    --cc=vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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 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.