All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Porter <mporter@ti.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: vinod.koul@intel.com, dan.j.williams@intel.com, cjb@laptop.org,
	grant.likely@secretlab.ca,
	Linux DaVinci Kernel List
	<davinci-linux-open-source@linux.davincidsp.com>,
	Sekhar Nori <nsekhar@ti.com>,
	Linux MMC List <linux-mmc@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux SPI Devel List <spi-devel-general@lists.sourceforge.net>,
	Linux ARM Kernel List <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/3] dmaengine: add TI EDMA DMA engine driver
Date: Mon, 20 Aug 2012 10:17:21 -0400	[thread overview]
Message-ID: <20120820141721.GA31897@beef> (raw)
In-Reply-To: <20120816222912.GA15883@n2100.arm.linux.org.uk>

On Thu, Aug 16, 2012 at 11:29:12PM +0100, Russell King wrote:
> On Thu, Aug 16, 2012 at 05:44:29PM -0400, Matt Porter wrote:
> > Add a DMA engine driver for the TI EDMA controller. This driver
> > is implemented as a wrapper around the existing DaVinci private
> > DMA implementation. This approach allows for incremental conversion
> > of each peripheral driver to the DMA engine API. The EDMA driver
> > supports slave transfers but does not yet support cyclic transfers.
> 
> Have you looked at the virt-dma support?  That should allow you to
> avoid some common errors, like forgetting that stuff submitted but
> not issued should not be started even if the channel is currently
> running.

I had previously skimmed it a bit and wrote it off as a helper for
certain types of controllers. On your suggestion, I looked into it
in detail and it does look to be a nice improvement on handling those
types of errors...some of which I noticed were not being handled
properly in my v1 version. I did a quick and dirty conversion of the
EDMA driver to use virt-dma now and it also results in simplified
handling of the descriptors and about a 10% code reduction. I'll do
some clean up on this virt-dma-enabled version and post v2.

One thing to note is that although I'm borrowing a lot from how you
did the omap-dma.c driver, the EDMA implementation of issue_pending()
cannot schedule a tasklet to send the descriptor to the hardware. The
client drivers have to be sure that dma_async_issue_pending() results
in the PaRAM set been written to the h/w before the driver specific
DMA reqs are enabled. Enabling the DMA req before the PaRAM set is
programmed results in an event error condition on this h/w. Ideally
there would be a dma_status state to reflect that a descriptor has
actually been written to the h/w so that client drivers can safely
enable dma reqs where this is a requirement.

Thanks,
Matt

WARNING: multiple messages have this Message-ID (diff)
From: mporter@ti.com (Matt Porter)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] dmaengine: add TI EDMA DMA engine driver
Date: Mon, 20 Aug 2012 10:17:21 -0400	[thread overview]
Message-ID: <20120820141721.GA31897@beef> (raw)
In-Reply-To: <20120816222912.GA15883@n2100.arm.linux.org.uk>

On Thu, Aug 16, 2012 at 11:29:12PM +0100, Russell King wrote:
> On Thu, Aug 16, 2012 at 05:44:29PM -0400, Matt Porter wrote:
> > Add a DMA engine driver for the TI EDMA controller. This driver
> > is implemented as a wrapper around the existing DaVinci private
> > DMA implementation. This approach allows for incremental conversion
> > of each peripheral driver to the DMA engine API. The EDMA driver
> > supports slave transfers but does not yet support cyclic transfers.
> 
> Have you looked at the virt-dma support?  That should allow you to
> avoid some common errors, like forgetting that stuff submitted but
> not issued should not be started even if the channel is currently
> running.

I had previously skimmed it a bit and wrote it off as a helper for
certain types of controllers. On your suggestion, I looked into it
in detail and it does look to be a nice improvement on handling those
types of errors...some of which I noticed were not being handled
properly in my v1 version. I did a quick and dirty conversion of the
EDMA driver to use virt-dma now and it also results in simplified
handling of the descriptors and about a 10% code reduction. I'll do
some clean up on this virt-dma-enabled version and post v2.

One thing to note is that although I'm borrowing a lot from how you
did the omap-dma.c driver, the EDMA implementation of issue_pending()
cannot schedule a tasklet to send the descriptor to the hardware. The
client drivers have to be sure that dma_async_issue_pending() results
in the PaRAM set been written to the h/w before the driver specific
DMA reqs are enabled. Enabling the DMA req before the PaRAM set is
programmed results in an event error condition on this h/w. Ideally
there would be a dma_status state to reflect that a descriptor has
actually been written to the h/w so that client drivers can safely
enable dma reqs where this is a requirement.

Thanks,
Matt

  reply	other threads:[~2012-08-20 14:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-16 21:44 [PATCH 0/3] DaVinci DMA engine conversion Matt Porter
2012-08-16 21:44 ` Matt Porter
     [not found] ` <1345153471-22757-1-git-send-email-mporter-l0cyMroinI0@public.gmane.org>
2012-08-16 21:44   ` [PATCH 1/3] dmaengine: add TI EDMA DMA engine driver Matt Porter
2012-08-16 21:44     ` Matt Porter
2012-08-16 21:44     ` Matt Porter
2012-08-16 22:29     ` Russell King - ARM Linux
2012-08-16 22:29       ` Russell King - ARM Linux
2012-08-20 14:17       ` Matt Porter [this message]
2012-08-20 14:17         ` Matt Porter
2012-08-21 18:20     ` Matt Porter
2012-08-21 18:20       ` Matt Porter
2012-08-16 21:44   ` [PATCH 2/3] mmc: davinci_mmc: convert to DMA engine API Matt Porter
2012-08-16 21:44     ` Matt Porter
2012-08-16 21:44     ` Matt Porter
2012-08-16 21:44   ` [PATCH 3/3] spi: spi-davinci: " Matt Porter
2012-08-16 21:44     ` Matt Porter
2012-08-16 21:44     ` Matt Porter

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=20120820141721.GA31897@beef \
    --to=mporter@ti.com \
    --cc=cjb@laptop.org \
    --cc=dan.j.williams@intel.com \
    --cc=davinci-linux-open-source@linux.davincidsp.com \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=nsekhar@ti.com \
    --cc=spi-devel-general@lists.sourceforge.net \
    --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.