Re: [RFC 00/29] De-stage android's sync framework

2016-01-15 Thread Joe Perches
On Fri, 2016-01-15 at 12:55 -0200, Gustavo Padovan wrote: > From: Gustavo Padovan > > This patch series de-stage the sync framework, and in order to accomplish that > a bunch of cleanups/improvements on the sync and fence were made. Perhaps add/update a MAINTAINERS entry too? __

Re: [PATCH] staging: ion: make the pte default none PTE_RDONLY

2016-01-15 Thread Russell King - ARM Linux
On Fri, Jan 15, 2016 at 03:03:42PM -0800, Laura Abbott wrote: > (adding linux-arm and a few people) > > On 01/14/2016 06:42 PM, Chen Feng wrote: > >The page is already alloc at ion_alloc function, > >ion_mmap map the alloced pages to user-space. > > > >The default prot can be PTE_RDONLY. Take a lo

Re: [PATCH] staging: ion: make the pte default none PTE_RDONLY

2016-01-15 Thread Laura Abbott
(adding linux-arm and a few people) On 01/14/2016 06:42 PM, Chen Feng wrote: The page is already alloc at ion_alloc function, ion_mmap map the alloced pages to user-space. The default prot can be PTE_RDONLY. Take a look at here: set_pte_at() arch/arm64/include/asm: if (pte_dirty

Re: [PATCH 1/2] staging:iio:adc:added space around '-'

2016-01-15 Thread Lars-Peter Clausen
On 01/15/2016 08:42 PM, Bhumika Goyal wrote: > This patch adds apace around '-' operator.Found using checkpatch.pl > > Signed-off-by: Bhumika Goyal > --- > drivers/staging/iio/adc/ad7280a.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/iio/adc/ad72

[PATCH 2/2] staging:iio:adc:add space around '-'

2016-01-15 Thread Bhumika Goyal
This patch adds space around '-' operator.Found using checkpatch.pl Signed-off-by: Bhumika Goyal --- drivers/staging/iio/adc/ad7192.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/iio/adc/ad7192.c b/drivers/staging/iio/adc/ad7192.c index 9221103..54db0f0 100

[PATCH 1/2] staging:iio:adc:added space around '-'

2016-01-15 Thread Bhumika Goyal
This patch adds apace around '-' operator.Found using checkpatch.pl Signed-off-by: Bhumika Goyal --- drivers/staging/iio/adc/ad7280a.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/iio/adc/ad7280a.c b/drivers/staging/iio/adc/ad7280a.c index f45ebed..0c7

[PATCH 0/2]Staging:iio:adc:add space around '-'

2016-01-15 Thread Bhumika Goyal
These patches adds space around '-' operator.Found using checkpatch.pl. Bhumika Goyal (2): staging:iio:adc:added space around '-' staging:iio:adc:add space around '-' drivers/staging/iio/adc/ad7192.c | 2 +- drivers/staging/iio/adc/ad7280a.c | 4 ++-- 2 files changed, 3 insertions(+), 3 de

Re: [RFC 26/29] dma-buf/fence: remove pointless fence_timeline_signal at destroy phase

2016-01-15 Thread Gustavo Padovan
2016-01-15 John Harrison : > On 15/01/2016 14:55, Gustavo Padovan wrote: > >From: Gustavo Padovan > > > >All changes to timeline value come through the user via > >fence_timeline_signal() calls. When fence_timeline_destroy() is called no > >changes on timeline->value happens hence call fence_time

Re: [RFC 26/29] dma-buf/fence: remove pointless fence_timeline_signal at destroy phase

2016-01-15 Thread John Harrison
On 15/01/2016 14:55, Gustavo Padovan wrote: From: Gustavo Padovan All changes to timeline value come through the user via fence_timeline_signal() calls. When fence_timeline_destroy() is called no changes on timeline->value happens hence call fence_timeline_signal() with no increment is pointles

[PATCH] staging: unisys: Only process up to budget amount of responses

2016-01-15 Thread Benjamin Romer
From: David Kershner >From napi documentation you should only process the amount your budget allows, if you go over it just wait for the next napi poll to continue. Signed-off-by: David Kershner Signed-off-by: Benjamin Romer --- drivers/staging/unisys/visornic/visornic_main.c | 19 +++

[RFC 23/29] staging/android: remove sw_sync_timeline and sw_sync_pt

2016-01-15 Thread Gustavo Padovan
From: Gustavo Padovan As we moved value storage to fence_timeline and fence those two structs became useless and can be removed now. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sw_sync.c| 15 ++- drivers/staging/android/sw_sync.h| 24 ++--

[RFC 02/29] staging/android: fix checkpatch warning

2016-01-15 Thread Gustavo Padovan
From: Gustavo Padovan Trivial indentation fix. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/android/sync.h b/drivers/staging/android/sync.h index 7a4d820..f3d4f75 100644 --- a/drivers/stagi

[RFC 01/29] staging/android: fix sync framework documentation

2016-01-15 Thread Gustavo Padovan
From: Gustavo Padovan Updates comments about functions and structures. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.h | 45 -- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/drivers/staging/android/sync.h b/drivers/sta

[RFC 25/29] dma-buf/fence: remove unused var from fence_timeline_signal()

2016-01-15 Thread Gustavo Padovan
From: Gustavo Padovan signaled_pts is not used in this function. Signed-off-by: Gustavo Padovan --- drivers/dma-buf/fence.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/dma-buf/fence.c b/drivers/dma-buf/fence.c index 09faf2e..7a5fc9b 100644 --- a/drivers/dma-buf/fence.c +++ b/dri

[RFC 24/29] dma-buf/fence: add debug to fence timeline

2016-01-15 Thread Gustavo Padovan
From: Gustavo Padovan Bring the debug information that belonged to sync_timeline and sync_pt back. Signed-off-by: Gustavo Padovan --- drivers/dma-buf/Makefile | 2 +- drivers/dma-buf/fence.c | 4 ++ drivers/dma-buf/fence_debug.c| 128 +++

[RFC 15/29] dma-buf/fence: create fence_default_get_driver_name()

2016-01-15 Thread Gustavo Padovan
From: Gustavo Padovan Move driver name handling to fence and create a default function for it. Returns the driver which the fence belongs. Signed-off-by: Gustavo Padovan --- drivers/dma-buf/fence.c | 19 ++- drivers/staging/android/sw_sync.c| 3 +-- drivers/st

[RFC 21/29] dma-buf/fence: add fence_create_on_timeline()

2016-01-15 Thread Gustavo Padovan
From: Gustavo Padovan This functions in intended to replace sync_pt_create() and it does exactly the same thing sync_pt_create() did. Signed-off-by: Gustavo Padovan --- drivers/dma-buf/fence.c| 38 ++ drivers/staging/android/sync.c | 20 ++---

[RFC 27/29] dma-buf/fence: add .cleanup() callback

2016-01-15 Thread Gustavo Padovan
From: Gustavo Padovan Called when the fence_timeline is destroyed so users can cleanup routines on fences. Signed-off-by: Gustavo Padovan --- drivers/dma-buf/fence.c | 24 include/linux/fence.h | 4 2 files changed, 28 insertions(+) diff --git a/drivers/dma-bu

[RFC 20/29] dma-buf/fence: remove fence_timeline_ops

2016-01-15 Thread Gustavo Padovan
From: Gustavo Padovan fence_timeline_ops was just workarounding over fence_ops and was used chained in the fence ops. So remove it all to simplify the fence code flow. Signed-off-by: Gustavo Padovan --- drivers/dma-buf/fence.c | 7 ++- drivers/staging/android/sw_sync.c | 20 +---

[RFC 22/29] staging/android: remove sync_pt_create()

2016-01-15 Thread Gustavo Padovan
From: Gustavo Padovan get sw_sync_pt_create() to use fence_create_on_timeline() directly and remove an abstractions layers between fences and its users. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sw_sync.c | 22 ++ drivers/staging/android/sync.c| 20

[RFC 26/29] dma-buf/fence: remove pointless fence_timeline_signal at destroy phase

2016-01-15 Thread Gustavo Padovan
From: Gustavo Padovan All changes to timeline value come through the user via fence_timeline_signal() calls. When fence_timeline_destroy() is called no changes on timeline->value happens hence call fence_timeline_signal() with no increment is pointless. Signed-off-by: Gustavo Padovan --- drive

[RFC 28/29] staging/android: use .cleanup() to interrupt any sync_fence waiter

2016-01-15 Thread Gustavo Padovan
From: Gustavo Padovan When the timeline is being destroyed all the waiters waiting for the sync_fence to signal need to be woken up and finished as well. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sw_sync.c | 8 drivers/staging/android/sync.c| 9 + drivers/

[RFC 16/29] dma-buf/fence: create fence_default_timeline_name()

2016-01-15 Thread Gustavo Padovan
From: Gustavo Padovan The fence timeline struct already receives the name of the timeline so we can use a default function to return the timeline name. Signed-off-by: Gustavo Padovan --- drivers/dma-buf/fence.c| 14 ++ drivers/staging/android/sync.c | 9 + include/

[RFC 19/29] dma-buf/fence: create fence_default_fill_driver_data()

2016-01-15 Thread Gustavo Padovan
From: Gustavo Padovan The value needed by sw_sync is now inside struct fence so we create a default ops to reply that value for us. --- drivers/dma-buf/fence.c| 21 + drivers/staging/android/sync.c | 12 +--- include/linux/fence.h | 1 + 3 files chan

[RFC 17/29] dma-buf/fence: store last signaled value on fence timeline

2016-01-15 Thread Gustavo Padovan
From: Gustavo Padovan Now fence timeline is aware of the last signaled fence, as it receives the increment to the current value in fence_timeline_signal(). That allow us to create a fence_default_signaled() using timeline->value and fence->seqno in the comparison. Signed-off-by: Gustavo Padovan

[RFC 29/29] dma-buf/fence: de-stage sync framework

2016-01-15 Thread Gustavo Padovan
From: Gustavo Padovan The sync framework is ready for mainline inclusion. Here we move it to drivers/dma-buf and the header files to the appropiated places. The sync framework contained some abstractions around struct fence and those were removed in the de-staging process among other changes: U

[RFC 18/29] dma-buf/fence: create default .fence_value_str() and .timeline_value_str()

2016-01-15 Thread Gustavo Padovan
From: Gustavo Padovan Provide simple default functions to help users retrieve the values of the fence and the timeline. Signed-off-by: Gustavo Padovan --- drivers/dma-buf/fence.c | 31 +++ drivers/staging/android/sw_sync.c| 18 -- dr

[RFC 14/29] dma-buf/fence: create fence_default_release()

2016-01-15 Thread Gustavo Padovan
From: Gustavo Padovan Add a default .release() op to be used on fence_ops vtable. It removes the fences from any list it was added, removes a timeline ref and free the fence. Signed-off-by: Gustavo Padovan --- drivers/dma-buf/fence.c| 28 drivers/staging/an

[RFC 09/29] staging/android: rename struct sync_fence's variables to 'sync_fence'

2016-01-15 Thread Gustavo Padovan
From: Gustavo Padovan To avoid confusion with struct fence vars that are most of the time called 'fence' as well we should rename all struct sync_fence's to sync_fence. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 192 ++- drivers/st

[RFC 13/29] dma-buf/fence: create fence_default_enable_signaling()

2016-01-15 Thread Gustavo Padovan
From: Gustavo Padovan Add a default .enable_signaling() op to be used on fence_ops vtable. fence_default_enable_signaling() checks if the was not signaled yet and adds it to the active_list. Signed-off-by: Gustavo Padovan --- drivers/dma-buf/fence.c| 22 ++ drivers/

[RFC 12/29] staging/android: remove struct sync_pt

2016-01-15 Thread Gustavo Padovan
From: Gustavo Padovan struct sync_pt was just wrapping around struct fence and creating an extra abstraction layer. The only two members of struct sync_pt, child_list and active_list, were moved to struct fence in an earlier commit. After removing those two members struct sync_pt is nothing more

[RFC 07/29] staging/android: move sw_sync file to debugfs file

2016-01-15 Thread Gustavo Padovan
From: Gustavo Padovan This remove CONFIG_SW_SYNC_USER and instead compile the sw_sync file into debugpfs under /sync/sw_sync. Signed-off-by: Gustavo Padovan --- drivers/staging/android/Kconfig | 9 --- drivers/staging/android/sw_sync.c| 129 --- drive

[RFC 06/29] staging/android: create a 'sync' dir for debugfs information

2016-01-15 Thread Gustavo Padovan
From: Gustavo Padovan Creates the 'sync' dir on debugfs root dir and move the 'sync' file to sync/info. This is the preparation to add more debug info and control. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync_debug.c | 21 + 1 file changed, 17 insertions(

[RFC 11/29] dma-buf/fence: move sync_timeline to fence_timeline

2016-01-15 Thread Gustavo Padovan
From: Gustavo Padovan Add the sync timeline from sync framework to fence synchronization system. This is an attempt to remove some duplication between sync.c and fence.c The sync_timeline was no more than a wrapper on top of the fence framework to be used by sw_sync. It simplifies some accesses,

[RFC 05/29] staging/android: remove not used sync_timeline ops

2016-01-15 Thread Gustavo Padovan
From: Gustavo Padovan .dup and .compare are not used by the sync framework, so remove them from sw_sync. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sw_sync.c | 29 + drivers/staging/android/sync.c| 6 -- drivers/staging/android/sync.h| 1

[RFC 08/29] staging/android: Remove WARN_ON_ONCE when releasing sync_fence

2016-01-15 Thread Gustavo Padovan
From: Gustavo Padovan There isn't any problem on removing the sync_pts from the active_list when the fence is released. If the user decides to close the fence before it is signaled we should do it and not warn about anything. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c |

[RFC 10/29] staging/android: rename 'sync_pt' to 'fence' in struct sync_fence_cb

2016-01-15 Thread Gustavo Padovan
From: Gustavo Padovan 'sync_pt' is actually declared as struct fence so to make the name means its type we rename it to 'fence'. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 20 ++-- drivers/staging/android/sync.h | 2 +- drivers/staging/andr

[RFC 04/29] staging/android: rename 'android_fence' to 'sync_fence'

2016-01-15 Thread Gustavo Padovan
From: Gustavo Padovan As we are de-staging it rename it to a name that is not related to android. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/staging/and

[RFC 03/29] staging/android: rename sync_fence_release

2016-01-15 Thread Gustavo Padovan
From: Gustavo Padovan To avoid collision with an upcoming rename change the name of sync_fence_release() to sync_fence_release_file() Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/androi

[RFC 00/29] De-stage android's sync framework

2016-01-15 Thread Gustavo Padovan
From: Gustavo Padovan This patch series de-stage the sync framework, and in order to accomplish that a bunch of cleanups/improvements on the sync and fence were made. The sync framework contained some abstractions around struct fence and those were removed in the de-staging process among other c