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

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

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

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

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

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

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

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

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

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

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

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

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

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

[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

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

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

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

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

[PATCH 00/12] De-stage Sync File Framework

2016-04-27 Thread Gustavo Padovan
From: Gustavo Padovan Hi, This patchset sits on top of Sync ABI Rework v13: https://www.spinics.net/lists/dri-devel/msg105667.html The first eight clean up and prepare sync_file for de-staging. The last four patches do the de-staging, moving files to drivers/dma-buf/ and include/linux/ plus

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

2016-04-27 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 | 10 +- 1 file changed, 5 insertions(+), 5

[PATCH 02/12] staging/android: drop sync_file_install() and sync_file_put()

2016-04-27 Thread Gustavo Padovan
From: Gustavo Padovan These two functions are just wrappers for one line functions, they call fd_install() and fput() respectively, so just get rid of them and use fd_install() and fput() directly for more simplicity. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c

[PATCH 05/12] staging/android: make sync_file_fdget() static

2016-04-27 Thread Gustavo Padovan
From: Gustavo Padovan There is no plan in the near future to use this function outside of this file so keep it as static. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 3 +-- drivers/staging/android/sync.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff

[PATCH 03/12] staging/android: move sync_file functions comments to sync.c

2016-04-27 Thread Gustavo Padovan
From: Gustavo Padovan To keep comments in line with drivers/dma-buf/ move all sync_file comments to sync.c. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 26 +- drivers/staging/android/sync.h | 31 --- 2 files changed

[PATCH 04/12] staging/android: make sync_file_merge() static

2016-04-27 Thread Gustavo Padovan
From: Gustavo Padovan There is no plan in the near future to use this function outside of this file so keep it as static. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 4 ++-- drivers/staging/android/sync.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff

[PATCH 11/12] Documentation: include sync_file into DocBook

2016-04-27 Thread Gustavo Padovan
From: Gustavo Padovan Add entry in device-drivers.tmpl for sync_file documentation. Signed-off-by: Gustavo Padovan --- Documentation/DocBook/device-drivers.tmpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/DocBook/device-drivers.tmpl b/Documentation/DocBook/device

[PATCH 06/12] staging/android: prepare sync_file for de-staging

2016-04-27 Thread Gustavo Padovan
From: Gustavo Padovan Move its functions and structs to their own file. Also moves function's docs to the .c file. Signed-off-by: Gustavo Padovan --- drivers/staging/android/Makefile | 2 +- drivers/staging/android/sync.c

[PATCH 07/12] staging/android: improve documentation for sync_file

2016-04-27 Thread Gustavo Padovan
From: Gustavo Padovan num_fences was missing a colon mark and sync_file_create() now have better description. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync_file.c | 3 ++- drivers/staging/android/sync_file.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff

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

2016-04-27 Thread Gustavo Padovan
From: Gustavo Padovan sync_file is useful to connect one or more fences to the file. The file is used by userspace to track fences between drivers that share DMA bufs. Signed-off-by: Gustavo Padovan --- drivers/Kconfig | 2 ++ drivers/dma-buf/Kconfig

[PATCH 08/12] staging/android: style fix: alignment to match the open parenthesis

2016-04-27 Thread Gustavo Padovan
From: Gustavo Padovan Fix checks reported by checkpatch.pl. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync_file.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/android/sync_file.c b/drivers/staging/android/sync_file.c index

[PATCH 09/12] dma-buf/sync_file: de-stage sync_file headers

2016-04-27 Thread Gustavo Padovan
From: Gustavo Padovan Move sync_file headers file to include/ dir. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.h | 4 ++-- drivers/staging/android/sync_debug.c | 2 +- drivers/staging/android/sync_file.c

[PATCH 12/12] Documentation: add Sync File doc

2016-04-27 Thread Gustavo Padovan
From: Gustavo Padovan Add sync_file documentation on dma-buf-sync_file.txt --- Documentation/dma-buf-sync_file.txt | 65 + 1 file changed, 65 insertions(+) create mode 100644 Documentation/dma-buf-sync_file.txt diff --git a/Documentation/dma-buf

[PATCH v2 00/13] De-stage Sync File Framework

2016-04-28 Thread Gustavo Padovan
From: Gustavo Padovan Hi, This patchset sits on top of Sync ABI Rework v13: https://www.spinics.net/lists/dri-devel/msg105667.html The first eight clean up and prepare sync_file for de-staging. The last four patches do the de-staging, moving files to drivers/dma-buf/ and include/linux/ plus

[PATCH v2 01/13] staging/android: remove redundant comments on sync_merge_data

2016-04-28 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 Reviewed-by: Daniel Vetter --- drivers/staging/android/uapi/sync.h | 10 +- 1 file changed

[PATCH v2 02/13] staging/android: drop sync_file_install() and sync_file_put()

2016-04-28 Thread Gustavo Padovan
From: Gustavo Padovan These two functions are just wrappers for one line functions, they call fd_install() and fput() respectively, so just get rid of them and use fd_install() and fput() directly for more simplicity. Signed-off-by: Gustavo Padovan Reviewed-by: Daniel Vetter --- drivers

[PATCH v2 03/13] staging/android: move sync_file functions comments to sync.c

2016-04-28 Thread Gustavo Padovan
From: Gustavo Padovan To keep comments in line with drivers/dma-buf/ move all sync_file comments to sync.c. Signed-off-by: Gustavo Padovan Reviewed-by: Daniel Vetter --- drivers/staging/android/sync.c | 26 +- drivers/staging/android/sync.h | 31

[PATCH v2 04/13] staging/android: make sync_file_merge() static

2016-04-28 Thread Gustavo Padovan
From: Gustavo Padovan There is no plan in the near future to use this function outside of this file so keep it as static. Signed-off-by: Gustavo Padovan Reviewed-by: Daniel Vetter --- drivers/staging/android/sync.c | 5 ++--- drivers/staging/android/sync.h | 2 -- 2 files changed, 2

[PATCH v2 05/13] staging/android: make sync_file_fdget() static

2016-04-28 Thread Gustavo Padovan
From: Gustavo Padovan There is no plan in the near future to use this function outside of this file so keep it as static. Signed-off-by: Gustavo Padovan Reviewed-by: Daniel Vetter --- drivers/staging/android/sync.c | 3 +-- drivers/staging/android/sync.h | 1 - 2 files changed, 1 insertion

[PATCH v2 06/13] staging/android: remove name arg from sync_file_create()

2016-04-28 Thread Gustavo Padovan
From: Gustavo Padovan Simplifies the API to only receive the fence it needs to add to the sync and create a name for the sync_file based on the fence context and seqno. Signed-off-by: Gustavo Padovan Reviewed-by: Daniel Vetter --- drivers/staging/android/sync.c | 16

[PATCH v2 07/13] staging/android: prepare sync_file for de-staging

2016-04-28 Thread Gustavo Padovan
From: Gustavo Padovan Move its functions and structs to their own file. Also moves function's docs to the .c file. Signed-off-by: Gustavo Padovan Reviewed-by: Daniel Vetter --- drivers/staging/android/Makefile | 2 +- drivers/staging/android/s

[PATCH v2 08/13] staging/android: improve documentation for sync_file

2016-04-28 Thread Gustavo Padovan
From: Gustavo Padovan num_fences was missing a colon mark and sync_file_create() now have better description. Signed-off-by: Gustavo Padovan Reviewed-by: Daniel Vetter --- drivers/staging/android/sync_file.c | 5 +++-- drivers/staging/android/sync_file.h | 2 +- 2 files changed, 4 insertions

[PATCH v2 09/13] staging/android: style fix: alignment to match the open parenthesis

2016-04-28 Thread Gustavo Padovan
From: Gustavo Padovan Fix checks reported by checkpatch.pl. Signed-off-by: Gustavo Padovan Reviewed-by: Daniel Vetter --- drivers/staging/android/sync_file.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/android/sync_file.c b/drivers/staging

[PATCH v2 10/13] dma-buf/sync_file: de-stage sync_file headers

2016-04-28 Thread Gustavo Padovan
From: Gustavo Padovan Move sync_file headers file to include/ dir. Signed-off-by: Gustavo Padovan Reviewed-by: Daniel Vetter --- drivers/staging/android/sync.h | 4 ++-- drivers/staging/android/sync_debug.c | 2 +- drivers/staging

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

2016-04-28 Thread Gustavo Padovan
From: Gustavo Padovan sync_file is useful to connect one or more fences to the file. The file is used by userspace to track fences between drivers that share DMA bufs. Signed-off-by: Gustavo Padovan Reviewed-by: Daniel Vetter --- drivers/Kconfig | 2

[PATCH v2 12/13] Documentation: include sync_file into DocBook

2016-04-28 Thread Gustavo Padovan
From: Gustavo Padovan Add entry in device-drivers.tmpl for sync_file documentation. Signed-off-by: Gustavo Padovan Reviewed-by: Daniel Vetter --- Documentation/DocBook/device-drivers.tmpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/DocBook/device-drivers.tmpl b

[PATCH v2 13/13] Documentation: add Sync File doc

2016-04-28 Thread Gustavo Padovan
From: Gustavo Padovan Add sync_file documentation on dma-buf-sync_file.txt Reviewed-by: Daniel Vetter --- Documentation/sync_file.txt | 69 + 1 file changed, 69 insertions(+) create mode 100644 Documentation/sync_file.txt diff --git a/Documentation

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

2016-04-28 Thread Gustavo Padovan
2016-04-27 Daniel Stone : > Hi, > > On 26 April 2016 at 21:48, Greg Hackmann wrote: > > On 04/26/2016 01:05 PM, Daniel Vetter wrote: > >> On Tue, Apr 26, 2016 at 09:55:06PM +0300, Ville Syrjälä wrote: > >>> What are they doing that can't stuff the fences into an array > >>> instead of props? >

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

2016-04-28 Thread Gustavo Padovan
2016-04-26 Chris Wilson : > On Mon, Apr 25, 2016 at 07:33:21PM -0300, Gustavo Padovan wrote: > > +static const char *fence_collection_get_timeline_name(struct fence *fence) > > +{ > > + return "no context"; > > "unbound" to distinguish from fence

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

2016-04-28 Thread Gustavo Padovan
2016-04-26 Daniel Vetter : > On Mon, Apr 25, 2016 at 07:33:28PM -0300, 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. >

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

2016-04-28 Thread Gustavo Padovan
2016-04-28 Ville Syrjälä : > On Thu, Apr 28, 2016 at 07:43:16PM +0200, Daniel Vetter wrote: > > On Thu, Apr 28, 2016 at 6:56 PM, Ville Syrjälä > > wrote: > > >> - better for tracing, can identify the buffer/fence promptly > > > > > > Can fences be reused somehow while still attached to a pla

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

2016-08-04 Thread Gustavo Padovan
2016-08-03 Chris Wilson : > On Tue, Jul 12, 2016 at 03:08:45PM -0300, Gustavo Padovan wrote: > > 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 throug

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

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

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

2016-08-04 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 v5 3/5] dma-buf/sync_file: add sync_file_get_fence()

2016-08-04 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 v5 5/5] dma-buf/sync_file: only enable fence signalling on poll()

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

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

2016-08-04 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 v6 1/5] dma-buf/fence-array: add fence_is_array()

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

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

2016-08-05 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 v6 3/5] dma-buf/sync_file: add sync_file_get_fence()

2016-08-05 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 v6 4/5] Documentation: add doc for sync_file_get_fence()

2016-08-05 Thread Gustavo Padovan
From: Gustavo Padovan Document the new function added to sync_file.c v2: Adapt to fence_array v3: Take in Chris Wilson suggestions Signed-off-by: Gustavo Padovan Acked-by: Christian König Reviewed-by: Chris Wilson --- Documentation/sync_file.txt | 14 ++ 1 file changed, 14

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

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

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

2016-08-08 Thread Gustavo Padovan
2016-07-24 Pavel Machek : > On Mon 2016-08-08 16:08:12, Gustavo Padovan wrote: > > 2016-08-07 Pavel Machek : > > > > > On Sun 2016-07-24 15:21:11, Greg Kroah-Hartman wrote: > > > > On Mon, Jul 18, 2016 at 04:12:45PM -0300, Gustavo Padovan wrote: > > &

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

2016-08-08 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 v2 1/6] staging/android: remove doc from sw_sync

2016-08-08 Thread Gustavo Padovan
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 any info to avoid confuse this with a standard kernel internal API. Signed-off-by: Gustavo Padovan --- drivers/staging/android

[PATCH v2 2/6] staging/android: do not let userspace trigger WARN_ON

2016-08-08 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 v2 3/6] staging/android: move trace/sync.h to sync_trace.h

2016-08-08 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 --- drivers/staging/android/sw_sync.c| 2 +- drivers/staging/android/sync_trace.h | 32

[PATCH v2 4/6] staging/android: prepare sw_sync files for de-staging

2016-08-08 Thread Gustavo Padovan
From: Gustavo Padovan remove file paths in the comments and add short description about each file. v2: remove file paths instead of just change them. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sw_sync.c| 2 +- drivers/staging/android/sync_debug.c | 2 +- drivers/staging

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

2016-08-08 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. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sw_sync.c | 31

[PATCH v2 6/6] dma-buf/sw_sync: de-stage SW_SYNC

2016-08-08 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 0/7] de-stage SW_SYNC validation frawework

2016-08-08 Thread Gustavo Padovan
2016-08-07 Pavel Machek : > On Sun 2016-07-24 15:21:11, Greg Kroah-Hartman wrote: > > On Mon, Jul 18, 2016 at 04:12:45PM -0300, Gustavo Padovan wrote: > > > Hi, > > > > > > Do you think there is time to get this in for 4.8? > > > > No, it wa

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

2016-08-08 Thread 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 the name received wasn't used anywhere. > > Now we add it to the sync info debug output to make it easier to indetify > &

[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

[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

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

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

[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 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 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 v2] drm/fb-helper: add DRM_FB_HELPER_DEFAULT_OPS for fb_ops

2016-10-05 Thread Gustavo Padovan
Hi Stefan, 2016-10-04 Stefan Christ : > The define DRM_FB_HELPER_DEFAULT_OPS provides the drm_fb_helper default > implementations for functions in struct fb_ops. A drm driver can use it > like: > > static struct fb_ops drm_fbdev_cma_ops = { > .owner = THIS_MODULE, >

[PATCH] drm/bridge: Call drm_connector_cleanup directly

2016-10-05 Thread Gustavo Padovan
7 +-- > drivers/gpu/drm/bridge/parade-ps8622.c| 7 +-- > 3 files changed, 3 insertions(+), 18 deletions(-) Reviewed-by: Gustavo Padovan Gustavo

[PATCH 0/6] R-Car DU fixes and cleanups

2016-10-05 Thread Gustavo Padovan
drm/rcar-du/rcar_du_lvdscon.c | 2 +- > drivers/gpu/drm/rcar-du/rcar_du_lvdscon.h | 2 +- > drivers/gpu/drm/rcar-du/rcar_du_lvdsenc.c | 4 +--- > drivers/video/of_display_timing.c | 6 +++--- > include/video/of_display_timing.h | 15 --- > 8 files changed, 21 insertions(+), 28 deletions(-) For 1 to 6 Reviewed-by: Gustavo Padovan Gustavo

[PATCH] drm/bridge: Call drm_connector_cleanup directly

2016-10-05 Thread Gustavo Padovan
Hi Marek, 2016-10-05 Marek Vasut : > On 10/05/2016 03:21 PM, Daniel Vetter wrote: > > On Wed, Oct 05, 2016 at 11:03:20AM +0200, Gustavo Padovan wrote: > >> Hi Marek, > >> > >> 2016-10-05 Marek Vasut : > >> > >>> Remove the u

[PATCH] dma-buf/fence-array: fix deadlock in fence-array

2016-10-17 Thread Gustavo Padovan
2016-10-17 Rob Clark : > Currently with fence-array, we have a potential deadlock situation. If we > fence_add_callback() on an array-fence, the array-fence's lock is acquired > first, and in it's ->enable_signaling() callback, it will install cb's on > it's array-member fences, so the array-memb

[PATCH] dma-buf/fence-array: fix deadlock in fence-array

2016-10-17 Thread Gustavo Padovan
2016-10-17 Rob Clark : > On Mon, Oct 17, 2016 at 2:52 PM, Gustavo Padovan > wrote: > > 2016-10-17 Rob Clark : > > > >> Currently with fence-array, we have a potential deadlock situation. If we > >> fence_add_callback() on an array-fence, the array-fence&#

[PATCH] dma-buf/fence-array: fix deadlock in fence-array

2016-10-17 Thread Gustavo Padovan
2016-10-17 Chris Wilson : > On Mon, Oct 17, 2016 at 02:59:52PM -0400, Rob Clark wrote: > > On Mon, Oct 17, 2016 at 2:52 PM, Gustavo Padovan > > wrote: > > > 2016-10-17 Rob Clark : > > > > > >> Currently with fence-array, we have a

[PATCH v2] virtio-gpu: fix vblank events

2016-10-18 Thread Gustavo Padovan
From: Gustavo Padovan virtio-gpu sends vblank events in virtio_gpu_crtc_atomic_flush, and because of that it must be called for disabled planes too. Ask drm_atomic_helper_commit_planes to do that. v2: update to use new drm_atomic_helper_commit_planes() API. Signed-off-by: Gerd Hoffmann

[PATCH v2] virtio-gpu: fix vblank events

2016-10-18 Thread Gustavo Padovan
-off-by: Gustavo Padovan --- drivers/gpu/drm/virtio/virtgpu_display.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c index 6848651..64facc8 100644 --- a/drivers/gpu/drm/virtio

[PATCH v2] virtio-gpu: fix vblank events

2016-10-18 Thread Gustavo Padovan
2016-10-18 Gustavo Padovan : > From: Gustavo Padovan Author info is wrong. It should be Gerd, I'll send another patch. > > virtio-gpu sends vblank events in virtio_gpu_crtc_atomic_flush, and > because of that it must be called for disabled planes too. Ask > drm_atomic_hel

[PATCH v2] virtio-gpu: fix vblank events

2016-10-18 Thread Gustavo Padovan
-off-by: Gustavo Padovan --- drivers/gpu/drm/virtio/virtgpu_display.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c index 6848651..64facc8 100644 --- a/drivers/gpu/drm/virtio

[PATCH 1/2] dma-buf/sync_file: hold reference to fence when creating sync_file

2016-10-19 Thread Gustavo Padovan
From: Gustavo Padovan fence referencing was out of balance. It was not taking any ref to the fence at creating time, but it was putting a reference when freeing the sync file. This patch fixes the balancing issue by getting a reference for the fence when creating the sync_file. Signed-off-by

[PATCH 2/2] dma-buf/fence-array: hold fences reference when creating an array

2016-10-19 Thread Gustavo Padovan
From: Gustavo Padovan When creating fence arrays we were not holding references to the fences in the array, however when destroy the array we were putting away a reference to these fences. This patch hold the ref for all fences in the array when creating the array. It then removes the code

[PATCH 2/2] dma-buf/fence-array: hold fences reference when creating an array

2016-10-19 Thread Gustavo Padovan
2016-10-19 Christian König : > Am 19.10.2016 um 19:48 schrieb Gustavo Padovan: > > From: Gustavo Padovan > > > > When creating fence arrays we were not holding references to the fences > > in the array, however when destroy the array we were putting away a &g

[PATCH 2/2] dma-buf/fence-array: hold fences reference when creating an array

2016-10-20 Thread Gustavo Padovan
2016-10-20 Christian König : > Am 19.10.2016 um 20:35 schrieb Gustavo Padovan: > > 2016-10-19 Christian König : > > > > > Am 19.10.2016 um 19:48 schrieb Gustavo Padovan: > > > > From: Gustavo Padovan > > > > > > > > When creati

  1   2   3   4   5   6   7   8   9   10   >