From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: nsekhar@ti.com, joelf@ti.com, vinod.koul@intel.com
Cc: linux@arm.linux.org.uk, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org,
davinci-linux-open-source@linux.davincidsp.com,
dmaengine@vger.kernel.org
Subject: [PATCH 3/3] dma: edma: Serve cyclic (audio) channels with high priority queue
Date: Tue, 8 Jul 2014 13:46:38 +0300 [thread overview]
Message-ID: <1404816398-12338-4-git-send-email-peter.ujfalusi@ti.com> (raw)
In-Reply-To: <1404816398-12338-1-git-send-email-peter.ujfalusi@ti.com>
Move the DMA channel used in cyclic mode (audio) to the highest priority
event queue which helps to reduce audio problems.
When the channel is terminated, move it back to the default queue.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
drivers/dma/edma.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
index b512caf46944..fe55f78ea137 100644
--- a/drivers/dma/edma.c
+++ b/drivers/dma/edma.c
@@ -256,8 +256,13 @@ static int edma_terminate_all(struct edma_chan *echan)
* echan->edesc is NULL and exit.)
*/
if (echan->edesc) {
+ int cyclic = echan->edesc->cyclic;
echan->edesc = NULL;
edma_stop(echan->ch_num);
+ /* Move the cyclic channel back to default queue */
+ if (cyclic)
+ edma_assign_channel_eventq(echan->ch_num,
+ EVENTQ_DEFAULT);
}
vchan_get_all_descriptors(&echan->vchan, &head);
@@ -724,6 +729,9 @@ static struct dma_async_tx_descriptor *edma_prep_dma_cyclic(
edesc->pset[i].param.opt |= TCINTEN;
}
+ /* Place the cyclic channel to highest priority queue */
+ edma_assign_channel_eventq(echan->ch_num, EVENTQ_0);
+
return vchan_tx_prep(&echan->vchan, &edesc->vdesc, tx_flags);
}
--
2.0.0
next prev parent reply other threads:[~2014-07-08 10:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-08 10:46 [PATCH 0/3] ARM/dma: edma: Serve cyclic clients via high priority queue Peter Ujfalusi
2014-07-08 10:46 ` [PATCH 2/3] ARM: edma: Add edma_assign_channel_eventq() to move channel to a give queue Peter Ujfalusi
2014-07-08 10:46 ` Peter Ujfalusi [this message]
[not found] ` <1404816398-12338-1-git-send-email-peter.ujfalusi-l0cyMroinI0@public.gmane.org>
2014-07-08 10:46 ` [PATCH 1/3] ARM: edma: Set default queue to lowest priority Peter Ujfalusi
2014-07-28 6:12 ` [PATCH 0/3] ARM/dma: edma: Serve cyclic clients via high priority queue Peter Ujfalusi
[not found] ` <53D5E9CF.10706-l0cyMroinI0@public.gmane.org>
2014-07-28 6:32 ` Sekhar Nori
2014-07-28 11:34 ` 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=1404816398-12338-4-git-send-email-peter.ujfalusi@ti.com \
--to=peter.ujfalusi@ti.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=linux@arm.linux.org.uk \
--cc=nsekhar@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox