Hi,
I missed out that you are stil creating only one ION miscdevice though multiple ion-driver devices are created.
Isn't it better to add a priv field in the platform heap than modifying the heap creation API? The priv field can be then used for extended purposes for custom heaps (board file and heap implementation needs to know what is being passed in the priv field).
- Nishanth Peethambaran
On Wed, Jun 13, 2012 at 9:05 AM, Benjamin Gaignard benjamin.gaignard@linaro.org wrote:
Hello,
The addition of a private field in ion_platform_heap has been discussed in the previous versions of the patches: http://lists.linaro.org/pipermail/linaro-mm-sig/2012-March/001431.html
Each CMA area need to be linked with one device, so we need to have multiple ion-driver device beacuse there is only one ION device. If we don't link CMA to one device driver, all calls to dma_alloc_coherent will go to the default CMA area.
I'm not sure about your use case, but if you mean that you want to define multiple heaps and let the ION allocate the memory in one of them, it is already what ION does inĀ ion_alloc function by checking heap_mask and flags.
Benjamin