Re: [PATCH] staging: android: ion: Fix dma direction for dma_sync_sg_for_cpu/device

2017-12-18 Thread Laura Abbott
On 12/15/2017 12:59 PM, Sushmita Susheelendra wrote: Use the direction argument passed into begin_cpu_access and end_cpu_access when calling the dma_sync_sg_for_cpu/device. The actual cache primitive called depends on the direction passed in. Acked-by: Laura Abbott <labb...@redhat.

Re: [PATCH v2] dma-buf: Rename dma-ops to prevent conflict with kunmap_atomic macro

2017-04-19 Thread Laura Abbott
1 insertions(+), 61 deletions(-) For Ion, Acked-by: Laura Abbott <labb...@redhat.com> I did some major Ion refactoring but I don't think this will conflict. Thanks, Laura

[PATCHv4 01/12] cma: Store a name in the cma structure

2017-04-18 Thread Laura Abbott
Frameworks that may want to enumerate CMA heaps (e.g. Ion) will find it useful to have an explicit name attached to each region. Store the name in each CMA structure. Signed-off-by: Laura Abbott <labb...@redhat.com> --- arch/powerpc/kvm/book3s_hv_builtin.c | 3 ++- drivers/base/dma-contig

[PATCHv4 05/12] staging: android: ion: Break the ABI in the name of forward progress

2017-04-18 Thread Laura Abbott
the useless alignment field from the allocation structure. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion/Makefile | 3 - drivers/staging/android/ion/compat_ion.c | 152 --- drivers/staging/android/ion/compat_ion.h

[PATCHv4 02/12] cma: Introduce cma_for_each_area

2017-04-18 Thread Laura Abbott
Frameworks (e.g. Ion) may want to iterate over each possible CMA area to allow for enumeration. Introduce a function to allow a callback. Signed-off-by: Laura Abbott <labb...@redhat.com> --- include/linux/cma.h | 2 ++ mm/cma.c| 14 ++ 2 files changed, 16 inse

[PATCHv4 03/12] staging: android: ion: Use CMA APIs directly

2017-04-18 Thread Laura Abbott
be allocated directly from the APIs. Switch to using this model to avoid needing a dummy device. This also mitigates some of the caching problems (e.g. dma_alloc_coherent only returning uncached memory). Signed-off-by: Laura Abbott <labb...@redhat.com> --- v4: Put some #ifdef around CM

[PATCHv4 04/12] staging: android: ion: Stop butchering the DMA address

2017-04-18 Thread Laura Abbott
Now that we have proper caching, stop setting the DMA address manually. It should be set after properly calling dma_map. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion/ion.c | 17 + 1 file changed, 1 insertion(+), 16 deletions(-) diff

[PATCHv4 06/12] staging: android: ion: Get rid of ion_phys_addr_t

2017-04-18 Thread Laura Abbott
Once upon a time, phys_addr_t was not everywhere in the kernel. These days it is used enough places that having a separate Ion type doesn't make sense. Remove the extra type and just use phys_addr_t directly. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion

[PATCHv4 07/12] staging: android: ion: Collapse internal header files

2017-04-18 Thread Laura Abbott
Ion current has ion_priv.h and ion.h as header files. ion.h was intended to be used for public APIs but Ion never ended up really having anything public. Combine the two headers so there is only one internal header. Signed-off-by: Laura Abbott <labb...@redhat.com> --- v4: minor cleanup sug

[PATCHv4 09/12] staging: android: ion: Drop ion_map_kernel interface

2017-04-18 Thread Laura Abbott
Nobody uses this interface externally. Drop it. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion/ion.c | 59 --- 1 file changed, 59 deletions(-) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/andro

[PATCHv4 12/12] staging/android: Update Ion TODO list

2017-04-18 Thread Laura Abbott
Most of the items have been taken care of by a clean up series. Remove the completed items and add a few new ones. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/TODO | 21 - 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/d

[PATCHv4 10/12] staging: android: ion: Remove ion_handle and ion_client

2017-04-18 Thread Laura Abbott
to give confusing data (orphaned allocations) so it can be replaced with something better if people actually want it. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion/ion-ioctl.c | 53 +-- drivers/staging/android/ion/ion.c

[PATCHv4 08/12] staging: android: ion: Rework heap registration/enumeration

2017-04-18 Thread Laura Abbott
to use. Switch to a model where Ion creates its device unconditionally and heaps are registed as available regions. Currently, only system and CMA heaps are converted over to the new model. Carveout and chunk heaps can be converted over when someone wants to figure out how. Signed-off-by: Laura

[PATCHv4 11/12] staging: android: ion: Set query return value

2017-04-18 Thread Laura Abbott
This never got set in the ioctl. Properly set a return value of 0 on success. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion/ion.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c

[PATCHv4 00/12] Ion cleanup in preparation for moving out of staging

2017-04-18 Thread Laura Abbott
, Laura Laura Abbott (12): cma: Store a name in the cma structure cma: Introduce cma_for_each_area staging: android: ion: Use CMA APIs directly staging: android: ion: Stop butchering the DMA address staging: android: ion: Break the ABI in the name of forward progress staging: android: ion

Re: [PATCHv3 13/22] staging: android: ion: Use CMA APIs directly

2017-04-11 Thread Laura Abbott
On 04/10/2017 11:47 PM, Laurent Pinchart wrote: > Hi Laura, > > Thank you for the patch. > > On Monday 03 Apr 2017 11:57:55 Laura Abbott wrote: >> When CMA was first introduced, its primary use was for DMA allocation >> and the only way to get CMA memory was

Re: [PATCHv3 00/22] Ion clean up in preparation in moving out of staging

2017-04-10 Thread Laura Abbott
On 04/10/2017 09:25 AM, Greg Kroah-Hartman wrote: > On Mon, Apr 10, 2017 at 09:20:27AM -0700, Laura Abbott wrote: >> On 04/08/2017 03:38 AM, Greg Kroah-Hartman wrote: >>> On Mon, Apr 03, 2017 at 11:57:42AM -0700, Laura Abbott wrote: >>>> Hi, >>>> >&g

Re: [PATCHv3 00/22] Ion clean up in preparation in moving out of staging

2017-04-10 Thread Laura Abbott
On 04/08/2017 03:38 AM, Greg Kroah-Hartman wrote: > On Mon, Apr 03, 2017 at 11:57:42AM -0700, Laura Abbott wrote: >> Hi, >> >> This is v3 of the series to do some serious Ion cleanup in preparation for >> moving out of staging. I didn't hear much on v2 so I'm going t

Re: [PATCHv3 17/22] staging: android: ion: Collapse internal header files

2017-04-10 Thread Laura Abbott
On 04/08/2017 11:12 AM, Emil Velikov wrote: > Hi Laura, > > Couple of trivial nitpicks below. > > On 3 April 2017 at 19:57, Laura Abbott <labb...@redhat.com> wrote: > >> --- a/drivers/staging/android/ion/ion.h >> +++ b/drivers/staging/android/ion/ion.h >

[PATCHv3 01/22] cma: Store a name in the cma structure

2017-04-03 Thread Laura Abbott
Frameworks that may want to enumerate CMA heaps (e.g. Ion) will find it useful to have an explicit name attached to each region. Store the name in each CMA structure. Signed-off-by: Laura Abbott <labb...@redhat.com> --- v3: Added default name suggestion per Sumit. Fixup powerpc cal

[PATCHv3 02/22] cma: Introduce cma_for_each_area

2017-04-03 Thread Laura Abbott
Frameworks (e.g. Ion) may want to iterate over each possible CMA area to allow for enumeration. Introduce a function to allow a callback. Signed-off-by: Laura Abbott <labb...@redhat.com> --- include/linux/cma.h | 2 ++ mm/cma.c| 14 ++ 2 files changed, 16 inse

[PATCHv3 07/22] staging: android: ion: Remove page faulting support

2017-04-03 Thread Laura Abbott
The new method of syncing with dma_map means that the page faulting sync implementation is no longer applicable. Remove it. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion/ion.c | 117 -- 1 file changed, 117 deletions(-)

[PATCHv3 03/22] staging: android: ion: Remove dmap_cnt

2017-04-03 Thread Laura Abbott
The reference counting of dma_map calls was removed. Remove the associated counter field as well. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion/ion_priv.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/android/ion/ion_priv.h b/d

[PATCHv3 06/22] staging: android: ion: Call dma_map_sg for syncing and mapping

2017-04-03 Thread Laura Abbott
Technically, calling dma_buf_map_attachment should return a buffer properly dma_mapped. Add calls to dma_map_sg to begin_cpu_access to ensure this happens. As a side effect, this lets Ion buffers take advantage of the dma_buf sync ioctls. Signed-off-by: Laura Abbott <labb...@redhat.

[PATCHv3 04/22] staging: android: ion: Remove alignment from allocation field

2017-04-03 Thread Laura Abbott
The align field was supposed to be used to specify the alignment of the allocation. Nobody actually does anything with it except to check if the alignment specified is out of bounds. Since this has no effect on the actual allocation, just remove it. Signed-off-by: Laura Abbott <labb...@redhat.

[PATCHv3 10/22] staging: android: ion: Remove import interface

2017-04-03 Thread Laura Abbott
With the expansion of dma-buf and the move for Ion to be come just an allocator, the import mechanism is mostly useless. There isn't a kernel component to Ion anymore and handles are private to Ion. Remove this interface. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/s

[PATCHv3 13/22] staging: android: ion: Use CMA APIs directly

2017-04-03 Thread Laura Abbott
be allocated directly from the APIs. Switch to using this model to avoid needing a dummy device. This also mitigates some of the caching problems (e.g. dma_alloc_coherent only returning uncached memory). Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion/K

[PATCHv3 09/22] staging: android: ion: Remove custom ioctl interface

2017-04-03 Thread Laura Abbott
Ion is now moving towards a unified interfact. This makes the custom ioctl interface unneeded. Remove it. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion/compat_ion.c | 40 -- drivers/staging/android/ion/ion-ioctl.c

[PATCHv3 19/22] staging: android: ion: Drop ion_map_kernel interface

2017-04-03 Thread Laura Abbott
Nobody uses this interface externally. Drop it. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion/ion.c | 59 --- 1 file changed, 59 deletions(-) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/andro

[PATCHv3 14/22] staging: android: ion: Stop butchering the DMA address

2017-04-03 Thread Laura Abbott
Now that we have proper caching, stop setting the DMA address manually. It should be set after properly calling dma_map. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion/ion.c | 17 + 1 file changed, 1 insertion(+), 16 deletions(-) diff

[PATCHv3 22/22] staging/android: Update Ion TODO list

2017-04-03 Thread Laura Abbott
Most of the items have been taken care of by a clean up series. Remove the completed items and add a few new ones. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/TODO | 21 - 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/d

[PATCHv3 20/22] staging: android: ion: Remove ion_handle and ion_client

2017-04-03 Thread Laura Abbott
to give confusing data (orphaned allocations) so it can be replaced with something better if people actually want it. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion/ion-ioctl.c | 53 +-- drivers/staging/android/ion/ion.c

[PATCHv3 21/22] staging: android: ion: Set query return value

2017-04-03 Thread Laura Abbott
This never got set in the ioctl. Properly set a return value of 0 on success. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion/ion.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c

[PATCHv3 15/22] staging: android: ion: Break the ABI in the name of forward progress

2017-04-03 Thread Laura Abbott
the useless alignment field from the allocation structure. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion/Makefile | 3 - drivers/staging/android/ion/compat_ion.c | 152 --- drivers/staging/android/ion/compat_ion.h

[PATCHv3 08/22] staging: android: ion: Remove crufty cache support

2017-04-03 Thread Laura Abbott
Now that we call dma_map in the dma_buf API callbacks there is no need to use the existing cache APIs. Remove the sync ioctl and the existing bad dma_sync calls. Explicit caching can be handled with the dma_buf sync API. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/s

[PATCHv3 12/22] staging: android: ion: Remove old platform support

2017-04-03 Thread Laura Abbott
Device specific platform support has been haphazard for Ion. There have been several independent attempts and there are still objections to what bindings exist right now. Just remove everything for a fresh start. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/andro

[PATCHv3 17/22] staging: android: ion: Collapse internal header files

2017-04-03 Thread Laura Abbott
Ion current has ion_priv.h and ion.h as header files. ion.h was intended to be used for public APIs but Ion never ended up really having anything public. Combine the two headers so there is only one internal header. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/andro

[PATCHv3 18/22] staging: android: ion: Rework heap registration/enumeration

2017-04-03 Thread Laura Abbott
to use. Switch to a model where Ion creates its device unconditionally and heaps are registed as available regions. Currently, only system and CMA heaps are converted over to the new model. Carveout and chunk heaps can be converted over when someone wants to figure out how. Signed-off-by: Laura

[PATCHv3 16/22] staging: android: ion: Get rid of ion_phys_addr_t

2017-04-03 Thread Laura Abbott
Once upon a time, phys_addr_t was not everywhere in the kernel. These days it is used enough places that having a separate Ion type doesn't make sense. Remove the extra type and just use phys_addr_t directly. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion

[PATCHv3 11/22] staging: android: ion: Remove duplicate ION_IOC_MAP

2017-04-03 Thread Laura Abbott
ION_IOC_MAP is the same as ION_IOC_SHARE. We really don't need two identical interfaces. Remove it. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion/compat_ion.c | 1 - drivers/staging/android/ion/ion-ioctl.c | 1 - drivers/staging/android/uapi/ion.h

[PATCHv3 00/22] Ion clean up in preparation in moving out of staging

2017-04-03 Thread Laura Abbott
steps I'd like to go ahead and merge this series assuming there are no more major objections. More work can happen on top of this. Changes from v2: - Dropped the RFC tag - Minor bisectability fixes - Sumit's comment about CMA naming - Updated the TODO list Thanks, Laura Laura Abbott (22): cma

[PATCHv3 05/22] staging: android: ion: Duplicate sg_table

2017-04-03 Thread Laura Abbott
Ion currently returns a single sg_table on each dma_map call. This is incorrect for later usage. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion/ion.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/d

[RFC PATCHv2 15/21] staging: android: ion: Break the ABI in the name of forward progress

2017-03-17 Thread Laura Abbott
so let's follow the ioctl guidelines and clean things up while everyone is busy converting things over anyway. As part of this, also remove the useless alignment field from the allocation structure. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion/Makefile

[RFC PATCHv2 16/21] staging: android: ion: Get rid of ion_phys_addr_t

2017-03-17 Thread Laura Abbott
Once upon a time, phys_addr_t was not everywhere in the kernel. These days it is used enough places that having a separate Ion type doesn't make sense. Remove the extra type and just use phys_addr_t directly. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion

[RFC PATCHv2 10/21] staging: android: ion: Remove import interface

2017-03-17 Thread Laura Abbott
With the expansion of dma-buf and the move for Ion to be come just an allocator, the import mechanism is mostly useless. There isn't a kernel component to Ion anymore and handles are private to Ion. Remove this interface. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/s

[RFC PATCHv2 20/21] staging: android: ion: Remove ion_handle and ion_client

2017-03-17 Thread Laura Abbott
to give confusing data (orphaned allocations) so it can be replaced with something better if people actually want it. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion/ion-ioctl.c | 53 +-- drivers/staging/android/ion/ion.c

[RFC PATCHv2 18/21] staging: android: ion: Rework heap registration/enumeration

2017-03-17 Thread Laura Abbott
to use. Switch to a model where Ion creates its device unconditionally and heaps are registed as available regions. Currently, only system and CMA heaps are converted over to the new model. Carveout and chunk heaps can be converted over when someone wants to figure out how. Signed-off-by: Laura

[RFC PATCHv2 12/21] staging: android: ion: Remove old platform support

2017-03-17 Thread Laura Abbott
Device specific platform support has been haphazard for Ion. There have been several independent attempts and there are still objections to what bindings exist right now. Just remove everything for a fresh start. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/andro

[RFC PATCHv2 11/21] staging: android: ion: Remove duplicate ION_IOC_MAP

2017-03-17 Thread Laura Abbott
ION_IOC_MAP is the same as ION_IOC_SHARE. We really don't need two identical interfaces. Remove it. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion/compat_ion.c | 1 - drivers/staging/android/ion/ion-ioctl.c | 1 - drivers/staging/android/uapi

[RFC PATCHv2 19/21] staging: android: ion: Drop ion_map_kernel interface

2017-03-17 Thread Laura Abbott
Nobody uses this interface externally. Drop it. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion/ion.c | 59 --- 1 file changed, 59 deletions(-) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/andro

[RFC PATCHv2 03/21] staging: android: ion: Remove dmap_cnt

2017-03-17 Thread Laura Abbott
The reference counting of dma_map calls was removed. Remove the associated counter field as well. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion/ion_priv.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/android/ion/ion_priv.h b/d

[RFC PATCHv2 05/21] staging: android: ion: Duplicate sg_table

2017-03-17 Thread Laura Abbott
Ion currently returns a single sg_table on each dma_map call. This is incorrect for later usage. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion/ion.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/d

[RFC PATCHv2 04/21] staging: android: ion: Remove alignment from allocation field

2017-03-17 Thread Laura Abbott
The align field was supposed to be used to specify the alignment of the allocation. Nobody actually does anything with it except to check if the alignment specified is out of bounds. Since this has no effect on the actual allocation, just remove it. Signed-off-by: Laura Abbott <l

[RFC PATCHv2 14/21] staging: android: ion: Stop butchering the DMA address

2017-03-17 Thread Laura Abbott
Now that we have proper caching, stop setting the DMA address manually. It should be set after properly calling dma_map. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion/ion.c | 17 + 1 file changed, 1 insertion(+), 16 deletions(-) diff

[RFC PATCHv2 13/21] staging: android: ion: Use CMA APIs directly

2017-03-17 Thread Laura Abbott
be allocated directly from the APIs. Switch to using this model to avoid needing a dummy device. This also mitigates some of the caching problems (e.g. dma_alloc_coherent only returning uncached memory). Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion/K

[RFC PATCHv2 01/21] cma: Store a name in the cma structure

2017-03-17 Thread Laura Abbott
Frameworks that may want to enumerate CMA heaps (e.g. Ion) will find it useful to have an explicit name attached to each region. Store the name in each CMA structure. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/base/dma-contiguous.c | 5 +++-- include/linux

[RFC PATCHv2 06/21] staging: android: ion: Call dma_map_sg for syncing and mapping

2017-03-17 Thread Laura Abbott
Technically, calling dma_buf_map_attachment should return a buffer properly dma_mapped. Add calls to dma_map_sg to begin_cpu_access to ensure this happens. As a side effect, this lets Ion buffers take advantage of the dma_buf sync ioctls. Signed-off-by: Laura Abbott <labb...@redhat.

[RFC PATCHv2 09/21] staging: android: ion: Remove custom ioctl interface

2017-03-17 Thread Laura Abbott
Ion is now moving towards a unified interfact. This makes the custom ioctl interface unneeded. Remove it. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion/compat_ion.c | 40 drivers/staging/android/ion/ion-ioctl.c

[RFC PATCHv2 07/21] staging: android: ion: Remove page faulting support

2017-03-17 Thread Laura Abbott
The new method of syncing with dma_map means that the page faulting sync implementation is no longer applicable. Remove it. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion/ion.c | 117 -- 1 file changed, 117 deletions(-)

[RFC PATCHv2 17/21] staging: android: ion: Collapse internal header files

2017-03-17 Thread Laura Abbott
Ion current has ion_priv.h and ion.h as header files. ion.h was intended to be used for public APIs but Ion never ended up really having anything public. Combine the two headers so there is only one internal header. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/a

[RFC PATCHv2 08/21] staging: android: ion: Remove crufty cache support

2017-03-17 Thread Laura Abbott
Now that we call dma_map in the dma_buf API callbacks there is no need to use the existing cache APIs. Remove the sync ioctl and the existing bad dma_sync calls. Explicit caching can be handled with the dma_buf sync API. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/s

[RFC PATCHv2 02/21] cma: Introduce cma_for_each_area

2017-03-17 Thread Laura Abbott
Frameworks (e.g. Ion) may want to iterate over each possible CMA area to allow for enumeration. Introduce a function to allow a callback. Signed-off-by: Laura Abbott <labb...@redhat.com> --- include/linux/cma.h | 2 ++ mm/cma.c| 14 ++ 2 files changed, 16 inse

[RFC PATCHv2 21/21] staging: android: ion: Set query return value

2017-03-17 Thread Laura Abbott
This never got set in the ioctl. Properly set a return value of 0 on success. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion/ion.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c

[RFC PATCHv2 00/21] Ion clean in preparation for moving out of staging

2017-03-17 Thread Laura Abbott
using the VGEM module instead. Ideally, the tests can live as part of some other existing test set (drm tests maybe?) Feedback appreciated as always. Thanks, Laura Laura Abbott (21): cma: Store a name in the cma structure cma: Introduce cma_for_each_area staging: android: ion: Remove

Re: [RFC PATCH 08/12] cma: Store a name in the cma structure

2017-03-17 Thread Laura Abbott
On 03/10/2017 12:53 AM, Sumit Semwal wrote: > Hi Laura, > > Thanks for the patch. > > On 3 March 2017 at 03:14, Laura Abbott <labb...@redhat.com> wrote: >> >> Frameworks that may want to enumerate CMA heaps (e.g. Ion) will find it >> useful to have an expli

Re: [RFC][PATCH] dma-buf: Introduce dma-buf test module

2017-03-14 Thread Laura Abbott
On 03/14/2017 01:13 PM, Daniel Vetter wrote: > On Tue, Mar 14, 2017 at 01:04:19PM -0700, Laura Abbott wrote: >> >> dma-buf is designed to share buffers. Sharing means that there needs to >> be another subsystem to accept those buffers. Introduce a simple test >> modu

[RFC][PATCH] dma-buf: Introduce dma-buf test module

2017-03-14 Thread Laura Abbott
reasonable. This is based on ion_test.c that existed for the Ion framework. Signed-off-by: Laura Abbott <labb...@redhat.com> --- This is basically a drop in of what was available as drivers/staging/android/ion/ion_test.c. Given it has no Ion specific parts it might be useful as a more genera

Re: [RFC PATCH 00/12] Ion cleanup in preparation for moving out of staging

2017-03-14 Thread Laura Abbott
On 03/14/2017 07:47 AM, Benjamin Gaignard wrote: > 2017-03-13 22:09 GMT+01:00 Laura Abbott <labb...@redhat.com>: >> On 03/12/2017 12:05 PM, Daniel Vetter wrote: >>> On Sun, Mar 12, 2017 at 2:34 PM, Benjamin Gaignard >>> <benjamin.gaign...@linaro.org> wrote

Re: [RFC PATCH 00/12] Ion cleanup in preparation for moving out of staging

2017-03-13 Thread Laura Abbott
On 03/13/2017 02:29 PM, Rob Clark wrote: > On Mon, Mar 13, 2017 at 5:09 PM, Laura Abbott <labb...@redhat.com> wrote: >>> Hm, we might want to expose all the heaps as individual >>> /dev/ion_$heapname nodes? Should we do this from the start, since >>> we're mass

Re: [RFC PATCH 00/12] Ion cleanup in preparation for moving out of staging

2017-03-13 Thread Laura Abbott
On 03/13/2017 06:21 AM, Mark Brown wrote: > On Mon, Mar 13, 2017 at 10:54:33AM +, Brian Starkey wrote: >> On Sun, Mar 12, 2017 at 02:34:14PM +0100, Benjamin Gaignard wrote: > >>> Another point is how can we put secure rules (like selinux policy) on >>> heaps since all the allocations >>> go

Re: [RFC PATCH 00/12] Ion cleanup in preparation for moving out of staging

2017-03-13 Thread Laura Abbott
On 03/13/2017 03:54 AM, Brian Starkey wrote: > On Sun, Mar 12, 2017 at 02:34:14PM +0100, Benjamin Gaignard wrote: >> 2017-03-09 18:38 GMT+01:00 Laura Abbott <labb...@redhat.com>: >>> On 03/09/2017 02:00 AM, Benjamin Gaignard wrote: >>>> 2017-03-06 17:04 GMT+

Re: [RFC PATCH 00/12] Ion cleanup in preparation for moving out of staging

2017-03-13 Thread Laura Abbott
On 03/12/2017 12:05 PM, Daniel Vetter wrote: > On Sun, Mar 12, 2017 at 2:34 PM, Benjamin Gaignard > <benjamin.gaign...@linaro.org> wrote: >> 2017-03-09 18:38 GMT+01:00 Laura Abbott <labb...@redhat.com>: >>> On 03/09/2017 02:00 AM, Benjamin Gaignard wrote: >&

Re: [RFC PATCH 00/12] Ion cleanup in preparation for moving out of staging

2017-03-10 Thread Laura Abbott
On 03/10/2017 06:27 AM, Brian Starkey wrote: > On Fri, Mar 10, 2017 at 11:46:42AM +, Robin Murphy wrote: >> On 10/03/17 10:31, Brian Starkey wrote: >>> Hi, >>> >>> On Thu, Mar 09, 2017 at 09:38:49AM -0800, Laura Abbott wrote: >>>> On 03/09/2017

Re: [RFC PATCH 00/12] Ion cleanup in preparation for moving out of staging

2017-03-09 Thread Laura Abbott
On 03/09/2017 02:00 AM, Benjamin Gaignard wrote: > 2017-03-06 17:04 GMT+01:00 Daniel Vetter : >> On Mon, Mar 06, 2017 at 11:58:05AM +0100, Mark Brown wrote: >>> On Mon, Mar 06, 2017 at 11:40:41AM +0100, Daniel Vetter wrote: >>> No one gave a thing about android in upstream,

Re: [RFC PATCH 10/12] staging: android: ion: Use CMA APIs directly

2017-03-06 Thread Laura Abbott
On 03/06/2017 07:52 AM, Daniel Vetter wrote: > On Mon, Mar 06, 2017 at 03:43:53PM +0200, Laurent Pinchart wrote: >> Hi Daniel, >> >> On Monday 06 Mar 2017 11:32:04 Daniel Vetter wrote: >>> On Fri, Mar 03, 2017 at 10:50:20AM -0800, Laura Abbott wrote: >>>>

Re: [RFC PATCH 06/12] staging: android: ion: Remove crufty cache support

2017-03-06 Thread Laura Abbott
On 03/06/2017 09:00 AM, Emil Velikov wrote: > On 6 March 2017 at 10:29, Daniel Vetter <dan...@ffwll.ch> wrote: >> On Fri, Mar 03, 2017 at 10:46:03AM -0800, Laura Abbott wrote: >>> On 03/03/2017 08:39 AM, Laurent Pinchart wrote: >>>> Hi Daniel, >>>> &

Re: [RFC PATCH 00/12] Ion cleanup in preparation for moving out of staging

2017-03-03 Thread Laura Abbott
On 03/03/2017 05:29 AM, Michal Hocko wrote: > On Thu 02-03-17 13:44:32, Laura Abbott wrote: >> Hi, >> >> There's been some recent discussions[1] about Ion-like frameworks. There's >> apparently interest in just keeping Ion since it works reasonablly well. >

Re: [RFC PATCH 11/12] staging: android: ion: Make Ion heaps selectable

2017-03-03 Thread Laura Abbott
On 03/03/2017 02:33 AM, Daniel Vetter wrote: > On Thu, Mar 02, 2017 at 01:44:43PM -0800, Laura Abbott wrote: >> >> Currently, all heaps are compiled in all the time. In switching to >> a better platform model, let's allow these to be compiled out for good >> measure.

Re: [RFC PATCH 00/12] Ion cleanup in preparation for moving out of staging

2017-03-03 Thread Laura Abbott
On 03/03/2017 08:45 AM, Laurent Pinchart wrote: > Hi Daniel, > > On Friday 03 Mar 2017 11:04:33 Daniel Vetter wrote: >> On Thu, Mar 02, 2017 at 01:44:32PM -0800, Laura Abbott wrote: >>> Hi, >>> >>> There's been some recent discussions[1] about Ion-like f

Re: [RFC PATCH 00/12] Ion cleanup in preparation for moving out of staging

2017-03-03 Thread Laura Abbott
On 03/03/2017 08:25 AM, Laurent Pinchart wrote: > Hi Laura, > > Thank you for the patches. > > On Thursday 02 Mar 2017 13:44:32 Laura Abbott wrote: >> Hi, >> >> There's been some recent discussions[1] about Ion-like frameworks. There's >> apparently inte

Re: [RFC PATCH 10/12] staging: android: ion: Use CMA APIs directly

2017-03-03 Thread Laura Abbott
On 03/03/2017 08:41 AM, Laurent Pinchart wrote: > Hi Laura, > > Thank you for the patch. > > On Thursday 02 Mar 2017 13:44:42 Laura Abbott wrote: >> When CMA was first introduced, its primary use was for DMA allocation >> and the only way to get CMA memory was

Re: [RFC PATCH 06/12] staging: android: ion: Remove crufty cache support

2017-03-03 Thread Laura Abbott
On 03/03/2017 08:39 AM, Laurent Pinchart wrote: > Hi Daniel, > > On Friday 03 Mar 2017 10:56:54 Daniel Vetter wrote: >> On Thu, Mar 02, 2017 at 01:44:38PM -0800, Laura Abbott wrote: >>> Now that we call dma_map in the dma_buf API callbacks there is no need >>&g

Re: [RFC PATCH 04/12] staging: android: ion: Call dma_map_sg for syncing and mapping

2017-03-03 Thread Laura Abbott
On 03/03/2017 08:37 AM, Laurent Pinchart wrote: > Hi Laura, > > Thank you for the patch. > > On Thursday 02 Mar 2017 13:44:36 Laura Abbott wrote: >> Technically, calling dma_buf_map_attachment should return a buffer >> properly dma_mapped. Add calls to dma_map_sg to be

Re: [RFC PATCH 03/12] staging: android: ion: Duplicate sg_table

2017-03-03 Thread Laura Abbott
On 03/03/2017 12:18 AM, Hillf Danton wrote: > > On March 03, 2017 5:45 AM Laura Abbott wrote: >> >> +static struct sg_table *dup_sg_table(struct sg_table *table) >> +{ >> +struct sg_table *new_table; >> +int ret, i; >> +struct scatte

[RFC PATCH 12/12] staging; android: ion: Enumerate all available heaps

2017-03-02 Thread Laura Abbott
Practiaclly speaking, most Ion heaps are either going to be available all the time (system heaps) or found based off of the reserved-memory node. Parse the CMA and reserved-memory nodes to assign the heaps. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/andro

[RFC PATCH 02/12] staging: android: ion: Remove alignment from allocation field

2017-03-02 Thread Laura Abbott
The align field was supposed to be used to specify the alignment of the allocation. Nobody actually does anything with it except to check if the alignment specified is out of bounds. Since this has no effect on the actual allocation, just remove it. Signed-off-by: Laura Abbott <l

[RFC PATCH 00/12] Ion cleanup in preparation for moving out of staging

2017-03-02 Thread Laura Abbott
=148699712602105=2 [2] https://marc.info/?l=linaro-mm-sig=148176050802908=2 Laura Abbott (12): staging: android: ion: Remove dmap_cnt staging: android: ion: Remove alignment from allocation field staging: android: ion: Duplicate sg_table staging: android: ion: Call dma_map_sg for syncing

[RFC PATCH 01/12] staging: android: ion: Remove dmap_cnt

2017-03-02 Thread Laura Abbott
The reference counting of dma_map calls was removed. Remove the associated counter field as well. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion/ion_priv.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/android/ion/ion_priv.h b/d

[RFC PATCH 09/12] cma: Introduce cma_for_each_area

2017-03-02 Thread Laura Abbott
Frameworks (e.g. Ion) may want to iterate over each possible CMA area to allow for enumeration. Introduce a function to allow a callback. Signed-off-by: Laura Abbott <labb...@redhat.com> --- include/linux/cma.h | 2 ++ mm/cma.c| 14 ++ 2 files changed, 16 inse

[RFC PATCH 08/12] cma: Store a name in the cma structure

2017-03-02 Thread Laura Abbott
Frameworks that may want to enumerate CMA heaps (e.g. Ion) will find it useful to have an explicit name attached to each region. Store the name in each CMA structure. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/base/dma-contiguous.c | 5 +++-- include/linux

[RFC PATCH 11/12] staging: android: ion: Make Ion heaps selectable

2017-03-02 Thread Laura Abbott
Currently, all heaps are compiled in all the time. In switching to a better platform model, let's allow these to be compiled out for good measure. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion/Kconfig| 32 drivers/staging/andro

[RFC PATCH 10/12] staging: android: ion: Use CMA APIs directly

2017-03-02 Thread Laura Abbott
be allocated directly from the APIs. Switch to using this model to avoid needing a dummy device. This also avoids awkward caching questions. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion/ion_cma_heap.c | 97 -- 1 file chang

[RFC PATCH 07/12] staging: android: ion: Remove old platform support

2017-03-02 Thread Laura Abbott
Device specific platform support has been haphazard for Ion. There have been several independent attempts and there are still objections to what bindings exist right now. Just remove everything for a fresh start. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/andro

[RFC PATCH 03/12] staging: android: ion: Duplicate sg_table

2017-03-02 Thread Laura Abbott
Ion currently returns a single sg_table on each dma_map call. This is incorrect for later usage. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion/ion.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/d

[RFC PATCH 04/12] staging: android: ion: Call dma_map_sg for syncing and mapping

2017-03-02 Thread Laura Abbott
Technically, calling dma_buf_map_attachment should return a buffer properly dma_mapped. Add calls to dma_map_sg to begin_cpu_access to ensure this happens. As a side effect, this lets Ion buffers take advantage of the dma_buf sync ioctls. Signed-off-by: Laura Abbott <labb...@redhat.

[RFC PATCH 05/12] staging: android: ion: Remove page faulting support

2017-03-02 Thread Laura Abbott
The new method of syncing with dma_map means that the page faulting sync implementation is no longer applicable. Remove it. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/staging/android/ion/ion.c | 117 -- 1 file changed, 117 deletions(-)

[RFC PATCH 06/12] staging: android: ion: Remove crufty cache support

2017-03-02 Thread Laura Abbott
Now that we call dma_map in the dma_buf API callbacks there is no need to use the existing cache APIs. Remove the sync ioctl and the existing bad dma_sync calls. Explicit caching can be handled with the dma_buf sync API. Signed-off-by: Laura Abbott <labb...@redhat.com> --- drivers/s

Re: [RFC simple allocator v2 0/2] Simple allocator

2017-02-13 Thread Laura Abbott
On 02/13/2017 10:18 AM, Mark Brown wrote: > On Mon, Feb 13, 2017 at 03:45:04PM +0100, Benjamin Gaignard wrote: > >> An other question is: do we have others memory regions that could be >> interested >> by this new framework ? I have in mind that some title memory regions could >> use >> it or

Re: [RFC simple allocator v1 0/2] Simple allocator

2017-01-25 Thread Laura Abbott
On 01/23/2017 09:35 AM, Daniel Vetter wrote: On Fri, Jan 20, 2017 at 04:32:29PM +0100, Benjamin Gaignard wrote: The goal of this RFC is to understand if a common ioctl for specific memory regions allocations is needed/welcome. Obviously it will not replace allocation done in linux kernel

[RFC PATCH 4/4] staging: android: ion: Call dma_map_sg for syncing and mapping

2016-12-14 Thread Laura Abbott
Technically, calling dma_buf_map_attachment should return a buffer properly dma_mapped. Add calls to dma_map_sg to begin_cpu_access to ensure this happens. As a side effect, this lets Ion buffers take advantage of the dma_buf sync ioctls. Not-signed-off-by: Laura Abbott <labb...@redhat.

  1   2   >