[PATCH] staging/android: change IOCTLs opcode after ABI change

2016-03-03 Thread Gustavo Padovan
From: Gustavo Padovan Burn the old opcode to avoid any potential old userspace running the old API to get weird errors. Changing the opcodes will make them fail right away. This is just a precaution, there no upstream users of these interfaces yet and the only user is Android, but we don&#

[PATCH v2] drm/virtio: send vblank event after crtc updates

2016-03-22 Thread 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 updates. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/virtio/virtgpu_display.c | 12

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

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

2016-03-23 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. Signed-off-by: Gustavo Padovan --- drivers/dma-buf/sync_file.c | 36 include/linux/sync_file.h | 8 2

[RFC 6/6] drm/fence: support fence_collection on atomic commit

2016-03-23 Thread Gustavo Padovan
From: Gustavo Padovan Let atomic_commit() wait on a collection of fences before proceed with the scanout. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/drm_atomic.c| 9 + drivers/gpu/drm/drm_atomic_helper.c | 9 + include/drm/drm_crtc.h | 2 +- 3

[RFC 0/6] drm/fences: add in-fences to DRM

2016-03-23 Thread Gustavo Padovan
From: Gustavo Padovan Hi, This is a first proposal to discuss the addition of in-fences support to DRM. It adds a new struct to fence.c to abstract the use of sync_file in DRM drivers. The new struct fence_collection contains a array with all fences that a atomic commit needs to wait on

[RFC 5/6] dma-buf/fence: add fence_collection_wait()

2016-03-23 Thread Gustavo Padovan
From: Gustavo Padovan Iterate over the array of fences and wait for all of the to finish. Signed-off-by: Gustavo Padovan --- drivers/dma-buf/fence.c | 16 include/linux/fence.h | 1 + 2 files changed, 17 insertions(+) diff --git a/drivers/dma-buf/fence.c b/drivers/dma-buf

[RFC 4/6] dma-buf/fence: add fence_collection_put()

2016-03-23 Thread Gustavo Padovan
From: Gustavo Padovan Put fence_collection data. For that calls fence_put() on all fences and the user put callback. Signed-off-by: Gustavo Padovan --- drivers/dma-buf/fence.c | 17 + include/linux/fence.h | 2 ++ 2 files changed, 19 insertions(+) diff --git a/drivers/dma

[RFC 1/6] drm/fence: add FENCE_FD property to planes

2016-03-23 Thread Gustavo Padovan
From: Gustavo Padovan FENCE_FD can now be set by the user during an atomic IOCTL, it will be used by atomic_commit to wait until the sync_file is signalled, i.e., the framebuffer is ready for scanout. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/drm_atomic.c| 4 drivers/gpu

[RFC 2/6] dma-buf/fence: add struct fence_collection

2016-03-23 Thread Gustavo Padovan
From: Gustavo Padovan The struct aggregates fences that we need to wait on before proceed with some specific operation. In DRM, for example, we may wait for a group of fences to signal before we scanout the buffers related to those fences. Signed-off-by: Gustavo Padovan --- include/linux

Re: [RFC 0/6] drm/fences: add in-fences to DRM

2016-03-24 Thread Gustavo Padovan
Hi Maarten, 2016-03-24 Maarten Lankhorst : > Hey, > > Op 23-03-16 om 19:47 schreef Gustavo Padovan: > > From: Gustavo Padovan > > > > Hi, > > > > This is a first proposal to discuss the addition of in-fences support > > to DRM. It adds a new struc

Re: [RFC 0/6] drm/fences: add in-fences to DRM

2016-03-24 Thread Gustavo Padovan
Hi Inki, 2016-03-24 Inki Dae : > Hi, > > 2016년 03월 24일 03:47에 Gustavo Padovan 이(가) 쓴 글: > > From: Gustavo Padovan > > > > Hi, > > > > This is a first proposal to discuss the addition of in-fences support > > to DRM. It adds a new struct to fence.

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

[PATCH] powerpc: rename to_user_ptr to __to_user_ptr

2016-03-19 Thread Gustavo Padovan
From: Gustavo Padovan to_user_ptr() is a local macro defined by signal_32.c, rename it to __to_user_ptr() as now we will have a global to_user_ptr() defined by kernel.h that has a different meaning from this one. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Signed-off

[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

Re: [PATCH] powerpc: rename to_user_ptr to __to_user_ptr

2016-03-20 Thread Gustavo Padovan
Hi, 2016-03-17 Gustavo Padovan : > From: Gustavo Padovan > > to_user_ptr() is a local macro defined by signal_32.c, rename it to > __to_user_ptr() as now we will have a global to_user_ptr() defined by > kernel.h that has a different meaning from this one. > > Cc: Benjami

[PATCH 2/2] drm/virtio: send vblank event on plane atomic update

2016-03-21 Thread 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 updates. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/virtio/virtgpu_plane.c | 9 - 1

[PATCH 1/2] drm/virtio: use new drm_crtc_send_vblank_event()

2016-03-21 Thread Gustavo Padovan
From: Gustavo Padovan Simplify code by using the new vblank crtc helpers. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/virtio/virtgpu_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio

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

2016-03-01 Thread Gustavo Padovan
2016-03-01 Dan Carpenter : > This breaks userspace. You used to be able to figure it out from > info->len - sizeof(struct sync_file_info). It does. We are breaking this on purpose to clean up the API for de-staging. Gustavo

Re: [PATCH] staging/android: refactor SYNC_IOC_FILE_INFO

2016-03-01 Thread Gustavo Padovan
Hi Maarten, 2016-03-01 Maarten Lankhorst : > Op 29-02-16 om 23:08 schreef Gustavo Padovan: > > Hi Maarten, > > > > 2016-02-29 Maarten Lankhorst : > > > >> Op 26-02-16 om 22:00 schreef Gustavo Padovan: > >>> From: Gustavo Padovan > >>&g

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

2016-03-01 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 Reviewed-by: Maarten Lankhorst --- drivers/staging/android/sync.c | 2 +- drivers/staging/android/uapi/sync.h | 2 +- 2 f

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

2016-03-01 Thread Gustavo Padovan
From: Gustavo Padovan Change SYNC_IOC_FILE_INFO behaviour to avoid future API breaks and optimize buffer 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 zero info->sync_fence_info should point

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

2016-03-01 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 v5 5/5] staging/android: add flags member to sync ioctl structs

2016-03-01 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) v3: return -EINVAL if flags are not zero'ed Signed-off-b

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

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

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

2016-03-02 Thread Gustavo Padovan
Hi Emil, 2016-03-02 Emil Velikov : > On 1 March 2016 at 13:13, 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 the future if new features that requi

[PATCH v6 2/6] staging/android: rename SYNC_IOC_FENCE_INFO

2016-03-02 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 Reviewed-by: Maarten Lankhorst --- drivers/staging/android/sync.c | 2 +- drivers/staging/android/uapi/sync.h | 2 +- 2 f

[PATCH v6 4/6] staging/android: align struct sync_merge_data to a multiple of 64-bits

2016-03-02 Thread Gustavo Padovan
From: Gustavo Padovan Change order of the field to avoid alignment issues with 64 bits platforms. Signed-off-by: Gustavo Padovan --- drivers/staging/android/uapi/sync.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/android/uapi/sync.h b/drivers

[PATCH v6 5/6] staging/android: refactor SYNC_IOC_FILE_INFO

2016-03-02 Thread Gustavo Padovan
From: Gustavo Padovan Change SYNC_IOC_FILE_INFO behaviour to avoid future API breaks and optimize buffer 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 zero info->sync_fence_info should point

[PATCH v6 6/6] staging/android: add flags member to sync ioctl structs

2016-03-02 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) v3: return -EINVAL if flags are not zero'ed v4: add padd

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

2016-03-02 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 v6 1/6] staging/android: add num_fences field to struct sync_file_info

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

Re: [PATCH v6 4/6] staging/android: align struct sync_merge_data to a multiple of 64-bits

2016-03-02 Thread Gustavo Padovan
2016-03-02 Gustavo Padovan : > From: Gustavo Padovan > > Change order of the field to avoid alignment issues with 64 bits > platforms. > > Signed-off-by: Gustavo Padovan > --- > drivers/staging/android/uapi/sync.h | 4 ++-- > 1 file changed, 2 insertions(+), 2

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

2016-03-02 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) v3: return -EINVAL if flags are not zero'ed v4: add padd

Re: [PATCH 09/10] staging/android: add flags member to sync ioctl structs

2016-02-01 Thread Gustavo Padovan
2016-01-30 Emil Velikov : > Hi Gustavo, > > > @@ -54,6 +59,7 @@ struct sync_file_info { > > __u32 len; > As mentioned previously - can we rework this variable to indicate the > total length (or the number) of fence_info struct instances. It seems > to be the more common approach afaict.

Re: [PATCH 06/10] staging/android: turn fence_info into a __64 pointer

2016-02-01 Thread Gustavo Padovan
Hi Maarten, 2016-02-01 Maarten Lankhorst : > Op 29-01-16 om 22:20 schreef Gustavo Padovan: > > From: Gustavo Padovan > > > > Making fence_info a pointer enables us to extend the struct in the future > > without breaking the ABI. > > > > Signed-off-by

Re: [PATCH 06/10] staging/android: turn fence_info into a __64 pointer

2016-02-02 Thread Gustavo Padovan
2016-02-01 Gustavo Padovan : > Hi Maarten, > > 2016-02-01 Maarten Lankhorst : > > > Op 29-01-16 om 22:20 schreef Gustavo Padovan: > > > From: Gustavo Padovan > > > > > > Making fence_info a pointer enables us to extend the struct in the future >

[PATCH v2 03/11] staging/android: rename sync_file_info_data to sync_file_info

2016-02-02 Thread Gustavo Padovan
From: Gustavo Padovan info_data is a bit redundant, let's keep it as only sync_file_info. It is also smaller. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 26 +- drivers/staging/android/uapi/sync.h | 9 - 2 files change

[PATCH v2 01/11] staging/android: remove SYNC_WAIT ioctl

2016-02-02 Thread Gustavo Padovan
From: Gustavo Padovan This ioctl is replicating the work of poll() syscall so let's take the opportunity that this is still on staging tree and remove the duplication and force new users to use the poll() standard interface. Signed-off-by: Gustavo Padovan --- drivers/staging/android/s

[PATCH v2 00/11] android sync framework: clean up IOCTLs and ABI

2016-02-02 Thread Gustavo Padovan
From: Gustavo Padovan Hi, This patch series clean up IOCTLs and abi of sync framework and it is a follow up on the clean up series I've sent on Jan 21: http://thread.gmane.org/gmane.comp.video.dri.devel/145509 The main changes here are: * remove of SYNC_WAIT ioctl, poll() should be

[PATCH v2 02/11] staging/android: rename sync_pt_info to fence_info

2016-02-02 Thread Gustavo Padovan
From: Gustavo Padovan As struct sync_pt doesn't exist anymore it is a good idea remove any reference to it in the sync_framework. sync_pts were replaced directly by fences. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 10 +- drivers/staging/android

[PATCH v2 09/11] staging/android: rename SYNC_IOC_FENCE_INFO

2016-02-02 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 v2 10/11] staging/android: add flags member to sync ioctl structs

2016-02-02 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 v2 06/11] staging/android: turn fence_info into a __u64 pointer

2016-02-02 Thread Gustavo Padovan
From: Gustavo Padovan Making fence_info a pointer enables us to extend the struct in the future without breaking the ABI. v2: use type __u64 for fence_info Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 2 +- drivers/staging/android/uapi/sync.h | 2 +- 2 files

[PATCH v2 07/11] staging/android: add num_fences field to struct sync_file_info

2016-02-02 Thread Gustavo Padovan
From: Gustavo Padovan Inform the users how many fences are in the 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 v2 11/11] staging/android: remove redundant comments on sync_merge_data

2016-02-02 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 v2 04/11] staging/android: remove driver_data from struct fence_info

2016-02-02 Thread Gustavo Padovan
From: Gustavo Padovan It is unclear in what situations driver_data should be used thus better do not upstream it for now. If a need arises in the future a discussion can be started to re-add it. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sw_sync.c | 14

[PATCH v2 05/11] staging/android: remove len field from struct fence_info

2016-02-02 Thread Gustavo Padovan
From: Gustavo Padovan After removing driver_data struct fence_info has now a fixed size, thus it doesn't need any field to tell its size, it is already known. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 4 +--- drivers/staging/android/uapi/sync.h | 2 -- 2

[PATCH v2 08/11] staging/android: make info->len return only the size of fence_infos

2016-02-02 Thread Gustavo Padovan
From: Gustavo Padovan The len member of struct sync_file_info was returning the size of the whole buffer (struct sync_file_info + fence_infos at the of it). This commit change it to return only the size of the array of fence_infos. It also moves len to be right before the fences_infos struct

Re: [PATCH v2 08/11] staging/android: make info->len return only the size of fence_infos

2016-02-02 Thread Gustavo Padovan
2016-02-02 Maarten Lankhorst : > Op 02-02-16 om 14:23 schreef Gustavo Padovan: > > From: Gustavo Padovan > > > > The len member of struct sync_file_info was returning the size of the whole > > buffer (struct sync_file_info + fence_infos at the of it). This commit >

Re: [PATCH v2 06/11] staging/android: turn fence_info into a __u64 pointer

2016-02-02 Thread Gustavo Padovan
Hi Maarten, 2016-02-02 Maarten Lankhorst : > Op 02-02-16 om 14:23 schreef Gustavo Padovan: > > From: Gustavo Padovan > > > > Making fence_info a pointer enables us to extend the struct in the future > > without breaking the ABI. > > > > v2: use type

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

2016-01-29 Thread Gustavo Padovan
Hi, 2016-01-25 Maarten Lankhorst : > Hey, > > Op 21-01-16 om 13:49 schreef Gustavo Padovan: > > From: Gustavo Padovan > > > > Hi, > > > > The following patches are some clean ups on the sync framework before > > we start the actual de-s

[PATCH 00/10] android sync framework: clean up IOCTLs and ABI.

2016-01-29 Thread Gustavo Padovan
From: Gustavo Padovan Hi, This patch series clean up IOCTLs and abi of sync framework and it is a follow up on the clean up series I've sent on Jan 21: http://thread.gmane.org/gmane.comp.video.dri.devel/145509 The main changes here are: * remove of SYNC_WAIT ioctl, poll() should be

[PATCH 01/10] staging/android: remove SYNC_WAIT ioctl

2016-01-29 Thread Gustavo Padovan
From: Gustavo Padovan This ioctl is replicating the work of poll() syscall so let's take the opportunity that this is still on staging tree and remove the duplication and force new users to use the poll() standard interface. Signed-off-by: Gustavo Padovan --- drivers/staging/android/s

[PATCH 02/10] staging/android: rename sync_pt_info to fence_info

2016-01-29 Thread Gustavo Padovan
From: Gustavo Padovan As struct sync_pt doesn't exist anymore it is a good idea remove any reference to it in the sync_framework. sync_pts were replaced directly by fences. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 8 drivers/staging/android

[PATCH 03/10] staging/android: rename sync_file_info_data to sync_file_info

2016-01-29 Thread Gustavo Padovan
From: Gustavo Padovan info_data is a bit redundant, let's keep it as only sync_file_info. It is also smaller. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 26 +- drivers/staging/android/uapi/sync.h | 9 - 2 files change

[PATCH 09/10] staging/android: add flags member to sync ioctl structs

2016-01-29 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. Signed-off-by: Gustavo Padovan --- drivers/staging/android/uapi/sync.h | 6 ++ 1 file changed, 6 inser

[PATCH 06/10] staging/android: turn fence_info into a __64 pointer

2016-01-29 Thread Gustavo Padovan
From: Gustavo Padovan Making fence_info a pointer enables us to extend the struct in the future without breaking the ABI. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 2 +- drivers/staging/android/uapi/sync.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions

[PATCH 05/10] staging/android: remove len field from struct fence_info

2016-01-29 Thread Gustavo Padovan
From: Gustavo Padovan After removing driver_data struct fence_info has now a fixed size, thus it doesn't need any field to tell its size, it is already known. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 4 +--- drivers/staging/android/uapi/sync.h | 2 -- 2

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

2016-01-29 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 07/10] staging/android: add num_fences field to struct sync_file_info

2016-01-29 Thread Gustavo Padovan
From: Gustavo Padovan Inform the users how many fences are in the 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 04/10] staging/android: remove driver_data from struct fence_info

2016-01-29 Thread Gustavo Padovan
From: Gustavo Padovan It is unclear in what situations driver_data should be used thus better do not upstream it for now. If a need arises in the future a discussion can be started to re-add it. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sw_sync.c | 14

[PATCH 08/10] staging/android: rename SYNC_IOC_FENCE_INFO

2016-01-29 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 00/11] sync framework de-staging: part 2 - de-stage

2016-01-26 Thread Gustavo Padovan
From: Gustavo Padovan This patch series de-stage the sync framework and it a follow up on the clean up series I've sent last week: http://thread.gmane.org/gmane.comp.video.dri.devel/145509 Now in part 2 we finis

[PATCH 08/11] staging/android: rename android_fence to timeline_fence

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

[PATCH 06/11] staging/android: remove sw_sync_timeline and sw_sync_pt

2016-01-26 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/11] dma-buf/sync_file: bring debug back to sync file

2016-01-26 Thread Gustavo Padovan
From: Gustavo Padovan Enable reports of sync_files through /sync/info Signed-off-by: Gustavo Padovan --- drivers/dma-buf/sync_file.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/dma-buf/sync_file.c b/drivers/dma-buf/sync_file.c index 92474dd..aa1215d 100644 --- a/drivers

[PATCH 09/11] dma-buf/sync_timeline: de-stage sync_timeline

2016-01-26 Thread Gustavo Padovan
From: Gustavo Padovan De-stage the remaining bit of sync framework: sync_timeline and sw_sync plus some debugging routines. Signed-off-by: Gustavo Padovan --- drivers/dma-buf/Kconfig| 10 + drivers/dma-buf/Makefile | 3 +- drivers/dma-buf/sw_sync.h

[PATCH 11/11] dma-buf/sync_file: bring sync_dump() back

2016-01-26 Thread Gustavo Padovan
From: Gustavo Padovan During the de-stage of sync framework it was easy to keep sync_dump() out to avoid an early de-stage of all debug code, but now that sync_debug.c was de-staged bring sync_dump() back. Signed-off-by: Gustavo Padovan --- drivers/dma-buf/sync_file.c | 8 ++-- 1 file

[PATCH 03/11] staging/android: remove .fill_driver_data() timeline ops

2016-01-26 Thread Gustavo Padovan
From: Gustavo Padovan The .fill_driver_data() ops was just a useless abstraction for fence_ops op of the same name. Now that we use fence->seqno to store the value it is cleaner to remove the abstraction and fill the data directly. Signed-off-by: Gustavo Padovan --- drivers/staging/andr

[PATCH 05/11] staging/android: remove struct sync_timeline_ops

2016-01-26 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 07/11] staging/android: remove sw_sync.[ch] files

2016-01-26 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/11] dma-buf/sync_file: de-stage sync_file

2016-01-26 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 + drivers/dma-buf/Makefile

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

2016-01-26 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 02/11] staging/android: store last signaled value on sync timeline

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

Re: [PATCH 09/11] dma-buf/sync_timeline: de-stage sync_timeline

2016-01-26 Thread Gustavo Padovan
2016-01-26 Gustavo Padovan : > From: Gustavo Padovan > > De-stage the remaining bit of sync framework: sync_timeline and sw_sync > plus some debugging routines. > > Signed-off-by: Gustavo Padovan > --- > drivers/dma-buf/Kconfig| 10 + >

[PATCH v2 00/11] sync framework de-staging: part 2 - de-stage

2016-01-27 Thread Gustavo Padovan
From: Gustavo Padovan This patch series de-stage the sync framework and it a follow up on the clean up series I've sent last week: http://thread.gmane.org/gmane.comp.video.dri.devel/145509 Now in part 2 we finish the de-stage of the sync framework. It start with the move of sync_file

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

2016-01-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. Signed-off-by: Gustavo Padovan --- drivers/Kconfig| 2 + drivers/dma-buf/Kconfig| 11

[PATCH v2 03/11] staging/android: remove .fill_driver_data() timeline ops

2016-01-27 Thread Gustavo Padovan
From: Gustavo Padovan The .fill_driver_data() ops was just a useless abstraction for fence_ops op of the same name. Now that we use fence->seqno to store the value it is cleaner to remove the abstraction and fill the data directly. Signed-off-by: Gustavo Padovan --- drivers/staging/andr

[PATCH v2 06/11] staging/android: remove sw_sync_timeline and sw_sync_pt

2016-01-27 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 v2 05/11] staging/android: remove struct sync_timeline_ops

2016-01-27 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 v2 07/11] staging/android: remove sw_sync.[ch] files

2016-01-27 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 v2 10/11] dma-buf/sync_file: bring debug back to sync file

2016-01-27 Thread Gustavo Padovan
From: Gustavo Padovan Enable reports of sync_files through /sync/info Signed-off-by: Gustavo Padovan --- drivers/dma-buf/sync_file.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/dma-buf/sync_file.c b/drivers/dma-buf/sync_file.c index 92474dd..aa1215d 100644 --- a/drivers

[PATCH v2 08/11] staging/android: rename android_fence to timeline_fence

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

[PATCH v2 04/11] staging/android: remove .{fence,timeline}_value_str() from timeline_ops

2016-01-27 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 v2 02/11] staging/android: store last signaled value on sync timeline

2016-01-27 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 v2 11/11] dma-buf/sync_file: bring sync_dump() back

2016-01-27 Thread Gustavo Padovan
From: Gustavo Padovan During the de-stage of sync framework it was easy to keep sync_dump() out to avoid an early de-stage of all debug code, but now that sync_debug.c was de-staged bring sync_dump() back. Signed-off-by: Gustavo Padovan --- drivers/dma-buf/sync_file.c | 8 ++-- 1 file

[PATCH v2 09/11] dma-buf/sync_timeline: de-stage sync_timeline

2016-01-27 Thread Gustavo Padovan
From: Gustavo Padovan De-stage the remaining bit of sync framework: sync_timeline and sw_sync plus some debugging routines. Signed-off-by: Gustavo Padovan --- drivers/dma-buf/Kconfig| 10 +++ drivers/dma-buf/Makefile | 3

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

2016-01-27 Thread Gustavo Padovan
Hi Maarten, 2016-01-27 Maarten Lankhorst : > Hey, > > Op 27-01-16 om 14:30 schreef 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. >

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

2016-01-27 Thread Gustavo Padovan
Hi Emil, 2016-01-27 Emil Velikov : > Hi Gustavo, > > On 27 January 2016 at 17:03, Gustavo Padovan wrote: > > Hi Maarten, > > > > 2016-01-27 Maarten Lankhorst : > > > >> Hey, > >> > >> Op 27-01-16 om 14:30 schreef Gustavo Padovan: >

[PATCH v3 01/11] staging/android: remove SYNC_WAIT ioctl

2016-02-03 Thread Gustavo Padovan
From: Gustavo Padovan This ioctl is replicating the work of poll() syscall so let's take the opportunity that this is still on staging tree and remove the duplication and force new users to use the poll() standard interface. Signed-off-by: Gustavo Padovan --- drivers/staging/android/s

[PATCH v3 00/11] android sync framework: clean up IOCTLs and ABI

2016-02-03 Thread Gustavo Padovan
From: Gustavo Padovan Hi, This patch series clean up IOCTLs and abi of sync framework and it is a follow up on the clean up series I've sent on Jan 21: http://thread.gmane.org/gmane.comp.video.dri.devel/145509 The main changes here are: * remove of SYNC_WAIT ioctl, poll() should be

[PATCH v3 03/11] staging/android: rename sync_file_info_data to sync_file_info

2016-02-03 Thread Gustavo Padovan
From: Gustavo Padovan info_data is a bit redundant, let's keep it as only sync_file_info. It is also smaller. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 26 +- drivers/staging/android/uapi/sync.h | 9 - 2 files change

[PATCH v3 04/11] staging/android: remove driver_data from struct sync_fence_info

2016-02-03 Thread Gustavo Padovan
From: Gustavo Padovan It is unclear in what situations driver_data should be used thus better do not upstream it for now. If a need arises in the future a discussion can be started to re-add it. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sw_sync.c | 14

[PATCH v3 10/11] staging/android: add flags member to sync ioctl structs

2016-02-03 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 v3 11/11] staging/android: remove redundant comments on sync_merge_data

2016-02-03 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 v3 08/11] staging/android: make info->len return only size of sync_fence_info array

2016-02-03 Thread Gustavo Padovan
From: Gustavo Padovan The len member of struct sync_file_info was returning the size of the whole buffer (struct sync_file_info + sync_fence_infos at the of it). This commit change it to return only the size of the array of sync_fence_infos. It also moves len to be right before the

[PATCH v3 09/11] staging/android: rename SYNC_IOC_FENCE_INFO

2016-02-03 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 v3 07/11] staging/android: add num_fences field to struct sync_file_info

2016-02-03 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 v3 05/11] staging/android: remove len field from struct sync_fence_info

2016-02-03 Thread Gustavo Padovan
From: Gustavo Padovan After removing driver_data struct sync_fence_info has now a fixed size, thus it doesn't need any field to tell its size, it is already known. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 4 +--- drivers/staging/android/uapi/sync.h | 2

<    2   3   4   5   6   7   8   9   >