staging: android: ion: aligned allocation support

Laura Abbott labbott at redhat.com
Mon Oct 8 18:26:15 UTC 2018


On 10/03/2018 01:03 PM, Alexey Skidanov wrote:
> 
> 
> On 10/03/2018 09:07 PM, Laura Abbott wrote:
>> On 10/02/2018 07:27 AM, Alexey Skidanov wrote:
>>> Hi,
>>>
>>> Sometimes HW requires memory buffer to be aligned in order to be used
>>> properly.  Of course, we may overcome the lack of aligned allocation
>>> support, but we may easily add it because CMA and gen_pool (used by
>>> several heaps) already support it.
>>>
>>> Does someone have an objection to add it?
>>>
>>> Thanks,
>>> Alexey
>>>
>>
>> The alignment option was removed from the allocation API before
>> because the most common heap (system heap) didn't support it
>> and it was causing more confusion. We've already mangled the
>> ABI once so I really don't want to break it again. I'm not
>> opposed to adding alignment support for the CMA via the allocation
>> flags.
> Currently, the flags member is used to define the way the buffer will be
> mapped - cached or uncached. So,if I understand you correct, we need to
> add ION_FLAG_ALIGNED flag and to share 32 bit field between flags and
> flags specific data (alignment value) ?
> 

Yes, that's what I was thinking.

> I'm probably going to remove the carveout and chunk heap because
>> nobody has stepped up to figure out how to tie allocation of those
>> to device tree or another method.
>>
>> Thanks,
>> Laura
> 
> Thanks,
> Alexey
> 



More information about the devel mailing list