Re: [PATCH] android: fix warning when releasing active sync point

2015-12-15 Thread Gustavo Padovan
2015-12-14 Dmitry Torokhov : > Userspace can close the sync device while there are still active fence > points, in which case kernel produces the following warning: > > [ 43.853176] [ cut here ] > [ 43.857834] WARNING: CPU: 0 PID: 892 at > /mnt/host/source/src/third_p

Re: [PATCH] android: fix warning when releasing active sync point

2015-12-15 Thread Gustavo Padovan
2015-12-15 Daniel Vetter : > On Mon, Dec 14, 2015 at 05:29:55PM -0800, Dmitry Torokhov wrote: > > Userspace can close the sync device while there are still active fence > > points, in which case kernel produces the following warning: > > > > [ 43.853176] [ cut here ] > >

[PATCH v8 2/2] staging/android: refactor SYNC IOCTLs

2016-03-14 Thread Gustavo Padovan
From: Gustavo Padovan Change SYNC_IOC_FILE_INFO (former SYNC_IOC_FENCE_INFO) behaviour to avoid future API breaks and optimize buffer allocation. Now num_fences can be filled by the caller to inform how many fences it wants to retrieve from the kernel. If the num_fences passed is greater than

[PATCH v8 1/2] staging/android: remove redundant comments on sync_merge_data

2016-03-14 Thread Gustavo Padovan
From: Gustavo Padovan struct sync_merge_data already have documentation on top of the struct definition. No need to duplicate it. Signed-off-by: Gustavo Padovan Reviewed-by: Maarten Lankhorst --- drivers/staging/android/uapi/sync.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions

[PATCH] de-stage android sync framework

2016-03-18 Thread Gustavo Padovan
From: Gustavo Padovan Hi, This is the first step and the most important one of the de-stage of the the sync framework, it de-stage the sync_file part which is used to send/receive fence file descriptors with the userspace. These patches sits on top of the sync ABI changes that I sent earlier

Re: [PATCH v9 2/3] kernel.h: add to_user_ptr()

2016-03-18 Thread Gustavo Padovan
2016-03-17 Joe Perches : > On Thu, 2016-03-17 at 18:19 -0300, Gustavo Padovan wrote: > > 2016-03-17 Joe Perches : > > > On Thu, 2016-03-17 at 16:50 -0400, Rob Clark wrote: > > > > On Thu, Mar 17, 2016 at 4:40 PM, Joe Perches wrote: > > > [] > > >

[PATCH v10 3/3] staging/android: refactor SYNC IOCTLs

2016-03-18 Thread Gustavo Padovan
From: Gustavo Padovan Change SYNC_IOC_FILE_INFO (former SYNC_IOC_FENCE_INFO) behaviour to avoid future API breaks and optimize buffer allocation. Now num_fences can be filled by the caller to inform how many fences it wants to retrieve from the kernel. If the num_fences passed is greater than

Re: [PATCH v9 2/3] kernel.h: add to_user_ptr()

2016-03-19 Thread Gustavo Padovan
2016-03-17 Joe Perches : > On Thu, 2016-03-17 at 16:50 -0400, Rob Clark wrote: > > On Thu, Mar 17, 2016 at 4:40 PM, Joe Perches wrote: > [] > > > It's a name that seems like it should be a straightforward > > > cast of a kernel pointer to a __user pointer like: > > > > > > static inline void __u

[PATCH v9 1/3] staging/android: remove redundant comments on sync_merge_data

2016-03-19 Thread Gustavo Padovan
From: Gustavo Padovan struct sync_merge_data already have documentation on top of the struct definition. No need to duplicate it. Signed-off-by: Gustavo Padovan Reviewed-by: Maarten Lankhorst --- drivers/staging/android/uapi/sync.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions

Re: [PATCH v9 2/3] kernel.h: add to_user_ptr()

2016-03-19 Thread Gustavo Padovan
2016-03-17 Gustavo Padovan : > 2016-03-17 Joe Perches : > > > On Thu, 2016-03-17 at 14:30 -0300, Gustavo Padovan wrote: > > > This function had copies in 3 different files. Unify them in > > > kernel.h. > > > > This is only used by gpu/drm. > >

Re: [PATCH v9 2/3] kernel.h: add to_user_ptr()

2016-03-19 Thread Gustavo Padovan
2016-03-17 Joe Perches : > On Thu, 2016-03-17 at 14:30 -0300, Gustavo Padovan wrote: > > This function had copies in 3 different files. Unify them in > > kernel.h. > > This is only used by gpu/drm. > > I think this is a poor name for a generic function > that wo

[PATCH v10 1/3] staging/android: remove redundant comments on sync_merge_data

2016-03-19 Thread Gustavo Padovan
From: Gustavo Padovan struct sync_merge_data already have documentation on top of the struct definition. No need to duplicate it. Signed-off-by: Gustavo Padovan Reviewed-by: Maarten Lankhorst --- drivers/staging/android/uapi/sync.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions

[PATCH v9 3/3] staging/android: refactor SYNC IOCTLs

2016-03-19 Thread Gustavo Padovan
From: Gustavo Padovan Change SYNC_IOC_FILE_INFO (former SYNC_IOC_FENCE_INFO) behaviour to avoid future API breaks and optimize buffer allocation. Now num_fences can be filled by the caller to inform how many fences it wants to retrieve from the kernel. If the num_fences passed is greater than

[PATCH v10 2/3] kernel.h: add u64_to_user_ptr()

2016-03-19 Thread Gustavo Padovan
From: Gustavo Padovan This function had copies in 3 different files. Unify them in kernel.h. Cc: Joe Perches Cc: Andrew Morton Cc: David Airlie Cc: Daniel Vetter Cc: Rob Clark Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 11 +++ drivers/gpu

[PATCH v9 2/3] kernel.h: add to_user_ptr()

2016-03-19 Thread Gustavo Padovan
From: Gustavo Padovan This function had copies in 3 different files. Unify them in kernel.h. Cc: Andrew Morton Cc: David Airlie Cc: Daniel Vetter Cc: Rob Clark Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 5 - drivers/gpu/drm/i915/i915_drv.h

[PATCH] dma-buf/sync_file: de-stage sync_file

2016-03-19 Thread Gustavo Padovan
From: Gustavo Padovan sync_file is useful to connect one or more fences to the file. The file is used by userspace to track fences. Signed-off-by: Gustavo Padovan --- drivers/Kconfig| 2 + drivers/dma-buf/Kconfig| 11

Re: [PATCH] dma-buf/sync_file: de-stage sync_file

2016-03-23 Thread Gustavo Padovan
Hi Sumit, 2016-03-21 Sumit Semwal : > Thanks for the patch, Gustavo! > > On 18 March 2016 at 19:49, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > sync_file is useful to connect one or more fences to the file. The file is > > used by userspace to

Re: [PATCH v7 1/5] staging/android: add num_fences field to struct sync_file_info

2016-03-30 Thread Gustavo Padovan
Hi Greg, 2016-03-30 Greg Kroah-Hartman : > On Thu, Mar 03, 2016 at 04:40:42PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Gustavo, can you resend both series of your android patches so I know I > have the latest ones to work with? Please al

Re: [PATCH v10 3/3] staging/android: refactor SYNC IOCTLs

2016-04-05 Thread Gustavo Padovan
Hi Greg, Any comments on this? Thanks, Gustavo 2016-03-18 Gustavo Padovan : > From: Gustavo Padovan > > Change SYNC_IOC_FILE_INFO (former SYNC_IOC_FENCE_INFO) behaviour to avoid > future API breaks and optimize buffer allocation. > > Now num_fences can be fille

Re: [PATCH v10 3/3] staging/android: refactor SYNC IOCTLs

2016-04-14 Thread Gustavo Padovan
Hi Greg, Any comment on this? Thanks, Gustavo 2016-03-18 Gustavo Padovan : > From: Gustavo Padovan > > Change SYNC_IOC_FILE_INFO (former SYNC_IOC_FENCE_INFO) behaviour to avoid > future API breaks and optimize buffer allocation. > > Now num_fences can be filled by the ca

[PATCH v10 RESEND 1/3] staging/android: remove redundant comments on sync_merge_data

2016-04-19 Thread Gustavo Padovan
From: Gustavo Padovan struct sync_merge_data already have documentation on top of the struct definition. No need to duplicate it. Signed-off-by: Gustavo Padovan Reviewed-by: Maarten Lankhorst --- drivers/staging/android/uapi/sync.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions

[PATCH v10 RESEND 2/3] kernel.h: add u64_to_user_ptr()

2016-04-19 Thread Gustavo Padovan
From: Gustavo Padovan This function had copies in 3 different files. Unify them in kernel.h. Cc: Joe Perches Cc: Andrew Morton Cc: David Airlie Cc: Daniel Vetter Cc: Rob Clark Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 11 +++ drivers/gpu

[PATCH v10 RESEND 3/3] staging/android: refactor SYNC IOCTLs

2016-04-19 Thread Gustavo Padovan
From: Gustavo Padovan Change SYNC_IOC_FILE_INFO (former SYNC_IOC_FENCE_INFO) behaviour to avoid future API breaks and optimize buffer allocation. Now num_fences can be filled by the caller to inform how many fences it wants to retrieve from the kernel. If the num_fences passed is greater than

Re: [PATCH v10 RESEND 2/3] kernel.h: add u64_to_user_ptr()

2016-04-20 Thread Gustavo Padovan
2016-04-20 Maarten Lankhorst : > Op 19-04-16 om 22:42 schreef Gustavo Padovan: > > From: Gustavo Padovan > > > > This function had copies in 3 different files. Unify them in kernel.h. > > > > Cc: Joe Perches > > Cc: Andrew Morton > > Cc: David Air

[PATCH 2/3] kernel.h: add u64_to_user_ptr()

2016-04-20 Thread Gustavo Padovan
From: Gustavo Padovan This function had copies in 3 different files. Unify them in kernel.h. Cc: Joe Perches Cc: Andrew Morton Cc: David Airlie Cc: Daniel Vetter Cc: Rob Clark Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 11 +++ drivers/gpu

[PATCH 3/3] staging/android: refactor SYNC IOCTLs

2016-04-20 Thread Gustavo Padovan
From: Gustavo Padovan Change SYNC_IOC_FILE_INFO (former SYNC_IOC_FENCE_INFO) behaviour to avoid future API breaks and optimize buffer allocation. Now num_fences can be filled by the caller to inform how many fences it wants to retrieve from the kernel. If the num_fences passed is greater than

[PATCH 1/3] staging/android: remove redundant comments on sync_merge_data

2016-04-20 Thread Gustavo Padovan
From: Gustavo Padovan struct sync_merge_data already have documentation on top of the struct definition. No need to duplicate it. Signed-off-by: Gustavo Padovan Reviewed-by: Maarten Lankhorst --- drivers/staging/android/uapi/sync.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions

Re: [PATCH 1/3] staging/android: remove redundant comments on sync_merge_data

2016-04-20 Thread Gustavo Padovan
I messed up with the subject prefix, but this is v11, adds typecheck() to patch 2. 2016-04-20 Gustavo Padovan : > From: Gustavo Padovan > > struct sync_merge_data already have documentation on top of the > struct definition. No need to duplicate it. > > Signed-off-b

Re: [PATCH 2/3] kernel.h: add u64_to_user_ptr()

2016-04-21 Thread Gustavo Padovan
2016-04-20 Joe Perches : > On Wed, 2016-04-20 at 16:18 -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > This function had copies in 3 different files. Unify them in kernel.h. > [] > > diff --git a/include/linux/kernel.h b/include/linux/ker

[PATCH v12 0/2] staging/android: Sync ABI rework

2016-04-21 Thread Gustavo Padovan
From: Gustavo Padovan Hi, Here we clean up the Sync ABI and then improve in to a more optimized version. Also it is now less likely to need changes in the future. This is not breaking any upstream user of the sync framework, as no driver wired support for it, so far Android is the only user. A

[PATCH v12 1/2] kernel.h: add u64_to_user_ptr()

2016-04-21 Thread Gustavo Padovan
From: Gustavo Padovan This function had copies in 3 different files. Unify them in kernel.h. Cc: Joe Perches Cc: Andrew Morton Cc: David Airlie Cc: Daniel Vetter Cc: Rob Clark Signed-off-by: Gustavo Padovan --- v2: add typecheck() (comment from Maarten Lankhorst) v3: make

[PATCH v12 2/2] staging/android: refactor SYNC IOCTLs

2016-04-21 Thread Gustavo Padovan
From: Gustavo Padovan Change SYNC_IOC_FILE_INFO (former SYNC_IOC_FENCE_INFO) behaviour to avoid future API breaks and optimize buffer allocation. Now num_fences can be filled by the caller to inform how many fences it wants to retrieve from the kernel. If the num_fences passed is greater than

Re: [PATCH v12 1/2] kernel.h: add u64_to_user_ptr()

2016-04-22 Thread Gustavo Padovan
2016-04-22 Daniel Vetter : > On Thu, Apr 21, 2016 at 12:38:49PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > This function had copies in 3 different files. Unify them in kernel.h. > > > > Cc: Joe Perches > > Cc: Andrew Morton >

[RFC v2 7/8] drm/fence: add fence timeline to drm_crtc

2016-04-25 Thread Gustavo Padovan
From: Gustavo Padovan Create one timeline context for each CRTC to be able to handle out-fences and signal them. It adds a few members to struct drm_crtc: fence_context, where we store the context we get from fence_context_alloc(), the fence seqno and the fence lock, that we pass in fence_init

[RFC v2 1/8] dma-buf/fence: add fence_collection fences

2016-04-25 Thread Gustavo Padovan
From: Gustavo Padovan struct fence_collection inherits from struct fence and carries a collection of fences that needs to be waited together. It is useful to translate a sync_file to a fence to remove the complexity of dealing with sync_files on DRM drivers. So even if there are many fences in

[RFC v2 4/8] drm/fence: allow fence waiting to be interrupted by userspace

2016-04-25 Thread Gustavo Padovan
From: Gustavo Padovan If userspace is running an synchronously atomic commit and interrupts the atomic operation during fence_wait() it will hang until the timer expires, so here we change the wait to be interruptible so it stop immediately when userspace wants to quit. Also adds the necessary

[RFC v2 2/8] Documentation: add fence-collection to kernel DocBook

2016-04-25 Thread Gustavo Padovan
From: Gustavo Padovan Include fence-collection files in the DocBook. Signed-off-by: Gustavo Padovan --- Documentation/DocBook/device-drivers.tmpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/DocBook/device-drivers.tmpl b/Documentation/DocBook/device-drivers.tmpl index

[RFC v2 5/8] drm/fence: add in-fences support

2016-04-25 Thread Gustavo Padovan
From: Gustavo Padovan There is now a new property called FENCE_FD attached to every plane state that receives the sync_file fd from userspace via the atomic commit IOCTL. The fd is then translated to a fence (that may be a fence_collection subclass or just a normal fence) and then used by DRM

[RFC v2 8/8] drm/fence: add out-fences support

2016-04-25 Thread Gustavo Padovan
From: Gustavo Padovan Support DRM out-fences creating a sync_file with a fence for each crtc update with the DRM_MODE_ATOMIC_OUT_FENCE flag. We then send an struct drm_out_fences array with the out-fences fds back in the drm_atomic_ioctl() as an out arg in the out_fences_ptr field. struct

[RFC v2 0/8] drm: explicit fencing support

2016-04-25 Thread Gustavo Padovan
From: Gustavo Padovan Hi, Currently the Linux Kernel only have an implicit fencing mechanism where the fence are attached directly to buffers and userspace is unaware of what is happening. On the other hand explicit fencing which is not supported yet by Linux but it expose fences to the

[RFC v2 3/8] dma-buf/sync_file: add sync_file_fences_get()

2016-04-25 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

[RFC v2 6/8] drm/fence: add fence to drm_pending_event

2016-04-25 Thread Gustavo Padovan
From: Gustavo Padovan Now a drm_pending_event can either send a real drm_event or signal a fence, or both. It allow us to signal via fences when the buffer is displayed on the screen. Which in turn means that the previous buffer is not in use anymore and can be freed or sent back to another

Re: [PATCH v12 1/2] kernel.h: add u64_to_user_ptr()

2016-04-26 Thread Gustavo Padovan
2016-04-26 Lucas Stach : > Am Donnerstag, den 21.04.2016, 12:38 -0300 schrieb Gustavo Padovan: > > From: Gustavo Padovan > > > > This function had copies in 3 different files. Unify them in kernel.h. > > > > Cc: Joe Perches > > Cc: Andrew Morton >

[PATCH v13 0/2] staging/android: Sync ABI rework

2016-04-26 Thread Gustavo Padovan
From: Gustavo Padovan Hi Greg, This patchset clean up the Sync ABI and then improve in to a more optimized version. Also it is now less likely to need changes in the future. This is not breaking any upstream user of the sync framework, as no driver wired support for it, so far Android is the

[PATCH v13 2/2] staging/android: refactor SYNC IOCTLs

2016-04-26 Thread Gustavo Padovan
From: Gustavo Padovan Change SYNC_IOC_FILE_INFO (former SYNC_IOC_FENCE_INFO) behaviour to avoid future API breaks and optimize buffer allocation. Now num_fences can be filled by the caller to inform how many fences it wants to retrieve from the kernel. If the num_fences passed is greater than

[PATCH v13 1/2] kernel.h: add u64_to_user_ptr()

2016-04-26 Thread Gustavo Padovan
From: Gustavo Padovan This function had copies in 3 different files. Unify them in kernel.h. Cc: Joe Perches Cc: Andrew Morton Cc: David Airlie Cc: Daniel Vetter Cc: Rob Clark Signed-off-by: Gustavo Padovan Acked-by: Daniel Vetter[drm/i915/] Acked-by: Rob Clark[drm

[PATCH 01/12] staging/android: remove redundant comments on sync_merge_data

2016-04-27 Thread Gustavo Padovan
From: Gustavo Padovan struct sync_merge_data already have documentation on top of the struct definition. No need to duplicate it. Signed-off-by: Gustavo Padovan Reviewed-by: Maarten Lankhorst --- drivers/staging/android/uapi/sync.h | 10 +- 1 file changed, 5 insertions(+), 5

[PATCH 03/12] staging/android: move sync_file functions comments to sync.c

2016-04-27 Thread Gustavo Padovan
From: Gustavo Padovan To keep comments in line with drivers/dma-buf/ move all sync_file comments to sync.c. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 26 +- drivers/staging/android/sync.h | 31 --- 2 files changed

[PATCH 02/12] staging/android: drop sync_file_install() and sync_file_put()

2016-04-27 Thread Gustavo Padovan
From: Gustavo Padovan These two functions are just wrappers for one line functions, they call fd_install() and fput() respectively, so just get rid of them and use fd_install() and fput() directly for more simplicity. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c

[PATCH 00/12] De-stage Sync File Framework

2016-04-27 Thread Gustavo Padovan
From: Gustavo Padovan Hi, This patchset sits on top of Sync ABI Rework v13: https://www.spinics.net/lists/dri-devel/msg105667.html The first eight clean up and prepare sync_file for de-staging. The last four patches do the de-staging, moving files to drivers/dma-buf/ and include/linux/ plus

[PATCH 04/12] staging/android: make sync_file_merge() static

2016-04-27 Thread Gustavo Padovan
From: Gustavo Padovan There is no plan in the near future to use this function outside of this file so keep it as static. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 4 ++-- drivers/staging/android/sync.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff

[PATCH 06/12] staging/android: prepare sync_file for de-staging

2016-04-27 Thread Gustavo Padovan
From: Gustavo Padovan Move its functions and structs to their own file. Also moves function's docs to the .c file. Signed-off-by: Gustavo Padovan --- drivers/staging/android/Makefile | 2 +- drivers/staging/android/sync.c

[PATCH 09/12] dma-buf/sync_file: de-stage sync_file headers

2016-04-27 Thread Gustavo Padovan
From: Gustavo Padovan Move sync_file headers file to include/ dir. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.h | 4 ++-- drivers/staging/android/sync_debug.c | 2 +- drivers/staging/android/sync_file.c

[PATCH 11/12] Documentation: include sync_file into DocBook

2016-04-27 Thread Gustavo Padovan
From: Gustavo Padovan Add entry in device-drivers.tmpl for sync_file documentation. Signed-off-by: Gustavo Padovan --- Documentation/DocBook/device-drivers.tmpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/DocBook/device-drivers.tmpl b/Documentation/DocBook/device

[PATCH 08/12] staging/android: style fix: alignment to match the open parenthesis

2016-04-27 Thread Gustavo Padovan
From: Gustavo Padovan Fix checks reported by checkpatch.pl. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync_file.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/android/sync_file.c b/drivers/staging/android/sync_file.c index

[PATCH 12/12] Documentation: add Sync File doc

2016-04-27 Thread Gustavo Padovan
From: Gustavo Padovan Add sync_file documentation on dma-buf-sync_file.txt --- Documentation/dma-buf-sync_file.txt | 65 + 1 file changed, 65 insertions(+) create mode 100644 Documentation/dma-buf-sync_file.txt diff --git a/Documentation/dma-buf

[PATCH 05/12] staging/android: make sync_file_fdget() static

2016-04-27 Thread Gustavo Padovan
From: Gustavo Padovan There is no plan in the near future to use this function outside of this file so keep it as static. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 3 +-- drivers/staging/android/sync.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff

[PATCH 10/12] dma-buf/sync_file: de-stage sync_file

2016-04-27 Thread Gustavo Padovan
From: Gustavo Padovan sync_file is useful to connect one or more fences to the file. The file is used by userspace to track fences between drivers that share DMA bufs. Signed-off-by: Gustavo Padovan --- drivers/Kconfig | 2 ++ drivers/dma-buf/Kconfig

[PATCH 07/12] staging/android: improve documentation for sync_file

2016-04-27 Thread Gustavo Padovan
From: Gustavo Padovan num_fences was missing a colon mark and sync_file_create() now have better description. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync_file.c | 3 ++- drivers/staging/android/sync_file.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff

Re: [PATCH 00/12] De-stage Sync File Framework

2016-04-28 Thread Gustavo Padovan
2016-04-27 Daniel Vetter : > On Wed, Apr 27, 2016 at 01:27:07PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Hi, > > > > This patchset sits on top of Sync ABI Rework v13: > > > > https://www.spinics.net/lists/dri-devel/msg1056

[PATCH v2 04/13] staging/android: make sync_file_merge() static

2016-04-28 Thread Gustavo Padovan
From: Gustavo Padovan There is no plan in the near future to use this function outside of this file so keep it as static. Signed-off-by: Gustavo Padovan Reviewed-by: Daniel Vetter --- drivers/staging/android/sync.c | 5 ++--- drivers/staging/android/sync.h | 2 -- 2 files changed, 2

[PATCH v2 03/13] staging/android: move sync_file functions comments to sync.c

2016-04-28 Thread Gustavo Padovan
From: Gustavo Padovan To keep comments in line with drivers/dma-buf/ move all sync_file comments to sync.c. Signed-off-by: Gustavo Padovan Reviewed-by: Daniel Vetter --- drivers/staging/android/sync.c | 26 +- drivers/staging/android/sync.h | 31

[PATCH v2 01/13] staging/android: remove redundant comments on sync_merge_data

2016-04-28 Thread Gustavo Padovan
From: Gustavo Padovan struct sync_merge_data already have documentation on top of the struct definition. No need to duplicate it. Signed-off-by: Gustavo Padovan Reviewed-by: Maarten Lankhorst Reviewed-by: Daniel Vetter --- drivers/staging/android/uapi/sync.h | 10 +- 1 file changed

[PATCH v2 06/13] staging/android: remove name arg from sync_file_create()

2016-04-28 Thread Gustavo Padovan
From: Gustavo Padovan Simplifies the API to only receive the fence it needs to add to the sync and create a name for the sync_file based on the fence context and seqno. Signed-off-by: Gustavo Padovan Reviewed-by: Daniel Vetter --- drivers/staging/android/sync.c | 16

[PATCH v2 02/13] staging/android: drop sync_file_install() and sync_file_put()

2016-04-28 Thread Gustavo Padovan
From: Gustavo Padovan These two functions are just wrappers for one line functions, they call fd_install() and fput() respectively, so just get rid of them and use fd_install() and fput() directly for more simplicity. Signed-off-by: Gustavo Padovan Reviewed-by: Daniel Vetter --- drivers

[PATCH v2 00/13] De-stage Sync File Framework

2016-04-28 Thread Gustavo Padovan
From: Gustavo Padovan Hi, This patchset sits on top of Sync ABI Rework v13: https://www.spinics.net/lists/dri-devel/msg105667.html The first eight clean up and prepare sync_file for de-staging. The last four patches do the de-staging, moving files to drivers/dma-buf/ and include/linux/ plus

[PATCH v2 07/13] staging/android: prepare sync_file for de-staging

2016-04-28 Thread Gustavo Padovan
From: Gustavo Padovan Move its functions and structs to their own file. Also moves function's docs to the .c file. Signed-off-by: Gustavo Padovan Reviewed-by: Daniel Vetter --- drivers/staging/android/Makefile | 2 +- drivers/staging/android/s

[PATCH v2 05/13] staging/android: make sync_file_fdget() static

2016-04-28 Thread Gustavo Padovan
From: Gustavo Padovan There is no plan in the near future to use this function outside of this file so keep it as static. Signed-off-by: Gustavo Padovan Reviewed-by: Daniel Vetter --- drivers/staging/android/sync.c | 3 +-- drivers/staging/android/sync.h | 1 - 2 files changed, 1 insertion

[PATCH v2 11/13] dma-buf/sync_file: de-stage sync_file

2016-04-28 Thread Gustavo Padovan
From: Gustavo Padovan sync_file is useful to connect one or more fences to the file. The file is used by userspace to track fences between drivers that share DMA bufs. Signed-off-by: Gustavo Padovan Reviewed-by: Daniel Vetter --- drivers/Kconfig | 2

[PATCH v2 13/13] Documentation: add Sync File doc

2016-04-28 Thread Gustavo Padovan
From: Gustavo Padovan Add sync_file documentation on dma-buf-sync_file.txt Reviewed-by: Daniel Vetter --- Documentation/sync_file.txt | 69 + 1 file changed, 69 insertions(+) create mode 100644 Documentation/sync_file.txt diff --git a/Documentation

[PATCH v2 10/13] dma-buf/sync_file: de-stage sync_file headers

2016-04-28 Thread Gustavo Padovan
From: Gustavo Padovan Move sync_file headers file to include/ dir. Signed-off-by: Gustavo Padovan Reviewed-by: Daniel Vetter --- drivers/staging/android/sync.h | 4 ++-- drivers/staging/android/sync_debug.c | 2 +- drivers/staging

[PATCH v2 09/13] staging/android: style fix: alignment to match the open parenthesis

2016-04-28 Thread Gustavo Padovan
From: Gustavo Padovan Fix checks reported by checkpatch.pl. Signed-off-by: Gustavo Padovan Reviewed-by: Daniel Vetter --- drivers/staging/android/sync_file.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/android/sync_file.c b/drivers/staging

[PATCH v2 08/13] staging/android: improve documentation for sync_file

2016-04-28 Thread Gustavo Padovan
From: Gustavo Padovan num_fences was missing a colon mark and sync_file_create() now have better description. Signed-off-by: Gustavo Padovan Reviewed-by: Daniel Vetter --- drivers/staging/android/sync_file.c | 5 +++-- drivers/staging/android/sync_file.h | 2 +- 2 files changed, 4 insertions

[PATCH v2 12/13] Documentation: include sync_file into DocBook

2016-04-28 Thread Gustavo Padovan
From: Gustavo Padovan Add entry in device-drivers.tmpl for sync_file documentation. Signed-off-by: Gustavo Padovan Reviewed-by: Daniel Vetter --- Documentation/DocBook/device-drivers.tmpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/DocBook/device-drivers.tmpl b

Re: [RFC v2 1/8] dma-buf/fence: add fence_collection fences

2016-04-28 Thread Gustavo Padovan
2016-04-26 Chris Wilson : > On Mon, Apr 25, 2016 at 07:33:21PM -0300, Gustavo Padovan wrote: > > +static const char *fence_collection_get_timeline_name(struct fence *fence) > > +{ > > + return "no context"; > > "unbound" to distinguish from fence

Re: [RFC v2 8/8] drm/fence: add out-fences support

2016-04-28 Thread Gustavo Padovan
2016-04-26 Daniel Vetter : > On Mon, Apr 25, 2016 at 07:33:28PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Support DRM out-fences creating a sync_file with a fence for each crtc > > update with the DRM_MODE_ATOMIC_OUT_FENCE flag. >

[PATCH 03/13] staging/android: remove struct sync_timeline_ops

2016-05-02 Thread Gustavo Padovan
From: Gustavo Padovan Move drv_name, the last field of sync_timeline_ops, to sync_timeline and remove sync_timeline_ops. struct sync_timeline_ops was just an extra abstraction on top of fence_ops, and in the last few commits we removed all it ops in favor of cleaner fence_ops. Signed-off-by

[PATCH 00/13] staging/android: clean up SW_SYNC

2016-05-02 Thread 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 the code and the start to organize the sync_timeline and sw_sync code better. sw_sync interface was moved to

[PATCH 13/13] staging/android: make sw_ioctl info internal to sw_sync.c

2016-05-02 Thread Gustavo Padovan
From: Gustavo Padovan We don't want to export this from the kernel. This is interface is only for testing and debug. So testers shall copy the ioctl info in their own projects. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sw_sync.c | 13 - drivers/st

[PATCH 09/13] staging/android: bring struct sync_pt back

2016-05-02 Thread Gustavo Padovan
From: Gustavo Padovan Move the list_head members from sync_pt to struct fence was a mistake, they will not be used by struct fence as planned before, so here we create sync_pt again to bring the list heads back. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 40

[PATCH 07/13] staging/android: remove unnecessary check for fence

2016-05-02 Thread Gustavo Padovan
From: Gustavo Padovan When we call sync_print_fence() fence is always valid. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync_debug.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/android/sync_debug.c b/drivers/staging/android

[PATCH 11/13] staging/android: clean up #includes in the sync framework

2016-05-02 Thread Gustavo Padovan
From: Gustavo Padovan Most of the includes there are not necessary anymore. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 6 -- drivers/staging/android/sync.h | 3 --- drivers/staging/android/sync_debug.c | 16 3 files changed, 25

[PATCH 12/13] staging/android: make sync_timeline internal to sw_sync

2016-05-02 Thread Gustavo Padovan
From: Gustavo Padovan The only use sync_timeline will have in upstream kernel is for debugging through the SW_SYNC interface. So make it internal to SW_SYNC to avoid people use it in the future. Signed-off-by: Gustavo Padovan --- drivers/staging/android/Kconfig | 16 +-- drivers/staging

[PATCH 06/13] staging/android: rename android_fence to timeline_fence

2016-05-02 Thread Gustavo Padovan
From: Gustavo Padovan We are moving out of staging/android so rename it to a name that is not related to android anymore. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git

[PATCH 05/13] staging/android: remove sw_sync.[ch] files

2016-05-02 Thread Gustavo Padovan
From: Gustavo Padovan We can glue the sw_sync file operations directly on the sync framework without the need to pass through sw_sync wrappers. It only builds sw_sync debugfs file support if CONFIG_SW_SYNC is enabled. Signed-off-by: Gustavo Padovan --- drivers/staging/android/Makefile

[PATCH 01/13] staging/android: store last signaled value on sync timeline

2016-05-02 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 sync_timeline_signal(). That allow us to remove .has_signaled() from timeline_ops as we can directly compare using timeline->value and fence->seqno in

[PATCH 02/13] staging/android: remove .{fence, timeline}_value_str() from timeline_ops

2016-05-02 Thread Gustavo Padovan
From: Gustavo Padovan Now that the value of fence and the timeline are not stored by sw_sync anymore we can remove this extra abstraction to retrieve this data. This patch changes both fence_ops (.fence_value_str and .timeline_value_str) to return the str directly. It also clean up struct

[PATCH 04/13] staging/android: remove sw_sync_timeline and sw_sync_pt

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

[PATCH 10/13] staging/android: move sw_sync related code to sw_sync.c

2016-05-02 Thread Gustavo Padovan
From: Gustavo Padovan Split sync_debug and sw_sync in two different files. Signed-off-by: Gustavo Padovan --- drivers/staging/android/Makefile | 1 + drivers/staging/android/sw_sync.c| 136 +++ drivers/staging/android/sync.h | 2 + drivers

[PATCH 08/13] staging/android: remove size arg of sync_timeline_create()

2016-05-02 Thread Gustavo Padovan
From: Gustavo Padovan After we removed sw_sync_timeline this arg has not been really used by anyone, all its users pass the size of struct sync_timeline there. So simplify this function but not requiring the size anymore. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c

Re: [PATCH 01/12] staging/android: remove redundant comments on sync_merge_data

2016-05-02 Thread Gustavo Padovan
2016-05-02 Pavel Machek : > On Wed 2016-04-27 13:27:08, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > struct sync_merge_data already have documentation on top of the > > struct definition. No need to duplicate it. > > > > Signed-off-by: Gu

Re: [PATCH 06/12] staging/android: prepare sync_file for de-staging

2016-05-02 Thread Gustavo Padovan
Hi Pavel, 2016-05-02 Pavel Machek : > Hi! > > > > -} > > -EXPORT_SYMBOL(sync_file_merge); > > - > > static const char *android_fence_get_driver_name(struct fence *fence) > > { > > struct sync_timeline *parent = fence_parent(fence); > > if this is meant to be used outside android, should

[PATCH] MAINTAINERS: add entry for the Sync File Framework

2016-05-11 Thread Gustavo Padovan
From: Gustavo Padovan Add Gustavo as maintainer for the Sync File Framework. Sumit is co-maintainer as he maintains drivers/dma-buf/. It also uses Sumit's tree as base. Cc: Sumit Semwal Signed-off-by: Gustavo Padovan --- MAINTAINERS | 10 ++ 1 file changed, 10 insertions(+)

[PATCH v2] MAINTAINERS: add entry for the Sync File Framework

2016-05-13 Thread Gustavo Padovan
From: Gustavo Padovan Add Gustavo as maintainer for the Sync File Framework. Sumit is co-maintainer as he maintains drivers/dma-buf/. It also uses Sumit's tree as base. Signed-off-by: Gustavo Padovan Acked-by: Sumit Semwal Acked-by: Maarten Lankhorst --- MAINTAINERS | 11 +++ 1

[PATCH 01/18] staging/android: store last signaled value on sync timeline

2016-05-31 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 sync_timeline_signal(). That allow us to remove .has_signaled() from timeline_ops as we can directly compare using timeline->value and fence->seqno in

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

2016-05-31 Thread 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 the code and the start to organize the sync_timeline and sw_sync code better. sw_sync interface was moved to

[PATCH 02/18] staging/android: remove .{fence, timeline}_value_str() from timeline_ops

2016-05-31 Thread Gustavo Padovan
From: Gustavo Padovan Now that the value of fence and the timeline are not stored by sw_sync anymore we can remove this extra abstraction to retrieve this data. This patch changes both fence_ops (.fence_value_str and .timeline_value_str) to return the str directly. It also clean up struct

[PATCH 04/18] staging/android: remove sw_sync_timeline and sw_sync_pt

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

[PATCH 06/18] staging/android: rename android_fence to timeline_fence

2016-05-31 Thread Gustavo Padovan
From: Gustavo Padovan We are moving out of staging/android so rename it to a name that is not related to android anymore. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git

[PATCH 05/18] staging/android: remove sw_sync.[ch] files

2016-05-31 Thread Gustavo Padovan
From: Gustavo Padovan We can glue the sw_sync file operations directly on the sync framework without the need to pass through sw_sync wrappers. It only builds sw_sync debugfs file support if CONFIG_SW_SYNC is enabled. Signed-off-by: Gustavo Padovan --- drivers/staging/android/Makefile

  1   2   3   4   >