Re: [PATCH] staging: android: ion: cma heap: Limit size of allocated buffer

2019-08-26 Thread Alexey Skidanov
On 8/26/19 11:36 AM, Laura Abbott wrote: > On 8/23/19 10:28 PM, Alexey Skidanov wrote: >> In ion_cma_heap, the allocated buffer is represented by a single >> struct scatterlist instance. The length field of this struct is >> 32 bit, hence the maximal size of requested buf

[PATCH] staging: android: ion: cma heap: Limit size of allocated buffer

2019-08-24 Thread Alexey Skidanov
the requested size might be greater than 4GB and in this case the field length of the struct scatterlist is initialized incorrectly. To fix this, we check that requested size may fit into the field length of the struct scatterlist Signed-off-by: Alexey Skidanov --- drivers/staging/android/ion/ion.h

ION doesn't set the cache attributes according to ION_FLAG_CACHED buffer flag

2019-05-12 Thread Alexey Skidanov
Hi, Mapping the buffer to user space, ION failed to set the cache attributes according to ION_FLAG_CACHED flag on x86. When the reserved memory (reserved by memmap= kernel boot option) or part of it is mapped to the user space, the user space memory mapping is always *uncachable*. ION uses

Re: [PATCH] staging: android: ion: Add chunk heaps instantiation

2019-01-02 Thread Alexey Skidanov
On 1/3/19 12:37 AM, Laura Abbott wrote: > On 12/20/18 1:29 PM, Alexey Skidanov wrote: >> >> >> On 12/20/18 10:36 PM, Laura Abbott wrote: >>> On 12/16/18 2:46 AM, Alexey Skidanov wrote: >>>> Chunk heap instantiation should be supported for device tr

Re: [PATCH] staging: android: ion: Add chunk heaps instantiation

2018-12-20 Thread Alexey Skidanov
On 12/20/18 10:36 PM, Laura Abbott wrote: > On 12/16/18 2:46 AM, Alexey Skidanov wrote: >> Chunk heap instantiation should be supported for device tree platforms >> and >> non device tree platforms. For device tree platforms, it's a platform >> specific code responsi

Re: [PATCH v3] staging: android: ion: Add implementation of dma_buf_vmap and dma_buf_vunmap

2018-12-18 Thread Alexey Skidanov
On 12/17/18 20:42, Liam Mark wrote: > On Sun, 16 Dec 2018, Alexey Skidanov wrote: > >> >> >> On 12/16/18 7:20 AM, Liam Mark wrote: >>> On Tue, 6 Feb 2018, Alexey Skidanov wrote: >>> >>>> >>>> >>>> On 02/07/2018 01:

[PATCH] staging: android: ion: Add chunk heaps instantiation

2018-12-16 Thread Alexey Skidanov
, there is no defined way to create the heaps. This patch provides the way of chunk heaps creation using "ion_chunk_heap=name:size@start" kernel boot parameter. Link: http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2018-November/128495.html Signed-off-by: Alexe

Re: [PATCH v3] staging: android: ion: Add implementation of dma_buf_vmap and dma_buf_vunmap

2018-12-15 Thread Alexey Skidanov
On 12/16/18 7:20 AM, Liam Mark wrote: > On Tue, 6 Feb 2018, Alexey Skidanov wrote: > >> >> >> On 02/07/2018 01:56 AM, Laura Abbott wrote: >>> On 01/31/2018 10:10 PM, Alexey Skidanov wrote: >>>> >>>> On 01/31/2018 03:00 PM, Greg KH wrot

Re: [PATCH] staging: android: ion: Add chunk heap initialization

2018-12-05 Thread Alexey Skidanov
On 11/29/18 8:25 AM, Alexey Skidanov wrote: > > > On 11/29/18 3:30 AM, Laura Abbott wrote: >> On 11/27/18 12:07 PM, Alexey Skidanov wrote: >>> >>> >>> On 11/27/18 9:20 PM, Laura Abbott wrote: >>>> On 11/26/18 10:43 AM, Alexey Skidanov wrot

Re: [PATCH] staging: android: ion: Add chunk heap initialization

2018-11-28 Thread Alexey Skidanov
On 11/29/18 3:30 AM, Laura Abbott wrote: > On 11/27/18 12:07 PM, Alexey Skidanov wrote: >> >> >> On 11/27/18 9:20 PM, Laura Abbott wrote: >>> On 11/26/18 10:43 AM, Alexey Skidanov wrote: >>>> >>>> >>>> On 11/26/18 6:39 PM, La

Re: [PATCH] staging: android: ion: Add chunk heap initialization

2018-11-27 Thread Alexey Skidanov
On 11/27/18 9:20 PM, Laura Abbott wrote: > On 11/26/18 10:43 AM, Alexey Skidanov wrote: >> >> >> On 11/26/18 6:39 PM, Laura Abbott wrote: >>> On 11/25/18 2:02 PM, Alexey Skidanov wrote: >>>> >>>> >>>> On 11/25/18 11:40 PM, La

Re: [PATCH] staging: android: ion: Add chunk heap initialization

2018-11-26 Thread Alexey Skidanov
On 11/26/18 6:39 PM, Laura Abbott wrote: > On 11/25/18 2:02 PM, Alexey Skidanov wrote: >> >> >> On 11/25/18 11:40 PM, Laura Abbott wrote: >>> On 11/25/18 1:22 PM, Alexey Skidanov wrote: >>>> >>>> >>>> On 11/25/18 10:51 PM, Lau

Re: [PATCH] staging: android: ion: Add chunk heap initialization

2018-11-25 Thread Alexey Skidanov
On 11/25/18 11:40 PM, Laura Abbott wrote: > On 11/25/18 1:22 PM, Alexey Skidanov wrote: >> >> >> On 11/25/18 10:51 PM, Laura Abbott wrote: >>> On 11/11/18 11:29 AM, Alexey Skidanov wrote: >>>> Create chunk heap of specified size and base address by addi

Re: [PATCH] staging: android: ion: Add chunk heap initialization

2018-11-25 Thread Alexey Skidanov
On 11/25/18 10:51 PM, Laura Abbott wrote: > On 11/11/18 11:29 AM, Alexey Skidanov wrote: >> Create chunk heap of specified size and base address by adding >> "ion_chunk_heap=size@start" kernel boot parameter. >> >> Signed-off-by: Alexey Skidanov &g

[PATCH] staging: android: ion: Add chunk heap initialization

2018-11-11 Thread Alexey Skidanov
Create chunk heap of specified size and base address by adding "ion_chunk_heap=size@start" kernel boot parameter. Signed-off-by: Alexey Skidanov --- drivers/staging/android/ion/ion_chunk_heap.c | 40 1 file changed, 40 insertions(+) diff --git a/drive

Re: [PATCH] Add carve out heap name initialization

2018-11-08 Thread Alexey Skidanov
On 11/8/18 9:41 PM, Laura Abbott wrote: > On 11/8/18 11:34 AM, Alexey Skidanov wrote: >> >> >> On 11/8/18 9:15 PM, Laura Abbott wrote: >>> On 10/22/18 2:15 PM, Alexey Skidanov wrote: >>>> Heap name is mundatory. >>>> >>> >>>

Re: [PATCH] Add carve out heap name initialization

2018-11-08 Thread Alexey Skidanov
On 11/8/18 9:15 PM, Laura Abbott wrote: > On 10/22/18 2:15 PM, Alexey Skidanov wrote: >> Heap name is mundatory. >> > > I'm wary of this and the other change because it misses the > broader problem of dealing with the carveout heaps. > I still want to remove the car

[PATCH] Add carve out heap name initialization

2018-10-22 Thread Alexey Skidanov
Heap name is mundatory. Signed-off-by: Alexey Skidanov --- drivers/staging/android/ion/ion_carveout_heap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/android/ion/ion_carveout_heap.c b/drivers/staging/android/ion/ion_carveout_heap.c index e129237..e89b464 100644

Re: [PATCH] staging: android: ion: Fixed uninitialized heap name access

2018-10-22 Thread Alexey Skidanov
On 10/22/18 17:32, Laura Abbott wrote: > On 10/22/2018 07:02 AM, Alexey Skidanov wrote: >> The heap name might be uninitialized and access might crash the >> kernel. >> > > The heap name should never be null so this seems like this is being > fixed in the wrong p

[PATCH] staging: android: ion: Fixed uninitialized heap name access

2018-10-22 Thread Alexey Skidanov
The heap name might be uninitialized and access might crash the kernel. Signed-off-by: Alexey Skidanov --- drivers/staging/android/ion/ion.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index

[PATCH v5] staging: android: ion: Add per-heap counters

2018-10-09 Thread Alexey Skidanov
. Signed-off-by: Alexey Skidanov --- v3: Removed debugfs_create_dir() return value checking v4: Added spinlock to protect heap statistics v5: Rebased on staging-next drivers/staging/android/ion/ion.c | 50 --- drivers/staging/android/ion

Re: staging: android: ion: aligned allocation support

2018-10-03 Thread Alexey Skidanov
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

staging: android: ion: aligned allocation support

2018-10-02 Thread Alexey Skidanov
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,

[PATCH v4] staging: android: ion: Add per-heap counters

2018-09-30 Thread Alexey Skidanov
. Signed-off-by: Alexey Skidanov --- v3: Removed debugfs_create_dir() return value checking v4: Added spinlock to protect heap statistics drivers/staging/android/ion/ion.c | 50 --- drivers/staging/android/ion/ion.h | 10 +++- 2 files changed

Re: [PATCH v3] staging: android: ion: Add per-heap counters

2018-09-26 Thread Alexey Skidanov
On 09/21/2018 05:40 PM, Laura Abbott wrote: > On 09/11/2018 04:29 AM, Alexey Skidanov wrote: >> Heap statistics have been removed and currently even basics statistics >> are missing. >> >> This patch creates per heap debugfs directory >> /sys/kernel/debug/ &

[PATCH v3] staging: android: ion: Add per-heap counters

2018-09-11 Thread Alexey Skidanov
. Signed-off-by: Alexey Skidanov --- v3: Removed debugfs_create_dir() return value checking drivers/staging/android/ion/ion.c | 46 --- drivers/staging/android/ion/ion.h | 6 ++--- 2 files changed, 41 insertions(+), 11 deletions(-) diff --git a/drivers

Re: [PATCH v2] staging: android: ion: Add per-heap counters

2018-09-11 Thread Alexey Skidanov
On 09/11/2018 12:31 PM, Greg KH wrote: > On Tue, Sep 11, 2018 at 12:11:23PM +0300, Alexey Skidanov wrote: >> >> >> On 09/11/2018 11:59 AM, Greg KH wrote: >>> On Tue, Sep 11, 2018 at 11:50:19AM +0300, Dan Carpenter wrote: >>>> On Tue, Sep 11, 2018

Re: [PATCH v2] staging: android: ion: Add per-heap counters

2018-09-11 Thread Alexey Skidanov
On 09/11/2018 12:15 PM, Dan Carpenter wrote: > On Tue, Sep 11, 2018 at 12:11:23PM +0300, Alexey Skidanov wrote: >> >> >> On 09/11/2018 11:59 AM, Greg KH wrote: >>> On Tue, Sep 11, 2018 at 11:50:19AM +0300, Dan Carpenter wrote: >>>> On Tue, Sep 11, 2018

Re: [PATCH v2] staging: android: ion: Add per-heap counters

2018-09-11 Thread Alexey Skidanov
On 09/11/2018 11:59 AM, Greg KH wrote: > On Tue, Sep 11, 2018 at 11:50:19AM +0300, Dan Carpenter wrote: >> On Tue, Sep 11, 2018 at 11:17:10AM +0300, Alexey Skidanov wrote: >>> @@ -546,6 +556,38 @@ void ion_device_add_heap(struct ion_heap *heap) >>> } &g

[PATCH v2] staging: android: ion: Add per-heap counters

2018-09-11 Thread Alexey Skidanov
. Signed-off-by: Alexey Skidanov --- drivers/staging/android/ion/ion.c | 50 --- drivers/staging/android/ion/ion.h | 6 ++--- 2 files changed, 45 insertions(+), 11 deletions(-) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c

Re: [PATCH] staging: android: ion: Add per-heap counters

2018-09-10 Thread Alexey Skidanov
On 09/10/2018 11:21 PM, Laura Abbott wrote: > On 09/10/2018 03:00 AM, Alexey Skidanov wrote: >> >> >> On 09/10/2018 12:36 PM, Dan Carpenter wrote: >>> On Sun, Sep 09, 2018 at 01:44:31AM +0300, Alexey Skidanov wrote: >>>> The heap statistics h

Re: [PATCH] staging: android: ion: Add per-heap counters

2018-09-10 Thread Alexey Skidanov
On 09/10/2018 06:57 PM, Greg KH wrote: > On Mon, Sep 10, 2018 at 06:51:18PM +0300, Alexey Skidanov wrote: >> On 09/10/2018 05:21 PM, Greg KH wrote: >>> On Mon, Sep 10, 2018 at 01:46:13PM +0300, Alexey Skidanov wrote: >>>> On 09/10/2018 11:27 AM, Greg KH wrote:

Re: [PATCH] staging: android: ion: Add per-heap counters

2018-09-10 Thread Alexey Skidanov
On 09/10/2018 05:21 PM, Greg KH wrote: > On Mon, Sep 10, 2018 at 01:46:13PM +0300, Alexey Skidanov wrote: >> >> >> On 09/10/2018 11:27 AM, Greg KH wrote: >>> On Sun, Sep 09, 2018 at 01:44:31AM +0300, Alexey Skidanov wrote: >>>> The heap statistics h

Re: [PATCH] staging: android: ion: Add per-heap counters

2018-09-10 Thread Alexey Skidanov
On 09/10/2018 11:27 AM, Greg KH wrote: > On Sun, Sep 09, 2018 at 01:44:31AM +0300, Alexey Skidanov wrote: >> The heap statistics have been removed and currently even basics statistics >> are missing. >> >> This patch creates per heap debugfs directory /sys/kernel/debu

Re: [PATCH] staging: android: ion: Add per-heap counters

2018-09-10 Thread Alexey Skidanov
On 09/10/2018 12:36 PM, Dan Carpenter wrote: > On Sun, Sep 09, 2018 at 01:44:31AM +0300, Alexey Skidanov wrote: >> The heap statistics have been removed and currently even basics statistics >> are missing. > > Remind me why did we remove them? What was the git hash? 1

[PATCH] staging: android: ion: Add per-heap counters

2018-09-08 Thread Alexey Skidanov
The heap statistics have been removed and currently even basics statistics are missing. This patch creates per heap debugfs directory /sys/kernel/debug/ and adds two counters - the number of allocated buffers and number of allocated bytes. Signed-off-by: Alexey Skidanov --- drivers/staging

Re: [PATCH] staging: android: ion: Fix compilation warning

2018-09-08 Thread Alexey Skidanov
On 09/08/2018 09:42 PM, Dan Carpenter wrote: > On Sat, Sep 08, 2018 at 07:33:40PM +0300, Alexey Skidanov wrote: >> Label unlock is defined but not used >> >> Signed-off-by: Alexey Skidanov > > There is no Fixes tag. I don't understand how the compile warning was

[PATCH] staging: android: ion: Fix compilation warning

2018-09-08 Thread Alexey Skidanov
Label unlock is defined but not used Signed-off-by: Alexey Skidanov --- drivers/staging/android/ion/ion.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index 5fa5363..080ff1c 100644 --- a/drivers

[PATCH v3] staging: android: ion: Clean unused debug_show memeber of the heap object

2018-09-04 Thread Alexey Skidanov
ION had supported heap debug info under /sys/kernel/debug/ion/. This support have been removed but some leftovers (dead code) still exist. This patch removes the existing dead code. Fixes: 15c6098cfec5 ("staging: android: ion: Remove ion_handle and ion_client") Signed-off-by: Alexe

Re: [PATCH v2] staging: android: ion: Clean unused debug_show memeber of the heap object

2018-09-04 Thread Alexey Skidanov
On 09/04/2018 09:23 PM, Laura Abbott wrote: > On 08/26/2018 01:08 PM, Alexey Skidanov wrote: >> ION had supported heap debug info under >> /sys/kernel/debug/ion/. >> This support have been removed but some leftovers (dead code) still >> exist. >> >> Th

[PATCH v2] staging: android: ion: Clean unused debug_show memeber of the heap object

2018-08-26 Thread Alexey Skidanov
ION had supported heap debug info under /sys/kernel/debug/ion/. This support have been removed but some leftovers (dead code) still exist. This patch removes the existing dead code. Signed-off-by: Alexey Skidanov --- drivers/staging/android/ion/ion.h | 5 - drivers/staging

[PATCH] staging: android: ion: Clean unused debug_show memeber of the heap object

2018-08-26 Thread Alexey Skidanov
Signed-off-by: Alexey Skidanov --- drivers/staging/android/ion/ion.h | 5 - drivers/staging/android/ion/ion_system_heap.c | 24 2 files changed, 29 deletions(-) diff --git a/drivers/staging/android/ion/ion.h b/drivers/staging/android/ion/ion.h index

Re: [PATCH] staging: android: ion: Change dma_buf_kmap()/dma_buf_kmap_atomic() implementation

2018-02-17 Thread Alexey Skidanov
On 02/17/2018 01:54 AM, Laura Abbott wrote: > On 02/16/2018 04:17 AM, Alexey Skidanov wrote: >> >> >> On 02/16/2018 01:48 AM, Laura Abbott wrote: >>> On 02/12/2018 02:33 PM, Alexey Skidanov wrote: >>>> Current ion kernel mapping implementation uses vmap(

Re: [PATCH] staging: android: ion: Change dma_buf_kmap()/dma_buf_kmap_atomic() implementation

2018-02-16 Thread Alexey Skidanov
On 02/16/2018 10:49 PM, Greg KH wrote: > On Fri, Feb 16, 2018 at 10:43:03PM +0200, Alexey Skidanov wrote: >> >> >> On 02/16/2018 04:46 PM, Greg KH wrote: >>> On Tue, Feb 13, 2018 at 12:33:53AM +0200, Alexey Skidanov wrote: >>>> Current ion kernel

Re: [PATCH] staging: android: ion: Change dma_buf_kmap()/dma_buf_kmap_atomic() implementation

2018-02-16 Thread Alexey Skidanov
On 02/16/2018 04:46 PM, Greg KH wrote: > On Tue, Feb 13, 2018 at 12:33:53AM +0200, Alexey Skidanov wrote: >> Current ion kernel mapping implementation uses vmap() to map previously >> allocated buffers into kernel virtual address space. >> >> On 32-bit platforms,

Re: [PATCH] staging: android: ion: Change dma_buf_kmap()/dma_buf_kmap_atomic() implementation

2018-02-16 Thread Alexey Skidanov
On 02/16/2018 01:48 AM, Laura Abbott wrote: > On 02/12/2018 02:33 PM, Alexey Skidanov wrote: >> Current ion kernel mapping implementation uses vmap() to map previously >> allocated buffers into kernel virtual address space. >> >> On 32-bit platforms, vmap() might fail

Re: staging: android: ion: potential coherency issue

2018-02-13 Thread Alexey Skidanov
On 02/13/2018 08:40 PM, Laura Abbott wrote: > On 02/12/2018 11:24 PM, Alexey Skidanov wrote: >> Hello, >> >> Correct me if I'm wrong, but there is no user space interface, similar >> to the dma_buf_start_cpu_access()/dma_buf_end_cpu_access() to handle IO >> coh

staging: android: ion: potential coherency issue

2018-02-12 Thread Alexey Skidanov
Hello, Correct me if I'm wrong, but there is no user space interface, similar to the dma_buf_start_cpu_access()/dma_buf_end_cpu_access() to handle IO coherency. That is, on the platforms, where the SW is responsible for IO coherency handling, the following sequences: - write to the buffer - DMA

Re: [PATCH] staging: android: ion: Add requested allocation alignment

2018-02-12 Thread Alexey Skidanov
On 02/12/2018 10:46 PM, Laura Abbott wrote: > On 02/12/2018 12:22 PM, Alexey Skidanov wrote: >> >> >> On 02/12/2018 09:52 PM, Laura Abbott wrote: >>> On 02/12/2018 11:11 AM, Alexey Skidanov wrote: >>>> >>>> On 02/12/2018 08:42 PM, Laura Abbot

Re: ion kernel mapping implementation

2018-02-12 Thread Alexey Skidanov
On 02/12/2018 10:09 PM, Laura Abbott wrote: > On 02/12/2018 11:21 AM, Alexey Skidanov wrote: >> >> >> On 02/12/2018 08:30 PM, Laura Abbott wrote: >>> On 02/10/2018 01:43 AM, Alexey Skidanov wrote: >>>> Hi, >>>> >>>> Curre

Re: [PATCH] staging: android: ion: Add requested allocation alignment

2018-02-12 Thread Alexey Skidanov
On 02/12/2018 09:52 PM, Laura Abbott wrote: > On 02/12/2018 11:11 AM, Alexey Skidanov wrote: >> >> On 02/12/2018 08:42 PM, Laura Abbott wrote: >>> On 02/10/2018 02:17 AM, Alexey Skidanov wrote: >>>> Current ion defined allocation ioctl doesn't allow to specif

Re: ion kernel mapping implementation

2018-02-12 Thread Alexey Skidanov
On 02/12/2018 08:30 PM, Laura Abbott wrote: > On 02/10/2018 01:43 AM, Alexey Skidanov wrote: >> Hi, >> >> Current ion kernel mapping implementation uses vmap() to map previously >> allocated buffers into kernel virtual address space. On 32 bit >> platforms,

Re: [PATCH] staging: android: ion: Add requested allocation alignment

2018-02-12 Thread Alexey Skidanov
On 02/12/2018 08:42 PM, Laura Abbott wrote: > On 02/10/2018 02:17 AM, Alexey Skidanov wrote: >> Current ion defined allocation ioctl doesn't allow to specify the >> requested >> allocation alignment. CMA heap allocates buffers aligned on buffer size >> page order. >

[PATCH] staging: android: ion: Add requested allocation alignment

2018-02-10 Thread Alexey Skidanov
fragmentation and in some cases it may avoid the allocation request failure. To fix this, we add an alignment parameter to the allocation ioctl. Signed-off-by: Alexey Skidanov <alexey.skida...@intel.com> --- drivers/staging/android/ion/ion-ioctl.c | 3 ++- drivers/staging/android/ion

ion kernel mapping implementation

2018-02-10 Thread Alexey Skidanov
Hi, Current ion kernel mapping implementation uses vmap() to map previously allocated buffers into kernel virtual address space. On 32 bit platforms, vmap() might fail on large enough buffers due to the limited available vmalloc space. dma_buf_kmap() should guarantee that only one page is mapped

Re: staging: ion: ION allocation fall back order depends on heap linkage order

2018-02-07 Thread Alexey Skidanov
On 02/07/2018 05:32 PM, Laura Abbott wrote: > On 02/07/2018 07:10 AM, Alexey Skidanov wrote: >> >> >> On 02/07/2018 04:58 PM, Laura Abbott wrote: >>> On 02/06/2018 11:05 PM, Alexey Skidanov wrote: >>>> >>>> >>>>> Yup, you'v

Re: staging: ion: ION allocation fall back order depends on heap linkage order

2018-02-07 Thread Alexey Skidanov
On 02/07/2018 04:58 PM, Laura Abbott wrote: > On 02/06/2018 11:05 PM, Alexey Skidanov wrote: >> >> >>> Yup, you've hit upon a key problem. Having fallbacks be stable >>> was always a problem and the recommendation these days is to >>> not rely

Re: staging: ion: ION allocation fall back order depends on heap linkage order

2018-02-06 Thread Alexey Skidanov
> Yup, you've hit upon a key problem. Having fallbacks be stable > was always a problem and the recommendation these days is to > not rely on them. You can specify a heap at a time and fallback > manually if you want that behavior. > > If you have a proposal to make fallbacks work reliably

Re: [PATCH v3] staging: android: ion: Add implementation of dma_buf_vmap and dma_buf_vunmap

2018-01-31 Thread Alexey Skidanov
On 01/31/2018 03:00 PM, Greg KH wrote: On Wed, Jan 31, 2018 at 02:03:42PM +0200, Alexey Skidanov wrote: Any driver may access shared buffers, created by ion, using dma_buf_vmap and dma_buf_vunmap dma-buf API that maps/unmaps previosuly allocated buffers into the kernel virtual address space

[PATCH v3] staging: android: ion: Add implementation of dma_buf_vmap and dma_buf_vunmap

2018-01-31 Thread Alexey Skidanov
Any driver may access shared buffers, created by ion, using dma_buf_vmap and dma_buf_vunmap dma-buf API that maps/unmaps previosuly allocated buffers into the kernel virtual address space. The implementation of these API is missing in the current ion implementation. Signed-off-by: Alexey Skidanov

[PATCH v2] staging: android: ion: Add implementation of dma_buf_vmap and dma_buf_vunmap

2018-01-30 Thread Alexey Skidanov
dma_buf_vmap and dma_buf_vunmap allow drivers to access buffers, created by ion. Signed-off-by: Alexey Skidanov <alexey.skida...@intel.com> --- Changes in v1: - Added changelog text drivers/staging/android/ion/ion.c | 13 + 1 file changed, 13 insertions(+) diff --git a/d

[PATCH] staging: android: ion: Add implementation of dma_buf_vmap and dma_buf_vunmap

2018-01-30 Thread Alexey Skidanov
Signed-off-by: Alexey Skidanov <alexey.skida...@intel.com> --- drivers/staging/android/ion/ion.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index f480885..4f1dc7f 100644 --- a/drivers/staging/a

staging: ion: ION allocation fall back order depends on heap linkage order

2018-01-28 Thread Alexey Skidanov
Hi, According to my understanding, the allocation fall back order completely depends on heap->id that is assigned during the heap creation: plist_for_each_entry(heap, >heaps, node) { /* if the caller didn't specify this heap id */ if (!((1 << heap->id) & heap_id_mask))