Re: ezdma: Simple read()/write() userspace interface for dmaengine.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 29, 2015 at 02:11:56PM +0530, Vinod Koul wrote:
> On Wed, May 27, 2015 at 04:33:02PM +0200, Maxime Ripard wrote:
> > On Mon, May 25, 2015 at 11:23:44AM +0530, Vinod Koul wrote:
> > > On Thu, May 21, 2015 at 09:34:03PM -0400, Jeremy Trimble wrote:
> > > > Hello all,
> > > > 
> > > > I've written a kernel module that allows data to be sent to or received from
> > > > any DMA device that supports the dmaengine API, using simple read()/write()
> > > > calls from userspace.
> > > > 
> > > > Motivation:
> > > > 
> > > > While doing some work for my master's thesis recently using the Xilinx Zynq
> > > > SoC, I needed a way to stream test data into and out of an FPGA soft-core I was
> > > > developing.  I was using the Xilinx AXI DMA soft-core (and its
> > > > dmaengine-compatible driver that I believe is related to Kedareswara rao
> > > > Appana's patch submitted recently).
> > > > 
> > > > Although dmaengine provides a versatile in-kernel API, to my knowledge there's
> > > > no direct userspace interface for the case where one wants to simply
> > > > send/receive data through a slave dma channel -- writing a separate
> > > > userspace-facing module would be required.  (Or some hack using /dev/kmem.)
> > > 
> > > why not use dmatest?
> > 
> > I guess that's not the only use case for this. Like we discussed
> > already in the memset-revival patches, you might want to use these
> > kind of features from the user-space for example to set or copy large
> > buffers because the CPU is slower than the DMA controller to do so, or
> > simply to offload these kind of operations.
> > 
> > I know some out-of-tree interfaces like this already exist, maybe this
> > driver is the opportunity to come up with the right one :)
>
> But in that case they would go thru the client subsystem. Like audio sends
> buffers to kernel and then the respective subsystem (sound) uses dmaengine.
> 
> Do we have a real world example where we would want to DMA without a kernel
> client, IOW a usermode client?

memset/memcpy on large buffers ?

And like I mentionned on the memset reintroduction serie, we do have a
platform where we exactly want to do framebuffer-related operations
(blitting for example, but also memset on the framebuffer itself)
which usually are accelerated by the GPU, but that platform doesn't
have any GPU while it has a DMA controller able to do just that.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux