LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-31-2015, 06:38 AM   #1
ped
LQ Newbie
 
Registered: Oct 2015
Posts: 2

Rep: Reputation: Disabled
Smile Cyclic DMA Buffers


Hello all,
First post, in at the deep end.

I want to be able to allocate a number of coherent DMA buffers
to be used as a cyclic ring buffer and am having trouble finding
an answer.

Some things I do not want to do or cannot do for various reasons.
I don't want to allocate the buffers at boot time.
I didn't particually want a large single cyclic buffer.
I can't afford to re-submit a sg list.

I can allocate a single cyclic buffer and get the callback notifications to work. I can make a scatted gather list, submit it and that all works.

What I really want to do is to make a cyclic scatter gather list and I just cant see how to do it, that is to say without delving into the dmaengine code.

Maybe I misunderstand dmaengine_prep_dma_cyclic. As far as I can see you can only submit a single buffer and set the callback granularty.

This is for ARM at91sam9x5 with Linux-3.18
 
Old 10-31-2015, 07:56 AM   #2
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
This would be a kernel driver concern, and I feel quite certain that there will be existing kernel drivers that do this. Before striving to write code, find code that you can steal.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Advice on how to map very large buffers & obtain addresses for processor and dma ManteoBob Linux - Newbie 2 01-21-2014 05:01 PM
What's the best way of disk I/O in cyclic manner? Mapisto Programming 5 08-13-2011 01:35 AM
Memory Mapping DMA Buffers in User Space ramukaka Linux - Kernel 6 08-08-2010 04:02 PM
Non cyclic switching between keyboard layouts alexbrui Linux - General 8 02-17-2010 12:54 AM
short on DMA buffers pgcbiz Linux - General 1 08-01-2002 02:10 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration