Re: [PATCH] drm/msm: Fix removal of valid error case when checking speed_bin

2021-04-05 Thread John Stultz
On Mon, Mar 29, 2021 at 6:34 PM John Stultz wrote: > > Commit 7bf168c8fe8c ("drm/msm: Fix speed-bin support not to > access outside valid memory"), reworked the nvmem reading of > "speed_bin", but in doing so dropped handling of the -ENOENT > case which

[PATCH] drm/msm: Fix removal of valid error case when checking speed_bin

2021-03-29 Thread John Stultz
d-bin support not to access outside valid memory") Signed-off-by: John Stultz --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c index 690409ca8a186

Re: [PATCH v3 1/2] usb: dwc3: Trigger a GCTL soft reset when switching modes in DRD

2021-03-29 Thread John Stultz
05 PM, Thinh Nguyen wrote: > >>>> Wesley Cheng wrote: > >>>>> > >>>>> On 3/6/2021 3:41 PM, Thinh Nguyen wrote: > >>>>>> Wesley Cheng wrote: > >>>>>>> On 1/8/2021 4:44 PM, Thinh Nguyen wrote: > >&

Re: [PATCH] selftests: timers: remove unneeded semicolon

2021-03-15 Thread John Stultz
s for sending this along. Acked-by: John Stultz thanks -john

Re: [PATCH] selftests/timers: Fix spelling mistake "clocksourc" -> "clocksource"

2021-03-15 Thread John Stultz
On Mon, Mar 15, 2021 at 5:33 AM Colin King wrote: > > From: Colin Ian King > > There is a spelling mistake in a comment. Fix it. > > Signed-off-by: Colin Ian King Akcde-yb: John Stultz I kid, I kid! My apologies and thanks! Acked-by: John Stultz

Re: [PATCH v2 0/3] ASoC: sdm845: array out of bound issues

2021-03-09 Thread John Stultz
On Tue, Mar 9, 2021 at 6:21 AM Srinivas Kandagatla wrote: > > During testing John Stultz and Amit reported few array our bound issues > after enabling bound sanitizer > > This patch series attempts to fix those! > > changes since v1: > - make sure the wcd is n

[PATCH v8 5/5] dma-buf: system_heap: Add deferred freeing to the system heap

2021-03-04 Thread John Stultz
: Hridya Valsaraju Cc: Suren Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: John Stultz --- v2: * Rework deferred-free api to use

[PATCH v8 4/5] dma-buf: system_heap: Add drm pagepool support to system heap

2021-03-04 Thread John Stultz
: Brian Starkey Cc: Hridya Valsaraju Cc: Suren Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: John Stultz --- v2: * Fix

[PATCH v8 3/5] dma-buf: heaps: Add deferred-free-helper library code

2021-03-04 Thread John Stultz
Valsaraju Cc: Suren Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: John Stultz --- v2: * Fix sleep in atomic issue from using

[PATCH v8 2/5] drm: ttm_pool: Rework ttm_pool to use drm_page_pool

2021-03-04 Thread John Stultz
: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: John Stultz --- v7: * Major refactoring to use drm_page_pools inside the ttm_pool_type structure. This allows us to use container_of to get the needed context to free a page. This also means less code is changed

[PATCH v8 1/5] drm: Add a sharable drm page-pool implementation

2021-03-04 Thread John Stultz
Valsaraju Cc: Suren Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: John Stultz --- v8: * Completely rewritten from scratch

[PATCH v8 0/5] Generic page pool & deferred freeing for system dmabuf heap

2021-03-04 Thread John Stultz
...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org John Stultz (5): drm: Add a sharable drm page-pool implementation drm: ttm_pool: Rework ttm_pool to use drm_page_pool dma-buf: heaps: Add deferred-free-helper library code dma-buf: system_heap: Add drm pagepool support to system heap dma

Re: [PATCH v2] dma-buf: system_heap: do not warn for costly allocation

2021-03-04 Thread John Stultz
lection of the orders used for allocation (1MB, 64K, 4K) is designed > * to match with the sizes often found in IOMMUs. Using order 4 pages instead This looks good to me! Thanks for sending this and apologies for the slow reply, the patch slipped by me! Reviewed-by: John Stultz thanks again! -john

[RESEND][PATCH v2 1/2] dma-buf: dma-heap: Provide accessor to get heap name

2021-03-01 Thread John Stultz
: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: John Stultz --- v2: * Make sure to use "const char *" as Reported-by: kernel test robot --- drivers/dma-buf/dma-heap.c | 12 +++

[RESEND][PATCH v2 2/2] dma-buf: heaps: Fix the name used when exporting dmabufs to be the actual heap name

2021-03-01 Thread John Stultz
ren Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: John Stultz --- drivers/dma-buf/heaps/cma_heap.c| 1 + drivers/dma-buf/hea

Re: [PATCH] dma-buf: heaps: Set VM_PFNMAP in mmap for system and cma heaps

2021-03-01 Thread John Stultz
On Sat, Feb 27, 2021 at 1:44 AM Christoph Hellwig wrote: > > On Fri, Feb 26, 2021 at 08:36:55AM +0100, Daniel Vetter wrote: > > Also given that both deal with struct page there's a ton of divergence > > between these two that doesn't make much sense. Maybe could even share > > the code fully,

Re: [PATCH v2] drm/bridge: lt9611: Fix handling of 4k panels

2021-03-01 Thread John Stultz
On Thu, Jan 21, 2021 at 1:50 AM Robert Foss wrote: > +Sam Ravnborg > > I think this patch is ready to get pulled into the drm-misc tree. > > On Thu, 17 Dec 2020 at 15:09, Robert Foss wrote: > > > > 4k requires two dsi pipes, so don't report MODE_OK when only a > > single pipe is configured. But

[PATCH] dma-buf: heaps: Set VM_PFNMAP in mmap for system and cma heaps

2021-02-25 Thread John Stultz
Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: John Stultz --- drivers/dma-buf/heaps/cma_heap.c| 1 + drivers/dma-buf/heaps/system_heap.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/dma-buf/heaps/cma_heap.c b/drivers/dma

Re: [REGRESSION] "split bio_kmalloc from bio_alloc_bioset" causing crash shortly after bootup

2021-02-23 Thread John Stultz
> needed to guarantee forward progress was missing, but is not fatal. > > > > Satya, can you look into adding a mempool that can guarantees forward > > progress here? > > Something like this would be the minimum viable fix: This seems to work for me! Tested-by: John Stultz thanks -john

Re: [REGRESSION] "add a disk_uevent helper" breaks booting Andorid w/ dynamic partitions

2021-02-23 Thread John Stultz
device in in disk_uevent > > Restore the previous behavior by using the correct flag for the whole device > ("part0"). > > Fixes: 99dfc43ecbf6 ("block: use ->bi_bdev for bio based I/O accounting") > Reported-by: John Stultz > Signed-off-by: Christoph Hel

Re: [REGRESSION] "split bio_kmalloc from bio_alloc_bioset" causing crash shortly after bootup

2021-02-22 Thread John Stultz
On Mon, Feb 22, 2021 at 7:39 PM Chaitanya Kulkarni wrote: > > On 2/22/21 19:07, John Stultz wrote: > > [ 34.784901] ueventd: LoadWithAliases was unable to load > > platform:regulatory > > [ 34.785313] bio_alloc_bioset+0x14/0x230 > > [ 34.796189] bio_clone_fa

[REGRESSION] "split bio_kmalloc from bio_alloc_bioset" causing crash shortly after bootup

2021-02-22 Thread John Stultz
Hey all, In testing Linus' HEAD today I found another[1] regression in the block merge. This time I see a crash on my hikey960 board shortly after booting ASOP. See the log below. I bisected the issue down to "block: split bio_kmalloc from bio_alloc_bioset":

[REGRESSION] "add a disk_uevent helper" breaks booting Andorid w/ dynamic partitions

2021-02-22 Thread John Stultz
Hey all, After updating to Linus' HEAD today I found my db845c board wouldn't boot to android with the error below. I was able to bisect the boot regression down to "block: add a disk_uevent helper":

Re: [PATCH] dma-buf: system_heap: do not warn for costly allocation

2021-02-10 Thread John Stultz
On Wed, Feb 10, 2021 at 3:17 PM Minchan Kim wrote: > > On Wed, Feb 10, 2021 at 01:40:02PM -0800, John Stultz wrote: > > On Wed, Feb 10, 2021 at 9:48 AM Minchan Kim wrote: > > > > > > On Wed, Feb 10, 2021 at 09:32:09AM -0800, John Stultz wrote: > > > > O

Re: [PATCH] dma-buf: system_heap: do not warn for costly allocation

2021-02-10 Thread John Stultz
On Wed, Feb 10, 2021 at 9:48 AM Minchan Kim wrote: > > On Wed, Feb 10, 2021 at 09:32:09AM -0800, John Stultz wrote: > > On Wed, Feb 10, 2021 at 8:26 AM Minchan Kim wrote: > > > > > > Linux VM is not hard to support PAGE_ALLOC_COSTLY_ODER allocation > >

Re: [PATCH] dma-buf: system_heap: do not warn for costly allocation

2021-02-10 Thread John Stultz
On Wed, Feb 10, 2021 at 8:26 AM Minchan Kim wrote: > > Linux VM is not hard to support PAGE_ALLOC_COSTLY_ODER allocation > so normally expects driver passes __GFP_NOWARN in that case > if they has fallback options. > > system_heap in dmabuf is the case so do not flood into demsg > with the

[PATCH v2 1/2] dma-buf: dma-heap: Provide accessor to get heap name

2021-02-09 Thread John Stultz
: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: John Stultz --- v2: * Make sure to use "const char *" as Reported-by: kernel test robot --- drivers/dma-buf/dma-heap.c | 12 +++

[PATCH v2 2/2] dma-buf: heaps: Fix the name used when exporting dmabufs to be the actual heap name

2021-02-09 Thread John Stultz
ren Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: John Stultz --- drivers/dma-buf/heaps/cma_heap.c| 1 + drivers/dma-buf/hea

Re: [RFC][PATCH v6 1/7] drm: Add a sharable drm page-pool implementation

2021-02-09 Thread John Stultz
On Tue, Feb 9, 2021 at 4:11 AM Christian König wrote: > > > > Am 05.02.21 um 21:46 schrieb John Stultz: > > On Fri, Feb 5, 2021 at 12:47 AM Christian König > > wrote: > >> Am 05.02.21 um 09:06 schrieb John Stultz: > >>> diff --git a/drivers/gpu/

Re: [RFC][PATCH v6 3/7] drm: ttm_pool: Rework ttm_pool_free_page to allow us to use it as a function pointer

2021-02-09 Thread John Stultz
On Tue, Feb 9, 2021 at 4:14 AM Christian König wrote: > Am 05.02.21 um 20:47 schrieb John Stultz: > > On Fri, Feb 5, 2021 at 12:28 AM Christian König > > wrote: > >> Adding this to all pages would increase the memory footprint drastically. > > Yea, that's a good po

Re: [RFC][PATCH 2/2] dma-buf: heaps: Fix the name used when exporting dmabufs to be the actual heap name

2021-02-08 Thread John Stultz
On Mon, Feb 8, 2021 at 10:03 PM Sumit Semwal wrote: > > Hi Daniel, > > On Tue, 9 Feb 2021 at 02:36, Daniel Vetter wrote: > > > > On Mon, Feb 8, 2021 at 9:51 PM John Stultz wrote: > > > On Mon, Feb 8, 2021 at 2:08 AM Daniel Vetter wrote: > > > > O

Re: [PATCH 1/5] kselftests: dmabuf-heaps: Fix Makefile's inclusion of the kernel's usr/include dir

2021-02-08 Thread John Stultz
On Mon, Feb 8, 2021 at 3:23 PM Shuah Khan wrote: > On 1/28/21 8:05 PM, John Stultz wrote: > Thanks John for all these 5 fix and cleanup patches. > > Applied to linux-kselftest next for 5.12-rc1 > Great! I was just prepping to resend them :) Thanks so much! -john

Re: [RFC][PATCH 2/2] dma-buf: heaps: Fix the name used when exporting dmabufs to be the actual heap name

2021-02-08 Thread John Stultz
On Mon, Feb 8, 2021 at 2:08 AM Daniel Vetter wrote: > On Sat, Feb 06, 2021 at 05:47:48AM +0000, John Stultz wrote: > > By default dma_buf_export() sets the exporter name to be > > KBUILD_MODNAME. Unfortunately this may not be identical to the > > string used as the heap

[RFC][PATCH 1/2] dma-buf: dma-heap: Provide accessor to get heap name

2021-02-05 Thread John Stultz
: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: John Stultz --- drivers/dma-buf/dma-heap.c | 13 + include/linux/dma-heap.h | 9 + 2 files changed, 22 insertions(+) diff

[RFC][PATCH 2/2] dma-buf: heaps: Fix the name used when exporting dmabufs to be the actual heap name

2021-02-05 Thread John Stultz
ren Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: John Stultz --- drivers/dma-buf/heaps/cma_heap.c| 1 + drivers/dma-buf/hea

Re: [RFC][PATCH v6 0/7] Generic page pool & deferred freeing for system dmabuf heap

2021-02-05 Thread John Stultz
On Fri, Feb 5, 2021 at 2:36 AM Christian König wrote: > Am 05.02.21 um 09:06 schrieb John Stultz: > > Input would be greatly appreciated. Testing as well, as I don't > > have any development hardware that utilizes the ttm pool. > > We can easily do the testing and the gene

Re: [RFC][PATCH v6 1/7] drm: Add a sharable drm page-pool implementation

2021-02-05 Thread John Stultz
On Fri, Feb 5, 2021 at 12:47 AM Christian König wrote: > Am 05.02.21 um 09:06 schrieb John Stultz: > > diff --git a/drivers/gpu/drm/page_pool.c b/drivers/gpu/drm/page_pool.c > > new file mode 100644 > > index ..2139f86e6ca7 > > --- /dev/null > >

Re: [RFC][PATCH v6 3/7] drm: ttm_pool: Rework ttm_pool_free_page to allow us to use it as a function pointer

2021-02-05 Thread John Stultz
On Fri, Feb 5, 2021 at 12:28 AM Christian König wrote: > Am 05.02.21 um 09:06 schrieb John Stultz: > > This refactors ttm_pool_free_page(), and by adding extra entries > > to ttm_pool_page_dat, we then use it for all allocations, which > > allows us to simplify the argument

[RFC][PATCH v6 0/7] Generic page pool & deferred freeing for system dmabuf heap

2021-02-05 Thread John Stultz
Cc: Daniel Mentz Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org John Stultz (7): drm: Add a sharable drm page-pool implementation drm: ttm_pool: Rename the ttm_pool_dma structure

[RFC][PATCH v6 1/7] drm: Add a sharable drm page-pool implementation

2021-02-05 Thread John Stultz
: Hridya Valsaraju Cc: Suren Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: John Stultz --- drivers/gpu/drm/Kconfig | 4

[RFC][PATCH v6 4/7] drm: ttm_pool: Rework ttm_pool to use drm_page_pool

2021-02-05 Thread John Stultz
Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: John Stultz --- drivers/gpu/drm/Kconfig| 1 + drivers/gpu/drm/ttm/ttm_pool.c | 199 +++-- include/drm/ttm/ttm_pool.h | 23 +--- 3 files changed, 41

[RFC][PATCH v6 5/7] dma-buf: heaps: Add deferred-free-helper library code

2021-02-05 Thread John Stultz
Valsaraju Cc: Suren Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: John Stultz --- v2: * Fix sleep in atomic issue from using

[RFC][PATCH v6 6/7] dma-buf: system_heap: Add drm pagepool support to system heap

2021-02-05 Thread John Stultz
: Brian Starkey Cc: Hridya Valsaraju Cc: Suren Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: John Stultz --- v2: * Fix

[RFC][PATCH v6 3/7] drm: ttm_pool: Rework ttm_pool_free_page to allow us to use it as a function pointer

2021-02-05 Thread John Stultz
Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: John Stultz --- drivers/gpu/drm/ttm/ttm_pool.c | 60 ++ 1 file changed, 32 insertions(+), 28 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_pool.c b/drivers/gpu

[RFC][PATCH v6 7/7] dma-buf: system_heap: Add deferred freeing to the system heap

2021-02-05 Thread John Stultz
: Hridya Valsaraju Cc: Suren Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: John Stultz --- v2: * Rework deferred-free api to use

[RFC][PATCH v6 2/7] drm: ttm_pool: Rename the ttm_pool_dma structure to ttm_pool_page_dat

2021-02-05 Thread John Stultz
Valsaraju Cc: Suren Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: John Stultz --- drivers/gpu/drm/ttm/ttm_pool.c | 37

Re: [RFC][PATCH 2/3] dma-buf: system_heap: Add pagepool support to system heap

2021-02-02 Thread John Stultz
On Tue, Feb 2, 2021 at 6:04 AM Daniel Vetter wrote: > > On Fri, Jan 22, 2021 at 05:28:32PM -0800, John Stultz wrote: > > On Mon, Dec 21, 2020 at 2:09 PM Daniel Vetter wrote: > > > > > > On Fri, Dec 18, 2020 at 05:16:56PM -0800, John Stultz wrote: > > > &

Re: [PATCH v2 2/2] dma-buf: heaps: Map system heap pages as managed by linux vm

2021-02-02 Thread John Stultz
On Tue, Feb 2, 2021 at 4:31 PM Suren Baghdasaryan wrote: > Currently system heap maps its buffers with VM_PFNMAP flag using > remap_pfn_range. This results in such buffers not being accounted > for in PSS calculations because vm treats this memory as having no > page structs. Without page structs

[PATCH v4 3/3] dma-buf: system_heap: Add deferred freeing to the system heap

2021-02-01 Thread John Stultz
Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: John Stultz --- v2: * Rework deferred-free api to use reason enum

[PATCH v4 2/3] dma-buf: system_heap: Add pagepool support to system heap

2021-02-01 Thread John Stultz
: Brian Starkey Cc: Hridya Valsaraju Cc: Suren Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: John Stultz --- v2: * Fix

[PATCH v4 1/3] dma-buf: heaps: Add deferred-free-helper library code

2021-02-01 Thread John Stultz
Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: John Stultz --- v2: * Fix sleep in atomic issue from using a mutex, by switching

[PATCH 3/5] kselftests: dmabuf-heaps: Softly fail if don't find a vgem device

2021-01-28 Thread John Stultz
: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Cc: linux-kselft...@vger.kernel.org Signed-off-by: John Stultz --- .../testing/selftests/dmabuf-heaps/dmabuf-heap.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tools/testing/selftests/dmabuf

[PATCH 4/5] kselftests: dmabuf-heaps: Cleanup test output

2021-01-28 Thread John Stultz
...@vger.kernel.org Signed-off-by: John Stultz --- .../selftests/dmabuf-heaps/dmabuf-heap.c | 44 +-- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c b/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c index

[PATCH 5/5] kselftests: dmabuf-heaps: Add extra checking that allocated buffers are zeroed

2021-01-28 Thread John Stultz
...@lists.freedesktop.org Cc: linux-kselft...@vger.kernel.org Signed-off-by: John Stultz --- .../selftests/dmabuf-heaps/dmabuf-heap.c | 86 +++ 1 file changed, 86 insertions(+) diff --git a/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c b/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c

[PATCH 1/5] kselftests: dmabuf-heaps: Fix Makefile's inclusion of the kernel's usr/include dir

2021-01-28 Thread John Stultz
...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Cc: linux-kselft...@vger.kernel.org Fixes: a8779927fd86c ("kselftests: Add dma-heap test") Signed-off-by: John Stultz --- tools/testing/selftests/dmabuf-heaps/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/too

[PATCH 2/5] kselftests: dmabuf-heaps: Add clearer checks on DMABUF_BEGIN/END_SYNC

2021-01-28 Thread John Stultz
...@vger.kernel.org Signed-off-by: John Stultz --- .../selftests/dmabuf-heaps/dmabuf-heap.c | 20 --- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c b/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c index

[PATCH v3 2/3] dma-buf: system_heap: Add pagepool support to system heap

2021-01-27 Thread John Stultz
: Brian Starkey Cc: Hridya Valsaraju Cc: Suren Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: John Stultz --- v2: * Fix

[PATCH v3 1/3] dma-buf: heaps: Add deferred-free-helper library code

2021-01-27 Thread John Stultz
Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: John Stultz --- v2: * Fix sleep in atomic issue from using a mutex, by switching

[PATCH v3 3/3] dma-buf: system_heap: Add deferred freeing to the system heap

2021-01-27 Thread John Stultz
Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: John Stultz --- v2: * Rework deferred-free api to use reason enum

Re: [PATCH v2 2/3] dma-buf: system_heap: Add pagepool support to system heap

2021-01-27 Thread John Stultz
On Wed, Jan 27, 2021 at 12:21 PM Daniel Mentz wrote: > > On Fri, Jan 22, 2021 at 7:47 PM John Stultz wrote: > > +static int system_heap_clear_pages(struct page **pages, int num, pgprot_t > > pgprot) > > +{ > > + void *addr = vmap(pages, num, VM_MAP, pgprot

Re: [PATCH v4 4/4] dma-buf: heaps: add chunk heap to dmabuf heaps

2021-01-26 Thread John Stultz
On Thu, Jan 21, 2021 at 9:55 AM Minchan Kim wrote: Hey Minchan, Thanks for sending this out! I'm still working through testing with this patch set, so I may have some more feedback tomorrow, but a few quick items I did hit below. > + > +#define CHUNK_PREFIX "chunk-" > + > +static int

Re: [PATCH v4 3/4] dt-bindings: reserved-memory: Make DMA-BUF CMA heap DT-configurable

2021-01-26 Thread John Stultz
ding for chunk heap on DMA HEAP FRAMEWORK > + > +description: | > + The DMA chunk heap is backed by the Contiguous Memory Allocator (CMA) and > + supports bulk allocation of fixed size pages. > + > +maintainers: > + - Hyesoo Yu > + - John Stultz > + - M

[PATCH v2 2/3] dma-buf: system_heap: Add pagepool support to system heap

2021-01-22 Thread John Stultz
: Brian Starkey Cc: Hridya Valsaraju Cc: Suren Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: John Stultz --- v2: * Fix

[PATCH v2 3/3] dma-buf: system_heap: Add deferred freeing to the system heap

2021-01-22 Thread John Stultz
Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: John Stultz --- v2: * Rework deferred-free api to use reason enum

[PATCH v2 1/3] dma-buf: heaps: Add deferred-free-helper library code

2021-01-22 Thread John Stultz
Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: John Stultz --- v2: * Fix sleep in atomic issue from using a mutex, by switching

Re: [RFC][PATCH 2/3] dma-buf: system_heap: Add pagepool support to system heap

2021-01-22 Thread John Stultz
On Mon, Dec 21, 2020 at 2:09 PM Daniel Vetter wrote: > > On Fri, Dec 18, 2020 at 05:16:56PM -0800, John Stultz wrote: > > On Fri, Dec 18, 2020 at 6:36 AM Daniel Vetter wrote: > > > On Thu, Dec 17, 2020 at 11:06:11PM +, John Stultz wrote: > > > > Reuse/abuse t

Re: [RESEND][PATCH 2/3] dma-buf: heaps: Add a WARN_ON should the vmap_cnt go negative

2021-01-22 Thread John Stultz
On Fri, Jan 22, 2021 at 2:21 PM Suren Baghdasaryan wrote: > On Thu, Jan 21, 2021 at 11:56 PM Sumit Semwal wrote: > > On Wed, 20 Jan 2021 at 02:15, John Stultz wrote: > > > > > > We shouldn't vunmap more then we vmap, but if we do, make > > > sure we com

[PATCH 2/3] dma-buf: system_heap: Add a system-uncached heap re-using the system heap

2021-01-20 Thread John Stultz
: Hridya Valsaraju Cc: Suren Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Chris Goldsworthy Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: Bing Song Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: John Stultz

[PATCH 3/3] dma-buf: cma_heap: Add a cma-uncached heap re-using the cma heap

2021-01-20 Thread John Stultz
Mentz Cc: Chris Goldsworthy Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Bing Song Signed-off-by: John Stultz --- drivers/dma-buf/heaps/cma_heap.c | 119

[PATCH 1/3] dma-buf: dma-heap: Keep track of the heap device struct

2021-01-20 Thread John Stultz
: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: Bing Song Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: John Stultz --- drivers/dma-buf/dma-heap.c | 33 + include/linux/dma-heap.h | 9

[RFC][PATCH 0/3] dmabuf heaps: system uncached and cma uncached heaps

2021-01-20 Thread John Stultz
Garcia Cc: Simon Ser Cc: James Jones Cc: Bing Song Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Bing Song (1): dma-buf: cma_heap: Add a cma-uncached heap re-using the cma heap John Stultz (2): dma-buf: dma-heap: Keep track of the heap device struct dma-buf: system

[RESEND][PATCH 2/3] dma-buf: heaps: Add a WARN_ON should the vmap_cnt go negative

2021-01-19 Thread John Stultz
: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Suggested-by: Suren Baghdasaryan Signed-off-by: John Stultz --- drivers/dma-buf/heaps/cma_heap.c| 1 + drivers/dma-buf/heaps/system_heap.c | 1 + 2 files changed, 2 insertions

[RESEND][PATCH 1/3] dma-buf: system_heap: Make sure to return an error if we abort

2021-01-19 Thread John Stultz
: Sandeep Patil Cc: Daniel Mentz Cc: Chris Goldsworthy Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Suggested-by: Suren Baghdasaryan Signed-off-by: John Stultz --- drivers/dma-buf/heaps

[RESEND][PATCH 3/3] dma-buf: heaps: Rework heep allocation hooks to return struct dma_buf instead of fd

2021-01-19 Thread John Stultz
-by: John Stultz --- drivers/dma-buf/dma-heap.c | 14 +- drivers/dma-buf/heaps/cma_heap.c| 22 +++--- drivers/dma-buf/heaps/system_heap.c | 21 +++-- include/linux/dma-heap.h| 12 ++-- 4 files changed, 33 insertions(+), 36

Re: [PATCH v3 4/4] dma-buf: heaps: add chunk heap to dmabuf heaps

2021-01-19 Thread John Stultz
On Tue, Jan 12, 2021 at 5:22 PM Minchan Kim wrote: > > From: Hyesoo Yu > > This patch supports chunk heap that allocates the buffers that > arranged into a list a fixed size chunks taken from CMA. > > The chunk heap driver is bound directly to a reserved_memory > node by following Rob Herring's

Re: [PATCH v3 1/2] usb: dwc3: Trigger a GCTL soft reset when switching modes in DRD

2021-01-08 Thread John Stultz
On Fri, Jan 8, 2021 at 4:26 AM Felipe Balbi wrote: > > > Hi, > > John Stultz writes: > > From: Yu Chen > > > > Just resending this, as discussion died out a bit and I'm not > > sure how to make further progress. See here for debug data that > > was

[PATCH v3 2/2] usb: dwc3: Fix DRD mode change sequence following programming guide

2021-01-07 Thread John Stultz
hehab Cc: Greg Kroah-Hartman Cc: linux-...@vger.kernel.org Signed-off-by: John Stultz --- Feedback would be appreciated. I'm a little worried I should be conditionalizing the DCTL.CSftRst on DRD mode controllers, but I'm really not sure what the right thing to do is for non-DRD mode controllers. ---

[PATCH v3 1/2] usb: dwc3: Trigger a GCTL soft reset when switching modes in DRD

2021-01-07 Thread John Stultz
: Tejas Joglekar Cc: Yang Fei Cc: YongQin Liu Cc: Andrzej Pietrasiewicz Cc: Thinh Nguyen Cc: Jun Li Cc: Mauro Carvalho Chehab Cc: Greg Kroah-Hartman Cc: linux-...@vger.kernel.org Signed-off-by: Yu Chen Signed-off-by: John Stultz --- v2: * Rework to always call the GCTL soft reset in DRD mode

[PATCH 3/3] dma-buf: heaps: Rework heep allocation hooks to return struct dma_buf instead of fd

2021-01-07 Thread John Stultz
-by: John Stultz --- drivers/dma-buf/dma-heap.c | 14 +- drivers/dma-buf/heaps/cma_heap.c| 22 +++--- drivers/dma-buf/heaps/system_heap.c | 21 +++-- include/linux/dma-heap.h| 12 ++-- 4 files changed, 33 insertions(+), 36

[PATCH 2/3] dma-buf: heaps: Add a WARN_ON should the vmap_cnt go negative

2021-01-07 Thread John Stultz
: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Suggested-by: Suren Baghdasaryan Signed-off-by: John Stultz --- drivers/dma-buf/heaps/cma_heap.c| 1 + drivers/dma-buf/heaps/system_heap.c | 1 + 2 files changed, 2 insertions

[PATCH 1/3] dma-buf: system_heap: Make sure to return an error if we abort

2021-01-07 Thread John Stultz
: Sandeep Patil Cc: Daniel Mentz Cc: Chris Goldsworthy Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Suggested-by: Suren Baghdasaryan Signed-off-by: John Stultz --- drivers/dma-buf/heaps

[PATCH] dma-buf: cma_heap: Fix memory leak in CMA heap

2021-01-07 Thread John Stultz
esktop.org Reported-by: Bing Song Fixes: a5d2d29e24be ("dma-buf: heaps: Move heap-helper logic into the cma_heap implementation") Signed-off-by: John Stultz --- drivers/dma-buf/heaps/cma_heap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/dma-buf/heaps/cma_heap.c b/d

Re: [PATCH v2 16/18] arm64: dts: hi3660: Harmonize DWC USB3 DT nodes name

2020-12-21 Thread John Stultz
On Sat, Dec 19, 2020 at 3:06 AM Krzysztof Kozlowski wrote: > On Fri, Dec 18, 2020 at 09:11:42PM -0800, John Stultz wrote: > > On Wed, Nov 11, 2020 at 1:22 AM Serge Semin > > wrote: > > > > > > In accordance with the DWC USB3 bindings the corresponding nod

Re: [PATCH v2 16/18] arm64: dts: hi3660: Harmonize DWC USB3 DT nodes name

2020-12-18 Thread John Stultz
On Wed, Nov 11, 2020 at 1:22 AM Serge Semin wrote: > > In accordance with the DWC USB3 bindings the corresponding node > name is suppose to comply with the Generic USB HCD DT schema, which > requires the USB nodes to have the name acceptable by the regexp: > "^usb(@.*)?" . Make sure the

Re: [RFC][PATCH 2/3] dma-buf: system_heap: Add pagepool support to system heap

2020-12-18 Thread John Stultz
On Fri, Dec 18, 2020 at 6:36 AM Daniel Vetter wrote: > On Thu, Dec 17, 2020 at 11:06:11PM +0000, John Stultz wrote: > > Reuse/abuse the pagepool code from the network code to speed > > up allocation performance. > > > > This is similar to the ION pagepool usage, but t

[RFC][PATCH 3/3] dma-buf: system_heap: Add deferred freeing to the system heap

2020-12-17 Thread John Stultz
: Sandeep Patil Cc: Daniel Mentz Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: John Stultz --- drivers/dma-buf/heaps/Kconfig | 1 + drivers/dma-buf/heaps/system_heap.c

[RFC][PATCH 1/3] dma-buf: heaps: Add deferred-free-helper library code

2020-12-17 Thread John Stultz
: Sandeep Patil Cc: Daniel Mentz Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: John Stultz --- drivers/dma-buf/heaps/Kconfig| 3 + drivers/dma-buf/heaps/Makefile

[RFC][PATCH 2/3] dma-buf: system_heap: Add pagepool support to system heap

2020-12-17 Thread John Stultz
: Hridya Valsaraju Cc: Suren Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: John Stultz --- drivers/dma-buf/heaps/Kconfig

Re: [PATCH] cma_heap: fix implicit function declaration

2020-12-17 Thread John Stultz
On Thu, Dec 17, 2020 at 4:31 AM wrote: > > From: siyanteng > > When building cma_heap the following error shows up: > > drivers/dma-buf/heaps/cma_heap.c:195:10: error: implicit declaration of > function 'vmap'; did you mean 'kmap'? [-Werror=implicit-function-declaration] > 195 | vaddr =

[PATCH] dma-buf: cma_heap: Include linux/vmalloc.h to fix build failures on MIPS

2020-12-15 Thread John Stultz
...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Fixes: a5d2d29e24be ("dma-buf: heaps: Move heap-helper logic into the cma_heap implementation") Reported-by: Guenter Roeck Signed-off-by: John Stultz --- drivers/dma-buf/heaps/cma_heap.c | 1 + 1 file changed, 1 insertion(+)

Re: [PATCH v7 2/5] dma-buf: heaps: Move heap-helper logic into the cma_heap implementation

2020-12-15 Thread John Stultz
On Tue, Dec 15, 2020 at 3:53 PM Guenter Roeck wrote: > > On Sat, Nov 21, 2020 at 11:49:59PM +, John Stultz wrote: > > Since the heap-helpers logic ended up not being as generic as > > hoped, move the heap-helpers dma_buf_ops implementations into > &g

[RFC][PATCH 1/3] dma-buf: system_heap: Make sure to return an error if we abort

2020-12-15 Thread John Stultz
: Sandeep Patil Cc: Daniel Mentz Cc: Chris Goldsworthy Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Suggested-by: Suren Baghdasaryan Signed-off-by: John Stultz --- drivers/dma-buf/heaps

[RFC][PATCH 3/3] dma-buf: heaps: Rework heep allocation hooks to return struct dma_buf instead of fd

2020-12-15 Thread John Stultz
-by: John Stultz --- drivers/dma-buf/dma-heap.c | 14 +- drivers/dma-buf/heaps/cma_heap.c| 22 +++--- drivers/dma-buf/heaps/system_heap.c | 21 +++-- include/linux/dma-heap.h| 12 ++-- 4 files changed, 33 insertions(+), 36

[RFC][PATCH 2/3] dma-buf: heaps: Add a WARN_ON should the vmap_cnt go negative

2020-12-15 Thread John Stultz
: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-me...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Suggested-by: Suren Baghdasaryan Signed-off-by: John Stultz --- drivers/dma-buf/heaps/cma_heap.c| 1 + drivers/dma-buf/heaps/system_heap.c | 1 + 2 files changed, 2 insertions

Re: [PATCH v2] usb: dwc3: Trigger a GCTL soft reset when switching modes in DRD

2020-12-11 Thread John Stultz
Hey Felipe, Sorry for taking so long to get back to this. :( On Fri, Oct 23, 2020 at 12:02 AM Felipe Balbi wrote: > John Stultz writes: > > On Thu, Oct 22, 2020 at 12:55 AM Felipe Balbi wrote: > >> The only thing we need to do is verify > >> which register

Re: [PATCH] dmabuf: Add the capability to expose DMA-BUF stats in sysfs

2020-12-11 Thread John Stultz
On Thu, Dec 10, 2020 at 5:10 AM Daniel Vetter wrote: > On Thu, Dec 10, 2020 at 1:06 PM Greg KH wrote: > > On Thu, Dec 10, 2020 at 12:26:01PM +0100, Daniel Vetter wrote: > > > On Thu, Dec 10, 2020 at 11:55 AM Greg KH > > > wrote: > > > > On Thu, Dec 10, 2020 at 11:27:27AM +0100, Daniel Vetter

Re: [PATCH 4/4] dma-heap: Devicetree binding for chunk heap

2020-12-10 Thread John Stultz
On Thu, Dec 10, 2020 at 8:06 AM Minchan Kim wrote: > On Thu, Dec 10, 2020 at 12:15:15AM -0800, John Stultz wrote: > > Well, while I agree that conceptually the dmabuf heaps allow for > > allocations for multi-device pipelines, and thus are not tied to > > specifi

Re: [PATCH 4/4] dma-heap: Devicetree binding for chunk heap

2020-12-10 Thread John Stultz
On Wed, Dec 9, 2020 at 3:53 PM Minchan Kim wrote: > On Wed, Nov 18, 2020 at 07:19:07PM -0800, John Stultz wrote: > > The CMA heap currently only registers the default CMA heap, as we > > didn't want to expose all CMA regions and there's otherwise no way to > > pick and cho

Re: [PATCH v2 4/4] dma-buf: heaps: add chunk heap to dmabuf heaps

2020-12-01 Thread John Stultz
On Tue, Dec 1, 2020 at 4:13 PM Minchan Kim wrote: > > On Tue, Dec 01, 2020 at 03:38:14PM -0800, John Stultz wrote: > > On Tue, Dec 1, 2020 at 2:55 PM Minchan Kim wrote: > > > On Tue, Dec 01, 2020 at 11:48:15AM -0800, John Stultz wrote: > > > > On Tue, Dec 1, 2

Re: [PATCH v2 4/4] dma-buf: heaps: add chunk heap to dmabuf heaps

2020-12-01 Thread John Stultz
On Tue, Dec 1, 2020 at 2:55 PM Minchan Kim wrote: > On Tue, Dec 01, 2020 at 11:48:15AM -0800, John Stultz wrote: > > On Tue, Dec 1, 2020 at 9:51 AM Minchan Kim wrote: > > > > Thanks for reworking and resending this! > > > > ... > > &g

  1   2   3   4   5   6   7   8   9   10   >