From: Sekhar Nori <nsekhar@ti.com>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>,
dan.j.williams@intel.com, vinod.koul@intel.com
Cc: davinci-linux-open-source@linux.davincidsp.com, joelf@ti.com,
linux-kernel@vger.kernel.org, mporter@linaro.org,
dmaengine@vger.kernel.org, linux-omap@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 07/14] arm: common: edma: API to request non default queue for a channel
Date: Fri, 11 Apr 2014 14:13:31 +0530 [thread overview]
Message-ID: <5347AB33.8000606@ti.com> (raw)
In-Reply-To: <1396357575-30585-8-git-send-email-peter.ujfalusi@ti.com>
On Tuesday 01 April 2014 06:36 PM, Peter Ujfalusi wrote:
> When using eDMA3 via dmaengine all dma channels will use the default queue.
> Since during request time we do not have means to change this it need to be done
> later, before the DMA has been started.
> With the added function it is possible to move the channel to a non default
> queue if it is possible, otherwise (when only one EQ/TC is available for the CC)
> the default queue is going to be used.
> For example: For optimal system performance the audio (cyclic) DMA should
> be placed to a separate queue which is different than what the rest of the
> system is using.
>
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> ---
> arch/arm/common/edma.c | 27 +++++++++++++++++++++++++++
> include/linux/platform_data/edma.h | 2 ++
> 2 files changed, 29 insertions(+)
>
> diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c
> index be267b2080be..eaf6dd19f082 100644
> --- a/arch/arm/common/edma.c
> +++ b/arch/arm/common/edma.c
> @@ -712,6 +712,33 @@ int edma_alloc_channel(int channel,
> }
> EXPORT_SYMBOL(edma_alloc_channel);
>
> +/**
> + * edma_request_non_default_queue - try to map the channel to non default queue
> + * @channel: dma channel returned from edma_alloc_channel()
> + *
> + * For certain type of applications like audio it is preferred to not use the
> + * default event queue/tc to avoid eDMA caused latency.
> + *
> + * This function will iterate through the event queues available for the CC and
> + * picks the first EQ/TC which is not set as the default for the CC
> + */
> +void edma_request_non_default_queue(int channel)
> +{
> + unsigned ctlr = EDMA_CTLR(channel);
> + enum dma_event_q eventq_no = EVENTQ_DEFAULT;
> + int i;
> +
> + for (i = 0; i < edma_cc[ctlr]->num_tc; i++) {
> + if (i != edma_cc[ctlr]->default_queue) {
> + eventq_no = i;
> + break;
> + }
> + }
> +
> + channel = EDMA_CHAN_SLOT(channel);
> + map_dmach_queue(ctlr, channel, eventq_no);
> +}
> +EXPORT_SYMBOL(edma_request_non_default_queue);
With this API, the caller cannot be sure of what the final affect on the
channel will be. It depends a lot on what the default queue setting is.
And that can change independent of this API.
I am not an expert in dmaengine, but it looks like we are trying to
workaround the fact that dmaengine does not support multiple transfer
priorities for a dma_chan. If yes, it will be better to add support for
doing this in dmaengine core itself. A generic priority space could be
supported which each DMA device can then map to its hardware support.
Thanks,
Sekhar
WARNING: multiple messages have this Message-ID (diff)
From: nsekhar@ti.com (Sekhar Nori)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 07/14] arm: common: edma: API to request non default queue for a channel
Date: Fri, 11 Apr 2014 14:13:31 +0530 [thread overview]
Message-ID: <5347AB33.8000606@ti.com> (raw)
In-Reply-To: <1396357575-30585-8-git-send-email-peter.ujfalusi@ti.com>
On Tuesday 01 April 2014 06:36 PM, Peter Ujfalusi wrote:
> When using eDMA3 via dmaengine all dma channels will use the default queue.
> Since during request time we do not have means to change this it need to be done
> later, before the DMA has been started.
> With the added function it is possible to move the channel to a non default
> queue if it is possible, otherwise (when only one EQ/TC is available for the CC)
> the default queue is going to be used.
> For example: For optimal system performance the audio (cyclic) DMA should
> be placed to a separate queue which is different than what the rest of the
> system is using.
>
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> ---
> arch/arm/common/edma.c | 27 +++++++++++++++++++++++++++
> include/linux/platform_data/edma.h | 2 ++
> 2 files changed, 29 insertions(+)
>
> diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c
> index be267b2080be..eaf6dd19f082 100644
> --- a/arch/arm/common/edma.c
> +++ b/arch/arm/common/edma.c
> @@ -712,6 +712,33 @@ int edma_alloc_channel(int channel,
> }
> EXPORT_SYMBOL(edma_alloc_channel);
>
> +/**
> + * edma_request_non_default_queue - try to map the channel to non default queue
> + * @channel: dma channel returned from edma_alloc_channel()
> + *
> + * For certain type of applications like audio it is preferred to not use the
> + * default event queue/tc to avoid eDMA caused latency.
> + *
> + * This function will iterate through the event queues available for the CC and
> + * picks the first EQ/TC which is not set as the default for the CC
> + */
> +void edma_request_non_default_queue(int channel)
> +{
> + unsigned ctlr = EDMA_CTLR(channel);
> + enum dma_event_q eventq_no = EVENTQ_DEFAULT;
> + int i;
> +
> + for (i = 0; i < edma_cc[ctlr]->num_tc; i++) {
> + if (i != edma_cc[ctlr]->default_queue) {
> + eventq_no = i;
> + break;
> + }
> + }
> +
> + channel = EDMA_CHAN_SLOT(channel);
> + map_dmach_queue(ctlr, channel, eventq_no);
> +}
> +EXPORT_SYMBOL(edma_request_non_default_queue);
With this API, the caller cannot be sure of what the final affect on the
channel will be. It depends a lot on what the default queue setting is.
And that can change independent of this API.
I am not an expert in dmaengine, but it looks like we are trying to
workaround the fact that dmaengine does not support multiple transfer
priorities for a dma_chan. If yes, it will be better to add support for
doing this in dmaengine core itself. A generic priority space could be
supported which each DMA device can then map to its hardware support.
Thanks,
Sekhar
WARNING: multiple messages have this Message-ID (diff)
From: Sekhar Nori <nsekhar@ti.com>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>,
<dan.j.williams@intel.com>, <vinod.koul@intel.com>
Cc: <dmaengine@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<joelf@ti.com>, <linux-arm-kernel@lists.infradead.org>,
<linux-omap@vger.kernel.org>,
<davinci-linux-open-source@linux.davincidsp.com>,
<mporter@linaro.org>
Subject: Re: [PATCH v2 07/14] arm: common: edma: API to request non default queue for a channel
Date: Fri, 11 Apr 2014 14:13:31 +0530 [thread overview]
Message-ID: <5347AB33.8000606@ti.com> (raw)
In-Reply-To: <1396357575-30585-8-git-send-email-peter.ujfalusi@ti.com>
On Tuesday 01 April 2014 06:36 PM, Peter Ujfalusi wrote:
> When using eDMA3 via dmaengine all dma channels will use the default queue.
> Since during request time we do not have means to change this it need to be done
> later, before the DMA has been started.
> With the added function it is possible to move the channel to a non default
> queue if it is possible, otherwise (when only one EQ/TC is available for the CC)
> the default queue is going to be used.
> For example: For optimal system performance the audio (cyclic) DMA should
> be placed to a separate queue which is different than what the rest of the
> system is using.
>
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> ---
> arch/arm/common/edma.c | 27 +++++++++++++++++++++++++++
> include/linux/platform_data/edma.h | 2 ++
> 2 files changed, 29 insertions(+)
>
> diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c
> index be267b2080be..eaf6dd19f082 100644
> --- a/arch/arm/common/edma.c
> +++ b/arch/arm/common/edma.c
> @@ -712,6 +712,33 @@ int edma_alloc_channel(int channel,
> }
> EXPORT_SYMBOL(edma_alloc_channel);
>
> +/**
> + * edma_request_non_default_queue - try to map the channel to non default queue
> + * @channel: dma channel returned from edma_alloc_channel()
> + *
> + * For certain type of applications like audio it is preferred to not use the
> + * default event queue/tc to avoid eDMA caused latency.
> + *
> + * This function will iterate through the event queues available for the CC and
> + * picks the first EQ/TC which is not set as the default for the CC
> + */
> +void edma_request_non_default_queue(int channel)
> +{
> + unsigned ctlr = EDMA_CTLR(channel);
> + enum dma_event_q eventq_no = EVENTQ_DEFAULT;
> + int i;
> +
> + for (i = 0; i < edma_cc[ctlr]->num_tc; i++) {
> + if (i != edma_cc[ctlr]->default_queue) {
> + eventq_no = i;
> + break;
> + }
> + }
> +
> + channel = EDMA_CHAN_SLOT(channel);
> + map_dmach_queue(ctlr, channel, eventq_no);
> +}
> +EXPORT_SYMBOL(edma_request_non_default_queue);
With this API, the caller cannot be sure of what the final affect on the
channel will be. It depends a lot on what the default queue setting is.
And that can change independent of this API.
I am not an expert in dmaengine, but it looks like we are trying to
workaround the fact that dmaengine does not support multiple transfer
priorities for a dma_chan. If yes, it will be better to add support for
doing this in dmaengine core itself. A generic priority space could be
supported which each DMA device can then map to its hardware support.
Thanks,
Sekhar
next prev parent reply other threads:[~2014-04-11 8:43 UTC|newest]
Thread overview: 132+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-01 13:06 [PATCH v2 00/14] dma: edma: Fixes for cyclic (audio) operation Peter Ujfalusi
2014-04-01 13:06 ` Peter Ujfalusi
2014-04-01 13:06 ` Peter Ujfalusi
2014-04-01 13:06 ` [PATCH v2 02/14] dma: edma: Correct the handling of src/dst_maxburst == 0 Peter Ujfalusi
2014-04-01 13:06 ` Peter Ujfalusi
2014-04-01 13:06 ` Peter Ujfalusi
2014-04-01 13:06 ` [PATCH v2 04/14] dma: edma: Set DMA_CYCLIC capability flag Peter Ujfalusi
2014-04-01 13:06 ` Peter Ujfalusi
2014-04-01 13:06 ` Peter Ujfalusi
2014-04-01 13:06 ` [PATCH v2 05/14] arm: common: edma: Select event queue 1 as default when booted with DT Peter Ujfalusi
2014-04-01 13:06 ` Peter Ujfalusi
2014-04-01 13:06 ` Peter Ujfalusi
[not found] ` <1396357575-30585-6-git-send-email-peter.ujfalusi-l0cyMroinI0@public.gmane.org>
2014-04-10 16:23 ` Joel Fernandes
2014-04-10 16:23 ` Joel Fernandes
2014-04-10 16:23 ` Joel Fernandes
2014-04-11 8:17 ` Sekhar Nori
2014-04-11 8:17 ` Sekhar Nori
2014-04-11 8:17 ` Sekhar Nori
[not found] ` <5347A4FD.1030803-l0cyMroinI0@public.gmane.org>
2014-04-11 8:50 ` Peter Ujfalusi
2014-04-11 8:50 ` Peter Ujfalusi
2014-04-11 8:50 ` Peter Ujfalusi
[not found] ` <5347ACDE.7040407-l0cyMroinI0@public.gmane.org>
2014-04-11 8:56 ` Sekhar Nori
2014-04-11 8:56 ` Sekhar Nori
2014-04-11 8:56 ` Sekhar Nori
[not found] ` <5347AE49.5020109-l0cyMroinI0@public.gmane.org>
2014-04-11 9:38 ` Peter Ujfalusi
2014-04-11 9:38 ` Peter Ujfalusi
2014-04-11 9:38 ` Peter Ujfalusi
2014-04-11 9:42 ` Vinod Koul
2014-04-11 9:42 ` Vinod Koul
2014-04-11 9:42 ` Vinod Koul
[not found] ` <20140411094217.GA32284-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-04-11 10:19 ` Sekhar Nori
2014-04-11 10:19 ` Sekhar Nori
2014-04-11 10:19 ` Sekhar Nori
2014-04-11 11:32 ` Peter Ujfalusi
2014-04-11 11:32 ` Peter Ujfalusi
2014-04-11 11:32 ` Peter Ujfalusi
2014-04-11 11:31 ` Vinod Koul
2014-04-11 11:31 ` Vinod Koul
[not found] ` <20140411113154.GB32284-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-04-11 12:23 ` Peter Ujfalusi
2014-04-11 12:23 ` Peter Ujfalusi
2014-04-11 12:23 ` Peter Ujfalusi
2014-04-11 12:46 ` Vinod Koul
2014-04-11 12:46 ` Vinod Koul
2014-04-11 12:46 ` Vinod Koul
[not found] ` <20140411124641.GC32284-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-04-14 11:56 ` Peter Ujfalusi
2014-04-14 11:56 ` Peter Ujfalusi
2014-04-14 11:56 ` Peter Ujfalusi
[not found] ` <534BCCD3.9060805-l0cyMroinI0@public.gmane.org>
2014-04-14 12:12 ` Sekhar Nori
2014-04-14 12:12 ` Sekhar Nori
2014-04-14 12:12 ` Sekhar Nori
[not found] ` <534BD0B5.5000004-l0cyMroinI0@public.gmane.org>
2014-04-14 12:41 ` Peter Ujfalusi
2014-04-14 12:41 ` Peter Ujfalusi
2014-04-14 12:41 ` Peter Ujfalusi
[not found] ` <534BD788.3050406-l0cyMroinI0@public.gmane.org>
2014-04-14 14:32 ` Sekhar Nori
2014-04-14 14:32 ` Sekhar Nori
2014-04-14 14:32 ` Sekhar Nori
[not found] ` <534BF181.6060503-l0cyMroinI0@public.gmane.org>
2014-04-16 12:59 ` Peter Ujfalusi
2014-04-16 12:59 ` Peter Ujfalusi
2014-04-16 12:59 ` Peter Ujfalusi
[not found] ` <534E7EB0.9000601-l0cyMroinI0@public.gmane.org>
2014-04-16 16:05 ` Joel Fernandes
2014-04-16 16:05 ` Joel Fernandes
2014-04-16 16:05 ` Joel Fernandes
[not found] ` <534EAA49.7030702-l0cyMroinI0@public.gmane.org>
2014-04-24 9:07 ` Peter Ujfalusi
2014-04-24 9:07 ` Peter Ujfalusi
2014-04-24 9:07 ` Peter Ujfalusi
2014-04-11 20:16 ` Joel Fernandes
2014-04-11 20:16 ` Joel Fernandes
2014-04-11 20:16 ` Joel Fernandes
[not found] ` <1396357575-30585-1-git-send-email-peter.ujfalusi-l0cyMroinI0@public.gmane.org>
2014-04-01 13:06 ` [PATCH v2 01/14] platform_data: edma: Be precise with the paRAM struct Peter Ujfalusi
2014-04-01 13:06 ` Peter Ujfalusi
2014-04-01 13:06 ` Peter Ujfalusi
2014-04-01 13:06 ` [PATCH v2 03/14] dma: edma: Add support for DMA_PAUSE/RESUME operation Peter Ujfalusi
2014-04-01 13:06 ` Peter Ujfalusi
2014-04-01 13:06 ` Peter Ujfalusi
2014-04-11 16:43 ` Vinod Koul
2014-04-11 16:43 ` Vinod Koul
[not found] ` <20140411164327.GD32284-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-04-11 20:51 ` Joel Fernandes
2014-04-11 20:51 ` Joel Fernandes
2014-04-11 20:51 ` Joel Fernandes
2014-04-01 13:06 ` [PATCH v2 06/14] arm: common: edma: Save the number of event queues/TCs Peter Ujfalusi
2014-04-01 13:06 ` Peter Ujfalusi
2014-04-01 13:06 ` Peter Ujfalusi
2014-04-01 13:06 ` [PATCH v2 07/14] arm: common: edma: API to request non default queue for a channel Peter Ujfalusi
2014-04-01 13:06 ` Peter Ujfalusi
2014-04-01 13:06 ` Peter Ujfalusi
2014-04-11 8:43 ` Sekhar Nori [this message]
2014-04-11 8:43 ` Sekhar Nori
2014-04-11 8:43 ` Sekhar Nori
2014-04-01 13:06 ` [PATCH v2 08/14] DMA: edma: Use different eventq for cyclic channels Peter Ujfalusi
2014-04-01 13:06 ` Peter Ujfalusi
2014-04-01 13:06 ` Peter Ujfalusi
[not found] ` <1396357575-30585-9-git-send-email-peter.ujfalusi-l0cyMroinI0@public.gmane.org>
2014-04-10 16:36 ` Joel Fernandes
2014-04-10 16:36 ` Joel Fernandes
2014-04-10 16:36 ` Joel Fernandes
[not found] ` <5346C88E.8010504-l0cyMroinI0@public.gmane.org>
2014-04-11 16:47 ` Vinod Koul
2014-04-11 16:47 ` Vinod Koul
2014-04-11 16:47 ` Vinod Koul
[not found] ` <20140411164755.GE32284-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-04-11 20:56 ` Joel Fernandes
2014-04-11 20:56 ` Joel Fernandes
2014-04-11 20:56 ` Joel Fernandes
2014-04-01 13:06 ` [PATCH v2 09/14] dma: edma: Implement device_slave_caps callback Peter Ujfalusi
2014-04-01 13:06 ` Peter Ujfalusi
2014-04-01 13:06 ` Peter Ujfalusi
2014-04-01 13:06 ` [PATCH v2 10/14] dma: edma: Simplify direction configuration in edma_config_pset() Peter Ujfalusi
2014-04-01 13:06 ` Peter Ujfalusi
2014-04-01 13:06 ` Peter Ujfalusi
2014-04-10 22:40 ` Joel Fernandes
2014-04-10 22:40 ` Joel Fernandes
2014-04-10 22:40 ` Joel Fernandes
[not found] ` <53471DC5.4090001-l0cyMroinI0@public.gmane.org>
2014-04-11 6:39 ` Peter Ujfalusi
2014-04-11 6:39 ` Peter Ujfalusi
2014-04-11 6:39 ` Peter Ujfalusi
[not found] ` <53478E0E.8040709-l0cyMroinI0@public.gmane.org>
2014-04-11 19:57 ` Joel Fernandes
2014-04-11 19:57 ` Joel Fernandes
2014-04-11 19:57 ` Joel Fernandes
2014-04-10 22:52 ` [PATCH v2 00/14] dma: edma: Fixes for cyclic (audio) operation Joel Fernandes
2014-04-10 22:52 ` Joel Fernandes
2014-04-10 22:52 ` Joel Fernandes
2014-04-01 13:06 ` [PATCH v2 11/14] dma: edma: Reduce debug print verbosity for non verbose debugging Peter Ujfalusi
2014-04-01 13:06 ` Peter Ujfalusi
2014-04-01 13:06 ` Peter Ujfalusi
2014-04-01 13:06 ` [PATCH v2 12/14] dma: edma: Prefix debug prints where the text were identical in prep callbacks Peter Ujfalusi
2014-04-01 13:06 ` Peter Ujfalusi
2014-04-01 13:06 ` Peter Ujfalusi
2014-04-01 13:06 ` [PATCH v2 13/14] dma: edma: Add channel number to debug prints Peter Ujfalusi
2014-04-01 13:06 ` Peter Ujfalusi
2014-04-01 13:06 ` Peter Ujfalusi
2014-04-01 13:06 ` [PATCH v2 14/14] dma: edma: Print the direction value as well when it is not supported Peter Ujfalusi
2014-04-01 13:06 ` Peter Ujfalusi
2014-04-01 13:06 ` Peter Ujfalusi
2014-04-11 16:52 ` [PATCH v2 00/14] dma: edma: Fixes for cyclic (audio) operation Vinod Koul
2014-04-11 16:52 ` 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=5347AB33.8000606@ti.com \
--to=nsekhar@ti.com \
--cc=dan.j.williams@intel.com \
--cc=davinci-linux-open-source@linux.davincidsp.com \
--cc=dmaengine@vger.kernel.org \
--cc=joelf@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=mporter@linaro.org \
--cc=peter.ujfalusi@ti.com \
--cc=vinod.koul@intel.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.