Re: [RFC][PATCH] libdrm: tests: Add planetest test from AOSP sources

2019-04-16 Thread John Stultz
On Tue, Apr 16, 2019 at 11:29 AM Sean Paul wrote: > On Tue, Apr 16, 2019 at 09:43:49AM -0700, John Stultz wrote: > > In trying to further align the AOSP libdrm branch with upstream, > > I wanted to submit the added test planetest that they have been > > carrying for awhile. &

[RFC][PATCH] libdrm: tests: Add planetest test from AOSP sources

2019-04-16 Thread John Stultz
would be appreciated! Originally-by: Sean Paul With fixes folded in by: Benjamin Gaignard Vincent Palatin Cc: Sean Paul Cc: Benjamin Gaignard Cc: Alex Deucher Signed-off-by: John Stultz --- tests/Makefile.am| 2 +- tests/planetest/Makefile.am | 30 tests

[RFC][PATCH 6/6 v3] kselftests: Add dma-heap test

2019-03-28 Thread John Stultz
butao Cc: "Xiaqing (A)" Cc: Yudongbin Cc: Christoph Hellwig Cc: Chenbo Feng Cc: Alistair Strachan Cc: dri-devel@lists.freedesktop.org Signed-off-by: John Stultz --- v2: Switched to use reworked dma-heap apis v3: * Add simple mmap * Utilize dma-buf testdev to test importin

[RFC][PATCH 5/6 v3] dma-buf: Add Dummy Importer Test Device

2019-03-28 Thread John Stultz
sktop.org Signed-off-by: Andrew F. Davis [Renamed and refactored dma_buf_phys driver, rewote commitlog] Signed-off-by: John Stultz --- drivers/dma-buf/Kconfig | 6 + drivers/dma-buf/Makefile | 1 + drivers/dma-buf/dma-buf-testdev.c| 239 +++

[RFC][PATCH 1/6 v3] dma-buf: Add dma-buf heaps framework

2019-03-28 Thread John Stultz
ri-devel@lists.freedesktop.org Signed-off-by: Andrew F. Davis Signed-off-by: John Stultz --- v2: * Folded down fixes I had previously shared in implementing heaps * Make flags a u64 (Suggested by Laura) * Add PAGE_ALIGN() fix to the core alloc funciton * IOCTL fixups suggested by Brian * Add

[RFC][PATCH 2/6 v3] dma-buf: heaps: Add heap helpers

2019-03-28 Thread John Stultz
Cc: Chenbo Feng Cc: Alistair Strachan Cc: dri-devel@lists.freedesktop.org Signed-off-by: John Stultz --- v2: * Removed cache management performance hack that I had accidentally folded in. * Removed stats code that was in helpers * Lots of checkpatch cleanups v3: * Uninline INIT_HEAP_HELP

[RFC][PATCH 3/6 v3] dma-buf: heaps: Add system heap to dmabuf heaps

2019-03-28 Thread John Stultz
; Cc: Yudongbin Cc: Christoph Hellwig Cc: Chenbo Feng Cc: Alistair Strachan Cc: dri-devel@lists.freedesktop.org Reviewed-by: Benjamin Gaignard Signed-off-by: John Stultz --- v2: * Switch allocate to return dmabuf fd * Simplify init code * Checkpatch fixups * Droped dead system-contig code v3: * Wh

[RFC][PATCH 4/6 v3] dma-buf: heaps: Add CMA heap to dmabuf heapss

2019-03-28 Thread John Stultz
ir Strachan Cc: dri-devel@lists.freedesktop.org Signed-off-by: John Stultz --- v2: * Switch allocate to return dmabuf fd * Simplify init code * Checkpatch fixups v3: * Switch to inline function for to_cma_heap() * Minor cleanups suggested by Brian * Fold in new registration style from Andrew * Fo

[RFC][PATCH 0/6 v3] DMA-BUF Heaps (destaging ION)

2019-03-28 Thread John Stultz
dma-buf: Add dma-buf heaps framework dma-buf: Add Dummy Importer Test Device John Stultz (4): dma-buf: heaps: Add heap helpers dma-buf: heaps: Add system heap to dmabuf heaps dma-buf: heaps: Add CMA heap to dmabuf heapss kselftests: Add dma-heap test MAINTAINERS

Re: [RFC][PATCH 1/5 v2] dma-buf: Add dma-buf heaps framework

2019-03-28 Thread John Stultz
On Wed, Mar 27, 2019 at 11:25 AM Greg KH wrote: > > On Tue, Mar 05, 2019 at 12:54:29PM -0800, John Stultz wrote: > > From: "Andrew F. Davis" > > > > This framework allows a unified userspace interface for dma-buf > > exporters, allowing userland to alloc

Re: [RFC][PATCH 1/5 v2] dma-buf: Add dma-buf heaps framework

2019-03-21 Thread John Stultz
On Tue, Mar 19, 2019 at 5:08 AM Brian Starkey wrote: > > Hi John, > > On Tue, Mar 05, 2019 at 12:54:29PM -0800, John Stultz wrote: > > From: "Andrew F. Davis" > > [snip] > > > + > > +#define NUM_HEAP_MINORS 128 > > +static DEFINE

Re: [RFC][PATCH 4/5 v2] dma-buf: heaps: Add CMA heap to dmabuf heapss

2019-03-21 Thread John Stultz
On Wed, Mar 6, 2019 at 8:05 AM Benjamin Gaignard wrote: > Le mar. 5 mars 2019 à 21:54, John Stultz a écrit : > > +#define to_cma_heap(x) container_of(x, struct cma_heap, heap) > > Even if I had write this macro years ago, now I would prefer to have a > static inline fun

Re: [RFC][PATCH 2/5 v2] dma-buf: heaps: Add heap helpers

2019-03-21 Thread John Stultz
On Tue, Mar 19, 2019 at 7:26 AM Brian Starkey wrote: > > Hi John, > > On Tue, Mar 05, 2019 at 12:54:30PM -0800, John Stultz wrote: > > ... > > > + > > +void dma_heap_buffer_destroy(struct dma_heap_buffer *heap_buffer) > > +{ > > + struct

Re: [RFC][PATCH 2/5 v2] dma-buf: heaps: Add heap helpers

2019-03-21 Thread John Stultz
On Fri, Mar 15, 2019 at 2:06 AM Christoph Hellwig wrote: > > + if (buffer->kmap_cnt) { > > + buffer->kmap_cnt++; > > + return buffer->vaddr; > > + } > > + vaddr = dma_heap_map_kernel(buffer); > > + if (WARN_ONCE(!vaddr, > > +

Re: [RFC][PATCH 0/5 v2] DMA-BUF Heaps (destaging ION)

2019-03-20 Thread John Stultz
On Wed, Mar 20, 2019 at 2:16 AM Benjamin Gaignard wrote: > Le mar. 19 mars 2019 à 23:36, John Stultz a écrit : > > On Tue, Mar 19, 2019 at 2:58 PM Rob Clark wrote: > > > For at least some hw the importing driver needs to configure things > > > differently for secu

Re: [RFC][PATCH 0/5 v2] DMA-BUF Heaps (destaging ION)

2019-03-19 Thread John Stultz
On Tue, Mar 19, 2019 at 2:58 PM Rob Clark wrote: > > On Tue, Mar 19, 2019 at 1:00 PM Andrew F. Davis wrote: > > > > On 3/19/19 11:54 AM, Benjamin Gaignard wrote: > > > Le mer. 13 mars 2019 à 23:31, John Stultz a > > > écrit : > > >> > &g

Re: [RFC][PATCH 0/5 v2] DMA-BUF Heaps (destaging ION)

2019-03-15 Thread John Stultz
On Fri, Mar 15, 2019 at 4:15 PM Jerome Glisse wrote: > On Tue, Mar 05, 2019 at 12:54:28PM -0800, John Stultz wrote: > > Here is a initial RFC of the dma-buf heaps patchset Andrew and I > > have been working on which tries to destage a fair chunk of ION > > functionality.

Re: [RFC][PATCH 1/5 v2] dma-buf: Add dma-buf heaps framework

2019-03-15 Thread John Stultz
On Fri, Mar 15, 2019 at 1:18 PM Laura Abbott wrote: > > On 3/5/19 12:54 PM, John Stultz wrote: > > +DMA-BUF HEAPS FRAMEWORK > > +M: Laura Abbott > > +R: Liam Mark > > +R: Brian Starkey > > +R: "Andrew F. Davis" > > +R:

Re: [RFC][PATCH 5/5 v2] kselftests: Add dma-heap test

2019-03-15 Thread John Stultz
On Fri, Mar 15, 2019 at 1:07 PM Laura Abbott wrote: > > On 3/6/19 9:01 AM, John Stultz wrote: > > On Wed, Mar 6, 2019 at 8:14 AM Benjamin Gaignard > > wrote: > >> Le mar. 5 mars 2019 à 21:54, John Stultz a écrit : > >>> + > >>> +

Re: [RFC][PATCH 4/5 v2] dma-buf: heaps: Add CMA heap to dmabuf heapss

2019-03-15 Thread John Stultz
On Fri, Mar 15, 2019 at 2:06 AM Christoph Hellwig wrote: > > On Tue, Mar 05, 2019 at 12:54:32PM -0800, John Stultz wrote: > > This adds a CMA heap, which allows userspace to allocate > > a dma-buf of contiguous memory out of a CMA region. > > With my previous suggestion of

Re: [RFC][PATCH 3/5 v2] dma-buf: heaps: Add system heap to dmabuf heaps

2019-03-13 Thread John Stultz
On Wed, Mar 13, 2019 at 1:20 PM Liam Mark wrote: > On Tue, 5 Mar 2019, John Stultz wrote: > > + > > + page = alloc_page(GFP_KERNEL); > > Need to zero the allocation (add __GFP_ZERO) Ah! Thanks! Fixed now. > > + if (!page) > >

Re: [RFC][PATCH 0/5 v2] DMA-BUF Heaps (destaging ION)

2019-03-13 Thread John Stultz
On Wed, Mar 13, 2019 at 1:11 PM Liam Mark wrote: > On Tue, 5 Mar 2019, John Stultz wrote: > > > > Eventual TODOS: > > * Reimplement page-pool for system heap (working on this) > > * Add stats accounting to system/cma heaps > > * Make the kselftest actually usefu

Re: [RFC][PATCH 3/5 v2] dma-buf: heaps: Add system heap to dmabuf heaps

2019-03-10 Thread John Stultz
On Wed, Mar 6, 2019 at 8:01 AM Benjamin Gaignard wrote: > > Le mar. 5 mars 2019 à 21:54, John Stultz a écrit : > > > > This patch adds system heap to the dma-buf heaps framework. > > > > This allows applications to get a page-allocator backed dma-buf

Re: [RFC][PATCH 1/5 v2] dma-buf: Add dma-buf heaps framework

2019-03-06 Thread John Stultz
On Wed, Mar 6, 2019 at 10:18 AM Andrew F. Davis wrote: > > On 3/5/19 2:54 PM, John Stultz wrote: > > From: "Andrew F. Davis" > > > > This framework allows a unified userspace interface for dma-buf > > exporters, allowing userland to allocate specifi

Re: [RFC][PATCH 5/5 v2] kselftests: Add dma-heap test

2019-03-06 Thread John Stultz
On Wed, Mar 6, 2019 at 10:15 AM Andrew F. Davis wrote: > > On 3/6/19 10:14 AM, Benjamin Gaignard wrote: > > Le mar. 5 mars 2019 à 21:54, John Stultz a écrit : > >> > >> Add very trivial allocation test for dma-heaps. > >> > >> TODO: Need to actu

Re: [RFC][PATCH 5/5 v2] kselftests: Add dma-heap test

2019-03-06 Thread John Stultz
On Wed, Mar 6, 2019 at 8:14 AM Benjamin Gaignard wrote: > Le mar. 5 mars 2019 à 21:54, John Stultz a écrit : > > + > > + printf("Allocating 1 MEG\n"); > > + ret = dmabuf_heap_alloc(heap_fd, ONE_MEG, 0, _fd); > > + if (ret) > > +

Re: [RFC][PATCH 1/5 v2] dma-buf: Add dma-buf heaps framework

2019-03-06 Thread John Stultz
On Wed, Mar 6, 2019 at 8:12 AM Benjamin Gaignard wrote: > Le mar. 5 mars 2019 à 21:54, John Stultz a écrit : > > +/** > > + * DOC: DMABUF Heaps Userspace API > > + * > > + */ > > + > > +/* Currently no flags */ > > +#define DMA_HEAP_VALID_FLAGS (0)

[RFC][PATCH 1/5 v2] dma-buf: Add dma-buf heaps framework

2019-03-05 Thread John Stultz
c: Greg KH Cc: Sumit Semwal Cc: Liam Mark Cc: Brian Starkey Cc: Andrew F. Davis Cc: Chenbo Feng Cc: Alistair Strachan Cc: dri-devel@lists.freedesktop.org Signed-off-by: Andrew F. Davis [jstultz: reworded commit message, and lots of cleanups] Signed-off-by: John Stultz --- v2: * Folded down f

[RFC][PATCH 5/5 v2] kselftests: Add dma-heap test

2019-03-05 Thread John Stultz
@lists.freedesktop.org Signed-off-by: John Stultz --- v2: Switched to use reworked dma-heap apis --- tools/testing/selftests/dmabuf-heaps/Makefile | 11 +++ tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c | 96 ++ 2 files changed, 107 insertions(+) create mode 100644

[RFC][PATCH 2/5 v2] dma-buf: heaps: Add heap helpers

2019-03-05 Thread John Stultz
! Cc: Laura Abbott Cc: Benjamin Gaignard Cc: Greg KH Cc: Sumit Semwal Cc: Liam Mark Cc: Brian Starkey Cc: Andrew F. Davis Cc: Chenbo Feng Cc: Alistair Strachan Cc: dri-devel@lists.freedesktop.org Signed-off-by: John Stultz --- v2: * Removed cache management performance hack that I had

[RFC][PATCH 4/5 v2] dma-buf: heaps: Add CMA heap to dmabuf heapss

2019-03-05 Thread John Stultz
: Benjamin Gaignard Cc: Greg KH Cc: Sumit Semwal Cc: Liam Mark Cc: Brian Starkey Cc: Andrew F. Davis Cc: Chenbo Feng Cc: Alistair Strachan Cc: dri-devel@lists.freedesktop.org Signed-off-by: John Stultz --- v2: * Switch allocate to return dmabuf fd * Simplify init code * Checkpatch fixups

[RFC][PATCH 3/5 v2] dma-buf: heaps: Add system heap to dmabuf heaps

2019-03-05 Thread John Stultz
Cross, Laura Abbott, and others! Cc: Laura Abbott Cc: Benjamin Gaignard Cc: Greg KH Cc: Sumit Semwal Cc: Liam Mark Cc: Brian Starkey Cc: Andrew F. Davis Cc: Chenbo Feng Cc: Alistair Strachan Cc: dri-devel@lists.freedesktop.org Signed-off-by: John Stultz --- v2: * Switch allocate to return

[RFC][PATCH 0/5 v2] DMA-BUF Heaps (destaging ION)

2019-03-05 Thread John Stultz
: Brian Starkey Cc: Andrew F. Davis Cc: Chenbo Feng Cc: Alistair Strachan Cc: dri-devel@lists.freedesktop.org Andrew F. Davis (1): dma-buf: Add dma-buf heaps framework John Stultz (4): dma-buf: heaps: Add heap helpers dma-buf: heaps: Add system heap to dmabuf heaps dma-buf: heaps: Add CMA

Re: [EARLY RFC][PATCH] dma-buf: Add dma-buf heaps framework

2019-03-05 Thread John Stultz
On Tue, Mar 5, 2019 at 10:05 AM Andrew F. Davis wrote: > On 3/4/19 7:16 PM, John Stultz wrote: > > The current patchset against v5.0 (with hikey960 patches), which > > includes the flags and other suggested changes is here: > > > > https://git.linaro.org/people/john

Re: [EARLY RFC][PATCH] dma-buf: Add dma-buf heaps framework

2019-03-04 Thread John Stultz
On Mon, Mar 4, 2019 at 6:53 AM Andrew F. Davis wrote: > On 3/1/19 6:06 AM, Brian Starkey wrote: > > On Mon, Feb 25, 2019 at 08:36:04AM -0600, Andrew F. Davis wrote: > >> +static long dma_heap_ioctl(struct file *filp, unsigned int cmd, unsigned > >> long arg) > >> +{ > >> +switch (cmd) { > >>

Re: [EARLY RFC][PATCH] dma-buf: Add dma-buf heaps framework

2019-03-01 Thread John Stultz
On Thu, Feb 28, 2019 at 9:21 AM Andrew F. Davis wrote: > > On 2/27/19 3:55 PM, John Stultz wrote: > > On Wed, Feb 27, 2019 at 8:38 AM Andrew F. Davis wrote: > >> > >> We can always add back the free op, the alternative is to have the heap > >> expor

Re: [EARLY RFC][PATCH] dma-buf: Add dma-buf heaps framework

2019-02-27 Thread John Stultz
On Wed, Feb 27, 2019 at 3:22 PM Laura Abbott wrote: > On 2/25/19 6:36 AM, Andrew F. Davis wrote: > > + > > +dev_t dma_heap_devt; > > +struct class *dma_heap_class; > > Can we make sure this gets reviewed by Greg sooner rather than > later when we drop the RFC? I think the use of this here > is

Re: [EARLY RFC][PATCH] dma-buf: Add dma-buf heaps framework

2019-02-27 Thread John Stultz
On Wed, Feb 27, 2019 at 8:38 AM Andrew F. Davis wrote: > > On 2/26/19 5:40 PM, John Stultz wrote: > > On Tue, Feb 26, 2019 at 11:21 AM John Stultz wrote: > > I've updated the patches here: > > kernel: > > https://git.linaro.org/people/john.stultz/android-d

Re: [EARLY RFC][PATCH] dma-buf: Add dma-buf heaps framework

2019-02-26 Thread John Stultz
On Tue, Feb 26, 2019 at 11:21 AM John Stultz wrote: > > On Tue, Feb 26, 2019 at 6:47 AM Andrew F. Davis wrote: > > On 2/26/19 12:20 AM, John Stultz wrote: > > > It boots w/ AOSP, and allocations seem to work, but there's something > > > wrong with the dmabuf mmapi

Re: [EARLY RFC][PATCH] dma-buf: Add dma-buf heaps framework

2019-02-26 Thread John Stultz
On Tue, Feb 26, 2019 at 6:47 AM Andrew F. Davis wrote: > On 2/26/19 12:20 AM, John Stultz wrote: > > On Mon, Feb 25, 2019 at 6:36 AM Andrew F. Davis wrote: > >> It all needs a bit more work, and I'm sure I'll find missing parts when > >> I add some more heaps, b

Re: [EARLY RFC][PATCH] dma-buf: Add dma-buf heaps framework

2019-02-25 Thread John Stultz
On Mon, Feb 25, 2019 at 6:36 AM Andrew F. Davis wrote: > > This framework allows a unified userspace interface for dma-buf > exporters, allowing userland to allocate specific types of memory > for use in dma-buf sharing. > > Each heap is given its own device node, which a user can allocate > a

Re: [EARLY RFC][PATCH] dma-buf: Add dma-buf heaps framework

2019-02-25 Thread John Stultz
On Mon, Feb 25, 2019 at 6:36 AM Andrew F. Davis wrote: > +static int dma_heap_buffer_alloc(struct dma_heap *heap, size_t len, unsigned > int flags) > +{ > + struct dma_heap_buffer *buffer; > + int fd, ret; > + > + buffer = kzalloc(sizeof(*buffer), GFP_KERNEL); > + if

Re: [EARLY RFC][PATCH] dma-buf: Add dma-buf heaps framework

2019-02-25 Thread John Stultz
On Mon, Feb 25, 2019 at 6:36 AM Andrew F. Davis wrote: > > This framework allows a unified userspace interface for dma-buf > exporters, allowing userland to allocate specific types of memory > for use in dma-buf sharing. > > Each heap is given its own device node, which a user can allocate > a

Re: [EARLY RFC][PATCH] dma-buf: Add dma-buf heaps framework

2019-02-25 Thread John Stultz
On Mon, Feb 25, 2019 at 6:36 AM Andrew F. Davis wrote: > > This framework allows a unified userspace interface for dma-buf > exporters, allowing userland to allocate specific types of memory > for use in dma-buf sharing. > > Each heap is given its own device node, which a user can allocate > a

Re: [EARLY RFC][PATCH 0/4] dmabuf pools infrastructure (destaging ION)

2019-02-22 Thread John Stultz
On Fri, Feb 22, 2019 at 12:45 PM John Stultz wrote: > Ok, I've renamed things back to heaps, and updated the patches here > (sorry, I didn't rename the git branch :): > kernel: > https://git.linaro.org/people/john.stultz/android-dev.git/log/?h=dev/dma-buf-pools > userland: &g

Re: [EARLY RFC][PATCH 0/4] dmabuf pools infrastructure (destaging ION)

2019-02-22 Thread John Stultz
On Fri, Feb 22, 2019 at 9:24 AM John Stultz wrote: > > On Fri, Feb 22, 2019 at 8:55 AM Andrew F. Davis wrote: > > On 2/21/19 1:40 AM, John Stultz wrote: > > > Here is a very early peek at my dmabuf pools patchset, which > > > tries to destage a f

Re: [EARLY RFC][PATCH 0/4] dmabuf pools infrastructure (destaging ION)

2019-02-22 Thread John Stultz
On Fri, Feb 22, 2019 at 8:55 AM Andrew F. Davis wrote: > On 2/21/19 1:40 AM, John Stultz wrote: > > Here is a very early peek at my dmabuf pools patchset, which > > tries to destage a fair chunk of ION functionality. > > > > This build and boots, but I've not gotten to

Re: [EARLY RFC][PATCH 0/4] dmabuf pools infrastructure (destaging ION)

2019-02-21 Thread John Stultz
On Wed, Feb 20, 2019 at 11:40 PM John Stultz wrote: > > Here is a very early peek at my dmabuf pools patchset, which > tries to destage a fair chunk of ION functionality. > > This build and boots, but I've not gotten to testing the actual > pool devices yet (need to write some k

[EARLY RFC][PATCH 3/4] dma-buf: pools: Add system/system-contig pools to dmabuf pools

2019-02-20 Thread John Stultz
. Davis Cc: Chenbo Feng Cc: Alistair Strachan Cc: dri-devel@lists.freedesktop.org Signed-off-by: John Stultz --- drivers/dma-buf/pools/Kconfig | 7 + drivers/dma-buf/pools/Makefile | 1 + drivers/dma-buf/pools/system_pool.c | 374 3 files

[EARLY RFC][PATCH 2/4] dma-buf: pools: Add page-pool for dma-buf pools

2019-02-20 Thread John Stultz
for alternatives here would be great. Cc: Laura Abbott Cc: Benjamin Gaignard Cc: Sumit Semwal Cc: Liam Mark Cc: Brian Starkey Cc: Andrew F. Davis Cc: Chenbo Feng Cc: Alistair Strachan Cc: dri-devel@lists.freedesktop.org Signed-off-by: John Stultz --- drivers/dma-buf/pools/Makefile | 2

[EARLY RFC][PATCH 4/4] dma-buf: pools: Add CMA pool to dmabuf pools

2019-02-20 Thread John Stultz
@lists.freedesktop.org Signed-off-by: John Stultz --- drivers/dma-buf/pools/Kconfig| 8 +++ drivers/dma-buf/pools/Makefile | 1 + drivers/dma-buf/pools/cma_pool.c | 143 +++ 3 files changed, 152 insertions(+) create mode 100644 drivers/dma-buf/pools/cma_pool.c diff --git

[EARLY RFC][PATCH 0/4] dmabuf pools infrastructure (destaging ION)

2019-02-20 Thread John Stultz
: Liam Mark Cc: Brian Starkey Cc: Andrew F. Davis Cc: Chenbo Feng Cc: Alistair Strachan Cc: dri-devel@lists.freedesktop.org John Stultz (4): dma-buf: Add dma-buf pools framework dma-buf: pools: Add page-pool for dma-buf pools dma-buf: pools: Add system/system-contig pools to dmabuf pools

[EARLY RFC][PATCH 1/4] dma-buf: Add dma-buf pools framework

2019-02-20 Thread John Stultz
t using a miscdevice. Extra review would be helpful. Cc: Laura Abbott Cc: Benjamin Gaignard Cc: Sumit Semwal Cc: Liam Mark Cc: Brian Starkey Cc: Andrew F. Davis Cc: Chenbo Feng Cc: Alistair Strachan Cc: dri-devel@lists.freedesktop.org Signed-off-by: John Stultz --- MAINTAINERS

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

2019-02-20 Thread John Stultz
On Wed, Feb 20, 2019 at 7:07 AM Brian Starkey wrote: > > On Tue, Feb 19, 2019 at 01:47:36PM -0800, John Stultz wrote: > > On Tue, Feb 19, 2019 at 1:13 PM Laura Abbott wrote: > > > > > > On 2/15/19 12:24 PM, John Stultz wrote: > > > > The per-device h

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

2019-02-19 Thread John Stultz
On Tue, Feb 19, 2019 at 1:25 PM Laura Abbott wrote: > > On 2/15/19 12:24 PM, John Stultz wrote: > > 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 ad

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

2019-02-19 Thread John Stultz
On Tue, Feb 19, 2019 at 1:46 PM Laura Abbott wrote: > > On 2/19/19 1:39 PM, Andrew F. Davis wrote: > > On 2/19/19 3:13 PM, Laura Abbott wrote: > >> On 2/15/19 12:24 PM, John Stultz wrote: > >>> The per-device heaps don't support HEAP_QUERY ioctl, since > >

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

2019-02-19 Thread John Stultz
On Tue, Feb 19, 2019 at 1:13 PM Laura Abbott wrote: > > On 2/15/19 12:24 PM, John Stultz wrote: > > 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 u

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

2019-02-19 Thread John Stultz
On Tue, Feb 19, 2019 at 1:17 PM Laura Abbott wrote: > > On 2/15/19 12:24 PM, John Stultz wrote: > > 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 throug

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

2019-02-19 Thread John Stultz
On Tue, Feb 19, 2019 at 12:46 PM Laura Abbott wrote: > > On 2/15/19 12:24 PM, John Stultz wrote: > > 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 >

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

2019-02-19 Thread John Stultz
On Mon, Feb 18, 2019 at 3:51 AM Brian Starkey wrote: > On Fri, Feb 15, 2019 at 12:24:08PM -0800, John Stultz wrote: > > 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 ho

[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
: Sumit Semwal Cc: Liam Mark Cc: Brian Starkey Cc: Andrew F. Davis Cc: Alistair Strachan Cc: dri-devel@lists.freedesktop.org Signed-off-by: John Stultz --- drivers/staging/android/ion/ion-ioctl.c | 12 drivers/staging/android/uapi/ion.h | 22 ++ 2 files

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

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

2019-02-16 Thread John Stultz via dri-devel
: Alistair Strachan Cc: dri-devel@lists.freedesktop.org John Stultz (4): ion: Add ION_VERSION ioctl ion: Initial hack to create per heap devices ion: Add HEAP_INFO ioctl to be able to fetch heap type ion: Make "legacy" /dev/ion support optional drivers/staging/android/i

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

2019-02-16 Thread John Stultz via dri-devel
: Alistair Strachan Cc: dri-devel@lists.freedesktop.org Signed-off-by: John Stultz --- drivers/staging/android/ion/ion-ioctl.c | 4 drivers/staging/android/ion/ion.h | 2 ++ drivers/staging/android/uapi/ion.h | 7 +++ 3 files changed, 13 insertions(+) diff --git a/drivers

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 use

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

2019-02-16 Thread John Stultz via dri-devel
dri-devel@lists.freedesktop.org Signed-off-by: John Stultz --- drivers/staging/android/ion/Kconfig | 7 ++ drivers/staging/android/ion/ion-ioctl.c | 2 ++ drivers/staging/android/ion/ion.c | 43 + drivers/staging/android/ion/ion.h | 2 ++ 4 files c

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

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

2019-02-15 Thread John Stultz via dri-devel
Cc: Brian Starkey Cc: Andrew F. Davis Cc: Alistair Strachan Cc: dri-devel@lists.freedesktop.org Signed-off-by: John Stultz --- drivers/staging/android/ion/ion-ioctl.c | 62 + drivers/staging/android/ion/ion.c | 18 ++ drivers/staging/android/io

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,

Re: [RFC PATCH v2] android: ion: How to properly clean caches for uncached allocations

2018-11-02 Thread John Stultz
On Thu, Nov 1, 2018 at 3:15 PM, Liam Mark wrote: > Based on the suggestions from Laura I created a first draft for a change > which will attempt to ensure that uncached mappings are only applied to > ION memory who's cache lines have been cleaned. > It does this by providing cached mappings (for

Re: [PATCH] staging: ion: Rework ion_map_dma_buf() to minimize re-mapping

2018-10-17 Thread John Stultz
On Fri, Oct 12, 2018 at 10:51 AM, Laura Abbott wrote: > > I suspect most of the cost of the dma_map/dma_unmap is from the > cache flushing and not the actual mapping operations. If this > is the case, another option might be to figure out how to > incorporate dma_attrs so drivers can use

Re: [PATCH] staging: ion: Rework ion_map_dma_buf() to minimize re-mapping

2018-10-15 Thread John Stultz
On Sat, Oct 13, 2018 at 11:01 PM, Liam Mark wrote: > On Fri, 12 Oct 2018, Laura Abbott wrote: >> I thought there might have been some Qualcomm >> stuff that did that (Liam? Todd?) > > Yes we have a form of "lazy mapping", which clients can opt into using, > which results in iommu page table

Re: [PATCH] staging: ion: Rework ion_map_dma_buf() to minimize re-mapping

2018-10-15 Thread John Stultz
On Fri, Oct 12, 2018 at 10:51 AM, Laura Abbott wrote: > On 10/10/2018 04:33 PM, John Stultz wrote: >> >> Since 4.12, much later narrowed down to commit 2a55e7b5e544 >> ("staging: android: ion: Call dma_map_sg for syncing and mapping"), >> we have seen graphi

[PATCH] staging: ion: Rework ion_map_dma_buf() to minimize re-mapping

2018-10-10 Thread John Stultz
Greg Kroah-Hartman Cc: Todd Kjos Cc: Martijn Coenen Cc: dri-devel@lists.freedesktop.org Signed-off-by: John Stultz --- drivers/staging/android/ion/ion.c | 36 +++- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/drivers/staging/android/ion/ion.c

Re: [PATCH v5 4/8] drm/cma-helper: Use the generic fbdev emulation

2018-08-23 Thread John Stultz
On Thu, Aug 23, 2018 at 1:49 PM, Laurent Pinchart wrote: > On Thursday, 23 August 2018 20:48:40 EEST John Stultz wrote: >> On Thu, Aug 23, 2018 at 1:09 AM, Daniel Vetter wrote: >> > On Thu, Aug 23, 2018 at 10:46:15AM +0300, Laurent Pinchart wrote: >> >> Possibly sl

Re: [PATCH v5 4/8] drm/cma-helper: Use the generic fbdev emulation

2018-08-23 Thread John Stultz
On Thu, Aug 23, 2018 at 1:09 AM, Daniel Vetter wrote: > On Thu, Aug 23, 2018 at 10:46:15AM +0300, Laurent Pinchart wrote: >> Hi John, >> >> On Thursday, 23 August 2018 07:14:08 EEST John Stultz wrote: >> > On Mon, Aug 20, 2018 at 11:44 PM, John Stultz

Re: [Intel-gfx] [PATCH v5 4/8] drm/cma-helper: Use the generic fbdev emulation

2018-08-23 Thread John Stultz
On Thu, Aug 23, 2018 at 10:24 AM, Ville Syrjälä wrote: > On Wed, Aug 22, 2018 at 09:14:08PM -0700, John Stultz wrote: >> On Mon, Aug 20, 2018 at 11:44 PM, John Stultz wrote: >> > Hey Noralf, all, >> > I've been digging for a bit on the regression that this patch ha

Re: [PATCH v5 4/8] drm/cma-helper: Use the generic fbdev emulation

2018-08-23 Thread John Stultz
On Thu, Aug 23, 2018 at 12:46 AM, Laurent Pinchart wrote: > Hi John, > > On Thursday, 23 August 2018 07:14:08 EEST John Stultz wrote: >> On Mon, Aug 20, 2018 at 11:44 PM, John Stultz wrote: >> > Hey Noralf, all, >> > >> > I've been digging for a

Re: [PATCH v5 4/8] drm/cma-helper: Use the generic fbdev emulation

2018-08-23 Thread John Stultz
On Wed, Aug 22, 2018 at 10:51 PM, Daniel Vetter wrote: > On Thu, Aug 23, 2018 at 6:14 AM, John Stultz wrote: >> On Mon, Aug 20, 2018 at 11:44 PM, John Stultz wrote: >>> Hey Noralf, all, >>> I've been digging for a bit on the regression that this patch has >

Re: [PATCH v5 4/8] drm/cma-helper: Use the generic fbdev emulation

2018-08-22 Thread John Stultz
On Mon, Aug 20, 2018 at 11:44 PM, John Stultz wrote: > Hey Noralf, all, > I've been digging for a bit on the regression that this patch has > tripped on the HiKey board as reported here: > https://lkml.org/lkml/2018/8/16/81 > > The first issue was that the kirin

Re: [PATCH v5 4/8] drm/cma-helper: Use the generic fbdev emulation

2018-08-21 Thread John Stultz
On Tue, Aug 21, 2018 at 7:59 AM, Noralf Trønnes wrote: > Den 21.08.2018 10.44, skrev Daniel Vetter: >> On Mon, Aug 20, 2018 at 11:44:56PM -0700, John Stultz wrote: >>> >>> Since we don't have a drm_gem_cma_object reference in >>> drm_fb_helper_generic_p

Re: [PATCH v5 4/8] drm/cma-helper: Use the generic fbdev emulation

2018-08-21 Thread John Stultz
On Tue, Jul 3, 2018 at 9:03 AM, Noralf Trønnes wrote: > This switches the CMA helper drivers that use its fbdev emulation over > to the generic fbdev emulation. It's the first phase of using generic > fbdev. A later phase will use DRM client callbacks for the > lastclose/hotplug/remove callbacks.

Re: [git pull] drm for 4.19-rc1

2018-08-16 Thread John Stultz
On Thu, Aug 16, 2018 at 3:16 PM, Daniel Vetter wrote: > On Thu, Aug 16, 2018 at 11:21 PM, John Stultz wrote: >> On Thu, Aug 16, 2018 at 1:46 PM, Daniel Vetter wrote: >>> You happen to have set drm_fb_overalloc respectively >>> CONFIG_DRM_FBDEV_OVERALLOC? Was added so

Re: [git pull] drm for 4.19-rc1

2018-08-16 Thread John Stultz
On Thu, Aug 16, 2018 at 1:38 PM, John Stultz wrote: > > Unfortunately bumping the max width/height values to 4096 cause the > system to hard hang as userspace starts up (and setting it to > 2048/2160 does the same). > > So yea, I'm going to continue to dig at the hard-hang issu

Re: [git pull] drm for 4.19-rc1

2018-08-16 Thread John Stultz
On Thu, Aug 16, 2018 at 1:46 PM, Daniel Vetter wrote: > On Thu, Aug 16, 2018 at 10:38 PM, John Stultz wrote: >> On Thu, Aug 16, 2018 at 12:16 AM, Daniel Vetter wrote: >>> On Thu, Aug 16, 2018 at 8:04 AM, John Stultz wrote: >>>> On Tue, Aug 14, 2018

Re: [git pull] drm for 4.19-rc1

2018-08-16 Thread John Stultz
On Thu, Aug 16, 2018 at 12:16 AM, Daniel Vetter wrote: > On Thu, Aug 16, 2018 at 8:04 AM, John Stultz wrote: >> On Tue, Aug 14, 2018 at 7:53 PM, Dave Airlie wrote: >>> This is the main drm pull request for 4.19. >>> >>> Rob has some new hardware support for

Re: [git pull] drm for 4.19-rc1

2018-08-16 Thread John Stultz
On Tue, Aug 14, 2018 at 7:53 PM, Dave Airlie wrote: > This is the main drm pull request for 4.19. > > Rob has some new hardware support for new qualcomm hw that I'll send along > separately. This has the display part of it, the remaining pull is for the > acceleration engine. > > This also

[RFC][PATCH] drm: kirin: Remove useless "Scale not support" error message

2018-06-21 Thread John Stultz
Cc: dri-devel@lists.freedesktop.org Signed-off-by: John Stultz --- drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c index 2269be9..bb77420 100644

Re: [PATCH 3/3 v2] drm_hwcomposer: Add platform backend for minigbm

2018-05-02 Thread John Stultz
On Wed, May 2, 2018 at 5:31 PM, John Stultz <john.stu...@linaro.org> wrote: > On Wed, May 2, 2018 at 5:01 PM, Alistair Strachan <astrac...@google.com> > wrote: >> This adds support for the chromiumos (not AOSP) version of minigbm. Like >> hisi, the gralloc handle

Re: [PATCH 3/3 v2] drm_hwcomposer: Add platform backend for minigbm

2018-05-02 Thread John Stultz
now. > > Tested with a pending change to the 'cuttlefish' android virtual device > in AOSP with its custom gralloc switched to minigbm. > > Cc: John Stultz <john.stu...@linaro.org> > Cc: Rob Herring <rob.herr...@linaro.org> > Cc: Sean Paul <seanp...@google.com>

Re: [PATCH 2/3] drm_hwcomposer: Stop using libsync to provide sw_sync wrappers

2018-05-02 Thread John Stultz
On Wed, May 2, 2018 at 4:56 PM, Alistair Strachan <astrac...@google.com> wrote: > Use of the sw_sync API is not allowed any more. Until drm_hwcomposer is > weaned off of sw_sync, build our own copy. > > Cc: John Stultz <john.stu...@linaro.org> > Cc: Rob Herring <rob.

Re: [PATCH 1/3] drm_hwcomposer: Drop obsolete drm_gralloc include path

2018-05-02 Thread John Stultz
On Wed, May 2, 2018 at 4:56 PM, Alistair Strachan <astrac...@google.com> wrote: > In commit d12274d, "drm_hwcomposer: Rework platformdrmgeneric.cpp > to use libdrm's gralloc handle", the use of drm_gralloc was removed. > > Cc: John Stultz <john.stu...@linaro.o

Re: [PATCH] drm_hwcomposer: Mark tests as vendor, fix build

2018-05-02 Thread John Stultz
This change also adds the libhardware include path explicitly, as the > implicit include of hardware/libhardware/include is going away. > > Cc: John Stultz <john.stu...@linaro.org> > Cc: Rob Herring <rob.herr...@linaro.org> > Cc: Sumit Semwal <sumit.sem...@linaro.org> &

Re: [PATCH] drm_hwcomposer: Remove NVIDIA importer header

2018-05-02 Thread John Stultz
On Wed, May 2, 2018 at 4:53 PM, Alistair Strachan <astrac...@google.com> wrote: > Commit 0f7487f "drm_hwcomposer: remove NVIDIA importer" removed most of > the implementation, but not the platformnv.h header file. Remove this > header now. > > Cc: John Stultz <

[PATCH hwc 2/4] drm_hwcomposer: Use log/log.h instead of cutils/log.h

2018-04-26 Thread John Stultz
t Szczesiak <matt.szczes...@arm.com> Cc: Liviu Dudau <liviu.du...@arm.com> Cc: David Hanna <david.hann...@gmail.com> Cc: Rob Herring <rob.herr...@linaro.org> Cc: Alexandru-Cosmin Gheorghe <alexandru-cosmin.gheor...@arm.com> Cc: Alistair Strachan <astrac...@googl

[PATCH hwc 4/4] drm_hwcomposer: Fall back to client compositon if the gl precompostior fails

2018-04-26 Thread John Stultz
org> Cc: Alexandru-Cosmin Gheorghe <alexandru-cosmin.gheor...@arm.com> Cc: Alistair Strachan <astrac...@google.com> Reviewed-by: Rob Herring <r...@kernel.org> Signed-off-by: John Stultz <john.stu...@linaro.org> --- v2: * Dropped misguided attempt to trivially allocate layer

[PATCH hwc 1/4] drm_hwcomposer: Andorid.mk : Mark libdrmhwc_utils as vendor module

2018-04-26 Thread John Stultz
> Cc: Alistair Strachan <astrac...@google.com> Signed-off-by: Sumit Semwal <sumit.sem...@linaro.org> [jstultz: commit message tweaks] Signed-off-by: John Stultz <john.stu...@linaro.org> --- Android.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/Android.mk b/Android.mk

[PATCH hwc 3/4] drm_hwcomposer: Cleanup gl precompositor init and provide uses_GL flag

2018-04-26 Thread John Stultz
> Cc: Liviu Dudau <liviu.du...@arm.com> Cc: David Hanna <david.hann...@gmail.com> Cc: Rob Herring <rob.herr...@linaro.org> Cc: Alexandru-Cosmin Gheorghe <alexandru-cosmin.gheor...@arm.com> Cc: Alistair Strachan <astrac...@google.com> Reviewed-by: Rob Herring <r...

Re: [RFC][PATCH 2/2] drm_hwcomposer: Fall back to client compositon if the gl precompostior fails

2018-04-24 Thread John Stultz
On Tue, Apr 24, 2018 at 3:34 AM, Stefan Schake <stsch...@gmail.com> wrote: > On Tue, Apr 24, 2018 at 10:09 AM, Alexandru-Cosmin Gheorghe > <alexandru-cosmin.gheor...@arm.com> wrote: >> On Mon, Apr 23, 2018 at 05:06:44PM -0700, John Stultz wrote: >>> @@ -695,6 +704

Re: [RFC][PATCH 2/2] drm_hwcomposer: Fall back to client compositon if the gl precompostior fails

2018-04-23 Thread John Stultz
On Mon, Apr 23, 2018 at 5:06 PM, John Stultz <john.stu...@linaro.org> wrote: > If the gl precompositor isn't being used, we cannot accept > every layer as a device composited layer. > > Thus this patch adds some extra logic in the validate function > to try to map layers to av

  1   2   3   4   >