Custom DMA Zone Size in 3.10.17

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom DMA Zone Size in 3.10.17

Jump to solution
1,564 Views
jjohn
Contributor II

Hai,

I was trying to change DMA zone size and its found to be working in 3.0.35 with the patch given in following thread,

Re: Re: Memory Reserved on i.MX6 for VPU

But how we can do the same on 3.10.17 kernel ? , looks like the 3.10.17 accepts the DMA zone size from Device Tree, but failed to find the proper way to define it,

Thank you.

1 Solution
421 Views
CommunityBot
Community Manager
This an automatic process.

We are marking this post as solved, due to the either low activity or any reply marked as correct.

If you have additional questions, please create a new post and reference to this closed post.

NXP Community!

View solution in original post

0 Kudos
3 Replies
422 Views
CommunityBot
Community Manager
This an automatic process.

We are marking this post as solved, due to the either low activity or any reply marked as correct.

If you have additional questions, please create a new post and reference to this closed post.

NXP Community!

View solution in original post

0 Kudos
421 Views
art
NXP TechSupport
NXP TechSupport

It seems not to be required, since the dynamic DMA memory allocation mechanism has been greatly improved in 3.10.17 release and no issues have been found yet.

Have you found one?


Have a great day,
Artur

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

421 Views
jjohn
Contributor II

It seems not to be required, since the dynamic DMA memory allocation mechanism has been greatly improved in 3.10.17 release and no issues have been found yet.

Have you found one?

I found the associated lwn article[1] after posting the issue, as per the article

CMA is integrated with the DMA subsystem, so the usual calls to the DMA API (such as dma_alloc_coherent()) should work as usual. In fact, device drivers should never need to call the CMA API directly, since instead of bus addresses and kernel mappings it operates on pages and page frame numbers (PFNs), and provides no mechanism for maintaining cache coherency.

...

There is a set of Kconfig options, which specify the default size of the reservation. All of those options are located under “Device Drivers” » “Generic Driver Options” » “Contiguous Memory Allocator” in the Kconfig menu. They allow choosing from four possibilities: the size can be an absolute value in megabytes, a percentage of total memory, the smaller of the two, or the larger of the two. The default is to allocate 16 MiBs.

There is also a cma= kernel command line option. It lets one specify the size of the area at boot time without the need to recompile the kernel. This option specifies the size in bytes and accepts the usual suffixes.

The kernel command line option didnt work, but anyway Kconfig option looks working. Will post the details after another round of testing.

Thank you for the support.

0 Kudos