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

2016-04-26 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> This function had copies in 3 different files. Unify them in kernel.h. Cc: Joe Perches <j...@perches.com> Cc: Andrew Morton <a...@linux-foundation.org> Cc: David Airlie <airl...@linux.ie> Cc: Daniel Vetter <danie

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

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

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

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

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

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

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

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

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

2016-04-26 Thread Gustavo Padovan
2016-04-26 Daniel Vetter <dan...@ffwll.ch>: > On Mon, Apr 25, 2016 at 07:33:21PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> > > > > struct fence_collection inherits from struct fence and carries a > > colle

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

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

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

2016-04-26 Thread Gustavo Padovan
2016-04-26 Lucas Stach <l.st...@pengutronix.de>: > Am Donnerstag, den 21.04.2016, 12:38 -0300 schrieb Gustavo Padovan: > > From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> > > > > This function had copies in 3 different files. Unify them in kern

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

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

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

2016-04-26 Thread Gustavo Padovan
2016-04-26 Ville Syrjälä <ville.syrj...@linux.intel.com>: > On Mon, Apr 25, 2016 at 07:33:27PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> > > > > Create one timeline context for each CRTC to be able to handle out-fe

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

2016-04-26 Thread Gustavo Padovan
2016-04-26 Ville Syrjälä : > On Mon, Apr 25, 2016 at 07:33:27PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Create one timeline context for each CRTC to be able to handle out-fences > > and signal them. It adds a few members to struct drm_crtc:

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

2016-04-26 Thread Gustavo Padovan
2016-04-26 Ville Syrjälä <ville.syrj...@linux.intel.com>: > On Mon, Apr 25, 2016 at 07:33:25PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> > > > > There is now a new property called FENCE_FD attached to ev

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

2016-04-26 Thread Gustavo Padovan
2016-04-26 Ville Syrjälä : > On Mon, Apr 25, 2016 at 07:33:25PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > There is now a new property called FENCE_FD attached to every plane > > state that receives the sync_file fd from userspace via the atom

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

2016-04-25 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 v2 7/8] drm/fence: add fence timeline to drm_crtc

2016-04-25 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 v2 8/8] drm/fence: add out-fences support

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

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

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

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

2016-04-25 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Include fence-collection files in the DocBook. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> --- Documentation/DocBook/device-drivers.tmpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documenta

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

2016-04-25 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Now a drm_pending_event can either send a real drm_event or signal a fence, or both. It allow us to signal via fences when the buffer is displayed on the screen. Which in turn means that the previous buffer is not in use anymore a

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

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

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

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

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

2016-04-25 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 what is happening. On the other hand explicit fencing which is not supported yet by

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

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

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

2016-04-25 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> struct fence_collection inherits from struct fence and carries a collection of fences that needs to be waited together. It is useful to translate a sync_file to a fence to remove the complexity of dealing with sync_files on DRM drive

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

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

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

2016-04-25 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Creates a function that given an sync file descriptor returns a fence_collection containing all fences in the sync_file. If there is only one fence in the sync_file this fence itself is returned, however if there is more th

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

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

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

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

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

2016-04-25 Thread Gustavo Padovan
From: Gustavo Padovan Creates a function that given an sync file descriptor returns a fence_collection containing all fences in the sync_file. If there is only one fence in the sync_file this fence itself is returned, however if there is more than one, a fence_collection fence is returned. v2

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

2016-04-25 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 v2 5/8] drm/fence: add in-fences support

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

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

2016-04-25 Thread Gustavo Padovan
Hi Mario, 2016-04-25 Mario Kleiner <mario.kleiner...@gmail.com>: > On 04/14/2016 07:48 PM, Gustavo Padovan wrote: > >From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> > > > >Replace the legacy drm_send_vblank_event() with the new helper function. >

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

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

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

2016-04-22 Thread Gustavo Padovan
2016-04-22 Daniel Vetter <dan...@ffwll.ch>: > On Thu, Apr 21, 2016 at 12:38:49PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> > > > > This function had copies in 3 different files. Unify them in kernel.h. > >

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

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

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

2016-04-21 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> This function had copies in 3 different files. Unify them in kernel.h. Cc: Joe Perches <j...@perches.com> Cc: Andrew Morton <a...@linux-foundation.org> Cc: David Airlie <airl...@linux.ie> Cc: Daniel Vetter <danie

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

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

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

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

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

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

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

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

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

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

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

2016-04-21 Thread Gustavo Padovan
2016-04-20 Joe Perches <j...@perches.com>: > On Wed, 2016-04-20 at 16:18 -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> > > > > This function had copies in 3 different files. Unify them in kernel.h. > [] > > dif

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

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

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

2016-04-20 Thread Gustavo Padovan
I messed up with the subject prefix, but this is v11, adds typecheck() to patch 2. 2016-04-20 Gustavo Padovan <gust...@padovan.org>: > From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> > > struct sync_merge_data already have documentation on top of the > st

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

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

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

2016-04-20 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> This function had copies in 3 different files. Unify them in kernel.h. Cc: Joe Perches <j...@perches.com> Cc: Andrew Morton <a...@linux-foundation.org> Cc: David Airlie <airl...@linux.ie> Cc: Daniel Vetter <danie

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

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

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

2016-04-20 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> struct sync_merge_data already have documentation on top of the struct definition. No need to duplicate it. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Reviewed-by: Maarten Lankhorst <maarten.lankho...@

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

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

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

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

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

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

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

2016-04-20 Thread Gustavo Padovan
2016-04-20 Maarten Lankhorst <maarten.lankho...@linux.intel.com>: > Op 19-04-16 om 22:42 schreef Gustavo Padovan: > > From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> > > > > This function had copies in 3 different files. Unify them in kernel.h. > >

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

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

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

2016-04-19 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> This function had copies in 3 different files. Unify them in kernel.h. Cc: Joe Perches <j...@perches.com> Cc: Andrew Morton <a...@linux-foundation.org> Cc: David Airlie <airl...@linux.ie> Cc: Daniel Vetter <danie

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

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

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

2016-04-19 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> struct sync_merge_data already have documentation on top of the struct definition. No need to duplicate it. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Reviewed-by: Maarten Lankhorst <maarten.lankho...@

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

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

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

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

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

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

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

2016-04-19 Thread Gustavo Padovan
Hi Jyri, 2016-04-19 Jyri Sarha <jsa...@ti.com>: > On 04/14/16 20:48, Gustavo Padovan wrote: > > From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> > > > > Replace the legacy drm_send_vblank_event() with the new helper function. > > > >

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

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

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

2016-04-19 Thread Gustavo Padovan
Hi Rob, 2016-04-14 Rob Clark <robdcl...@gmail.com>: > On Thu, Apr 14, 2016 at 1:48 PM, Gustavo Padovan <gust...@padovan.org> wrote: > > From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> > > > > Replace the legacy drm_send_vblank_event() with the

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

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

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

2016-04-15 Thread Gustavo Padovan
2016-04-15 Daniel Vetter <dan...@ffwll.ch>: > On Thu, Apr 14, 2016 at 06:29:41PM -0700, Gustavo Padovan wrote: > > From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> > > > > Support DRM out-fences creating a sync_file with a fence for each crtc > > up

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

2016-04-15 Thread Gustavo Padovan
2016-04-15 Daniel Vetter : > On Thu, Apr 14, 2016 at 06:29:41PM -0700, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Support DRM out-fences creating a sync_file with a fence for each crtc > > update with the DRM_MODE_ATOMIC_OUT_FENCE flag. >

Re: [RFC 6/8] drm/fence: create DRM_MODE_ATOMIC_OUT_FENCE flag

2016-04-15 Thread Gustavo Padovan
2016-04-14 Rob Clark <robdcl...@gmail.com>: > On Thu, Apr 14, 2016 at 9:29 PM, Gustavo Padovan <gust...@padovan.org> wrote: > > From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> > > > > This flag tells drm_atomic_ioctl that we want to get a per-crt

Re: [RFC 6/8] drm/fence: create DRM_MODE_ATOMIC_OUT_FENCE flag

2016-04-15 Thread Gustavo Padovan
2016-04-14 Rob Clark : > On Thu, Apr 14, 2016 at 9:29 PM, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > This flag tells drm_atomic_ioctl that we want to get a per-crtc out-fence > > fd back. > > > > Signed-off-by: Gustavo Padovan >

Re: [RFC 5/8] drm/fence: add fence to drm_pending_event

2016-04-15 Thread Gustavo Padovan
2016-04-15 Daniel Vetter <dan...@ffwll.ch>: > On Thu, Apr 14, 2016 at 06:29:38PM -0700, Gustavo Padovan wrote: > > From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> > > > > Now a drm_pending_event can either send a real drm_event or signal a > > fe

Re: [RFC 5/8] drm/fence: add fence to drm_pending_event

2016-04-15 Thread Gustavo Padovan
2016-04-15 Daniel Vetter : > On Thu, Apr 14, 2016 at 06:29:38PM -0700, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Now a drm_pending_event can either send a real drm_event or signal a > > fence, or both. It allow us to signal via fences when

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

2016-04-15 Thread Gustavo Padovan
2016-04-15 Daniel Vetter <dan...@ffwll.ch>: > On Thu, Apr 14, 2016 at 06:29:37PM -0700, Gustavo Padovan wrote: > > From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> > > > > There is now a new property called FENCE_FD attached to every plane > > st

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

2016-04-15 Thread Gustavo Padovan
2016-04-15 Daniel Vetter : > On Thu, Apr 14, 2016 at 06:29:37PM -0700, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > There is now a new property called FENCE_FD attached to every plane > > state that receives the sync_file fd from userspace via

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

2016-04-15 Thread Gustavo Padovan
2016-04-15 Daniel Vetter : > On Fri, Apr 15, 2016 at 11:03 AM, Christian König > wrote: > > Might be that how amdgpu uses the fence context and sequence number is a bit > > questionable, but this will completely break it. > > You mean it tries to

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

2016-04-15 Thread Gustavo Padovan
2016-04-15 Daniel Vetter : > On Fri, Apr 15, 2016 at 11:03 AM, Christian König > wrote: > > Might be that how amdgpu uses the fence context and sequence number is a bit > > questionable, but this will completely break it. > > You mean it tries to qualesce fences in the same context down to just

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

2016-04-15 Thread Gustavo Padovan
2016-04-15 Christian König <christian.koe...@amd.com>: > Am 15.04.2016 um 10:02 schrieb Daniel Vetter: > >On Thu, Apr 14, 2016 at 06:29:34PM -0700, Gustavo Padovan wrote: > >>From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> > >> > >>st

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

2016-04-15 Thread Gustavo Padovan
2016-04-15 Christian König : > Am 15.04.2016 um 10:02 schrieb Daniel Vetter: > >On Thu, Apr 14, 2016 at 06:29:34PM -0700, Gustavo Padovan wrote: > >>From: Gustavo Padovan > >> > >>struct fence_collection inherits from struct fence and carries a > >>

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

2016-04-14 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Creates a function that given an sync file descriptor returns a fence_collection containing all fences in the sync_file. If there is only one fence in the sync_file this fence itself is returned, however if there is more th

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

2016-04-14 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 2/8] dma-buf/sync_file: add sync_file_fences_get()

2016-04-14 Thread Gustavo Padovan
From: Gustavo Padovan Creates a function that given an sync file descriptor returns a fence_collection containing all fences in the sync_file. If there is only one fence in the sync_file this fence itself is returned, however if there is more than one, a fence_collection fence is returned

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

2016-04-14 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 7/8] drm/fence: create per-crtc sync_timeline

2016-04-14 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Add one timeline per-crtc that will be use to handle fence signalling to userspace via sync_files. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> --- drivers/gpu/drm/drm_crtc.c | 9 + include/dr

[RFC 7/8] drm/fence: create per-crtc sync_timeline

2016-04-14 Thread Gustavo Padovan
From: Gustavo Padovan Add one timeline per-crtc that will be use to handle fence signalling to userspace via sync_files. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/drm_crtc.c | 9 + include/drm/drm_crtc.h | 4 2 files changed, 13 insertions(+) diff --git a/drivers

[RFC 5/8] drm/fence: add fence to drm_pending_event

2016-04-14 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Now a drm_pending_event can either send a real drm_event or signal a fence, or both. It allow us to signal via fences when the buffer is displayed on the screen. Which in turn means that the previous buffer is not in use anymore a

[RFC 5/8] drm/fence: add fence to drm_pending_event

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

[RFC 6/8] drm/fence: create DRM_MODE_ATOMIC_OUT_FENCE flag

2016-04-14 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> This flag tells drm_atomic_ioctl that we want to get a per-crtc out-fence fd back. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> --- include/uapi/drm/drm_mode.h | 4 +++- 1 file changed, 3 insertions(+)

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

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

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

2016-04-14 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> struct fence_collection inherits from struct fence and carries a collection of fences that needs to be waited together. It is useful to translate a sync_file to a fence to remove the complexity of dealing with sync_files from DRM d

[RFC 6/8] drm/fence: create DRM_MODE_ATOMIC_OUT_FENCE flag

2016-04-14 Thread Gustavo Padovan
From: Gustavo Padovan This flag tells drm_atomic_ioctl that we want to get a per-crtc out-fence fd back. Signed-off-by: Gustavo Padovan --- include/uapi/drm/drm_mode.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm

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

2016-04-14 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. Signed-off-by: Gustavo

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

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

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

2016-04-14 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 0/8] drm: explicit fencing support

2016-04-14 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 what is happening. On the other hand explicit fencing which is not supported yet by

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

2016-04-14 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 0/8] drm: explicit fencing support

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

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

2016-04-14 Thread Gustavo Padovan
Hi Greg, Any comment on this? Thanks, Gustavo 2016-03-18 Gustavo Padovan <gust...@padovan.org>: > From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> > > Change SYNC_IOC_FILE_INFO (former SYNC_IOC_FENCE_INFO) behaviour to avoid > future API breaks and optimize buf

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

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

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

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

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

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

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

2016-04-14 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Replace the legacy drm_send_vblank_event() with the new helper function. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 2 +- 1 file changed, 1 insertion(+)

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

2016-04-14 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 12/14] drm/udl: use drm_crtc_send_vblank_event()

2016-04-14 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Replace the legacy drm_send_vblank_event() with the new helper function. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> --- drivers/gpu/drm/udl/udl_modeset.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

<    5   6   7   8   9   10   11   12   13   14   >