Re: [PATCH v2 1/7] selftest: sync: basic tests for sw_sync framework

2016-11-01 Thread Gustavo Padovan
Hi Emilio, 2016-10-19 Emilio López : > These tests are based on the libsync test suite from Android. > This commit lays the ground for future tests, as well as includes > tests for a variety of basic allocation commands. > > Signed-off-by: Emilio López > --- > tools/testing/selftests/Makefile

[PATCH] drm/virtio: call drm_plane_cleanup() at destroy phase

2016-12-12 Thread Gustavo Padovan
From: Gustavo Padovan virtio was missing this call to clean up core plane usage. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/virtio/virtgpu_plane.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c index

[PATCH] drm/msm: return fence_fd = -1 if gem_submit fails

2016-12-12 Thread Gustavo Padovan
From: Gustavo Padovan Previously we were returning garbage here, fix it by setting it to -1 before the first possible point of failure. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/msm/msm_gem_submit.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu

[RFC 4/5] drm/virtio: add out-fences support for explicit synchronization

2016-12-12 Thread Gustavo Padovan
From: Gustavo Padovan On the out-fence side we get fence returned by the submitted draw call and attach it to a sync_file and send the sync_file fd to userspace. On error -1 is returned to userspace. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 51

[RFC 1/5] drm/virtio: add virtio_gpu_alloc_fence()

2016-12-12 Thread Gustavo Padovan
From: Gustavo Padovan Refactor fence creation to remove the potential allocation failure from the cmd_submit and atomic_commit paths. Now the fence should be allocated first and just after we should proceed with the rest of the execution. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm

[RFC 5/5] drm/virtio: bump driver version after explicit synchronization addition

2016-12-12 Thread Gustavo Padovan
From: Gustavo Padovan To reflect the (backward compatible) changes in the uabi we are bumping the driver's version. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/virtio/virtgpu_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/v

[RFC 3/5] drm/virtio: add in-fences support for explicit synchronization

2016-12-12 Thread Gustavo Padovan
From: Gustavo Padovan When the execbuf call receives an in-fence it will get the dma_fence related to that fence fd and wait on it before submitting the draw call. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 41 ++ 1 file changed

[RFC 2/5] drm/virtio: add uapi for in and out explicit fences

2016-12-12 Thread Gustavo Padovan
From: Gustavo Padovan Add a new field called fence_fd that will be used by userspace to send in-fences to the kernel and receive out-fences created by the kernel. This uapi enables virtio to take advantage of explicit synchronization of dma-bufs. There are two new flags

Re: [PATCH] drm/msm: return fence_fd = -1 if gem_submit fails

2016-12-12 Thread Gustavo Padovan
2016-12-12 Chris Wilson : > On Mon, Dec 12, 2016 at 05:41:08PM -0200, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Previously we were returning garbage here, fix it by setting it to -1 > > before the first possible point of failure. > > The convent

Re: [RFC 1/5] drm/virtio: add virtio_gpu_alloc_fence()

2016-12-13 Thread Gustavo Padovan
2016-12-13 Gerd Hoffmann : > Hi, > > > +struct virtio_gpu_fence *virtio_gpu_fence_alloc(struct virtio_gpu_device > > *vgdev) > > +{ > > + struct virtio_gpu_fence_driver *drv = &vgdev->fence_drv; > > + struct virtio_gpu_fence *fence; > > + unsigned long irq_flags; > > + > > + fence = km

[PATCH] selftest: sync: improve assert() failure message

2016-12-13 Thread Gustavo Padovan
From: Gustavo Padovan Print "ERROR" on all messages instead of using the not well defined terms like "BAD". Signed-off-by: Gustavo Padovan --- tools/testing/selftests/sync/synctest.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftest

[RFC 00/10] V4L2 explicit synchronization support

2017-03-13 Thread Gustavo Padovan
From: Gustavo Padovan Hi, This RFC adds support for Explicit Synchronization of shared buffers in V4L2. It uses the Sync File Framework[1] as vector to communicate the fences between kernel and userspace. I'm sending this to start the discussion on the best approach to implement Exp

[RFC 03/10] [media] vb2: add in-fence support to QBUF

2017-03-13 Thread Gustavo Padovan
From: Gustavo Padovan Receive in-fence from userspace and support for waiting on them before queueing the buffer for the driver. Signed-off-by: Gustavo Padovan --- drivers/media/Kconfig| 1 + drivers/media/v4l2-core/videobuf2-core.c | 24 drivers

[RFC 07/10] [media] v4l: add support to BUF_QUEUED event

2017-03-13 Thread Gustavo Padovan
From: Gustavo Padovan Implement the needed pieces to let userspace subscribe for V4L2_EVENT_BUF_QUEUED events. Videobuf2 will queue the event for the DQEVENT ioctl. Signed-off-by: Gustavo Padovan --- drivers/media/v4l2-core/v4l2-ctrls.c | 6 +- drivers/media/v4l2-core/videobuf2

[RFC 05/10] [media] vivid: assign the specific device to the vb2_queue->dev

2017-03-13 Thread Gustavo Padovan
From: Gustavo Padovan Instead of assign the global v4l2 device assigned the specific device, this was causing trouble when using using V4L2 events with vivid devices. The queue device should be the same one we opened in userspace. Signed-off-by: Gustavo Padovan --- drivers/media/platform

[RFC 06/10] [media] v4l: add V4L2_EVENT_BUF_QUEUED event

2017-03-13 Thread Gustavo Padovan
From: Gustavo Padovan Add a new event the userspace can subscribe to receive notifications about when a buffer was enqueued onto the driver. The event provides the index of the enqueued buffer. Signed-off-by: Gustavo Padovan --- include/uapi/linux/videodev2.h | 6 ++ 1 file changed, 6

[RFC 09/10] [media] vb2: add infrastructure to support out-fences

2017-03-13 Thread Gustavo Padovan
From: Gustavo Padovan Add vb2_setup_out_fence() and the needed members to struct vb2_buffer. Signed-off-by: Gustavo Padovan --- drivers/media/v4l2-core/videobuf2-core.c | 31 +++ include/media/videobuf2-core.h | 5 + 2 files changed, 36 insertions

[RFC 10/10] [media] vb2: add out-fence support to QBUF

2017-03-13 Thread Gustavo Padovan
From: Gustavo Padovan If V4L2_BUF_FLAG_OUT_FENCE flag is present on the QBUF call we create an out_fence for the buffer and return it to userspace on the fence_fd field. The fence is signaled on buffer_done(), when the job on the buffer is finished. TODO: clean up on __vb2_queue_cancel

[RFC 08/10] [media] vb2: add videobuf2 dma-buf fence helpers

2017-03-13 Thread Gustavo Padovan
From: Javier Martinez Canillas Add a videobuf2-fence.h header file that contains different helpers for DMA buffer sharing explicit fence support in videobuf2. Signed-off-by: Javier Martinez Canillas Signed-off-by: Gustavo Padovan --- include/media/videobuf2-fence.h | 49

[RFC 02/10] [media] vb2: split out queueing from vb_core_qbuf()

2017-03-13 Thread Gustavo Padovan
From: Gustavo Padovan In order to support explicit synchronization we need to divide vb2_core_qbuf() in two parts one, to be executed before the fence signals and another one after that, to do the actual queueing of the buffer. Signed-off-by: Gustavo Padovan --- drivers/media/v4l2-core

[RFC 04/10] [media] uvc: enable subscriptions to other events

2017-03-13 Thread Gustavo Padovan
From: Gustavo Padovan Call v4l2_ctrl_subscribe_event to subscribe to more events supported by v4l. Signed-off-by: Gustavo Padovan --- drivers/media/usb/uvc/uvc_v4l2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc

[RFC 01/10] [media] vb2: add explicit fence user API

2017-03-13 Thread Gustavo Padovan
From: Gustavo Padovan Turn the reserved2 field into fence_fd that we will use to send an in-fence to the kernel return an out-fence from the kernel to userspace. Two new flags were added, V4L2_BUF_FLAG_IN_FENCE and V4L2_BUF_FLAG_OUT_FENCE. They should be used when setting in-fence and out-fence

Re: [PATCH] drm/sun4i: Propagate error to the caller

2016-11-06 Thread Gustavo Padovan
ged, 1 insertion(+), 1 deletion(-) Reviewed-by: Gustavo Padovan Gustavo

[PATCH 1/6] [media] vb2: only check ret if we assigned it

2017-02-15 Thread Gustavo Padovan
From: Gustavo Padovan Move the ret check to the right level under if (pb). It is not used by the code before that point if pb is NULL. Signed-off-by: Gustavo Padovan --- drivers/media/v4l2-core/videobuf2-core.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a

[PATCH 3/6] [media] solo6x10: improve subscribe event handling

2017-02-15 Thread Gustavo Padovan
From: Gustavo Padovan We already check for the V4L2_EVENT_CTRL inside v4l2_ctrl_subscribe_event() so just move the function to the default: branch of the switch and let it does the job for us. Signed-off-by: Gustavo Padovan --- drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c | 5 ++--- 1 file

[PATCH 5/6] [media] vivid: improve subscribe event handling

2017-02-15 Thread Gustavo Padovan
From: Gustavo Padovan We already check for the V4L2_EVENT_CTRL inside v4l2_ctrl_subscribe_event() so just move this fuction to the default: branch of the switch and let it does the job for us. Signed-off-by: Gustavo Padovan --- drivers/media/platform/vivid/vivid-vid-out.c | 4 +--- 1 file

[PATCH 4/6] [media] tw5864: improve subscribe event handling

2017-02-15 Thread Gustavo Padovan
From: Gustavo Padovan We already check for the V4L2_EVENT_CTRL inside v4l2_ctrl_subscribe_event() so just move this function to the default: branch of the switch and let it does the job for us. Signed-off-by: Gustavo Padovan --- drivers/media/pci/tw5864/tw5864-video.c | 5 ++--- 1 file

[PATCH 6/6] [media] go7007: improve subscribe event handling

2017-02-15 Thread Gustavo Padovan
From: Gustavo Padovan We already check for the V4L2_EVENT_CTRL inside v4l2_ctrl_subscribe_event() so just move this function to the default: branch of the switch and let it does the job for us. Signed-off-by: Gustavo Padovan --- drivers/media/usb/go7007/go7007-v4l2.c | 5 ++--- 1 file changed

[PATCH 2/6] [media] ivtv: improve subscribe_event handling

2017-02-15 Thread Gustavo Padovan
From: Gustavo Padovan Simplify logic and call v4l2_ctrl_subscribe_event() directly instead of copying its content over to ivtv_subscribe_event(). Signed-off-by: Gustavo Padovan --- drivers/media/pci/ivtv/ivtv-ioctl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a

[PATCH] drm/virtio: call drm_plane_cleanup() at destroy phase

2017-02-15 Thread Gustavo Padovan
From: Gustavo Padovan virtio was missing this call to clean up core plane usage. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/virtio/virtgpu_plane.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c index

Re: [PATCH -next] drm: mxsfb: fix error return code in mxsfb_load()

2017-02-06 Thread Gustavo Padovan
b->fbdev = NULL; > dev_err(drm->dev, "Failed to init FB CMA area\n"); > goto err_cma; Reviewed-by: Gustavo Padovan Gustavo

Re: [PATCH] drm/vc4: simplify exit path of a failed allocation of dsi_connector

2017-02-06 Thread Gustavo Padovan
ned-off-by: Colin Ian King > --- > drivers/gpu/drm/vc4/vc4_dsi.c | 16 > 1 file changed, 4 insertions(+), 12 deletions(-) Reviewed-by: Gustavo Padovan Gustavo

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

2016-08-09 Thread Gustavo Padovan
2016-08-09 Maarten Lankhorst : > Op 08-08-16 om 21:59 schreef Gustavo Padovan: > > 2016-08-08 Maarten Lankhorst : > > > >> Op 20-06-16 om 17:53 schreef Gustavo Padovan: > >>> From: Gustavo Padovan > >>> > >>> When creating a sync_pt th

Re: [PATCH v2 1/6] staging/android: remove doc from sw_sync

2016-08-11 Thread Gustavo Padovan
Hi Pavel, 2016-08-09 Pavel Machek : > On Mon 2016-08-08 18:24:17, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > SW_SYNC should never be used by other pieces of the kernel apart from > > sync_debug as it is only a Sync File Validation Framework, so hide an

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

2016-08-11 Thread Gustavo Padovan
Hi Eric, 2016-08-11 Eric Engestrom : > On Mon, Aug 08, 2016 at 06:24:16PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Hi Greg, > > > > This is the last step in the Sync Framwork de-stage task. It de-stage > > the SW_SYNC validation fr

[PATCH v3 4/5] staging/android: add Doc for SW_SYNC ioctl interface

2016-08-11 Thread Gustavo Padovan
From: Gustavo Padovan This interface is hidden from kernel headers and it is intended for use only for testing. So testers would have to add the ioctl information internally. This is to prevent misuse of this feature. v2: take in Eric suggestions for the Documentation Signed-off-by: Gustavo

[PATCH v3 1/5] staging/android: do not let userspace trigger WARN_ON

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

[PATCH v3 2/5] staging/android: move trace/sync.h to sync_trace.h

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

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

2016-08-11 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. v3: improve header description as sugggested by Eric Signed-off-by: Gustavo Padovan Reviewed-by: Eric Engestrom --- drivers/staging/android

[PATCH v3 5/5] dma-buf/sw_sync: de-stage SW_SYNC

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

[PATCH v3 0/5] de-stage SW_SYNC validation frawework

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

2016-07-11 Thread Gustavo Padovan
2016-07-10 Maarten Lankhorst : > Op 08-07-16 om 17:44 schreef Gustavo Padovan: > > From: Gustavo Padovan > > > > Signalling doesn't need to be enabled at sync_file creation, it is only > > required if userspace waiting the fence to signal through poll(). > >

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

2016-07-12 Thread Gustavo Padovan
2016-07-12 Maarten Lankhorst : > Op 11-07-16 om 22:27 schreef Gustavo Padovan: > > 2016-07-10 Maarten Lankhorst : > > > >> Op 08-07-16 om 17:44 schreef Gustavo Padovan: > >>> From: Gustavo Padovan > >>> > >>> Signalling doesn't ne

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

2016-07-12 Thread Gustavo Padovan
From: Gustavo Padovan Creates a function that given an sync file descriptor returns a fence containing all fences in the sync_file. v2: Comments by Daniel Vetter - Adapt to new version of fence_collection_init() - Hold a reference for the fence we return v3: - Adapt to

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

2016-07-12 Thread Gustavo Padovan
From: Gustavo Padovan Add helper to check if fence is array. v2: Comments from Chris Wilson - remove ternary if from ops comparison - add EXPORT_SYMBOL(fence_array_ops) Cc: Chris Wilson Cc: Christian König Signed-off-by: Gustavo Padovan Reviewed-by: Chris Wilson Reviewed-by

[PATCH v4 2/5] dma-buf/sync_file: refactor fence storage in struct sync_file

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

[PATCH v4 4/5] Documentation: add doc for sync_file_get_fence()

2016-07-12 Thread Gustavo Padovan
From: Gustavo Padovan Document the new function added to sync_file.c v2: Adapt to fence_array Signed-off-by: Gustavo Padovan Acked-by: Christian König --- Documentation/sync_file.txt | 15 +++ 1 file changed, 15 insertions(+) diff --git a/Documentation/sync_file.txt b

[PATCH v4 5/5] dma-buf/sync_file: only enable fence signalling on poll()

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

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

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

[PATCH RESEND 02/14] drm/armada: use drm_crtc_send_vblank_event()

2016-06-06 Thread Gustavo Padovan
From: Gustavo Padovan Replace the legacy drm_send_vblank_event() with the new helper function. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/armada/armada_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/armada/armada_crtc.c b/drivers/gpu/drm

[PATCH RESEND 03/14] drm/atmel: use drm_crtc_send_vblank_event()

2016-06-06 Thread Gustavo Padovan
From: Gustavo Padovan Replace the legacy drm_send_vblank_event() with the new helper function. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c

[PATCH RESEND 06/14] drm/virtio: use drm_crtc_send_vblank_event()

2016-06-06 Thread Gustavo Padovan
From: Gustavo Padovan Replace the legacy drm_send_vblank_event() with the new helper function. 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

[PATCH RESEND 04/14] drm/qxl: use drm_crtc_send_vblank_event()

2016-06-06 Thread Gustavo Padovan
From: Gustavo Padovan Replace the legacy drm_send_vblank_event() with the new helper function. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/qxl/qxl_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl

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

2016-06-06 Thread Gustavo Padovan
From: Gustavo Padovan Replace the legacy drm_vblank_{get,put}() with the new helper functions. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 2

[PATCH 10/14] drm/atmel: use drm_crtc_vblank_{get,put}()

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

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

2016-06-06 Thread Gustavo Padovan
From: Gustavo Padovan Replace the legacy drm_vblank_{get,put}() with the new helper functions. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c b

[PATCH 12/14] drm/qxl: use drm_crtc_vblank_{get,put}()

2016-06-06 Thread Gustavo Padovan
From: Gustavo Padovan Replace the legacy drm_vblank_{get,put}() with the new helper functions. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/qxl/qxl_display.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl

[PATCH RESEND 05/14] drm/udl: use drm_crtc_send_vblank_event()

2016-06-06 Thread Gustavo Padovan
From: Gustavo Padovan Replace the legacy drm_send_vblank_event() with the new helper function. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/udl/udl_modeset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl

[PATCH 07/14] drm: remove legacy drm_send_vblank_event()

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

[PATCH 01/14] drm/nouveau: use drm_crtc_send_vblank_event() v2

2016-06-06 Thread Gustavo Padovan
From: Gustavo Padovan Replace the legacy drm_send_vblank_event() with the new helper function. v2: add crtc to nouveau_page_flip_state (comment from Mario Kleiner) Cc: Mario Kleiner Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/nouveau/nouveau_display.c | 19

[PATCH 13/14] drm/radeon: use drm_crtc_vblank_{get,put}()

2016-06-06 Thread Gustavo Padovan
From: Gustavo Padovan Replace the legacy drm_vblank_{get,put}() with the new helper functions. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/radeon/radeon_display.c | 6 +++--- drivers/gpu/drm/radeon/radeon_pm.c | 13 + 2 files changed, 12 insertions(+), 7 deletions

[PATCH 09/14] drm/armada: use drm_crtc_vblank_{get,put}()

2016-06-06 Thread Gustavo Padovan
From: Gustavo Padovan Replace the legacy drm_vblank_{get,put}() with the new helper functions. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/armada/armada_crtc.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/armada/armada_crtc.c b

[PATCH 11/14] drm/nouveau: use drm_crtc_vblank_{get,put}()

2016-06-06 Thread Gustavo Padovan
From: Gustavo Padovan Replace the legacy drm_vblank_{get,put}() with the new helper functions. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/nouveau/nouveau_display.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b

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

2016-06-06 Thread Gustavo Padovan
From: Gustavo Padovan Include fence-array files in the DocBook. Signed-off-by: Gustavo Padovan --- This should go to drm-misc, as fence-array are only present there at the moment. --- Documentation/DocBook/device-drivers.tmpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[PATCH 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 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] staging/android: refactor SYNC_IOC_FILE_INFO

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

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

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

2016-03-03 Thread Gustavo Padovan
Hi Greg, 2016-03-03 Greg Kroah-Hartman : > On Thu, Mar 03, 2016 at 11:37:17AM -0300, 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 futu

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

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

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

2016-03-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 Reviewed-by: Maarten Lankhorst --- drivers/staging/android/uapi/sync.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions

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

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

2016-03-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. Signed-off-by: Gustavo Padovan Reviewed-by: Maarten Lankhorst --- v2: check if flags are valid (zero, in this

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

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

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

2016-03-03 Thread Gustavo Padovan
2016-03-03 Gustavo Padovan : > Hi Greg, > > 2016-03-03 Greg Kroah-Hartman : > > > On Thu, Mar 03, 2016 at 11:37:17AM -0300, Gustavo Padovan wrote: > > > From: Gustavo Padovan > > > > > > Play safe and add flags member to all structs. So we don

<    1   2   3   4   5   6   7   8   9   >