From: Vinod Koul <vkoul@kernel.org>
To: Robin Gong <yibin.gong@nxp.com>
Cc: "s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
"dan.j.williams@intel.com" <dan.j.williams@intel.com>,
"shawnguo@kernel.org" <shawnguo@kernel.org>,
Fabio Estevam <fabio.estevam@nxp.com>,
"linux@armlinux.org.uk" <linux@armlinux.org.uk>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"kernel@pengutronix.de" <kernel@pengutronix.de>,
"dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
dl-linux-imx <linux-imx@nxp.com>
Subject: [v1,3/4] dmaengine: imx-sdma: support dmatest
Date: Wed, 11 Jul 2018 14:28:06 +0530 [thread overview]
Message-ID: <20180711085806.GP3219@vkoul-mobl> (raw)
On 11-07-18, 08:16, Robin Gong wrote:
> > > The problem seems to be that we do not know whether we are doing
> > > memcpy or not. Normally we get the information how a channel is to be
> > > configured in dma_device->device_config, but this function is not
> > > called in the memcpy case.
> >
> > Not really true, device_config only provides parameters to be configured for
> > next slave transaction
> >
> > > An alternative might also be to do the setup in
> > dma_device->device_prep_dma_memcpy.
> >
> > Precisely, see how other drivers do this
> >
> > Let's roll back a bit and foresee why is this required.
> >
> > In case of memcpy, you need to tell DMA to do transfer from src to dstn and
> > size. Additional parameters like buswidth etc should be derived for maximum
> > throughput (after all we are dma, people want it to be done
> > fastest)
> >
> > Now for slave, you are interfacing with a peripheral and don't know how that is
> > setup. So you need to match the parameters, otherwise you get overflow or
> > underflow and hence need for device_config
> >
> > Please do not derive additional notions from these, please do not assume
> > anything else, unless provided in documentation :)
> I will move such prepare jobs from slave_config to device_prep_dma_memcpy
> Instead of device_alloc_chan_resources as I did in v1, thus we have no 'chan->private'
> issue, just like drivers/dma/stm32-mdma.c. The only limitation is those prepare jobs
> (some register setting) will be done every time memcpy instead of only one time in slave_config
> or v1 case. Is that ok?
sounds fine to me
next reply other threads:[~2018-07-11 8:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-11 8:58 Vinod Koul [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-07-11 8:16 [v1,3/4] dmaengine: imx-sdma: support dmatest Robin Gong
2018-07-11 7:19 Vinod Koul
2018-07-11 7:14 Robin Gong
2018-07-11 6:53 Sascha Hauer
2018-07-11 6:37 Robin Gong
2018-07-10 16:23 Robin Gong
2018-07-10 15:33 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=20180711085806.GP3219@vkoul-mobl \
--to=vkoul@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=fabio.estevam@nxp.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=yibin.gong@nxp.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