kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* How DMA transfers > 2MB are being performed?
@ 2011-06-01  5:10 sandeep kumar
  2011-06-01  6:00 ` Dave Hylands
  0 siblings, 1 reply; 2+ messages in thread
From: sandeep kumar @ 2011-06-01  5:10 UTC (permalink / raw)
  To: kernelnewbies

Hi all
A very limited (1-2MB) address space is mapped to dma_alloc() in ARM
architecture..what if a DMA transfer of >2MB is needed at a time? As DMA
transfer starts asynchronously..CPU relinquishes data buses..so CPU cant
control. So the excess data which is >2MB will be overflown or lost..So how
this large data transfers are being managed?

-- 
With regards,
Sandeep Kumar Anantapalli,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110601/9ef6420c/attachment.html 

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

* How DMA transfers > 2MB are being performed?
  2011-06-01  5:10 How DMA transfers > 2MB are being performed? sandeep kumar
@ 2011-06-01  6:00 ` Dave Hylands
  0 siblings, 0 replies; 2+ messages in thread
From: Dave Hylands @ 2011-06-01  6:00 UTC (permalink / raw)
  To: kernelnewbies

Hi Sandeep,

On Tue, May 31, 2011 at 10:10 PM, sandeep kumar
<coolsandyforyou@gmail.com> wrote:
> Hi all
> A very limited (1-2MB) address space is mapped to dma_alloc() in ARM
> architecture..what if a DMA transfer of >2MB is needed at a time? As DMA
> transfer starts asynchronously..CPU relinquishes data buses..so CPU cant
> control. So the excess data which is >2MB will be overflown or lost..So how
> this large data transfers are being managed?

Huh?

The dma_alloc space can be upto 14 Mb on ARM. It's up to the machine's
memory.h file to set exactly how big it is. The appropriate constant
is called CONSISTENT_DMA_SIZE and the machine is free to set it to be
2Mb multiple between 2Mb and 14 Mb. If the machine's memory.h file
doesn't set a size, then it defaults to 2Mb. See:
<http://lxr.linux.no/linux+v2.6.39/arch/arm/include/asm/memory.h#L80>

You can also DMA from memory allocated outside of the dma_alloc space.
It's just more work.

I have code that DMAs from kmalloc space, vmalloc space, user-space
and dma_alloc space. Each one has its own quirks, and ones like
vmalloc space and user-space require walking through the pages to
determine the correct physical addresses, and then you need to take
care of cache coherency.

The video guys have been working on code to allow user-mode buffers to
be dma'd as well. I think that there are a few different APIs and some
work is happening to get it down to one API.

-- 
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com

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

end of thread, other threads:[~2011-06-01  6:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-01  5:10 How DMA transfers > 2MB are being performed? sandeep kumar
2011-06-01  6:00 ` Dave Hylands

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).