[EARLY RFC][PATCH 3/4] ion: Add HEAP_INFO ioctl to be able to fetch heap type

2019-02-16 Thread John Stultz via dri-devel
The per-device heaps don't support HEAP_QUERY ioctl, since the name is provided in the devnode path and the heapid isn't useful with the new interface (one uses the fd of heapdevice). But, one missing bit of functionality is a way to find the heap type. So provide a HEAP_INFO ioctl which exposes t

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

2019-02-16 Thread John Stultz via dri-devel
On Fri, Feb 15, 2019 at 2:51 AM Brian Starkey 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_

[EARLY RFC][PATCH 0/4] ION per heap devices

2019-02-16 Thread John Stultz via dri-devel
This is a *very early RFC* (it builds, that's all I'll say :) but I wanted to share it to get some initial feedback before I go down the rabit hole of trying to adapt the Android userland code to get this fully validated. This patchset tries to implement the per-heap devices for ION. The main bene

[EARLY RFC][PATCH 1/4] ion: Add ION_VERSION ioctl

2019-02-16 Thread John Stultz via dri-devel
With all the slight interface changes ion has had through its time in staging, keeping userland working properly has been a pain. Assuming more churn going forward, provide a proper version interface. Cc: Laura Abbott Cc: Sumit Semwal Cc: Liam Mark Cc: Brian Starkey Cc: Andrew F. Davis Cc: Al

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

2019-02-16 Thread John Stultz via dri-devel
On Fri, Feb 15, 2019 at 12:52 PM Andrew F. Davis wrote: > On 2/15/19 1:58 PM, John Stultz wrote: > > So yea, I don't think we should tie our hands in reworking the > > interfaces, but it would be nice to avoid having subtle ABI changes > > that don't have clear ways for userland to detect which in

[EARLY RFC][PATCH 4/4] ion: Make "legacy" /dev/ion support optional

2019-02-16 Thread John Stultz via dri-devel
Add a config option to make the "legacy" /dev/ion interface optional. Not yet clear if this will come out of staging or not, but to help with the transition. Cc: Laura Abbott Cc: Sumit Semwal Cc: Liam Mark Cc: Brian Starkey Cc: Andrew F. Davis Cc: Alistair Strachan Cc: dri-devel@lists.freed

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

2019-02-15 Thread John Stultz via dri-devel
On Fri, Feb 15, 2019 at 11:22 AM Andrew F. Davis wrote: > > On 2/15/19 1:01 PM, John Stultz wrote: > > On Fri, Feb 15, 2019 at 2:51 AM Brian Starkey wrote: > >> On Thu, Feb 14, 2019 at 09:38:29AM -0800, John Stultz wrote: > >>> 2) For patches that cause ABI breaks, it might be good to make it > >

[EARLY RFC][PATCH 2/4] ion: Initial hack to create per heap devices

2019-02-15 Thread John Stultz via dri-devel
One of the issues w/ the /dev/ion interface is that we have to provide the complexity of a heap query interface and we end up multiplexing all the heap access through that one interface via a bit mask (which currently limits the heaps to 32). There has been a long running todo to provide per-heap

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

2019-02-14 Thread John Stultz via dri-devel
On Mon, Jan 28, 2019 at 1:44 PM Andrew F. Davis wrote: > > Previously the heap to allocate from was selected by a mask of allowed > heap types. This may have been done as a primitive form of constraint > solving, the first heap type that matched any set bit of the heap mask > was allocated from, u