[PATCH v6 5/6] drm/fence: add fence timeline to drm_crtc

2016-10-27 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> 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

[PATCH v6 4/6] drm/fence: add in-fences support

2016-10-27 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> 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 o

[PATCH v6 2/6] drm/imx: use drm_atomic_set_fence_for_plane() to set the fence

2016-10-27 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> drm_atomic_set_fence_for_plane() is smart and won't overwrite plane_state->fence if the user already set an explicit fence there. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> --- drivers/gpu/drm/imx/imx

[PATCH v6 6/6] drm/fence: add out-fences support

2016-10-27 Thread Gustavo Padovan
From: Gustavo Padovan Support DRM out-fences by creating a sync_file with a fence for each CRTC that sets the OUT_FENCE_PTR property. We use the out_fence pointer received in the OUT_FENCE_PTR prop to send the sync_file fd back to userspace. The sync_file and fd are allocated/created before

[PATCH v6 3/6] drm/msm: use drm_atomic_set_fence_for_plane() to set the fence

2016-10-27 Thread Gustavo Padovan
From: Gustavo Padovan drm_atomic_set_fence_for_plane() is smart and won't overwrite plane_state->fence if the user already set an explicit fence there. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/msm/msm_atomic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --

[PATCH v6 0/6] drm: add explict fencing

2016-10-27 Thread Gustavo Padovan
From: Gustavo Padovan This is yet another version of the DRM fences patches. Please refer to the cover letter[1] in previous version to check the fences details. For v6 we create drm_atomic_set_fence_for_plane() that tries to abstract from drivers if we are using implicit or explicit fencing

[PATCH v6 5/6] drm/fence: add fence timeline to drm_crtc

2016-10-27 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

[PATCH v6 4/6] drm/fence: add in-fences support

2016-10-27 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

[PATCH v6 2/6] drm/imx: use drm_atomic_set_fence_for_plane() to set the fence

2016-10-27 Thread Gustavo Padovan
From: Gustavo Padovan drm_atomic_set_fence_for_plane() is smart and won't overwrite plane_state->fence if the user already set an explicit fence there. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/imx/imx-drm-core.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --

[PATCH v6 1/6] drm/atomic: add drm_atomic_set_fence_for_plane()

2016-10-27 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> This new function should be used by drivers when setting a implicit fence for the plane. It abstracts the fact that the user might have chosen explicit fencing instead. Signed-off-by: Gustavo Padovan <gustavo.pado...@collab

[PATCH v6 1/6] drm/atomic: add drm_atomic_set_fence_for_plane()

2016-10-27 Thread Gustavo Padovan
From: Gustavo Padovan This new function should be used by drivers when setting a implicit fence for the plane. It abstracts the fact that the user might have chosen explicit fencing instead. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/drm_atomic.c | 30

Re: [RFC PATCH v2 9/9] drm: mali-dp: Add writeback out-fence support

2016-10-27 Thread Gustavo Padovan
2016-10-27 Brian Starkey <brian.star...@arm.com>: > On Wed, Oct 26, 2016 at 07:43:57PM -0200, Gustavo Padovan wrote: > > 2016-10-26 Brian Starkey <brian.star...@arm.com>: > > > > > If userspace has asked for an out-fence for the writeback, we add a > >

Re: [RFC PATCH v2 9/9] drm: mali-dp: Add writeback out-fence support

2016-10-27 Thread Gustavo Padovan
2016-10-27 Brian Starkey : > On Wed, Oct 26, 2016 at 07:43:57PM -0200, Gustavo Padovan wrote: > > 2016-10-26 Brian Starkey : > > > > > If userspace has asked for an out-fence for the writeback, we add a > > > fence to malidp_mw_job, to be signaled when the

Re: [RFC PATCH v2 7/9] drm: atomic: factor out common out-fence operations

2016-10-26 Thread Gustavo Padovan
2016-10-26 Brian Starkey : > Some parts of setting up the CRTC out-fence can be re-used for > writeback out-fences. Factor this out into a separate function. > > Signed-off-by: Brian Starkey > --- > drivers/gpu/drm/drm_atomic.c | 64 >

Re: [RFC PATCH v2 7/9] drm: atomic: factor out common out-fence operations

2016-10-26 Thread Gustavo Padovan
2016-10-26 Brian Starkey : > Some parts of setting up the CRTC out-fence can be re-used for > writeback out-fences. Factor this out into a separate function. > > Signed-off-by: Brian Starkey > --- > drivers/gpu/drm/drm_atomic.c | 64 > +++--- > 1 file

Re: [RFC PATCH v2 9/9] drm: mali-dp: Add writeback out-fence support

2016-10-26 Thread Gustavo Padovan
2016-10-26 Brian Starkey : > If userspace has asked for an out-fence for the writeback, we add a > fence to malidp_mw_job, to be signaled when the writeback job has > completed. > > Signed-off-by: Brian Starkey > --- >

Re: [RFC PATCH v2 9/9] drm: mali-dp: Add writeback out-fence support

2016-10-26 Thread Gustavo Padovan
2016-10-26 Brian Starkey : > If userspace has asked for an out-fence for the writeback, we add a > fence to malidp_mw_job, to be signaled when the writeback job has > completed. > > Signed-off-by: Brian Starkey > --- > drivers/gpu/drm/arm/malidp_hw.c |5 - >

Re: [RFC PATCH v2 8/9] drm: writeback: Add out-fences for writeback connectors

2016-10-26 Thread Gustavo Padovan
2016-10-26 Brian Starkey : > Add the OUT_FENCE_PTR property to writeback connectors, to enable > userspace to get a fence which will signal once the writeback is > complete. > > A timeline is added to drm_connector for use by the writeback > out-fences. It is up to drivers

Re: [RFC PATCH v2 8/9] drm: writeback: Add out-fences for writeback connectors

2016-10-26 Thread Gustavo Padovan
2016-10-26 Brian Starkey : > Add the OUT_FENCE_PTR property to writeback connectors, to enable > userspace to get a fence which will signal once the writeback is > complete. > > A timeline is added to drm_connector for use by the writeback > out-fences. It is up to drivers to check for a fence

Re: [RFC PATCH v2 7/9] drm: atomic: factor out common out-fence operations

2016-10-26 Thread Gustavo Padovan
2016-10-26 Brian Starkey : > Some parts of setting up the CRTC out-fence can be re-used for > writeback out-fences. Factor this out into a separate function. > > Signed-off-by: Brian Starkey > --- > drivers/gpu/drm/drm_atomic.c | 64 >

Re: [RFC PATCH v2 7/9] drm: atomic: factor out common out-fence operations

2016-10-26 Thread Gustavo Padovan
2016-10-26 Brian Starkey : > Some parts of setting up the CRTC out-fence can be re-used for > writeback out-fences. Factor this out into a separate function. > > Signed-off-by: Brian Starkey > --- > drivers/gpu/drm/drm_atomic.c | 64 > +++--- > 1 file

Re: [PATCH v5 4/4] drm/fence: add out-fences support

2016-10-21 Thread Gustavo Padovan
2016-10-21 Daniel Vetter <dan...@ffwll.ch>: > On Thu, Oct 20, 2016 at 10:15:20PM +0300, Ville Syrjälä wrote: > > On Thu, Oct 20, 2016 at 07:34:44PM +0300, Ville Syrjälä wrote: > > > On Thu, Oct 20, 2016 at 01:55:38PM -0200, Gustavo Padovan wrote: > > > >

Re: [PATCH v5 4/4] drm/fence: add out-fences support

2016-10-21 Thread Gustavo Padovan
2016-10-21 Daniel Vetter : > On Thu, Oct 20, 2016 at 10:15:20PM +0300, Ville Syrjälä wrote: > > On Thu, Oct 20, 2016 at 07:34:44PM +0300, Ville Syrjälä wrote: > > > On Thu, Oct 20, 2016 at 01:55:38PM -0200, Gustavo Padovan wrote: > > > > 2016-10-20 Ville Syrjälä :

Re: [PATCH v5 4/4] drm/fence: add out-fences support

2016-10-20 Thread Gustavo Padovan
ll drop the fence_get() in the out-fence patch because we already hold the ref when we create the fence. The sync_file refcount patch will remain. > > Couple more comments below. > > On Thu, Oct 20, 2016 at 12:50:05PM -0200, Gustavo Padovan wrote: > > From: Gustavo Padovan <gustavo

Re: [PATCH v5 4/4] drm/fence: add out-fences support

2016-10-20 Thread Gustavo Padovan
out-fence patch because we already hold the ref when we create the fence. The sync_file refcount patch will remain. > > Couple more comments below. > > On Thu, Oct 20, 2016 at 12:50:05PM -0200, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Support DRM ou

Re: [PATCH v5 3/4] drm/fence: add fence timeline to drm_crtc

2016-10-20 Thread Gustavo Padovan
2016-10-20 Brian Starkey <brian.star...@arm.com>: > Hi Gustavo, > > On Thu, Oct 20, 2016 at 12:50:04PM -0200, Gustavo Padovan wrote: > > From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> > > > > Create one timeline context for each CRTC to be able t

Re: [PATCH v5 3/4] drm/fence: add fence timeline to drm_crtc

2016-10-20 Thread Gustavo Padovan
2016-10-20 Brian Starkey : > Hi Gustavo, > > On Thu, Oct 20, 2016 at 12:50:04PM -0200, 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

Re: [PATCH v5 4/4] drm/fence: add out-fences support

2016-10-20 Thread Gustavo Padovan
2016-10-20 Ville Syrjälä <ville.syrj...@linux.intel.com>: > On Thu, Oct 20, 2016 at 12:50:05PM -0200, Gustavo Padovan wrote: > > From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> > > > > Support DRM out-fences by creating a sync_file with a

Re: [PATCH v5 4/4] drm/fence: add out-fences support

2016-10-20 Thread Gustavo Padovan
2016-10-20 Ville Syrjälä : > On Thu, Oct 20, 2016 at 12:50:05PM -0200, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Support DRM out-fences by creating a sync_file with a fence for each CRTC > > that sets the OUT_FENCE_PTR property. > > I still m

[PATCH v5 1/4] drm/fence: add in-fences support

2016-10-20 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> 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 o

[PATCH v5 2/4] drm/fence: release fence reference when canceling event

2016-10-20 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> If the event gets canceled we also need to put away the fence reference it holds. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> --- drivers/gpu/drm/drm_fops.c | 4 1 file changed, 4 insertions(+)

[PATCH v5 1/4] drm/fence: add in-fences support

2016-10-20 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

[PATCH v5 2/4] drm/fence: release fence reference when canceling event

2016-10-20 Thread Gustavo Padovan
From: Gustavo Padovan If the event gets canceled we also need to put away the fence reference it holds. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/drm_fops.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c index e84faec

[PATCH v5 3/4] drm/fence: add fence timeline to drm_crtc

2016-10-20 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> 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

[PATCH v5 3/4] drm/fence: add fence timeline to drm_crtc

2016-10-20 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

[PATCH v5 4/4] drm/fence: add out-fences support

2016-10-20 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Support DRM out-fences by creating a sync_file with a fence for each CRTC that sets the OUT_FENCE_PTR property. We use the out_fence pointer received in the OUT_FENCE_PTR prop to send the sync_file fd back to userspace. The syn

[PATCH v5 4/4] drm/fence: add out-fences support

2016-10-20 Thread Gustavo Padovan
From: Gustavo Padovan Support DRM out-fences by creating a sync_file with a fence for each CRTC that sets the OUT_FENCE_PTR property. We use the out_fence pointer received in the OUT_FENCE_PTR prop to send the sync_file fd back to userspace. The sync_file and fd are allocated/created before

[PATCH v5 0/4] drm: add explicit fencing

2016-10-20 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Hi, Currently the Linux Kernel only have an implicit fencing mechanism, through reservation objects, in which the fences are attached directly to buffers operations and userspace is unaware of what is happening. On the other hand ex

[PATCH v5 0/4] drm: add explicit fencing

2016-10-20 Thread Gustavo Padovan
From: Gustavo Padovan Hi, Currently the Linux Kernel only have an implicit fencing mechanism, through reservation objects, in which the fences are attached directly to buffers operations and userspace is unaware of what is happening. On the other hand explicit fencing exposes fences

Re: [PATCH] uapi: add missing install of sync_file.h

2016-09-27 Thread Gustavo Padovan
> > [0] http://www.spinics.net/lists/linux-kselftest/msg00444.html > [1] http://www.spinics.net/lists/linux-kselftest/msg00457.html > > include/uapi/linux/Kbuild | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Gustavo

Re: [PATCH] uapi: add missing install of sync_file.h

2016-09-27 Thread Gustavo Padovan
net/lists/linux-kselftest/msg00457.html > > include/uapi/linux/Kbuild | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Gustavo Padovan Gustavo

Re: [PATCH] dma-buf/sw_sync: mark sync_timeline_create() static

2016-09-25 Thread Gustavo Padovan
Hi Baoyou, 2016-09-22 Greg Kroah-Hartman <gre...@linuxfoundation.org>: > On Tue, Sep 20, 2016 at 06:23:33PM +0530, Sumit Semwal wrote: > > Hi Baoyou, > > > > On 20 September 2016 at 16:43, Gustavo Padovan <gust...@padovan.org> wrote: > > > 20

Re: [PATCH] dma-buf/sw_sync: mark sync_timeline_create() static

2016-09-25 Thread Gustavo Padovan
Hi Baoyou, 2016-09-22 Greg Kroah-Hartman : > On Tue, Sep 20, 2016 at 06:23:33PM +0530, Sumit Semwal wrote: > > Hi Baoyou, > > > > On 20 September 2016 at 16:43, Gustavo Padovan wrote: > > > 2016-09-18 Baoyou Xie : > > > > > >> We get 1 warnin

Re: [PATCH] dma-buf/sw_sync: mark sync_timeline_create() static

2016-09-20 Thread Gustavo Padovan
hich it is > declared and don't need a declaration, but can be made static. > So this patch marks it 'static'. > > Signed-off-by: Baoyou Xie <baoyou@linaro.org> > --- > drivers/dma-buf/sw_sync.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Thanks

Re: [PATCH] dma-buf/sw_sync: mark sync_timeline_create() static

2016-09-20 Thread Gustavo Padovan
red and don't need a declaration, but can be made static. > So this patch marks it 'static'. > > Signed-off-by: Baoyou Xie > --- > drivers/dma-buf/sw_sync.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Thanks for finding this. Reviewed-by: Gustavo Padovan Gustavo

Re: [PATCH] dma-buf/sync_file: fix documentation error

2016-09-19 Thread Gustavo Padovan
the field is updated > + * with the actual number of fences. If num_fences is > 0, the system will > + * use the pointer provided on sync_fence_info to return up to num_fences of > + * struct sync_fence_info, with detailed fence information. > */ Reviewed-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Gustavo

Re: [PATCH] dma-buf/sync_file: fix documentation error

2016-09-19 Thread Gustavo Padovan
nces. If num_fences is > 0, the system will > + * use the pointer provided on sync_fence_info to return up to num_fences of > + * struct sync_fence_info, with detailed fence information. > */ Reviewed-by: Gustavo Padovan Gustavo

Re: [PATCH v2 4/5] drm/qxl: squash lines for simple wrapper functions

2016-09-15 Thread Gustavo Padovan
_release.c | 7 ++- > 2 files changed, 4 insertions(+), 10 deletions(-) For patches 1 to 4: Reviewed-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Gustavo

Re: [PATCH v2 4/5] drm/qxl: squash lines for simple wrapper functions

2016-09-15 Thread Gustavo Padovan
s(-) For patches 1 to 4: Reviewed-by: Gustavo Padovan Gustavo

Re: [PATCH v2 4/5] drm/qxl: squash lines for simple wrapper functions

2016-09-15 Thread Gustavo Padovan
ers/gpu/drm/qxl/qxl_release.c | 7 ++- > 2 files changed, 4 insertions(+), 10 deletions(-) Reviewed-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Gustavo

Re: [PATCH v2 4/5] drm/qxl: squash lines for simple wrapper functions

2016-09-15 Thread Gustavo Padovan
0 deletions(-) Reviewed-by: Gustavo Padovan Gustavo

[PATCH v4] drm/fence: allow fence waiting to be interrupted by userspace

2016-09-12 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> 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

[PATCH v4] drm/fence: allow fence waiting to be interrupted by userspace

2016-09-12 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

Re: [PATCH v3] drm/fence: allow fence waiting to be interrupted by userspace

2016-09-12 Thread Gustavo Padovan
Hi Sean, 2016-09-12 Sean Paul <seanp...@google.com>: > On Thu, Aug 25, 2016 at 12:47 PM, Gustavo Padovan <gust...@padovan.org> wrote: > > From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> > > > > If userspace is running an synchronously atomic commit

Re: [PATCH v3] drm/fence: allow fence waiting to be interrupted by userspace

2016-09-12 Thread Gustavo Padovan
Hi Sean, 2016-09-12 Sean Paul : > On Thu, Aug 25, 2016 at 12:47 PM, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > If userspace is running an synchronously atomic commit and interrupts the > > atomic operation during fence_wait() it will hang until the ti

Re: [RFC v4 1/3] drm/fence: add in-fences support

2016-09-01 Thread Gustavo Padovan
Hi Maarten, 2016-09-01 Maarten Lankhorst <maarten.lankho...@linux.intel.com>: > Op 31-08-16 om 21:07 schreef Gustavo Padovan: > > From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> > > > > There is now a new property called FENCE_FD attached to ev

Re: [RFC v4 1/3] drm/fence: add in-fences support

2016-09-01 Thread Gustavo Padovan
Hi Maarten, 2016-09-01 Maarten Lankhorst : > Op 31-08-16 om 21:07 schreef 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

[RFC v4 1/3] drm/fence: add in-fences support

2016-08-31 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> 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 o

[RFC v4 1/3] drm/fence: add in-fences support

2016-08-31 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 v4 3/3] drm/fence: add out-fences support

2016-08-31 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> 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 o

[RFC v4 3/3] drm/fence: add out-fences support

2016-08-31 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 v4 2/3] drm/fence: add fence timeline to drm_crtc

2016-08-31 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> 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

[RFC v4 2/3] drm/fence: add fence timeline to drm_crtc

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

[RFC v4 0/3] drm: add fences support through Sync Files

2016-08-31 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Hi, Currently the Linux Kernel only have an implicit fencing mechanism where the fence are attached directly to buffers and userspace is unaware of the inner kernel workings. However by enabling explicit fencing, where fences trave

[RFC v4 0/3] drm: add fences support through Sync Files

2016-08-31 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 the inner kernel workings. However by enabling explicit fencing, where fences travels all the way up the userspace we can

[PATCH 1/2] drm/virtio: drop virtio_gpu_execbuffer_ioctl() wrapping

2016-08-31 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Instead of wrapping virtio_gpu_execbuffer() to execute the ioctl just execute it directly. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> --- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 24

[PATCH 1/2] drm/virtio: drop virtio_gpu_execbuffer_ioctl() wrapping

2016-08-31 Thread Gustavo Padovan
From: Gustavo Padovan Instead of wrapping virtio_gpu_execbuffer() to execute the ioctl just execute it directly. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 24 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/drivers/gpu

[PATCH 2/2] drm/virtio: add real fence context and seqno

2016-08-31 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> virtio fences were created with no fence context, which would make then clash with an allocated fence context. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> --- drivers/gpu/drm/virtio/virtgpu_drv.h | 1 +

[PATCH 2/2] drm/virtio: add real fence context and seqno

2016-08-31 Thread Gustavo Padovan
From: Gustavo Padovan virtio fences were created with no fence context, which would make then clash with an allocated fence context. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/virtio/virtgpu_drv.h | 1 + drivers/gpu/drm/virtio/virtgpu_fence.c | 2 +- drivers/gpu/drm/virtio

[PATCH v3] drm/fence: allow fence waiting to be interrupted by userspace

2016-08-25 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> 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

[PATCH v3] drm/fence: allow fence waiting to be interrupted by userspace

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

Re: [PATCH] include/linux: fix excess fence.h kernel-doc notation

2016-08-15 Thread Gustavo Padovan
Excess struct/union/enum/typedef > member 'child_list' description in 'fence' > ..//include/linux/fence.h:85: warning: Excess struct/union/enum/typedef > member 'active_list' description in 'fence' > > Fixes: 0431b9065f28 ("staging/android: bring struct sync_pt back")

Re: [PATCH] include/linux: fix excess fence.h kernel-doc notation

2016-08-15 Thread Gustavo Padovan
t' description in 'fence' > ..//include/linux/fence.h:85: warning: Excess struct/union/enum/typedef > member 'active_list' description in 'fence' > > Fixes: 0431b9065f28 ("staging/android: bring struct sync_pt back") > > Cc: Gustavo Padovan > Cc: Daniel Vetter >

[PATCH v2 1/2] drm/fence: enable drm_atomic_helper_wait_for_fences() to interrupt

2016-08-15 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Add an extra arg to drm_atomic_helper_wait_for_fences() to inform if fence_wait() should be called interruptible or uninterruptible. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> --- drivers/gpu/drm/drm_ato

[PATCH v2 1/2] drm/fence: enable drm_atomic_helper_wait_for_fences() to interrupt

2016-08-15 Thread Gustavo Padovan
From: Gustavo Padovan Add an extra arg to drm_atomic_helper_wait_for_fences() to inform if fence_wait() should be called interruptible or uninterruptible. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/drm_atomic_helper.c | 19 ++- drivers/gpu/drm/msm/msm_atomic.c| 2

[PATCH v2 2/2] drm/fence: allow fence waiting to be interrupted by userspace

2016-08-15 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> 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

[PATCH v2 2/2] drm/fence: allow fence waiting to be interrupted by userspace

2016-08-15 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

Re: [PATCH 2/2] drm/fence: allow fence waiting to be interrupted by userspace

2016-08-15 Thread Gustavo Padovan
2016-08-15 Maarten Lankhorst <maarten.lankho...@linux.intel.com>: > Op 11-08-16 om 20:39 schreef Gustavo Padovan: > > From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> > > > > If userspace is running an synchronously atomic commit and interrupts the >

Re: [PATCH 2/2] drm/fence: allow fence waiting to be interrupted by userspace

2016-08-15 Thread Gustavo Padovan
2016-08-15 Maarten Lankhorst : > Op 11-08-16 om 20:39 schreef 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, >

[PATCH 1/2] drm/fence: enable drm_atomic_helper_wait_for_fences() to interrupt

2016-08-11 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Add an extra arg to drm_atomic_helper_wait_for_fences() to inform if fence_wait() should be called interruptible or uninterruptible. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> --- drivers/gpu/drm/drm_ato

[PATCH 1/2] drm/fence: enable drm_atomic_helper_wait_for_fences() to interrupt

2016-08-11 Thread Gustavo Padovan
From: Gustavo Padovan Add an extra arg to drm_atomic_helper_wait_for_fences() to inform if fence_wait() should be called interruptible or uninterruptible. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/drm_atomic_helper.c | 19 ++- drivers/gpu/drm/msm/msm_atomic.c| 2

[PATCH 2/2] drm/fence: allow fence waiting to be interrupted by userspace

2016-08-11 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> 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

[PATCH 2/2] drm/fence: allow fence waiting to be interrupted by userspace

2016-08-11 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

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

2016-08-11 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> 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 sugge

[PATCH] 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 v3: really take in Eric

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

2016-08-11 Thread Gustavo Padovan
2016-08-11 Eric Engestrom <eric.engest...@imgtec.com>: > On Thu, Aug 11, 2016 at 12:26:43PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> > > > > This interface is hidden from kernel headers and it is intended for use

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

2016-08-11 Thread Gustavo Padovan
2016-08-11 Eric Engestrom : > On Thu, Aug 11, 2016 at 12:26:43PM -0300, Gustavo Padovan wrote: > > 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

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

2016-08-11 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> 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 sugge

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

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

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

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

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

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

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

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

2016-08-11 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> remove file paths in the comments and add short description about each file. v2: remove file paths instead of just change them. v3: improve header description as sugggested by Eric Signed-off-by: Gustavo Padovan <gus

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

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

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

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

2016-08-11 Thread Gustavo Padovan
Hi Eric, 2016-08-11 Eric Engestrom <eric.engest...@imgtec.com>: > On Mon, Aug 08, 2016 at 06:24:16PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> > > > > Hi Greg, > > > > This is the last step in

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