[RFC 4/5] dma-buf/fence-array: add fence_array_get_fences()

2016-06-23 Thread Gustavo Padovan
From: Gustavo Padovan This function returns a copy of the array of fences. Signed-off-by: Gustavo Padovan --- drivers/dma-buf/fence-array.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/dma-buf/fence-array.c b/drivers/dma-buf/fence-array.c index 601448a..ce98249

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

2016-06-23 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 behaviour is transparent all sync_f

[RFC 3/5] dma-buf/fence: add .get_fences() ops

2016-06-23 Thread Gustavo Padovan
From: Gustavo Padovan get_fences() should return a copy of all fences in the fence as some fence subclass (such as fence_array) can store more than one fence at time. Signed-off-by: Gustavo Padovan --- drivers/dma-buf/fence.c | 14 ++ include/linux/fence.h | 3 +++ 2 files

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

2016-06-24 Thread Gustavo Padovan
Hi Christian, 2016-06-24 Christian König : > Am 23.06.2016 um 17:29 schrieb Gustavo Padovan: > > From: Gustavo Padovan > > > > Hi all, > > > > This is an attempt to improve fence support on Sync File. The basic idea > > is to have only sync_file->f

Re: [RFC 1/5] dma-buf/fence: add .teardown() ops

2016-06-24 Thread Gustavo Padovan
2016-06-23 Chris Wilson : > On Thu, Jun 23, 2016 at 12:29:46PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > fence_array requires a function to clean up its state before we > > are able to call fence_put() and release it. > > An explanatio

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

2016-06-24 Thread Gustavo Padovan
2016-06-23 Chris Wilson : > On Thu, Jun 23, 2016 at 12:29:50PM -0300, Gustavo Padovan wrote: > > -static void sync_file_add_pt(struct sync_file *sync_file, int *i, > > +static int sync_file_set_fence(struct sync_file *sync_file, > > +

Re: [PATCH 00/18] staging/android: clean up SW_SYNC

2016-06-08 Thread Gustavo Padovan
Hi Greg, Any comment on this? Gustavo 2016-05-31 Gustavo Padovan : > From: Gustavo Padovan > > Hi, > > The following patches do a clean up on the sw_sync inteface. It starts by > removing struct sync_timeline_ops, which was creating unecessary wrappers > in the

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

2016-06-09 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 2/3] dma-buf/sync_file: add sync_file_get_fence()

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

[PATCH 3/3] Documentation: add doc for sync_file_get_fence()

2016-06-09 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 --- Documentation/sync_file.txt | 19 +++ 1 file changed, 19 insertions(+) diff --git a/Documentation/sync_file.txt b/Documentation/sync_file.txt

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

2016-07-07 Thread Gustavo Padovan
Hi Greg, Any comment on this? Thanks, Gustavo 2016-06-20 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. > >

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

2016-07-08 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 v2 2/4] dma-buf/sync_file: rework fence storage in struct file

2016-07-01 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 v2 1/4] dma-buf/fence-array: add fence_is_array()

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

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

2016-07-01 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 --- Documentation/sync_file.txt | 15 +++ 1 file changed, 15 insertions(+) diff --git a/Documentation/sync_file.txt b/Documentation/sync_file.txt index

[PATCH v2 3/4] dma-buf/sync_file: add sync_file_get_fence()

2016-07-01 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 v2 0/4] dma-buf/sync_file: rework fences on struct sync_file

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

[PATCH v3 3/4] dma-buf/sync_file: add sync_file_get_fence()

2016-07-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 v3 1/4] dma-buf/fence-array: add fence_is_array()

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

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

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

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

2016-07-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 v3 4/4] Documentation: add doc for sync_file_get_fence()

2016-07-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 --- Documentation/sync_file.txt | 15 +++ 1 file changed, 15 insertions(+) diff --git a/Documentation/sync_file.txt b/Documentation/sync_file.txt index

[PATCH 1/6] drm: make drm_vblank_count_and_time() static

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

[PATCH 2/6] drm/armada: use drm_crtc_handle_vblank()

2016-07-04 Thread Gustavo Padovan
From: Gustavo Padovan Remove legacy usage of drm_handle_vblank() Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/armada/armada_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/armada/armada_crtc.c b/drivers/gpu/drm/armada/armada_crtc.c index

[PATCH 4/6] drm/nouveau: use drm_crtc_handle_vblank()

2016-07-04 Thread Gustavo Padovan
From: Gustavo Padovan Remove legacy usage of drm_handle_vblank() Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/nouveau/nouveau_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau

[PATCH 6/6] drm/tilcdc: use drm_crtc_handle_vblank()

2016-07-04 Thread Gustavo Padovan
From: Gustavo Padovan Remove legacy usage of drm_handle_vblank() Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c index

[PATCH 3/6] drm/atmel: use drm_crtc_handle_vblank()

2016-07-04 Thread Gustavo Padovan
From: Gustavo Padovan Remove legacy usage of drm_handle_vblank() 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 b/drivers/gpu/drm/atmel-hlcdc

[PATCH 5/6] drm/rcar-du: use drm_crtc_handle_vblank()

2016-07-04 Thread Gustavo Padovan
From: Gustavo Padovan Remove legacy usage of drm_handle_vblank() Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c index

Re: [PATCH] Documentation: Fix some grammar mistakes in sync_file.txt

2016-05-31 Thread Gustavo Padovan
to notify, through fence_signal(), > +the driver creates an out-fence to be able to notify, through fence_signal(), > when it has finished using (or processing) that buffer. Out-fences are fences > that the driver creates. Thanks, Javier! Reviewed-by: Gustavo Padovan Gustavo

Re: [PATCH 02/11] dma-buf/fence: add fence_array fences v6

2016-06-01 Thread Gustavo Padovan
Hi Christian, 2016-06-01 Christian König : > 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

Re: [PATCH 01/11] dma-buf/fence: make fence context 64 bit v2

2016-06-01 Thread Gustavo Padovan
| 13 +++------ > 10 files changed, 21 insertions(+), 18 deletions(-) Reviewed-by: Gustavo Padovan Gustavo

Re: [PATCH 02/11] dma-buf/fence: add fence_array fences v6

2016-06-01 Thread Gustavo Padovan
2016-06-01 Christian König : > 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 w

Re: [PATCH 03/11] dma-buf/fence: add signal_on_any to the fence array v2

2016-06-01 Thread Gustavo Padovan
> > Signed-off-by: Christian König > --- > drivers/dma-buf/fence-array.c | 33 + > include/linux/fence-array.h | 3 ++- > 2 files changed, 27 insertions(+), 9 deletions(-) Reviewed-by: Gustavo Padovan Gustavo

[PATCH 1/2] MAINTAINERS: add entry for the Sync File Framework

2016-05-31 Thread Gustavo Padovan
From: Gustavo Padovan Add Gustavo as maintainer for the Sync File Framework. Sumit is co-maintainer as he maintains drivers/dma-buf/. It also uses Sumit's tree as base. Signed-off-by: Gustavo Padovan Acked-by: Sumit Semwal Acked-by: Maarten Lankhorst --- MAINTAINERS | 11 +++ 1

[PATCH 2/2] dma-buf/sync_file: improve Kconfig description for Sync Files

2016-05-31 Thread Gustavo Padovan
From: Gustavo Padovan We've got a complaint saying that the description was quite obtuse and indeed it was. This patch tries to improve it. Cc: Dave Jones Signed-off-by: Gustavo Padovan --- drivers/dma-buf/Kconfig | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-)

[PATCH 01/18] staging/android: store last signaled value on sync timeline

2016-05-31 Thread Gustavo Padovan
From: Gustavo Padovan Now fence timeline is aware of the last signaled fence, as it receives the increment to the current value in sync_timeline_signal(). That allow us to remove .has_signaled() from timeline_ops as we can directly compare using timeline->value and fence->seqno in

[PATCH 00/18] staging/android: clean up SW_SYNC

2016-05-31 Thread Gustavo Padovan
From: Gustavo Padovan Hi, The following patches do a clean up on the sw_sync inteface. It starts by removing struct sync_timeline_ops, which was creating unecessary wrappers in the code and the start to organize the sync_timeline and sw_sync code better. sw_sync interface was moved to

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

2016-05-31 Thread Gustavo Padovan
From: Gustavo Padovan Now that the value of fence and the timeline are not stored by sw_sync anymore we can remove this extra abstraction to retrieve this data. This patch changes both fence_ops (.fence_value_str and .timeline_value_str) to return the str directly. It also clean up struct

[PATCH 06/18] staging/android: rename android_fence to timeline_fence

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

[PATCH 08/18] staging/android: remove size arg of sync_timeline_create()

2016-05-31 Thread Gustavo Padovan
From: Gustavo Padovan After we removed sw_sync_timeline this arg has not been really used by anyone, all its users pass the size of struct sync_timeline there. So simplify this function but not requiring the size anymore. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c

[PATCH 05/18] staging/android: remove sw_sync.[ch] files

2016-05-31 Thread Gustavo Padovan
From: Gustavo Padovan We can glue the sw_sync file operations directly on the sync framework without the need to pass through sw_sync wrappers. It only builds sw_sync debugfs file support if CONFIG_SW_SYNC is enabled. Signed-off-by: Gustavo Padovan --- drivers/staging/android/Makefile

[PATCH 03/18] staging/android: remove struct sync_timeline_ops

2016-05-31 Thread Gustavo Padovan
From: Gustavo Padovan Move drv_name, the last field of sync_timeline_ops, to sync_timeline and remove sync_timeline_ops. struct sync_timeline_ops was just an extra abstraction on top of fence_ops, and in the last few commits we removed all it ops in favor of cleaner fence_ops. Signed-off-by

[PATCH 09/18] staging/android: bring struct sync_pt back

2016-05-31 Thread Gustavo Padovan
From: Gustavo Padovan Move the list_head members from sync_pt to struct fence was a mistake, they will not be used by struct fence as planned before, so here we create sync_pt again to bring the list heads back. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 40

[PATCH 04/18] staging/android: remove sw_sync_timeline and sw_sync_pt

2016-05-31 Thread Gustavo Padovan
From: Gustavo Padovan As we moved value storage to sync_timeline and fence those two structs became useless and can be removed now. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sw_sync.c| 24 +++- drivers/staging/android/sw_sync.h| 24

[PATCH 07/18] staging/android: remove unnecessary check for fence

2016-05-31 Thread Gustavo Padovan
From: Gustavo Padovan When we call sync_print_fence() fence is always valid. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync_debug.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/android/sync_debug.c b/drivers/staging/android

[PATCH 15/18] staging/android: remove sync_timeline_destroy()

2016-05-31 Thread Gustavo Padovan
From: Gustavo Padovan This function was just used by the file release function, so we just fold its content there and remove sync_timeline_destroy(). Signed-off-by: Gustavo Padovan --- drivers/staging/android/sw_sync.c | 19 +++ 1 file changed, 3 insertions(+), 16 deletions

[PATCH 11/18] staging/android: clean up #includes in the sync framework

2016-05-31 Thread Gustavo Padovan
From: Gustavo Padovan Most of the includes there are not necessary anymore. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 6 -- drivers/staging/android/sync.h | 3 --- drivers/staging/android/sync_debug.c | 16 3 files changed, 25

[PATCH 12/18] staging/android: make sync_timeline internal to sw_sync

2016-05-31 Thread Gustavo Padovan
From: Gustavo Padovan The only use sync_timeline will have in upstream kernel is for debugging through the SW_SYNC interface. So make it internal to SW_SYNC to avoid people use it in the future. Signed-off-by: Gustavo Padovan --- drivers/staging/android/Kconfig | 16 +-- drivers/staging

[PATCH 16/18] staging/android: remove drv_name from sync_timeline

2016-05-31 Thread Gustavo Padovan
From: Gustavo Padovan As it is internal to sw_sync now this value will always be "sw_sync". Signed-off-by: Gustavo Padovan --- drivers/staging/android/sw_sync.c| 11 +++ drivers/staging/android/sync.h | 2 -- drivers/staging/android/sync_debug.c | 2 +- 3 files

[PATCH 10/18] staging/android: move sw_sync related code to sw_sync.c

2016-05-31 Thread Gustavo Padovan
From: Gustavo Padovan Split sync_debug and sw_sync in two different files. Signed-off-by: Gustavo Padovan --- drivers/staging/android/Makefile | 1 + drivers/staging/android/sw_sync.c| 136 +++ drivers/staging/android/sync.h | 2 + drivers

[PATCH 13/18] staging/android: make sw_ioctl info internal to sw_sync.c

2016-05-31 Thread Gustavo Padovan
From: Gustavo Padovan We don't want to export this from the kernel. This is interface is only for testing and debug. So testers shall copy the ioctl info in their own projects. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sw_sync.c | 13 - drivers/st

[PATCH 18/18] staging/android: add DEBUG_FS dependence on Kconfig

2016-05-31 Thread Gustavo Padovan
From: Gustavo Padovan SW_SYNC only works with DEBUG_FS so state it in the Kconfig file. Signed-off-by: Gustavo Padovan --- drivers/staging/android/Kconfig | 1 + drivers/staging/android/sync_debug.c | 4 drivers/staging/android/sync_debug.h | 4 +--- 3 files changed, 2 insertions

[PATCH 14/18] staging/android: remove 'destroyed' member from struct sync_timeline

2016-05-31 Thread Gustavo Padovan
From: Gustavo Padovan 'destroyed' was set but not used ny anyone. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sw_sync.c | 5 - drivers/staging/android/sync.h| 5 + 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/staging/android/sw

[PATCH 17/18] staging/android: rename sync.h to sync_debug.h

2016-05-31 Thread Gustavo Padovan
From: Gustavo Padovan This header file only contains information for debugging and SW_SYNC, so rename it to sync_debug.h instead of having a more generic name. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sw_sync.c| 2 +- drivers/staging/android/sync_debug.c

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 chan

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 in

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 - > drivers/gpu/drm/arm/malidp_m

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 chan

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

[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

[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(-) di

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

2016-10-28 Thread Gustavo Padovan
2016-10-28 Daniel Vetter : > On Thu, Oct 27, 2016 at 05:37:09PM -0200, 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

[PATCH v7 1/3] drm/fence: add in-fences support

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

[PATCH v7 0/3] drm: add explict fencing

2016-11-07 Thread Gustavo Padovan
From: Gustavo Padovan Hi, This is yet another version of the DRM fences patches. Please refer to the cover letter[1] in a previous version to check for more details. In v7 we now have split most of the out_fences code into prepare_crtc_signaling() and unprepare_crtc_signaling() with improved

[PATCH v7 2/3] drm/fence: add fence timeline to drm_crtc

2016-11-07 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 v7 3/3] drm/fence: add out-fences support

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

Re: [PATCH v7 3/3] drm/fence: add out-fences support

2016-11-08 Thread Gustavo Padovan
2016-11-08 Daniel Vetter : > On Tue, Nov 08, 2016 at 03:54:50PM +0900, 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. > > > > W

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

2016-11-16 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 v11 3/3] drm/fence: add out-fences support

2016-11-14 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 v11 1/3] drm/fence: add in-fences support

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

[PATCH v11 0/3] drm: add explicit fencing

2016-11-14 Thread Gustavo Padovan
From: Gustavo Padovan Hi, Hopefully the last version of the patches with the two comments from Brian in the previous version addressed. Robert Foss managed to port Android's drm_hwcomposer to the new HWC2 API and added support to fences. Current patches can be seen here:

[PATCH v11 2/3] drm/fence: add fence timeline to drm_crtc

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

Re: [PATCH v11 2/3] drm/fence: add fence timeline to drm_crtc

2016-11-15 Thread Gustavo Padovan
2016-11-15 Chris Wilson : > On Tue, Nov 15, 2016 at 10:57:35AM +0900, Gustavo Padovan wrote: > > diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h > > index 11780a9..0870de1 100644 > > --- a/include/drm/drm_crtc.h > > +++ b/include/drm/drm_crtc.h > >

[PATCH v12 1/3] drm/fence: add in-fences support

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

[PATCH v12 0/3] drm: add explicit fencing

2016-11-15 Thread Gustavo Padovan
From: Gustavo Padovan Hi, Yet another iteration, v12 now after working on the changes proposed by Chris Wilson. Robert Foss managed to port Android's drm_hwcomposer to the new HWC2 API and added support to fences. Current patches can be seen here: https://git.collabora.com/cgit

[PATCH v12 2/3] drm/fence: add fence timeline to drm_crtc

2016-11-15 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 v12 3/3] drm/fence: add out-fences support

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

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 main

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
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 > > > > Support DRM o

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

[PATCH v8 2/3] drm/fence: add fence timeline to drm_crtc

2016-11-10 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 v8 1/3] drm/fence: add in-fences support

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

[PATCH v8 0/3] drm: add explict fencing

2016-11-10 Thread Gustavo Padovan
From: Gustavo Padovan Hi, New version of the DRM fences patches with all comments on v7 adressed. Please refer to the cover letter[1] in a previous version to check for more details. The changes since the last version can be seen in commit message on each patch. Robert Foss managed to port

[PATCH v8 3/3] drm/fence: add out-fences support

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

Re: [PATCH v8 3/3] drm/fence: add out-fences support

2016-11-11 Thread Gustavo Padovan
Hi Brian, 2016-11-11 Brian Starkey : > Hi Gustavo, > > On Fri, Nov 11, 2016 at 02:16:09PM +0900, 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_

Re: [PATCH v8 0/3] drm: add explict fencing

2016-11-11 Thread Gustavo Padovan
Subject was supposed to be v9! sorry about that. 2016-11-11 Gustavo Padovan : > From: Gustavo Padovan > > Hi, > > Another iteration after Brian comments. Please refer to the cover letter[1] in > a previous version to check for more details. > > The changes since the

[PATCH v8 1/3] drm/fence: add in-fences support

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

[PATCH v8 2/3] drm/fence: add fence timeline to drm_crtc

2016-11-11 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 v8 0/3] drm: add explict fencing

2016-11-11 Thread Gustavo Padovan
From: Gustavo Padovan Hi, Another iteration after Brian comments. Please refer to the cover letter[1] in a previous version to check for more details. The changes since the last version can be seen in commit message on each patch. Robert Foss managed to port Android's drm_hwcomposer t

[PATCH v8 3/3] drm/fence: add out-fences support

2016-11-11 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 v10 1/3] drm/fence: add in-fences support

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

[PATCH v10 2/3] drm/fence: add fence timeline to drm_crtc

2016-11-13 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 v10 3/3] drm/fence: add out-fences support

2016-11-13 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 v10 0/3] drm: add explicit fencing

2016-11-13 Thread Gustavo Padovan
From: Gustavo Padovan Hi, Another iteration after comments on v8 and v9. Please refer to the cover letter[1] in a previous version to check for more details. The only changes in this series are in patch 3/3, see commit message for details. Robert Foss managed to port Android's drm_hwcom

<    1   2   3   4   5   6   7   8   9   >