[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 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 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 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 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 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 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 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

[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

Re: [PATCH v3] staging/android: add TODO to de-stage android sync framework

2015-12-07 Thread Gustavo Padovan
Hi, any comments/update on this? Thanks Gustavo 2015-11-26 Gustavo Padovan : > From: Gustavo Padovan > > - remove CONFIG_SW_SYNC_USER, it is used only for testing/debugging and >should not be upstreamed. > - port CONFIG_SW_SYNC_USER tests interfaces to use

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 v2] staging/android: add TODO to de-stage android sync framework

2015-11-24 Thread Gustavo Padovan
From: Gustavo Padovan - remove sw_sync, it is used only for testing/debugging and should not be upstreamed. - port sw_sync testcases to use debugfs somehow - port libsync tests to kselftest - clean up and ABI check for security issues - move the sync framework to drivers/base/dma-buf Cc

Re: [PATCH] staging/android: add TODO to de-stage android sync framework

2015-11-24 Thread Gustavo Padovan
2015-11-24 Greg Hackmann : > On 11/23/15 11:41 AM, Gustavo Padovan wrote: > >+ - remove sw_sync, it is used only for testing/debugging and should not be > >+upstreamed. > >+ - port sw_sync testcases to use debugfs somehow > > A quick but important nitpick: >

[PATCH v3] staging/android: add TODO to de-stage android sync framework

2015-11-26 Thread Gustavo Padovan
From: Gustavo Padovan - remove CONFIG_SW_SYNC_USER, it is used only for testing/debugging and should not be upstreamed. - port CONFIG_SW_SYNC_USER tests interfaces to use debugfs somehow - port libsync tests to kselftest - clean up and ABI check for security issues - move the sync

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

2016-01-20 Thread Gustavo Padovan
2016-01-20 Maarten Lankhorst : > Op 20-01-16 om 15:32 schreef Gustavo Padovan: > > 2016-01-20 Maarten Lankhorst : > > > >> Hey, > >> > >> Op 15-01-16 om 15:55 schreef Gustavo Padovan: > >>> From: Gustavo Padovan > >>> &g

[PATCH] dma-buf/fence: fix timeline str value on fence_annotate_wait_on

2016-01-21 Thread Gustavo Padovan
From: Gustavo Padovan timeline was wrongly assigned with ->get_driver_name(). Signed-off-by: Gustavo Padovan --- include/trace/events/fence.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/trace/events/fence.h b/include/trace/events/fence.h index 98feb1b..d6df

[PATCH 00/11] sync framework de-staging: part 1 - clean up

2016-01-21 Thread Gustavo Padovan
From: Gustavo Padovan Hi, The following patches are some clean ups on the sync framework before we start the actual de-staging. The main changes here are the move of SW_SYNC_USER to debugfs. Removal of struct sync_pt in favor of direct use of struct fence. And the rename of sync_fence to

[PATCH 01/11] staging/android: fix sync framework documentation

2016-01-21 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

[PATCH 03/11] staging/android: remove not used sync_timeline ops

2016-01-21 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

[PATCH 09/11] staging/android: remove unused var from sync_timeline_signal()

2016-01-21 Thread Gustavo Padovan
From: Gustavo Padovan signaled_pts is not used in this function. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c index 3c2c8d0..9ec55ef 100644 --- a/drivers

[PATCH 10/11] staging/android: remove pointless sync_timeline_signal at destroy phase

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

[PATCH 11/11] staging/android: remove sync_fence_create_dma()

2016-01-21 Thread Gustavo Padovan
From: Gustavo Padovan With the removal of struct sync_pt sync_fence_create_dma() now takes the same arguments as sync_fence_create() so let's keep only sync_fence_create(). Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 8 +--- drivers/staging/android/sync.h

[PATCH 05/11] staging/android: move SW_SYNC_USER to a debugfs file

2016-01-21 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

[PATCH 07/11] staging/android: rename 'sync_pt' to 'fence' in struct sync_fence_cb

2016-01-21 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

[PATCH 06/11] staging/android: rename sync_fence to sync_file

2016-01-21 Thread Gustavo Padovan
From: Gustavo Padovan sync_file has a more close meaning to what a sync_fence really, a struct that represent a file that can be used by userspace to get information on a fence, or wait for it to be signaled. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 254

[PATCH 08/11] staging/android: remove struct sync_pt

2016-01-21 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

[PATCH 04/11] staging/android: create a 'sync' dir for debugfs information

2016-01-21 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 ch

[PATCH 02/11] staging/android: sync: remove interfaces that are not used

2016-01-21 Thread Gustavo Padovan
From: Gustavo Padovan These interfaces are not used nor have plans to be used in the near future so remove them for a cleaner solution before de-staging the sync framework. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 56

Re: [PATCH] dma-buf/fence: fix timeline str value on fence_annotate_wait_on

2016-01-21 Thread Gustavo Padovan
2016-01-21 Greg KH : > On Thu, Jan 21, 2016 at 09:48:14AM -0200, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > timeline was wrongly assigned with ->get_driver_name(). > > > > Signed-off-by: Gustavo Padovan > > --- > > include/tr

[PATCH v4 2/5] staging/android: rename SYNC_IOC_FENCE_INFO

2016-02-26 Thread Gustavo Padovan
From: Gustavo Padovan We don't use the 'fence' name to refer to sync_file anymore. So rename it to SYNC_IOC_FILE_INFO. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 2 +- drivers/staging/android/uapi/sync.h | 2 +- 2 files changed, 2 insertions(

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

2016-02-26 Thread Gustavo Padovan
From: Gustavo Padovan Inform userspace how many fences are in the sync_fence_info field. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 2 ++ drivers/staging/android/uapi/sync.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/staging/android/sync.c b

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

2016-02-26 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 --- drivers/staging/android/uapi/sync.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging

[PATCH v4 4/5] staging/android: refactor SYNC_IOC_FILE_INFO

2016-02-26 Thread Gustavo Padovan
From: Gustavo Padovan Change SYNC_IOC_FILE_INFO behaviour to avoid future API breaks and optimize buffer allocation. In the new approach the ioctl needs to be called twice to retrieve the array of fence_infos pointed by info->sync_fence_info. The first call should pass num_fences = 0,

[PATCH v4 5/5] staging/android: add flags member to sync ioctl structs

2016-02-26 Thread Gustavo Padovan
From: Gustavo Padovan Play safe and add flags member to all structs. So we don't need to break API or create new IOCTL in the future if new features that requires flags arises. v2: check if flags are valid (zero, in this case) Signed-off-by: Gustavo Padovan --- drivers/staging/android/s

[PATCH] staging/android: refactor SYNC_IOC_FILE_INFO

2016-02-26 Thread Gustavo Padovan
From: Gustavo Padovan Change SYNC_IOC_FILE_INFO behaviour to avoid future API breaks and optimize buffer allocation. In the new approach the ioctl needs to be called twice to retrieve the array of fence_infos pointed by info->sync_fence_info. The first call should pass num_fences = 0,

Re: [PATCH] staging/android: refactor SYNC_IOC_FILE_INFO

2016-02-27 Thread Gustavo Padovan
Hi Emil, 2016-02-27 Emil Velikov : > Hi Gustavo, > > On 26 February 2016 at 21:00, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Change SYNC_IOC_FILE_INFO behaviour to avoid future API breaks and > > optimize buffer allocation. In the new appr

Re: [PATCH v4 5/5] staging/android: add flags member to sync ioctl structs

2016-02-27 Thread Gustavo Padovan
Hi Emil, 2016-02-27 Emil Velikov : > Hi Gustavo, > > On 26 February 2016 at 18:31, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Play safe and add flags member to all structs. So we don't need to > > break API or create new IOCTL in th

Re: [PATCH] staging/android: refactor SYNC_IOC_FILE_INFO

2016-02-29 Thread Gustavo Padovan
Hi Maarten, 2016-02-29 Maarten Lankhorst : > Op 26-02-16 om 22:00 schreef Gustavo Padovan: > > From: Gustavo Padovan > > > > Change SYNC_IOC_FILE_INFO behaviour to avoid future API breaks and > > optimize buffer allocation. In the new approach the ioctl needs to be c

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

2016-02-25 Thread Gustavo Padovan
2016-02-09 Tom Cherry : > On Fri, Jan 15, 2016 at 3:42 PM, Greg Hackmann wrote: > > On 01/15/2016 10:02 AM, Gustavo Padovan wrote: > >> > >> Patches 27 and 28 are attempt to fix that. I assumed that if some code is > >> calling fence_timeline_destro

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 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

[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 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

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 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

[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

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 >

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

2016-03-18 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 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

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

2016-03-18 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 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 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

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 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 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] de-stage android sync framework

2016-03-19 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-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 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

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 v2] drm/virtio: send vblank event after crtc updates

2016-04-05 Thread Gustavo Padovan
Hi, Any comment on this? Gustavo 2016-03-22 Gustavo Padovan : > From: Gustavo Padovan > > virtio_gpu was failing to send vblank events when using the atomic IOCTL > with the DRM_MODE_PAGE_FLIP_EVENT flag set. This patch fixes each and > enables atomic pageflips updat

Re: [PATCH 05/14] drm/msm: use drm_crtc_send_vblank_event()

2016-04-19 Thread Gustavo Padovan
Hi Rob, 2016-04-14 Rob Clark : > On Thu, Apr 14, 2016 at 1:48 PM, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Replace the legacy drm_send_vblank_event() with the new helper function. > > > > Signed-off-by: Gustavo Padovan > > thanks, sh

Re: [PATCH 11/14] drm/tilcdc: use drm_crtc_send_vblank_event()

2016-04-19 Thread Gustavo Padovan
Hi Jyri, 2016-04-19 Jyri Sarha : > On 04/14/16 20:48, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Replace the legacy drm_send_vblank_event() with the new helper function. > > > > Signed-off-by: Gustavo Padovan > > Reviewed-by: Jyri Sarh

[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

[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

Re: [PATCH 07/14] drm/nouveau: use drm_crtc_send_vblank_event()

2016-04-25 Thread Gustavo Padovan
Hi Mario, 2016-04-25 Mario Kleiner : > On 04/14/2016 07:48 PM, Gustavo Padovan wrote: > >From: Gustavo Padovan > > > >Replace the legacy drm_send_vblank_event() with the new helper function. > > > >Signed-off-by: Gustavo Padovan > >--- > >

[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 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 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

[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 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 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

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

2016-04-26 Thread Gustavo Padovan
2016-04-26 Ville Syrjälä : > On Mon, Apr 25, 2016 at 07:33:25PM -0300, Gustavo Padovan wrote: > > 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 atom

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

2016-04-26 Thread Gustavo Padovan
2016-04-26 Ville Syrjälä : > On Mon, Apr 25, 2016 at 07:33:27PM -0300, Gustavo Padovan wrote: > > 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:

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 >

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

2016-04-26 Thread Gustavo Padovan
2016-04-26 Daniel Vetter : > On Mon, Apr 25, 2016 at 07:33:21PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > struct fence_collection inherits from struct fence and carries a > > collection of fences that needs to be waited together. > >

[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 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 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

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: [RESEND] fence: add missing descriptions for fence

2016-04-11 Thread Gustavo Padovan
ethencourt > Reviewed-by: Javier Martinez Canillas > --- > Hi, > > Just resending this patch since it hasn't had any reviews in since > March 21st. > > Thanks, > Luis > > include/linux/fence.h | 2 ++ > 1 file changed, 2 insertions(+) Reviewed-by: Gustavo Padovan Gustavo

[PATCH] staging/android: add TODO to de-stage android sync framework

2015-11-23 Thread Gustavo Padovan
From: Gustavo Padovan - remove sw_sync, it is used only for testing/debugging and should not be upstreamed. - port sw_sync testcases to use debugfs somehow - clean up and ABI check for security issues - move the sync framework to drivers/base/dma-buf Cc: Arve Hjønnevåg Cc: Riley Andrews

Re: [PATCH 1/2] component: Make a "match_add all devices matching my drivers" helper.

2015-09-30 Thread Gustavo Padovan
t; separately and not have to sync between trees. > > drivers/base/component.c | 40 > include/linux/component.h | 5 + > 2 files changed, 45 insertions(+) This looks good to me. Reviewed-by: Gustavo Padovan Gustavo -- To

Re: [PATCH 2/2] drm/exynos: Use the core platform_driver component matching helper.

2015-09-30 Thread Gustavo Padovan
Hi Eric. 2015-09-28 Eric Anholt : > Signed-off-by: Eric Anholt > --- > drivers/gpu/drm/exynos/exynos_drm_drv.c | 37 > +++-- > 1 file changed, 7 insertions(+), 30 deletions(-) Can you kindly add a commit message as well? Otherwise, Reviewed-by:

Re: [PATCH v9 11/15] vb2: add in-fence support to QBUF

2018-05-08 Thread Gustavo Padovan
Hi Hans, On Mon, 2018-05-07 at 14:07 +0200, Hans Verkuil wrote: > On 04/05/18 22:06, Ezequiel Garcia wrote: > > From: Gustavo Padovan > > > > Receive in-fence from userspace and add support for waiting on them > > before queueing the buffer to the driver. Buffers

[PATCH] staging/android: remove Sync Framework tasks from TODO

2016-12-06 Thread Gustavo Padovan
From: Gustavo Padovan The destaging work is now fully complete. Cc: Arve Hjønnevåg Cc: Riley Andrews 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 index

Re: [PATCH] drm: Clean up the 1366x768 fixup codes

2017-01-16 Thread Gustavo Padovan
Hi Takashi, 2017-01-16 Takashi Iwai : > This is just a cleanup, no functional change. > > The fixup code for 1366x768 in drm_mode_create_from_cmdline_mode() is > basically a copy of the existing code in drm_edid.c. Make the latter > code public so that it can be called from the former function.

Re: [PATCH -next] drm/hisilicon/hibmc: Fix wrong pointer passed to PTR_ERR()

2017-01-16 Thread Gustavo Padovan
Hi Wei, 2017-01-12 Wei Yongjun : > From: Wei Yongjun > > PTR_ERR should access the value just tested by IS_ERR, otherwise > the wrong error code will be returned. > > Fixes: d1667b86795a ("drm/hisilicon/hibmc: Add support for frame buffer") > Signed-off-by: Wei

Re: [PATCH -next] drm/atomic: make release_crtc_commit() static

2017-01-16 Thread Gustavo Padovan
Yongjun > --- > drivers/gpu/drm/drm_atomic_helper.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Gustavo Padovan Gustavo

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

2016-07-18 Thread Gustavo Padovan
Hi, Do you think there is time to get this in for 4.8? Thanks. 2016-06-20 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 fi

[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 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

[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

[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 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 a

<    1   2   3   4   5   6   7   8   9   >