linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Generic DMA-capable streaming device driver looking for home
@ 2017-04-20 22:10 Alex Williams
  2017-04-27 14:00 ` Jon Masters
  0 siblings, 1 reply; 4+ messages in thread
From: Alex Williams @ 2017-04-20 22:10 UTC (permalink / raw)
  To: linux-kernel; +Cc: Moritz Fischer, alex.williams

Hi all,

We're writing a device driver and having some difficulty matching a
subsystem to the driver/device properties. Can anyone help with
direction?

These are some basic properties:
1) Device is used to carry generic data to/from userspace. It's a pair
   of dumb streams with one sink and one source for each direction (no
   addressable endpoints for the other side).
2) Data goes to/from a DMA engine in an FPGA at high throughput.
3) The driver enables userspace to queue multiple DMA-able buffers for
   asynchronous, pipelined data transfer. We currently use the
   videobuf2 API to provide the feature. We're not carrying video data
   in general, though.

It's a piece of a software-defined radio system, and while it can carry
data from DACs/ADCs, the device is only a generic transport. It doesn't
know what data it's carrying, so neither would the driver.

Some guidance would be greatly appreciated. Thanks!
--Alex

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Generic DMA-capable streaming device driver looking for home
  2017-04-20 22:10 Generic DMA-capable streaming device driver looking for home Alex Williams
@ 2017-04-27 14:00 ` Jon Masters
  2017-04-27 14:50   ` Sinan Kaya
  0 siblings, 1 reply; 4+ messages in thread
From: Jon Masters @ 2017-04-27 14:00 UTC (permalink / raw)
  To: Alex Williams, linux-kernel; +Cc: Moritz Fischer, Sinan Kaya

On 04/20/2017 06:10 PM, Alex Williams wrote:
> Hi all,
> 
> We're writing a device driver and having some difficulty matching a
> subsystem to the driver/device properties. Can anyone help with
> direction?
> 
> These are some basic properties:
> 1) Device is used to carry generic data to/from userspace. It's a pair
>    of dumb streams with one sink and one source for each direction (no
>    addressable endpoints for the other side).
> 2) Data goes to/from a DMA engine in an FPGA at high throughput.
> 3) The driver enables userspace to queue multiple DMA-able buffers for
>    asynchronous, pipelined data transfer. We currently use the
>    videobuf2 API to provide the feature. We're not carrying video data
>    in general, though.
> 
> It's a piece of a software-defined radio system, and while it can carry
> data from DACs/ADCs, the device is only a generic transport. It doesn't
> know what data it's carrying, so neither would the driver.
> 
> Some guidance would be greatly appreciated. Thanks!

This might be close enough to hidma that Sinan would have suggestions?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Generic DMA-capable streaming device driver looking for home
  2017-04-27 14:00 ` Jon Masters
@ 2017-04-27 14:50   ` Sinan Kaya
  2017-04-27 16:33     ` Lars-Peter Clausen
  0 siblings, 1 reply; 4+ messages in thread
From: Sinan Kaya @ 2017-04-27 14:50 UTC (permalink / raw)
  To: Jon Masters, Alex Williams, linux-kernel; +Cc: Moritz Fischer, dmaengine

On 4/27/2017 10:00 AM, Jon Masters wrote:
> On 04/20/2017 06:10 PM, Alex Williams wrote:
>> Hi all,
>>
>> We're writing a device driver and having some difficulty matching a
>> subsystem to the driver/device properties. Can anyone help with
>> direction?
>>
>> These are some basic properties:
>> 1) Device is used to carry generic data to/from userspace. It's a pair
>>    of dumb streams with one sink and one source for each direction (no
>>    addressable endpoints for the other side).
>> 2) Data goes to/from a DMA engine in an FPGA at high throughput.
>> 3) The driver enables userspace to queue multiple DMA-able buffers for
>>    asynchronous, pipelined data transfer. We currently use the
>>    videobuf2 API to provide the feature. We're not carrying video data
>>    in general, though.
>>
>> It's a piece of a software-defined radio system, and while it can carry
>> data from DACs/ADCs, the device is only a generic transport. It doesn't
>> know what data it's carrying, so neither would the driver.
>>
>> Some guidance would be greatly appreciated. Thanks!
> 
> This might be close enough to hidma that Sinan would have suggestions?
> 

I added dmaengine group to CC above. I have recently experimented
with a similar concept by hacking the rapidio code.

http://lxr.free-electrons.com/source/drivers/rapidio/devices/rio_mport_cdev.c

It sounds like your code belongs to dmaengine.

> 
> 


-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Generic DMA-capable streaming device driver looking for home
  2017-04-27 14:50   ` Sinan Kaya
@ 2017-04-27 16:33     ` Lars-Peter Clausen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars-Peter Clausen @ 2017-04-27 16:33 UTC (permalink / raw)
  To: Sinan Kaya, Jon Masters, Alex Williams, linux-kernel
  Cc: Moritz Fischer, dmaengine

On 04/27/2017 04:50 PM, Sinan Kaya wrote:
> On 4/27/2017 10:00 AM, Jon Masters wrote:
>> On 04/20/2017 06:10 PM, Alex Williams wrote:
>>> Hi all,
>>>
>>> We're writing a device driver and having some difficulty matching a
>>> subsystem to the driver/device properties. Can anyone help with
>>> direction?
>>>
>>> These are some basic properties:
>>> 1) Device is used to carry generic data to/from userspace. It's a pair
>>>    of dumb streams with one sink and one source for each direction (no
>>>    addressable endpoints for the other side).
>>> 2) Data goes to/from a DMA engine in an FPGA at high throughput.
>>> 3) The driver enables userspace to queue multiple DMA-able buffers for
>>>    asynchronous, pipelined data transfer. We currently use the
>>>    videobuf2 API to provide the feature. We're not carrying video data
>>>    in general, though.
>>>
>>> It's a piece of a software-defined radio system, and while it can carry
>>> data from DACs/ADCs, the device is only a generic transport. It doesn't
>>> know what data it's carrying, so neither would the driver.
>>>
>>> Some guidance would be greatly appreciated. Thanks!
>>
>> This might be close enough to hidma that Sinan would have suggestions?
>>
> 
> I added dmaengine group to CC above. I have recently experimented
> with a similar concept by hacking the rapidio code.
> 
> http://lxr.free-electrons.com/source/drivers/rapidio/devices/rio_mport_cdev.c
> 
> It sounds like your code belongs to dmaengine.

If you want to be able to use the DMA from within different frameworks
inside the kernel (e.g. ALSA for audio, V4L2 for video, IIO for
general-purpose data converters) then DMAengine is the right place. If you
only ever want to access the DMA from userspace application logic use VFIO.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-04-27 16:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-20 22:10 Generic DMA-capable streaming device driver looking for home Alex Williams
2017-04-27 14:00 ` Jon Masters
2017-04-27 14:50   ` Sinan Kaya
2017-04-27 16:33     ` Lars-Peter Clausen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).