From: Nicolin Chen <nicoleotsuka@gmail.com>
To: vinod.koul@intel.com, jonathanh@nvidia.com
Cc: linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org,
dmaengine@vger.kernel.org, gnurou@gmail.com,
thierry.reding@gmail.com, swarren@wwwdotorg.org,
ldewangan@nvidia.com
Subject: [PATCH v3 1/2] dmaengine: tegra210-adma: Add pre-check for cyclic callback
Date: Tue, 6 Sep 2016 11:42:01 -0700 [thread overview]
Message-ID: <75bbbd9f20e0ead30760f47f0fd2ee9b05d49254.1473186743.git.nicoleotsuka@gmail.com> (raw)
In-Reply-To: <cover.1473186743.git.nicoleotsuka@gmail.com>
In-Reply-To: <cover.1473186743.git.nicoleotsuka@gmail.com>
ADMA driver will support more than cyclic type of transaction.
So this patch limit the cyclic callback for the cyclic type
only in order to support other types.
Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
---
drivers/dma/tegra210-adma.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/dma/tegra210-adma.c b/drivers/dma/tegra210-adma.c
index 09b46f7..5b5d298 100644
--- a/drivers/dma/tegra210-adma.c
+++ b/drivers/dma/tegra210-adma.c
@@ -111,6 +111,7 @@ struct tegra_adma_desc {
size_t buf_len;
size_t period_len;
size_t num_periods;
+ bool cyclic;
};
/*
@@ -408,7 +409,8 @@ static irqreturn_t tegra_adma_isr(int irq, void *dev_id)
return IRQ_NONE;
}
- vchan_cyclic_callback(&tdc->desc->vd);
+ if (tdc->desc->cyclic)
+ vchan_cyclic_callback(&tdc->desc->vd);
spin_unlock_irqrestore(&tdc->vc.lock, flags);
@@ -557,6 +559,7 @@ static struct dma_async_tx_descriptor *tegra_adma_prep_dma_cyclic(
if (!desc)
return NULL;
+ desc->cyclic = true;
desc->buf_len = buf_len;
desc->period_len = period_len;
desc->num_periods = buf_len / period_len;
--
2.1.4
next prev parent reply other threads:[~2016-09-06 18:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-06 18:42 [PATCH v3 0/2] Add memcpy support for tegra210-adma Nicolin Chen
2016-09-06 18:42 ` Nicolin Chen [this message]
2016-09-06 18:42 ` [PATCH v3 2/2] dmaengine: tegra210-adma: Add memcpy support Nicolin Chen
2016-09-08 14:08 ` Jon Hunter
2016-09-08 14:19 ` Jon Hunter
2016-09-08 17:31 ` Nicolin Chen
2016-09-12 14:34 ` Jon Hunter
2016-09-12 20:50 ` Nicolin Chen
2016-09-13 8:52 ` Jon Hunter
2016-09-14 13:38 ` 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=75bbbd9f20e0ead30760f47f0fd2ee9b05d49254.1473186743.git.nicoleotsuka@gmail.com \
--to=nicoleotsuka@gmail.com \
--cc=dmaengine@vger.kernel.org \
--cc=gnurou@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=ldewangan@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=swarren@wwwdotorg.org \
--cc=thierry.reding@gmail.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
all inboxes | Powered by JetHome®