From: Vinod Koul <vinod.koul@intel.com>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Sekhar Nori <nsekhar@ti.com>,
dan.j.williams@intel.com, 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, Mark Brown <broonie@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Liam Girdwood <lgirdwood@gmail.com>, Takashi Iwai <tiwai@suse.de>
Subject: Re: [PATCH v2 05/14] arm: common: edma: Select event queue 1 as default when booted with DT
Date: Fri, 11 Apr 2014 17:01:54 +0530 [thread overview]
Message-ID: <20140411113154.GB32284@intel.com> (raw)
In-Reply-To: <5347D2CC.4030407@ti.com>
On Fri, Apr 11, 2014 at 02:32:28PM +0300, Peter Ujfalusi wrote:
> Hi Vinod,
>
> On 04/11/2014 12:42 PM, Vinod Koul wrote:
> > On Fri, Apr 11, 2014 at 12:38:00PM +0300, Peter Ujfalusi wrote:
> >> On 04/11/2014 11:56 AM, Sekhar Nori wrote:
> >>> On Friday 11 April 2014 02:20 PM, Peter Ujfalusi wrote:
> >>>> On 04/11/2014 11:17 AM, Sekhar Nori wrote:
> >>>>> On Tuesday 01 April 2014 06:36 PM, Peter Ujfalusi wrote:
> >>>>>> Use the EVENTQ_1 for default and leave the EVENTQ_0 to be used by high
> >>>>>> priority channels, like audio.
> >>>>>>
> >>>>>> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> >>>>>
> >>>>> Acked-by: Sekhar Nori <nsekhar@ti.com>
> >>>>>
> >>>>>> ---
> >>>>>> arch/arm/common/edma.c | 3 ++-
> >>>>>> 1 file changed, 2 insertions(+), 1 deletion(-)
> >>>>>>
> >>>>>> diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c
> >>>>>> index 86a8b263278f..19520e2519d9 100644
> >>>>>> --- a/arch/arm/common/edma.c
> >>>>>> +++ b/arch/arm/common/edma.c
> >>>>>> @@ -1546,7 +1546,8 @@ static int edma_of_parse_dt(struct device *dev,
> >>>>>>
> >>>>>> pdata->queue_priority_mapping = queue_priority_map;
> >>>>>>
> >>>>>> - pdata->default_queue = 0;
> >>>>>> + /* select queue 1 as default */
> >>>>>
> >>>>> It will be nice to expand the comment with explanation of why this is
> >>>>> being chosen as default (lower priority queue by default for typical
> >>>>> bulk data transfer).
> >>>>
> >>>> Yes, extended comment is a good idea.
> >>>>
> >>>> For the next version I think I'm going to change the code around default
> >>>> TC/Queue and the non default queue selection, mostly based on Joel's comment:
> >>>>
> >>>> EVENTQ_1 as default queue.
> >>>> Set the EVENTQ_1 priority to 7
> >>>> EVENTQ_0 priority is going to stay 0 and EVENTQ_2 as 2
> >>>>
> >>>> Add new member to struct edma, like high_pri_queue.
> >>>> When we set the queue priorities in edma_probe() we look for the highest
> >>>> priority queue and save the number in high_pri_queue.
> >>>>
> >>>> I will rename the edma_request_non_default_queue() to
> >>>> edma_request_high_pri_queue() and it will assign the channel to the high
> >>>> priority queue.
> >>>>
> >>>> I think this way it is going to be more explicit and IMHO a bit more safer in
> >>>> a sense the we are going to get high priority when we ask for it.
> >>>
> >>> Sounds much better. I had posted some ideas about adding support for
> >>> channel priority in the core code but we can leave that for Vinod and
> >>> Dan to say if they really see a need for that.
> > Is it part of this series?
>
> No, it is not. The original series tackled the DMA queue selection within the
> edma driver stack. It was selecting high priority channel for cyclic (audio)
> use only, all other DMA channels were executed on a lower priority queue.
>
> >> If we do it via the dmaengine core I think it would be better to have a new
> >> flag to be passed to dmaengine_prep_dma_*().
> >> We could have for example:
> >> DMA_PREP_HIGH_PRI as flag to indicate that we need high priority DMA if it is
> >> possible.
> >> We can watch for this flag in the edma driver and act accordingly.
> >> ALSA's dmaengine_pcm_prepare_and_submit() could set this flag unconditionally
> >> since audio should be treated in this way if the DMA IP can do this.
> >
> > Will the priority be different for each descriptor or would be based on channel
> > usage.
>
> I would say that it is channel based config. I don't see the reason why would
> one mix different priorities on a configured channel between descriptors.
>
> > If not then we can add this in dma_slave_config ?
>
> So adding to the struct for example:
> bool high_priority;
In designware controller, we can have channel priorties from 0 to 7 which IIRC 7
being highest. So bool wont work. unsigned int/u8 would be good. How about your
controller, is it binary?
--
~Vinod
>
> I'm not sure if it helps if we have let's say three priority level like, low,
> normal and high.
> I don't think that any client would ask for low priority instead using the
> normal priority.
>
> > I can forsee its usage on slave controllers, so yes its useful :)
>
> True I'm sure it is going to be used as soon as it is available if the HW
> supports priorities.
>
> --
> Péter
--
next prev parent reply other threads:[~2014-04-11 11:31 UTC|newest]
Thread overview: 45+ 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
[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 ` [PATCH v2 03/14] dma: edma: Add support for DMA_PAUSE/RESUME operation Peter Ujfalusi
2014-04-11 16:43 ` Vinod Koul
[not found] ` <20140411164327.GD32284-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
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 ` [PATCH v2 07/14] arm: common: edma: API to request non default queue for a channel Peter Ujfalusi
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
[not found] ` <1396357575-30585-9-git-send-email-peter.ujfalusi-l0cyMroinI0@public.gmane.org>
2014-04-10 16:36 ` Joel Fernandes
[not found] ` <5346C88E.8010504-l0cyMroinI0@public.gmane.org>
2014-04-11 16:47 ` Vinod Koul
[not found] ` <20140411164755.GE32284-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
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 ` [PATCH v2 10/14] dma: edma: Simplify direction configuration in edma_config_pset() Peter Ujfalusi
2014-04-10 22:40 ` Joel Fernandes
[not found] ` <53471DC5.4090001-l0cyMroinI0@public.gmane.org>
2014-04-11 6:39 ` Peter Ujfalusi
[not found] ` <53478E0E.8040709-l0cyMroinI0@public.gmane.org>
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-01 13:06 ` [PATCH v2 02/14] dma: edma: Correct the handling of src/dst_maxburst == 0 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 ` [PATCH v2 05/14] arm: common: edma: Select event queue 1 as default when booted with DT 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-11 8:17 ` Sekhar Nori
[not found] ` <5347A4FD.1030803-l0cyMroinI0@public.gmane.org>
2014-04-11 8:50 ` Peter Ujfalusi
[not found] ` <5347ACDE.7040407-l0cyMroinI0@public.gmane.org>
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:42 ` Vinod Koul
[not found] ` <20140411094217.GA32284-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-04-11 10:19 ` Sekhar Nori
2014-04-11 11:32 ` Peter Ujfalusi
2014-04-11 11:31 ` Vinod Koul [this message]
[not found] ` <20140411113154.GB32284-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-04-11 12:23 ` Peter Ujfalusi
2014-04-11 12:46 ` Vinod Koul
[not found] ` <20140411124641.GC32284-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-04-14 11:56 ` Peter Ujfalusi
[not found] ` <534BCCD3.9060805-l0cyMroinI0@public.gmane.org>
2014-04-14 12:12 ` Sekhar Nori
[not found] ` <534BD0B5.5000004-l0cyMroinI0@public.gmane.org>
2014-04-14 12:41 ` Peter Ujfalusi
[not found] ` <534BD788.3050406-l0cyMroinI0@public.gmane.org>
2014-04-14 14:32 ` Sekhar Nori
[not found] ` <534BF181.6060503-l0cyMroinI0@public.gmane.org>
2014-04-16 12:59 ` Peter Ujfalusi
[not found] ` <534E7EB0.9000601-l0cyMroinI0@public.gmane.org>
2014-04-16 16:05 ` Joel Fernandes
[not found] ` <534EAA49.7030702-l0cyMroinI0@public.gmane.org>
2014-04-24 9:07 ` Peter Ujfalusi
2014-04-11 20:16 ` 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 ` [PATCH v2 12/14] dma: edma: Prefix debug prints where the text were identical in prep callbacks 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 ` [PATCH v2 14/14] dma: edma: Print the direction value as well when it is not supported Peter Ujfalusi
2014-04-11 16:52 ` [PATCH v2 00/14] dma: edma: Fixes for cyclic (audio) operation 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=20140411113154.GB32284@intel.com \
--to=vinod.koul@intel.com \
--cc=broonie@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=davinci-linux-open-source@linux.davincidsp.com \
--cc=dmaengine@vger.kernel.org \
--cc=joelf@ti.com \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.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=nsekhar@ti.com \
--cc=peter.ujfalusi@ti.com \
--cc=tiwai@suse.de \
/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).