On Sat, May 30, 2015 at 12:12:02PM +0200, Maxime Ripard wrote: > 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. So you dont have a framebuffer driver which can invoke dmaengine ops? -- ~Vinod -- To unsubscribe from this list: send the line "unsubscribe dmaengine" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html