[PATCH v2] staging: android: ion: Allocate from heap ID directly without mask

Brian Starkey Brian.Starkey at arm.com
Mon Feb 18 11:26:57 UTC 2019


On Fri, Feb 15, 2019 at 11:01:59AM -0800, John Stultz wrote:
> On Fri, Feb 15, 2019 at 2:51 AM Brian Starkey <Brian.Starkey at arm.com> wrote:
> >
> > Hi John,
> >
> > On Thu, Feb 14, 2019 at 09:38:29AM -0800, John Stultz wrote:
> > >
> > [snip]
> >
> > > Some thoughts, as this ABI break has the potential to be pretty painful.
> > >
> > > 1) Unfortunately, this ABI is exposed *through* libion via
> > > ion_alloc/ion_alloc_fd out to gralloc implementations. Which means it
> > > will have a wider impact to vendor userland code.
> >
> > I figured libion could fairly easily loop through all the set bits in
> > heap_mask and call the ioctl for each until it succeeds. That
> > preserves the old behaviour from the libion clients' perspective.
> 
> Potentially, though that implicitly still caps the heaps to 32.  So
> I'm not sure what the net benefit would be.
> 

It's purely a transitionary compatibility measure. Users of the old
API inherit the old limitation - they shouldn't care about that.

Alongside it, we'd want to add new function(s) exposing whatever the
new API is.

Cheers,
-Brian


More information about the devel mailing list