[PATCH 2/2] dma-buf/sync_file: rework fence storage in struct file

2016-06-30 Thread Gustavo Padovan
From: Gustavo Padovan Create sync_file->fence to abstract the type of fence we are using for each sync_file. If only one fence is present we use a normal struct fence but if there is more fences to be added to the sync_file a fence_array is created. This change cleans up sync_file a bit.

[PATCH 0/2] dma-buf/sync_file: rework fences on struct sync_file

2016-06-30 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Hi all, This is an attempt to improve fence support on Sync File. The basic idea is to have only sync_file->fence and store all fences there, either as normal fences or fence_arrays. That way we can remove some potential du

[PATCH 0/2] dma-buf/sync_file: rework fences on struct sync_file

2016-06-30 Thread Gustavo Padovan
From: Gustavo Padovan Hi all, This is an attempt to improve fence support on Sync File. The basic idea is to have only sync_file->fence and store all fences there, either as normal fences or fence_arrays. That way we can remove some potential duplication when using fence_ar

[PATCH 1/2] dma-buf/fence-array: add fence_is_array()

2016-06-30 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Add helper to check if fence is array. Cc: Chris Wilson <ch...@chris-wilson.co.uk> Cc: Christian König <christian.koe...@amd.com> Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> --- include/

[PATCH 1/2] dma-buf/fence-array: add fence_is_array()

2016-06-30 Thread Gustavo Padovan
From: Gustavo Padovan Add helper to check if fence is array. Cc: Chris Wilson Cc: Christian König Signed-off-by: Gustavo Padovan --- include/linux/fence-array.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/linux/fence-array.h b/include/linux/fence-array.h index

Re: [RFC v2 3/3] dma-buf/sync_file: rework fence storage in struct file

2016-06-28 Thread Gustavo Padovan
2016-06-28 Chris Wilson <ch...@chris-wilson.co.uk>: > On Tue, Jun 28, 2016 at 11:25:00AM -0300, Gustavo Padovan wrote: > > 2016-06-28 Chris Wilson <ch...@chris-wilson.co.uk>: > > > > > On Mon, Jun 27, 2016 at 04:29:22PM -0300, Gustavo Padovan wrote: > &g

Re: [RFC v2 3/3] dma-buf/sync_file: rework fence storage in struct file

2016-06-28 Thread Gustavo Padovan
2016-06-28 Chris Wilson : > On Tue, Jun 28, 2016 at 11:25:00AM -0300, Gustavo Padovan wrote: > > 2016-06-28 Chris Wilson : > > > > > On Mon, Jun 27, 2016 at 04:29:22PM -0300, Gustavo Padovan wrote: > > > > From: Gustavo Padovan > > > > >

Re: [RFC v2 2/3] dma-buf/fence-array: add fence_array_teardown()

2016-06-28 Thread Gustavo Padovan
2016-06-28 Christian König <christian.koe...@amd.com>: > Am 28.06.2016 um 16:17 schrieb Gustavo Padovan: > > 2016-06-28 Christian König <christian.koe...@amd.com>: > > > > > Am 27.06.2016 um 21:29 schrieb Gustavo Padovan: > > > > From:

Re: [RFC v2 2/3] dma-buf/fence-array: add fence_array_teardown()

2016-06-28 Thread Gustavo Padovan
2016-06-28 Christian König : > Am 28.06.2016 um 16:17 schrieb Gustavo Padovan: > > 2016-06-28 Christian König : > > > > > Am 27.06.2016 um 21:29 schrieb Gustavo Padovan: > > > > From: Gustavo Padovan > > > > > > > > As the a

Re: [RFC v2 3/3] dma-buf/sync_file: rework fence storage in struct file

2016-06-28 Thread Gustavo Padovan
2016-06-28 Chris Wilson <ch...@chris-wilson.co.uk>: > On Mon, Jun 27, 2016 at 04:29:22PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> > > > > Create sync_file->fence to abstract the type of fence we are using for &

Re: [RFC v2 3/3] dma-buf/sync_file: rework fence storage in struct file

2016-06-28 Thread Gustavo Padovan
2016-06-28 Chris Wilson : > On Mon, Jun 27, 2016 at 04:29:22PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Create sync_file->fence to abstract the type of fence we are using for > > each sync_file. If only one fence is presen

Re: [RFC v2 2/3] dma-buf/fence-array: add fence_array_teardown()

2016-06-28 Thread Gustavo Padovan
2016-06-28 Christian König <christian.koe...@amd.com>: > Am 27.06.2016 um 21:29 schrieb Gustavo Padovan: > > From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> > > > > As the array of fence callbacks held by an active struct fence_array > > each ha

Re: [RFC v2 2/3] dma-buf/fence-array: add fence_array_teardown()

2016-06-28 Thread Gustavo Padovan
2016-06-28 Christian König : > Am 27.06.2016 um 21:29 schrieb Gustavo Padovan: > > From: Gustavo Padovan > > > > As the array of fence callbacks held by an active struct fence_array > > each has a reference to the struct fence_array, when the owner of the >

[RFC v2 2/3] dma-buf/fence-array: add fence_array_teardown()

2016-06-27 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> As the array of fence callbacks held by an active struct fence_array each has a reference to the struct fence_array, when the owner of the fence_array is freed it must dispose of the callback references before it can free the fence

[RFC v2 2/3] dma-buf/fence-array: add fence_array_teardown()

2016-06-27 Thread Gustavo Padovan
From: Gustavo Padovan As the array of fence callbacks held by an active struct fence_array each has a reference to the struct fence_array, when the owner of the fence_array is freed it must dispose of the callback references before it can free the fence_array. This can not happen simply during

[RFC v2 3/3] dma-buf/sync_file: rework fence storage in struct file

2016-06-27 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Create sync_file->fence to abstract the type of fence we are using for each sync_file. If only one fence is present we use a normal struct fence but if there is more fences to be added to the sync_file a fence_array is created. Th

[RFC v2 3/3] dma-buf/sync_file: rework fence storage in struct file

2016-06-27 Thread Gustavo Padovan
From: Gustavo Padovan Create sync_file->fence to abstract the type of fence we are using for each sync_file. If only one fence is present we use a normal struct fence but if there is more fences to be added to the sync_file a fence_array is created. This change cleans up sync_file a bit.

[RFC v2 0/3] dma-buf/sync_file: rework fences on struct sync_file

2016-06-27 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Hi all, This is an attempt to improve fence support on Sync File. The basic idea is to have only sync_file->fence and store all fences there, either as normal fences or fence_arrays. That way we can remove some potential duplica

[RFC v2 0/3] dma-buf/sync_file: rework fences on struct sync_file

2016-06-27 Thread Gustavo Padovan
From: Gustavo Padovan Hi all, This is an attempt to improve fence support on Sync File. The basic idea is to have only sync_file->fence and store all fences there, either as normal fences or fence_arrays. That way we can remove some potential duplication when using fence_array with sync_f

[RFC v2 1/3] dma-buf/fence-array: add fence_is_array()

2016-06-27 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Add helper to check if fence is array. Cc: Chris Wilson <ch...@chris-wilson.co.uk> Cc: Christian König <christian.koe...@amd.com> Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> --- include/

[RFC v2 1/3] dma-buf/fence-array: add fence_is_array()

2016-06-27 Thread Gustavo Padovan
From: Gustavo Padovan Add helper to check if fence is array. Cc: Chris Wilson Cc: Christian König Signed-off-by: Gustavo Padovan --- include/linux/fence-array.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/linux/fence-array.h b/include/linux/fence-array.h index

Re: [RFC 0/5] rework fences on struct sync_file

2016-06-24 Thread Gustavo Padovan
2016-06-24 Christian König <christian.koe...@amd.com>: > Am 24.06.2016 um 16:59 schrieb Gustavo Padovan: > > 2016-06-24 Christian König <deathsim...@vodafone.de>: > > > > > Am 24.06.2016 um 15:17 schrieb Gustavo Padovan: > > > > Hi Christ

Re: [RFC 0/5] rework fences on struct sync_file

2016-06-24 Thread Gustavo Padovan
2016-06-24 Christian König : > Am 24.06.2016 um 16:59 schrieb Gustavo Padovan: > > 2016-06-24 Christian König : > > > > > Am 24.06.2016 um 15:17 schrieb Gustavo Padovan: > > > > Hi Christian, > > > > > > > > 2016-06-24 Christian König

Re: [RFC 0/5] rework fences on struct sync_file

2016-06-24 Thread Gustavo Padovan
2016-06-24 Christian König <deathsim...@vodafone.de>: > Am 24.06.2016 um 15:17 schrieb Gustavo Padovan: > > Hi Christian, > > > > 2016-06-24 Christian König <christian.koe...@amd.com>: > > > > > Am 23.06.2016 um 17:29 schrieb Gustavo Pado

Re: [RFC 0/5] rework fences on struct sync_file

2016-06-24 Thread Gustavo Padovan
2016-06-24 Christian König : > Am 24.06.2016 um 15:17 schrieb Gustavo Padovan: > > Hi Christian, > > > > 2016-06-24 Christian König : > > > > > Am 23.06.2016 um 17:29 schrieb Gustavo Padovan: > > > > From: Gustavo Padovan > > > > &g

Re: [RFC 5/5] dma-buf/sync_file: rework fence storage in struct file

2016-06-24 Thread Gustavo Padovan
2016-06-23 Chris Wilson <ch...@chris-wilson.co.uk>: > On Thu, Jun 23, 2016 at 12:29:50PM -0300, Gustavo Padovan wrote: > > -static void sync_file_add_pt(struct sync_file *sync_file, int *i, > > +static int sync_file_set_fence(struct sync_file *sync_file, > > +

Re: [RFC 5/5] dma-buf/sync_file: rework fence storage in struct file

2016-06-24 Thread Gustavo Padovan
2016-06-23 Chris Wilson : > On Thu, Jun 23, 2016 at 12:29:50PM -0300, Gustavo Padovan wrote: > > -static void sync_file_add_pt(struct sync_file *sync_file, int *i, > > +static int sync_file_set_fence(struct sync_file *sync_file, > > +

Re: [RFC 1/5] dma-buf/fence: add .teardown() ops

2016-06-24 Thread Gustavo Padovan
2016-06-23 Chris Wilson <ch...@chris-wilson.co.uk>: > On Thu, Jun 23, 2016 at 12:29:46PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> > > > > fence_array requires a function to clean up its state before we > > a

Re: [RFC 1/5] dma-buf/fence: add .teardown() ops

2016-06-24 Thread Gustavo Padovan
2016-06-23 Chris Wilson : > On Thu, Jun 23, 2016 at 12:29:46PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > fence_array requires a function to clean up its state before we > > are able to call fence_put() and release it. > &g

Re: [RFC 0/5] rework fences on struct sync_file

2016-06-24 Thread Gustavo Padovan
Hi Christian, 2016-06-24 Christian König <christian.koe...@amd.com>: > Am 23.06.2016 um 17:29 schrieb Gustavo Padovan: > > From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> > > > > Hi all, > > > > This is an attempt to improve fence suppor

Re: [RFC 0/5] rework fences on struct sync_file

2016-06-24 Thread Gustavo Padovan
Hi Christian, 2016-06-24 Christian König : > Am 23.06.2016 um 17:29 schrieb Gustavo Padovan: > > From: Gustavo Padovan > > > > Hi all, > > > > This is an attempt to improve fence support on Sync File. The basic idea > > is to have only sync_file-&g

[RFC 3/5] dma-buf/fence: add .get_fences() ops

2016-06-23 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> get_fences() should return a copy of all fences in the fence as some fence subclass (such as fence_array) can store more than one fence at time. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> --- drivers/dma

[RFC 3/5] dma-buf/fence: add .get_fences() ops

2016-06-23 Thread Gustavo Padovan
From: Gustavo Padovan get_fences() should return a copy of all fences in the fence as some fence subclass (such as fence_array) can store more than one fence at time. Signed-off-by: Gustavo Padovan --- drivers/dma-buf/fence.c | 14 ++ include/linux/fence.h | 3 +++ 2 files

[RFC 4/5] dma-buf/fence-array: add fence_array_get_fences()

2016-06-23 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> This function returns a copy of the array of fences. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> --- drivers/dma-buf/fence-array.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/dri

[RFC 5/5] dma-buf/sync_file: rework fence storage in struct file

2016-06-23 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Create sync_file->fence to abstract the type of fence we are using for each sync_file. If only one fence is present we use a normal struct fence but if there is more fences to be added to the sync_file a fence_array i

[RFC 4/5] dma-buf/fence-array: add fence_array_get_fences()

2016-06-23 Thread Gustavo Padovan
From: Gustavo Padovan This function returns a copy of the array of fences. Signed-off-by: Gustavo Padovan --- drivers/dma-buf/fence-array.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/dma-buf/fence-array.c b/drivers/dma-buf/fence-array.c index 601448a..ce98249

[RFC 5/5] dma-buf/sync_file: rework fence storage in struct file

2016-06-23 Thread Gustavo Padovan
From: Gustavo Padovan Create sync_file->fence to abstract the type of fence we are using for each sync_file. If only one fence is present we use a normal struct fence but if there is more fences to be added to the sync_file a fence_array is created. This behaviour is transparent all sync_f

[RFC 1/5] dma-buf/fence: add .teardown() ops

2016-06-23 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> fence_array requires a function to clean up its state before we are able to call fence_put() and release it. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> --- drivers/dma-buf/fence.c | 7 +++ include/l

[RFC 1/5] dma-buf/fence: add .teardown() ops

2016-06-23 Thread Gustavo Padovan
From: Gustavo Padovan fence_array requires a function to clean up its state before we are able to call fence_put() and release it. Signed-off-by: Gustavo Padovan --- drivers/dma-buf/fence.c | 7 +++ include/linux/fence.h | 7 +++ 2 files changed, 14 insertions(+) diff --git

[RFC 2/5] dma-buf/fence-array: add fence_array_teardown()

2016-06-23 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> When using fences in sync files we need to clean up everything when the sync file needs to be freed, thus we need to teardown fence_array, by removing the callback of its fences and putting extra references to the fence_array base

[RFC 2/5] dma-buf/fence-array: add fence_array_teardown()

2016-06-23 Thread Gustavo Padovan
From: Gustavo Padovan When using fences in sync files we need to clean up everything when the sync file needs to be freed, thus we need to teardown fence_array, by removing the callback of its fences and putting extra references to the fence_array base fence. Signed-off-by: Gustavo Padovan

[RFC 0/5] rework fences on struct sync_file

2016-06-23 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Hi all, This is an attempt to improve fence support on Sync File. The basic idea is to have only sync_file->fence and store all fences there, either as normal fences or fence_arrays. That way we can remove some potential duplica

[RFC 0/5] rework fences on struct sync_file

2016-06-23 Thread Gustavo Padovan
From: Gustavo Padovan Hi all, This is an attempt to improve fence support on Sync File. The basic idea is to have only sync_file->fence and store all fences there, either as normal fences or fence_arrays. That way we can remove some potential duplication when using fence_array with sync_f

Re: [PATCH 7/7] staging/android: remove sync framework TODO

2016-06-23 Thread Gustavo Padovan
2016-06-23 Emil Velikov <emil.l.veli...@gmail.com>: > Hi Gustavo, > > On 20 June 2016 at 16:53, Gustavo Padovan <gust...@padovan.org> wrote: > > - - port libsync tests to kselftest > > I believe the tests haven't landed yet right, so this should stay right

Re: [PATCH 7/7] staging/android: remove sync framework TODO

2016-06-23 Thread Gustavo Padovan
2016-06-23 Emil Velikov : > Hi Gustavo, > > On 20 June 2016 at 16:53, Gustavo Padovan wrote: > > - - port libsync tests to kselftest > > I believe the tests haven't landed yet right, so this should stay right ? Yes, you are right. That part is still missing in upstream. Gustavo

[PATCH v2] staging/android: prepare sw_sync files for de-staging

2016-06-22 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> remove file paths in the comments and add short description about each file. v2: remove file paths instead of just change them. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> --- drivers/staging/android/sw_s

[PATCH v2] staging/android: prepare sw_sync files for de-staging

2016-06-22 Thread Gustavo Padovan
From: Gustavo Padovan remove file paths in the comments and add short description about each file. v2: remove file paths instead of just change them. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sw_sync.c| 2 +- drivers/staging/android/sync_debug.c | 2 +- drivers/staging

Re: [PATCH 5/7] staging/android: prepare sw_sync files for de-staging

2016-06-20 Thread Gustavo Padovan
2016-06-20 Joe Perches <j...@perches.com>: > On Mon, 2016-06-20 at 12:53 -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> > > > > Fix paths in the comments. > > Why is it useful to have the path or filename embedd

Re: [PATCH 5/7] staging/android: prepare sw_sync files for de-staging

2016-06-20 Thread Gustavo Padovan
2016-06-20 Joe Perches : > On Mon, 2016-06-20 at 12:53 -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Fix paths in the comments. > > Why is it useful to have the path or filename embedded > in the file at > all? I just kept it as is. Th

[PATCH 1/7] staging/android: remove doc from sw_sync

2016-06-20 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> SW_SYNC should never be used by other pieces of the kernel apart from sync_debug as it is only a Sync File Validation Framework, so hide any info to avoid confuse this with a standard kernel internal API. Signed-off-by: Gustavo P

[PATCH 1/7] staging/android: remove doc from sw_sync

2016-06-20 Thread Gustavo Padovan
From: Gustavo Padovan SW_SYNC should never be used by other pieces of the kernel apart from sync_debug as it is only a Sync File Validation Framework, so hide any info to avoid confuse this with a standard kernel internal API. Signed-off-by: Gustavo Padovan --- drivers/staging/android

[PATCH 0/7] de-stage SW_SYNC validation frawework

2016-06-20 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Hi Greg, This is the last step in the Sync Framwork de-stage task. It de-stage the SW_SYNC validation framework and the sync_debug info debugfs file. The first 3 patches are clean up and improvements and the rest is preparation to de

[PATCH 0/7] de-stage SW_SYNC validation frawework

2016-06-20 Thread Gustavo Padovan
From: Gustavo Padovan Hi Greg, This is the last step in the Sync Framwork de-stage task. It de-stage the SW_SYNC validation framework and the sync_debug info debugfs file. The first 3 patches are clean up and improvements and the rest is preparation to de-stage and then finally the actual de

[PATCH 5/7] staging/android: prepare sw_sync files for de-staging

2016-06-20 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Fix paths in the comments. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> --- drivers/staging/android/sync_debug.c | 2 +- drivers/staging/android/sync_debug.h | 2 +- 2 files changed, 2 insertions(+),

[PATCH 7/7] staging/android: remove sync framework TODO

2016-06-20 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Sync Framework was de-staged to drivers/dma-buf/, so remove it entries in the TODO file. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> --- drivers/staging/android/TODO | 8 1 file changed, 8 deleti

[PATCH 5/7] staging/android: prepare sw_sync files for de-staging

2016-06-20 Thread Gustavo Padovan
From: Gustavo Padovan Fix paths in the comments. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync_debug.c | 2 +- drivers/staging/android/sync_debug.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/android/sync_debug.c b/drivers/staging

[PATCH 7/7] staging/android: remove sync framework TODO

2016-06-20 Thread Gustavo Padovan
From: Gustavo Padovan Sync Framework was de-staged to drivers/dma-buf/, so remove it entries in the TODO file. Signed-off-by: Gustavo Padovan --- drivers/staging/android/TODO | 8 1 file changed, 8 deletions(-) diff --git a/drivers/staging/android/TODO b/drivers/staging/android/TODO

[PATCH 4/7] staging/android: move trace/sync.h to sync_trace.h

2016-06-20 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> The common behaviour for trace headers is to have them in the same folder they are used, instead of creating a special trace/ directory. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> --- drivers/staging/andro

[PATCH 4/7] staging/android: move trace/sync.h to sync_trace.h

2016-06-20 Thread Gustavo Padovan
From: Gustavo Padovan The common behaviour for trace headers is to have them in the same folder they are used, instead of creating a special trace/ directory. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sw_sync.c | 2 +- drivers/staging/android/{trace

[PATCH 3/7] staging/android: do not let userspace trigger WARN_ON

2016-06-20 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Closing the timeline without waiting all fences to signal is not a critical failure, it is just bad usage from userspace so avoid calling WARN_ON in this case. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk>

[PATCH 6/7] dma-buf/sw_sync: de-stage SW_SYNC

2016-06-20 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> SW_SYNC allows to run tests on the sync_file framework via debugfs on /sync/sw_sync Opening and closing the file triggers creation and release of a sync timeline. To create fences on this timeline the SW_SYNC_IOC_CREATE_FENCE ioctl

[PATCH 3/7] staging/android: do not let userspace trigger WARN_ON

2016-06-20 Thread Gustavo Padovan
From: Gustavo Padovan Closing the timeline without waiting all fences to signal is not a critical failure, it is just bad usage from userspace so avoid calling WARN_ON in this case. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sw_sync.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 6/7] dma-buf/sw_sync: de-stage SW_SYNC

2016-06-20 Thread Gustavo Padovan
From: Gustavo Padovan SW_SYNC allows to run tests on the sync_file framework via debugfs on /sync/sw_sync Opening and closing the file triggers creation and release of a sync timeline. To create fences on this timeline the SW_SYNC_IOC_CREATE_FENCE ioctl should be used. To increment

[PATCH 2/7] staging/android: display sync_pt name on debugfs

2016-06-20 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> When creating a sync_pt the name received wasn't used anywhere. Now we add it to the sync info debug output to make it easier to indetify the userspace name of that sync pt. Signed-off-by: Gustavo Padovan <gustavo.pado...@collab

[PATCH 2/7] staging/android: display sync_pt name on debugfs

2016-06-20 Thread Gustavo Padovan
From: Gustavo Padovan When creating a sync_pt the name received wasn't used anywhere. Now we add it to the sync info debug output to make it easier to indetify the userspace name of that sync pt. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sw_sync.c| 16

Re: [PATCH 2/3] dma-buf/sync_file: add sync_file_get_fence()

2016-06-13 Thread Gustavo Padovan
2016-06-10 Chris Wilson <ch...@chris-wilson.co.uk>: > On Thu, Jun 09, 2016 at 12:05:29PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> > > > > Creates a function that given an sync file descriptor returns a > >

Re: [PATCH 2/3] dma-buf/sync_file: add sync_file_get_fence()

2016-06-13 Thread Gustavo Padovan
2016-06-10 Chris Wilson : > On Thu, Jun 09, 2016 at 12:05:29PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Creates a function that given an sync file descriptor returns a > > fence_collection containing all fences in the sync_file. > >

[PATCH 3/3] Documentation: add doc for sync_file_get_fence()

2016-06-09 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Document the new function added to sync_file.c v2: Adapt to fence_array Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> --- Documentation/sync_file.txt | 19 +++ 1 file changed, 19 inserti

[PATCH 3/3] Documentation: add doc for sync_file_get_fence()

2016-06-09 Thread Gustavo Padovan
From: Gustavo Padovan Document the new function added to sync_file.c v2: Adapt to fence_array Signed-off-by: Gustavo Padovan --- Documentation/sync_file.txt | 19 +++ 1 file changed, 19 insertions(+) diff --git a/Documentation/sync_file.txt b/Documentation/sync_file.txt

[PATCH 2/3] dma-buf/sync_file: add sync_file_get_fence()

2016-06-09 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Creates a function that given an sync file descriptor returns a fence_collection containing all fences in the sync_file. If there is only one fence in the sync_file this fence itself is returned, however if there is more th

[PATCH 2/3] dma-buf/sync_file: add sync_file_get_fence()

2016-06-09 Thread Gustavo Padovan
From: Gustavo Padovan Creates a function that given an sync file descriptor returns a fence_collection containing all fences in the sync_file. If there is only one fence in the sync_file this fence itself is returned, however if there is more than one, a fence_collection fence is returned. v2

[PATCH 1/3] dma-buf/sync_file: only enable fence signalling during wait

2016-06-09 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Signalling doesn't need to be enabled at sync_file creation, it is only required if userspace waiting the fence to signal through poll(). Thus we delay fence_add_callback() until poll is called. It only adds the callback the first tim

[PATCH 1/3] dma-buf/sync_file: only enable fence signalling during wait

2016-06-09 Thread Gustavo Padovan
From: Gustavo Padovan Signalling doesn't need to be enabled at sync_file creation, it is only required if userspace waiting the fence to signal through poll(). Thus we delay fence_add_callback() until poll is called. It only adds the callback the first time poll() is called. This avoid re

Re: [PATCH 00/18] staging/android: clean up SW_SYNC

2016-06-08 Thread Gustavo Padovan
Hi Greg, Any comment on this? Gustavo 2016-05-31 Gustavo Padovan <gust...@padovan.org>: > From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> > > Hi, > > The following patches do a clean up on the sw_sync inteface. It starts by > removing s

Re: [PATCH 00/18] staging/android: clean up SW_SYNC

2016-06-08 Thread Gustavo Padovan
Hi Greg, Any comment on this? Gustavo 2016-05-31 Gustavo Padovan : > From: Gustavo Padovan > > Hi, > > The following patches do a clean up on the sw_sync inteface. It starts by > removing struct sync_timeline_ops, which was creating unecessary wrappers > in t

Re: [PATCH 05/10] drm: make drm_vblank_count_and_time() static

2016-06-07 Thread Gustavo Padovan
2016-06-07 Gustavo Padovan <gust...@padovan.org>: > From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> > > As they are not used anywhere outside drm_irq.c make them static. > > Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> >

Re: [PATCH 05/10] drm: make drm_vblank_count_and_time() static

2016-06-07 Thread Gustavo Padovan
2016-06-07 Gustavo Padovan : > From: Gustavo Padovan > > As they are not used anywhere outside drm_irq.c make them static. > > Signed-off-by: Gustavo Padovan > --- > drivers/gpu/drm/drm_irq.c | 7 ++- > include/drm/drmP.h| 2 -- > 2 files changed, 2

[PATCH 04/10] drm: make drm_vblank_{get,put}() static

2016-06-07 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> As they are not used anywhere outside drm_irq.c make them static. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> --- drivers/gpu/drm/drm_irq.c | 10 ++ include/drm/drmP.h| 2 -- 2 file

[PATCH 04/10] drm: make drm_vblank_{get,put}() static

2016-06-07 Thread Gustavo Padovan
From: Gustavo Padovan As they are not used anywhere outside drm_irq.c make them static. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/drm_irq.c | 10 ++ include/drm/drmP.h| 2 -- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/drm_irq.c b

[PATCH 07/10] drm/gma500: use drm_crtc_vblank_{on,off}()

2016-06-07 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Replace the legacy drm_vblank_{on,off}() with the new helper functions. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> --- drivers/gpu/drm/gma500/gma_display.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

[PATCH 05/10] drm: make drm_vblank_count_and_time() static

2016-06-07 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> As they are not used anywhere outside drm_irq.c make them static. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> --- drivers/gpu/drm/drm_irq.c | 7 ++- include/drm/drmP.h| 2 -- 2 files changed,

[PATCH 07/10] drm/gma500: use drm_crtc_vblank_{on,off}()

2016-06-07 Thread Gustavo Padovan
From: Gustavo Padovan Replace the legacy drm_vblank_{on,off}() with the new helper functions. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/gma500/gma_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/gma500/gma_display.c b/drivers/gpu/drm

[PATCH 05/10] drm: make drm_vblank_count_and_time() static

2016-06-07 Thread Gustavo Padovan
From: Gustavo Padovan As they are not used anywhere outside drm_irq.c make them static. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/drm_irq.c | 7 ++- include/drm/drmP.h| 2 -- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/drm_irq.c b

[PATCH 03/10] drm: remove legacy drm_arm_vblank_event()

2016-06-07 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> We don't have any user of this function anymore, let's remove it. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> --- drivers/gpu/drm/drm_irq.c | 39 --- include/drm/drmP.h

[PATCH 03/10] drm: remove legacy drm_arm_vblank_event()

2016-06-07 Thread Gustavo Padovan
From: Gustavo Padovan We don't have any user of this function anymore, let's remove it. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/drm_irq.c | 39 --- include/drm/drmP.h| 2 -- 2 files changed, 8 insertions(+), 33 deletions(-) diff --git

[PATCH 01/10] drm/nouveau: replace legacy vblank helpers

2016-06-07 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Replace the legacy drm_send_vblank_event(), drm_arm_vblank_event() and drm_vblank_{get,put}() with the new helper functions. v2: add crtc to nouveau_page_flip_state (comment from Mario Kleiner) Signed-off-by: Gustavo Padovan <gus

[PATCH 08/10] drm/radeon: use drm_crtc_vblank_{on,off}()

2016-06-07 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Replace the legacy drm_vblank_{on,off}() with the new helper functions. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> --- drivers/gpu/drm/radeon/atombios_crtc.c | 4 ++-- drivers/gpu/drm/radeon/radeon_l

[PATCH 01/10] drm/nouveau: replace legacy vblank helpers

2016-06-07 Thread Gustavo Padovan
From: Gustavo Padovan Replace the legacy drm_send_vblank_event(), drm_arm_vblank_event() and drm_vblank_{get,put}() with the new helper functions. v2: add crtc to nouveau_page_flip_state (comment from Mario Kleiner) Signed-off-by: Gustavo Padovan Signed-off-by: Gustavo Padovan --- drivers

[PATCH 08/10] drm/radeon: use drm_crtc_vblank_{on,off}()

2016-06-07 Thread Gustavo Padovan
From: Gustavo Padovan Replace the legacy drm_vblank_{on,off}() with the new helper functions. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/radeon/atombios_crtc.c | 4 ++-- drivers/gpu/drm/radeon/radeon_legacy_crtc.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff

[PATCH 09/10] drm/amdgpu: use crtc directly in drm_crtc_vblank_put()

2016-06-07 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> We don't need to use _crtc->base there as crtc is available in the function. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 +- 1 file changed, 1

[PATCH 09/10] drm/amdgpu: use crtc directly in drm_crtc_vblank_put()

2016-06-07 Thread Gustavo Padovan
From: Gustavo Padovan We don't need to use _crtc->base there as crtc is available in the function. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c

[PATCH 06/10] drm/amdgpu: use drm_crtc_vblank_{on,off}()

2016-06-07 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Replace the legacy drm_vblank_{on,off}() with the new helper functions. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> --- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/dce

[PATCH 06/10] drm/amdgpu: use drm_crtc_vblank_{on,off}()

2016-06-07 Thread Gustavo Padovan
From: Gustavo Padovan Replace the legacy drm_vblank_{on,off}() with the new helper functions. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 4 ++-- 3 files changed

[PATCH 10/10] drm/radeon: use crtc directly in drm_crtc_vblank_put()

2016-06-07 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> We don't need to use _crtc->base there as crtc is available in the function. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> --- drivers/gpu/drm/radeon/radeon_display.c | 2 +- 1 file changed, 1 insertion

[PATCH 10/10] drm/radeon: use crtc directly in drm_crtc_vblank_put()

2016-06-07 Thread Gustavo Padovan
From: Gustavo Padovan We don't need to use _crtc->base there as crtc is available in the function. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/radeon/radeon_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/driv

[PATCH 02/10] drm: remove legacy drm_send_vblank_event()

2016-06-07 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> We don't have any user of this function anymore, let's remove it. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> --- drivers/gpu/drm/drm_irq.c | 31 ++- include/drm/drmP.h

[PATCH 02/10] drm: remove legacy drm_send_vblank_event()

2016-06-07 Thread Gustavo Padovan
From: Gustavo Padovan We don't have any user of this function anymore, let's remove it. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/drm_irq.c | 31 ++- include/drm/drmP.h| 2 -- 2 files changed, 6 insertions(+), 27 deletions(-) diff --git a/drivers

Re: [PATCH 08/14] drm/amdgpu: use drm_crtc_vblank_{get,put}()

2016-06-06 Thread Gustavo Padovan
2016-06-06 Alex Deucher <alexdeuc...@gmail.com>: > On Mon, Jun 6, 2016 at 10:41 AM, Gustavo Padovan <gust...@padovan.org> wrote: > > From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> > > > > Replace the legacy drm_vblank_{get,put}() with the n

Re: [PATCH 08/14] drm/amdgpu: use drm_crtc_vblank_{get,put}()

2016-06-06 Thread Gustavo Padovan
2016-06-06 Alex Deucher : > On Mon, Jun 6, 2016 at 10:41 AM, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Replace the legacy drm_vblank_{get,put}() with the new helper functions. > > > > Signed-off-by: Gustavo Padovan > > This and the r

[PATCH] Documentation: add fence-array to kernel DocBook

2016-06-06 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Include fence-array files in the DocBook. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> --- This should go to drm-misc, as fence-array are only present there at the moment. --- Documentation/DocBook/device-

<    2   3   4   5   6   7   8   9   10   11   >