[PATCH 01/17] drm/ttm: add interruptible parameter to ttm_eu_reserve_buffers

2014-07-09 Thread Maarten Lankhorst
It seems some drivers really want this as a parameter, like vmwgfx. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/qxl/qxl_release.c|2 +- drivers/gpu/drm/radeon/radeon_object.c |2 +- drivers/gpu/drm/radeon/radeon_uvd.c |2 +- drivers/gpu/drm/radeon/radeon_vm.c

[PATCH 10/17] drm/qxl: rework to new fence interface

2014-07-09 Thread Maarten Lankhorst
Final driver! \o/ This is not a proper dma_fence because the hardware may never signal anything, so don't use dma-buf with qxl, ever. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/qxl/Makefile |2 drivers/gpu/drm/qxl/qxl_cmd.c |5 - drivers/gpu/drm/qxl/qxl_debugfs.c

[PATCH 17/17] drm/ttm: use rcu in core ttm

2014-07-09 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/ttm/ttm_bo.c | 76 +++--- 1 file changed, 13 insertions(+), 63 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 31c4a6dd722d..6fe1f4bf37ed 100644 --- a/drivers

[PATCH 16/17] drm/vmwgfx: use rcu in vmw_user_dmabuf_synccpu_grab

2014-07-09 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c index 20a1a866ceeb..79e950df3018 100644

[PATCH 14/17] drm/nouveau: use rcu in nouveau_gem_ioctl_cpu_prep

2014-07-09 Thread Maarten Lankhorst
With the conversion to the reservation api this should be safe. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/nouveau/nouveau_gem.c | 28 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu

[PATCH 15/17] drm/radeon: use rcu waits in some ioctls

2014-07-09 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/radeon/radeon_gem.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c index d09650c1d720..7ba883843668 100644 --- a/drivers/gpu

[PATCH 12/17] drm/vmwgfx: rework to new fence interface

2014-07-09 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c |2 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c| 299 ++ drivers/gpu/drm/vmwgfx/vmwgfx_fence.h| 29 ++- drivers/gpu/drm/vmwgfx/vmwgfx_resource.c |9 - 4 files changed, 200

[PATCH 13/17] drm/ttm: flip the switch, and convert to dma_fence

2014-07-09 Thread Maarten Lankhorst
--- drivers/gpu/drm/nouveau/nouveau_bo.c | 48 +--- drivers/gpu/drm/nouveau/nouveau_fence.c | 24 +--- drivers/gpu/drm/nouveau/nouveau_fence.h |2 drivers/gpu/drm/nouveau/nouveau_gem.c| 16 ++- drivers/gpu/drm/qxl/qxl_debugfs.c|6 +

[PATCH 07/17] drm/nouveau: rework to new fence interface

2014-07-09 Thread Maarten Lankhorst
From: Maarten Lankhorst Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/nouveau/core/core/event.c |4 drivers/gpu/drm/nouveau/nouveau_bo.c |6 drivers/gpu/drm/nouveau/nouveau_display.c |4 drivers/gpu/drm/nouveau/nouveau_fence.c | 435

[PATCH 05/17] drm/ttm: call ttm_bo_wait while inside a reservation

2014-07-09 Thread Maarten Lankhorst
This is the last remaining function that doesn't use the reservation lock completely to fence off access to a buffer. --- drivers/gpu/drm/ttm/ttm_bo.c | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c

[PATCH 08/17] drm/radeon: add timeout argument to radeon_fence_wait_seq

2014-07-09 Thread Maarten Lankhorst
This makes it possible to wait for a specific amount of time, rather than wait until infinity. Signed-off-by: Maarten Lankhorst Reviewed-by: Christian König --- drivers/gpu/drm/radeon/radeon_fence.c | 60 ++--- 1 file changed, 40 insertions(+), 20 deletions

[PATCH 11/17] drm/vmwgfx: get rid of different types of fence_flags entirely

2014-07-09 Thread Maarten Lankhorst
Only one type was ever used. This is needed to simplify the fence support in the next commit. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c |5 +-- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h |1 - drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 14

[PATCH 04/17] drm/nouveau: require reservations for nouveau_fence_sync and nouveau_bo_fence

2014-07-09 Thread Maarten Lankhorst
This will ensure we always hold the required lock when calling those functions. --- drivers/gpu/drm/nouveau/nouveau_bo.c |2 ++ drivers/gpu/drm/nouveau/nouveau_display.c | 17 + 2 files changed, 15 insertions(+), 4 deletions(-) diff --git

[PATCH 09/17] drm/radeon: use common fence implementation for fences

2014-07-09 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/radeon/radeon.h| 15 +- drivers/gpu/drm/radeon/radeon_device.c | 60 - drivers/gpu/drm/radeon/radeon_fence.c | 223 ++-- 3 files changed, 248 insertions(+), 50 deletions(-) diff --git

[PATCH 06/17] drm/ttm: kill fence_lock

2014-07-09 Thread Maarten Lankhorst
No users are left, kill it off! :D Conversion to the reservation api is next on the list, after that the functionality can be restored with rcu. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/nouveau/nouveau_bo.c | 25 +++--- drivers/gpu/drm/nouveau/nouveau_display.c |6

[PATCH 03/17] drm/nouveau: add reservation to nouveau_gem_ioctl_cpu_prep

2014-07-09 Thread Maarten Lankhorst
Apart from some code inside ttm itself and nouveau_bo_vma_del, this is the only place where ttm_bo_wait is used without a reservation. Fix this so we can remove the fence_lock later on. After the switch to rcu the reservation lock will be removed again. Signed-off-by: Maarten Lankhorst

[PATCH 02/17] drm/ttm: kill off some members to ttm_validate_buffer

2014-07-09 Thread Maarten Lankhorst
This reorders the list to keep track of what buffers are reserved, so previous members are always unreserved. This gets rid of some bookkeeping that's no longer needed, while simplifying the code some. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/qxl/qxl_release.c |1

[PATCH 00/17] Convert TTM to the new fence interface.

2014-07-09 Thread Maarten Lankhorst
available instead, and the extra reservations can be dropped again. :-) I've done at least basic testing on all the drivers I've converted at some point, but more testing is definitely welcomed! --- Maarten Lankhorst (17): drm/ttm: add interruptible parameter to ttm_eu_reserve_buffers

[PATCH 00/17] Convert TTM to the new fence interface.

2014-07-09 Thread Maarten Lankhorst
available instead, and the extra reservations can be dropped again. :-) I've done at least basic testing on all the drivers I've converted at some point, but more testing is definitely welcomed! --- Maarten Lankhorst (17): drm/ttm: add interruptible parameter to ttm_eu_reserve_buffers

[PATCH 02/17] drm/ttm: kill off some members to ttm_validate_buffer

2014-07-09 Thread Maarten Lankhorst
This reorders the list to keep track of what buffers are reserved, so previous members are always unreserved. This gets rid of some bookkeeping that's no longer needed, while simplifying the code some. Signed-off-by: Maarten Lankhorst maarten.lankho...@canonical.com --- drivers/gpu/drm/qxl

[PATCH 03/17] drm/nouveau: add reservation to nouveau_gem_ioctl_cpu_prep

2014-07-09 Thread Maarten Lankhorst
Apart from some code inside ttm itself and nouveau_bo_vma_del, this is the only place where ttm_bo_wait is used without a reservation. Fix this so we can remove the fence_lock later on. After the switch to rcu the reservation lock will be removed again. Signed-off-by: Maarten Lankhorst

[PATCH 06/17] drm/ttm: kill fence_lock

2014-07-09 Thread Maarten Lankhorst
No users are left, kill it off! :D Conversion to the reservation api is next on the list, after that the functionality can be restored with rcu. Signed-off-by: Maarten Lankhorst maarten.lankho...@canonical.com --- drivers/gpu/drm/nouveau/nouveau_bo.c | 25 +++--- drivers/gpu/drm

[PATCH 05/17] drm/ttm: call ttm_bo_wait while inside a reservation

2014-07-09 Thread Maarten Lankhorst
This is the last remaining function that doesn't use the reservation lock completely to fence off access to a buffer. --- drivers/gpu/drm/ttm/ttm_bo.c | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c

[PATCH 08/17] drm/radeon: add timeout argument to radeon_fence_wait_seq

2014-07-09 Thread Maarten Lankhorst
This makes it possible to wait for a specific amount of time, rather than wait until infinity. Signed-off-by: Maarten Lankhorst maarten.lankho...@canonical.com Reviewed-by: Christian König deathsim...@vodafone.de --- drivers/gpu/drm/radeon/radeon_fence.c | 60

[PATCH 11/17] drm/vmwgfx: get rid of different types of fence_flags entirely

2014-07-09 Thread Maarten Lankhorst
Only one type was ever used. This is needed to simplify the fence support in the next commit. Signed-off-by: Maarten Lankhorst maarten.lankho...@canonical.com --- drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c |5 +-- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h |1 - drivers/gpu/drm/vmwgfx

[PATCH 04/17] drm/nouveau: require reservations for nouveau_fence_sync and nouveau_bo_fence

2014-07-09 Thread Maarten Lankhorst
This will ensure we always hold the required lock when calling those functions. --- drivers/gpu/drm/nouveau/nouveau_bo.c |2 ++ drivers/gpu/drm/nouveau/nouveau_display.c | 17 + 2 files changed, 15 insertions(+), 4 deletions(-) diff --git

[PATCH 09/17] drm/radeon: use common fence implementation for fences

2014-07-09 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst maarten.lankho...@canonical.com --- drivers/gpu/drm/radeon/radeon.h| 15 +- drivers/gpu/drm/radeon/radeon_device.c | 60 - drivers/gpu/drm/radeon/radeon_fence.c | 223 ++-- 3 files changed, 248 insertions(+), 50

[PATCH 07/17] drm/nouveau: rework to new fence interface

2014-07-09 Thread Maarten Lankhorst
From: Maarten Lankhorst maarten.lankho...@ubuntu.com Signed-off-by: Maarten Lankhorst maarten.lankho...@canonical.com --- drivers/gpu/drm/nouveau/core/core/event.c |4 drivers/gpu/drm/nouveau/nouveau_bo.c |6 drivers/gpu/drm/nouveau/nouveau_display.c |4 drivers/gpu/drm

[PATCH 13/17] drm/ttm: flip the switch, and convert to dma_fence

2014-07-09 Thread Maarten Lankhorst
--- drivers/gpu/drm/nouveau/nouveau_bo.c | 48 +--- drivers/gpu/drm/nouveau/nouveau_fence.c | 24 +--- drivers/gpu/drm/nouveau/nouveau_fence.h |2 drivers/gpu/drm/nouveau/nouveau_gem.c| 16 ++- drivers/gpu/drm/qxl/qxl_debugfs.c|6 +

[PATCH 17/17] drm/ttm: use rcu in core ttm

2014-07-09 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst maarten.lankho...@canonical.com --- drivers/gpu/drm/ttm/ttm_bo.c | 76 +++--- 1 file changed, 13 insertions(+), 63 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 31c4a6dd722d

[PATCH 16/17] drm/vmwgfx: use rcu in vmw_user_dmabuf_synccpu_grab

2014-07-09 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst maarten.lankho...@canonical.com --- drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c index

[PATCH 14/17] drm/nouveau: use rcu in nouveau_gem_ioctl_cpu_prep

2014-07-09 Thread Maarten Lankhorst
With the conversion to the reservation api this should be safe. Signed-off-by: Maarten Lankhorst maarten.lankho...@canonical.com --- drivers/gpu/drm/nouveau/nouveau_gem.c | 28 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/nouveau

[PATCH 15/17] drm/radeon: use rcu waits in some ioctls

2014-07-09 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst maarten.lankho...@canonical.com --- drivers/gpu/drm/radeon/radeon_gem.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c index d09650c1d720

[PATCH 12/17] drm/vmwgfx: rework to new fence interface

2014-07-09 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst maarten.lankho...@canonical.com --- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c |2 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c| 299 ++ drivers/gpu/drm/vmwgfx/vmwgfx_fence.h| 29 ++- drivers/gpu/drm/vmwgfx/vmwgfx_resource.c

[PATCH 01/17] drm/ttm: add interruptible parameter to ttm_eu_reserve_buffers

2014-07-09 Thread Maarten Lankhorst
It seems some drivers really want this as a parameter, like vmwgfx. Signed-off-by: Maarten Lankhorst maarten.lankho...@canonical.com --- drivers/gpu/drm/qxl/qxl_release.c|2 +- drivers/gpu/drm/radeon/radeon_object.c |2 +- drivers/gpu/drm/radeon/radeon_uvd.c |2

[PATCH 10/17] drm/qxl: rework to new fence interface

2014-07-09 Thread Maarten Lankhorst
Final driver! \o/ This is not a proper dma_fence because the hardware may never signal anything, so don't use dma-buf with qxl, ever. Signed-off-by: Maarten Lankhorst maarten.lankho...@canonical.com --- drivers/gpu/drm/qxl/Makefile |2 drivers/gpu/drm/qxl/qxl_cmd.c |5

Re: [PATCH 00/17] Convert TTM to the new fence interface.

2014-07-09 Thread Maarten Lankhorst
op 09-07-14 15:09, Mike Lothian schreef: Hi Maarten Will this stop the stuttering I've been seeing with DRI3 and PRIME? Or will other patches / plumbing be required No, that testing was with the whole series including the parts where you synchronized intel with radeon (iirc). Although it

[PATCH v2 09/17] drm/radeon: use common fence implementation for fences

2014-07-09 Thread Maarten Lankhorst
. Probably want to add the case for those here too. Alex Indeed, how about this? --8--- Signed-off-by: Maarten Lankhorst maarten.lankho...@canonical.com --- drivers/gpu/drm/radeon/radeon.h| 15 +-- drivers/gpu/drm/radeon/radeon_device.c | 60 - drivers/gpu/drm

Re: [PATCH v2 0/9] Updated fence patch series

2014-07-02 Thread Maarten Lankhorst
op 02-07-14 07:37, Greg KH schreef: > On Tue, Jul 01, 2014 at 12:57:02PM +0200, Maarten Lankhorst wrote: >> So after some more hacking I've moved dma-buf to its own subdirectory, >> drivers/dma-buf and applied the fence patches to its new place. I believe >> that the

Re: [PATCH v2 0/9] Updated fence patch series

2014-07-02 Thread Maarten Lankhorst
op 02-07-14 07:37, Greg KH schreef: On Tue, Jul 01, 2014 at 12:57:02PM +0200, Maarten Lankhorst wrote: So after some more hacking I've moved dma-buf to its own subdirectory, drivers/dma-buf and applied the fence patches to its new place. I believe that the first patch should be applied

Re: [PATCH v2 1/9] dma-buf: move to drivers/dma-buf

2014-07-01 Thread Maarten Lankhorst
op 01-07-14 13:06, Arend van Spriel schreef: > On 01-07-14 12:57, Maarten Lankhorst wrote: >> Signed-off-by: Maarten Lankhorst > It would help to use '-M' option with format-patch for this kind of rework. > > Regards, > Arend > Thanks, was looking for some option b

[PATCH v2 2/9] fence: dma-buf cross-device synchronization (v18)

2014-07-01 Thread Maarten Lankhorst
nkorst we decided that we need to be able to attach one fence to N dma-buf's, so using the list_head in dma-fence struct would be problematic. v5: [ Maarten Lankhorst ] Updated for dma-bikeshed-fence and dma-buf-manager. v6: [ Maarten Lankhorst ] I removed dma_fence_cancel_callback and so

[PATCH v2 9/9] reservation: add suppport for read-only access using rcu

2014-07-01 Thread Maarten Lankhorst
is needed, rcu_dereference followed by fence_get_rcu can be used, if the shared fences are needed it's recommended to use the supplied functions. Signed-off-by: Maarten Lankhorst Reviewed-By: Thomas Hellstrom --- drivers/dma-buf/dma-buf.c | 47 -- drivers/dma-buf/fence.c |2

[PATCH v2 4/9] dma-buf: use reservation objects

2014-07-01 Thread Maarten Lankhorst
This allows reservation objects to be used in dma-buf. it's required for implementing polling support on the fences that belong to a dma-buf. Signed-off-by: Maarten Lankhorst Acked-by: Mauro Carvalho Chehab #drivers/media/v4l2-core/ Acked-by: Thomas Hellstrom #drivers/gpu/drm/ttm Signed-off

[PATCH v2 8/9] reservation: update api and add some helpers

2014-07-01 Thread Maarten Lankhorst
. reservation_object_add_shared_fence() and reservation_object_add_excl_fence() are used to assign a new fence to a reservation_object pointer, to complete a reservation. Signed-off-by: Maarten Lankhorst Changes since v1: - Add reservation_object_get_excl, reorder code a bit. --- Documentation/DocBook/device-drivers.tmpl |1

[PATCH v2 6/9] reservation: add support for fences to enable cross-device synchronisation

2014-07-01 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst Reviewed-by: Rob Clark --- include/linux/reservation.h | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/include/linux/reservation.h b/include/linux/reservation.h index 813dae960ebd..f3f57460a205 100644 --- a/include

[PATCH v2 7/9] dma-buf: add poll support, v3

2014-07-01 Thread Maarten Lankhorst
Thanks to Fengguang Wu for spotting a missing static cast. v2: - Kill unused variable need_shared. v3: - Clarify the BUG() in dma_buf_release some more. (Rob Clark) Signed-off-by: Maarten Lankhorst --- drivers/dma-buf/dma-buf.c | 108 + include

[PATCH v2 0/9] Updated fence patch series

2014-07-01 Thread Maarten Lankhorst
el it should stay in staging, for now. --- Maarten Lankhorst (9): dma-buf: move to drivers/dma-buf fence: dma-buf cross-device synchronization (v18) seqno-fence: Hardware dma-buf implementation of fencing (v6) dma-buf: use reservation objects android: convert sync to f

[PATCH v2 1/9] dma-buf: move to drivers/dma-buf

2014-07-01 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst --- Documentation/DocBook/device-drivers.tmpl |3 MAINTAINERS |4 drivers/Makefile |1 drivers/base/Makefile |1 drivers/base/dma-buf.c| 743

[PATCH v2 3/9] seqno-fence: Hardware dma-buf implementation of fencing (v6)

2014-07-01 Thread Maarten Lankhorst
Add spinlock pointer to seqno_fence_init v5: Add condition member to allow wait for != 0. Fix small style errors pointed out by checkpatch. v6: Move to a separate file. Fix up api changes in fences. Signed-off-by: Maarten Lankhorst Reviewed-by: Rob Clark #v4 --- Documentation/DocBook/dev

[PATCH v2 5/9] android: convert sync to fence api, v6

2014-07-01 Thread Maarten Lankhorst
in sync_fence_free if not all fences have fired. v3: - Merge Colin Cross' bugfixes, and the android fence merge optimization. v4: - Merge with the upstream fixes. v5: - Fix small style issues pointed out by Thomas Hellstrom. v6: - Fix for updates to fence api. Signed-off-by: Maarten Lankhorst Acked

[PATCH v2 3/9] seqno-fence: Hardware dma-buf implementation of fencing (v6)

2014-07-01 Thread Maarten Lankhorst
spinlock pointer to seqno_fence_init v5: Add condition member to allow wait for != 0. Fix small style errors pointed out by checkpatch. v6: Move to a separate file. Fix up api changes in fences. Signed-off-by: Maarten Lankhorst maarten.lankho...@canonical.com Reviewed-by: Rob Clark robdcl

[PATCH v2 5/9] android: convert sync to fence api, v6

2014-07-01 Thread Maarten Lankhorst
in sync_fence_free if not all fences have fired. v3: - Merge Colin Cross' bugfixes, and the android fence merge optimization. v4: - Merge with the upstream fixes. v5: - Fix small style issues pointed out by Thomas Hellstrom. v6: - Fix for updates to fence api. Signed-off-by: Maarten Lankhorst

[PATCH v2 1/9] dma-buf: move to drivers/dma-buf

2014-07-01 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst maarten.lankho...@canonical.com --- Documentation/DocBook/device-drivers.tmpl |3 MAINTAINERS |4 drivers/Makefile |1 drivers/base/Makefile |1 drivers/base/dma-buf.c

[PATCH v2 7/9] dma-buf: add poll support, v3

2014-07-01 Thread Maarten Lankhorst
Thanks to Fengguang Wu for spotting a missing static cast. v2: - Kill unused variable need_shared. v3: - Clarify the BUG() in dma_buf_release some more. (Rob Clark) Signed-off-by: Maarten Lankhorst maarten.lankho...@canonical.com --- drivers/dma-buf/dma-buf.c | 108

[PATCH v2 0/9] Updated fence patch series

2014-07-01 Thread Maarten Lankhorst
in staging, for now. --- Maarten Lankhorst (9): dma-buf: move to drivers/dma-buf fence: dma-buf cross-device synchronization (v18) seqno-fence: Hardware dma-buf implementation of fencing (v6) dma-buf: use reservation objects android: convert sync to fence api, v6

[PATCH v2 6/9] reservation: add support for fences to enable cross-device synchronisation

2014-07-01 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst maarten.lankho...@canonical.com Reviewed-by: Rob Clark robdcl...@gmail.com --- include/linux/reservation.h | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/include/linux/reservation.h b/include/linux/reservation.h index

[PATCH v2 9/9] reservation: add suppport for read-only access using rcu

2014-07-01 Thread Maarten Lankhorst
is needed, rcu_dereference followed by fence_get_rcu can be used, if the shared fences are needed it's recommended to use the supplied functions. Signed-off-by: Maarten Lankhorst maarten.lankho...@canonical.com Reviewed-By: Thomas Hellstrom thellst...@vmware.com --- drivers/dma-buf/dma-buf.c

[PATCH v2 4/9] dma-buf: use reservation objects

2014-07-01 Thread Maarten Lankhorst
This allows reservation objects to be used in dma-buf. it's required for implementing polling support on the fences that belong to a dma-buf. Signed-off-by: Maarten Lankhorst maarten.lankho...@canonical.com Acked-by: Mauro Carvalho Chehab m.che...@samsung.com #drivers/media/v4l2-core/ Acked

[PATCH v2 8/9] reservation: update api and add some helpers

2014-07-01 Thread Maarten Lankhorst
. reservation_object_add_shared_fence() and reservation_object_add_excl_fence() are used to assign a new fence to a reservation_object pointer, to complete a reservation. Signed-off-by: Maarten Lankhorst maarten.lankho...@canonical.com Changes since v1: - Add reservation_object_get_excl, reorder code a bit. --- Documentation

[PATCH v2 2/9] fence: dma-buf cross-device synchronization (v18)

2014-07-01 Thread Maarten Lankhorst
need to be able to attach one fence to N dma-buf's, so using the list_head in dma-fence struct would be problematic. v5: [ Maarten Lankhorst ] Updated for dma-bikeshed-fence and dma-buf-manager. v6: [ Maarten Lankhorst ] I removed dma_fence_cancel_callback and some comments about checking

Re: [PATCH v2 1/9] dma-buf: move to drivers/dma-buf

2014-07-01 Thread Maarten Lankhorst
op 01-07-14 13:06, Arend van Spriel schreef: On 01-07-14 12:57, Maarten Lankhorst wrote: Signed-off-by: Maarten Lankhorst maarten.lankho...@canonical.com It would help to use '-M' option with format-patch for this kind of rework. Regards, Arend Thanks, was looking for some option but didn't

Re: [Nouveau] [PATCH v2 2/3] drm/ttm: introduce dma cache sync helpers

2014-06-24 Thread Maarten Lankhorst
op 24-06-14 14:23, Alexandre Courbot schreef: > On Tue, Jun 24, 2014 at 7:55 PM, Alexandre Courbot > wrote: >> On 06/24/2014 07:33 PM, Alexandre Courbot wrote: >>> On 06/24/2014 07:02 PM, Russell King - ARM Linux wrote: On Tue, Jun 24, 2014 at 06:54:26PM +0900, Alexandre Courbot wrote:

Re: [Nouveau] [PATCH v2 2/3] drm/ttm: introduce dma cache sync helpers

2014-06-24 Thread Maarten Lankhorst
op 24-06-14 14:23, Alexandre Courbot schreef: On Tue, Jun 24, 2014 at 7:55 PM, Alexandre Courbot acour...@nvidia.com wrote: On 06/24/2014 07:33 PM, Alexandre Courbot wrote: On 06/24/2014 07:02 PM, Russell King - ARM Linux wrote: On Tue, Jun 24, 2014 at 06:54:26PM +0900, Alexandre Courbot

Re: [REPOST PATCH 4/8] android: convert sync to fence api, v5

2014-06-23 Thread Maarten Lankhorst
Hey, op 20-06-14 22:52, Thierry Reding schreef: > On Thu, Jun 19, 2014 at 02:28:14PM +0200, Daniel Vetter wrote: >> On Thu, Jun 19, 2014 at 1:48 PM, Thierry Reding >> wrote: > With these changes, can we pull the android sync logic out of > drivers/staging/ now? Afaik the google guys

Re: [REPOST PATCH 4/8] android: convert sync to fence api, v5

2014-06-23 Thread Maarten Lankhorst
Hey, op 20-06-14 22:52, Thierry Reding schreef: On Thu, Jun 19, 2014 at 02:28:14PM +0200, Daniel Vetter wrote: On Thu, Jun 19, 2014 at 1:48 PM, Thierry Reding thierry.red...@gmail.com wrote: With these changes, can we pull the android sync logic out of drivers/staging/ now? Afaik the google

Re: [REPOST PATCH 4/8] android: convert sync to fence api, v5

2014-06-19 Thread Maarten Lankhorst
op 19-06-14 17:22, Colin Cross schreef: > On Wed, Jun 18, 2014 at 11:37 PM, Daniel Vetter wrote: >> On Wed, Jun 18, 2014 at 06:15:56PM -0700, Greg KH wrote: >>> On Wed, Jun 18, 2014 at 12:37:11PM +0200, Maarten Lankhorst wrote: >>>> Just to show it's easy. &g

Re: [REPOST PATCH 4/8] android: convert sync to fence api, v5

2014-06-19 Thread Maarten Lankhorst
op 19-06-14 17:22, Colin Cross schreef: On Wed, Jun 18, 2014 at 11:37 PM, Daniel Vetter dan...@ffwll.ch wrote: On Wed, Jun 18, 2014 at 06:15:56PM -0700, Greg KH wrote: On Wed, Jun 18, 2014 at 12:37:11PM +0200, Maarten Lankhorst wrote: Just to show it's easy. Android syncpoints can be mapped

[REPOST PATCH 1/8] fence: dma-buf cross-device synchronization (v17)

2014-06-18 Thread Maarten Lankhorst
nkorst we decided that we need to be able to attach one fence to N dma-buf's, so using the list_head in dma-fence struct would be problematic. v5: [ Maarten Lankhorst ] Updated for dma-bikeshed-fence and dma-buf-manager. v6: [ Maarten Lankhorst ] I removed dma_fence_cancel_callback and so

[REPOST PATCH 2/8] seqno-fence: Hardware dma-buf implementation of fencing (v5)

2014-06-18 Thread Maarten Lankhorst
Add spinlock pointer to seqno_fence_init v5: Add condition member to allow wait for != 0. Fix small style errors pointed out by checkpatch. Signed-off-by: Maarten Lankhorst Reviewed-by: Rob Clark #v4 --- Documentation/DocBook/device-drivers.tmpl |1 drivers/base/fenc

[REPOST PATCH 5/8] reservation: add support for fences to enable cross-device synchronisation

2014-06-18 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst Reviewed-by: Rob Clark --- include/linux/reservation.h | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/include/linux/reservation.h b/include/linux/reservation.h index 813dae960ebd..f3f57460a205 100644 --- a/include

[REPOST PATCH 7/8] reservation: update api and add some helpers

2014-06-18 Thread Maarten Lankhorst
. reservation_object_add_shared_fence() and reservation_object_add_excl_fence() are used to assign a new fence to a reservation_object pointer, to complete a reservation. Signed-off-by: Maarten Lankhorst Changes since v1: - Add reservation_object_get_excl, reorder code a bit. --- drivers/base/dma-buf.c | 35

[REPOST PATCH 6/8] dma-buf: add poll support, v3

2014-06-18 Thread Maarten Lankhorst
Thanks to Fengguang Wu for spotting a missing static cast. v2: - Kill unused variable need_shared. v3: - Clarify the BUG() in dma_buf_release some more. (Rob Clark) Signed-off-by: Maarten Lankhorst --- drivers/base/dma-buf.c | 108 +++ include

[REPOST PATCH 8/8] reservation: add suppport for read-only access using rcu

2014-06-18 Thread Maarten Lankhorst
. reservation_object_test_signaled_rcu() will test if all fences of the reservation_object are signaled without using the ww_mutex. reservation_object_get_excl() is added because touching the fence_excl member directly will trigger a sparse warning. Signed-off-by: Maarten Lankhorst Reviewed-By: Thomas

[REPOST PATCH 4/8] android: convert sync to fence api, v5

2014-06-18 Thread Maarten Lankhorst
in sync_fence_free if not all fences have fired. v3: - Merge Colin Cross' bugfixes, and the android fence merge optimization. v4: - Merge with the upstream fixes. v5: - Fix small style issues pointed out by Thomas Hellstrom. Signed-off-by: Maarten Lankhorst Acked-by: John Stultz --- drivers/staging

[REPOST PATCH 0/8] fence synchronization patches

2014-06-18 Thread Maarten Lankhorst
ttm, and make dealing with rcu less painful. Patches slightly updated to fix compilation with armada and new atomic primitives, but otherwise identical. --- Maarten Lankhorst (8): fence: dma-buf cross-device synchronization (v17) seqno-fence: Hardware dma-buf implementation of fencing

[REPOST PATCH 3/8] dma-buf: use reservation objects

2014-06-18 Thread Maarten Lankhorst
This allows reservation objects to be used in dma-buf. it's required for implementing polling support on the fences that belong to a dma-buf. Signed-off-by: Maarten Lankhorst Acked-by: Mauro Carvalho Chehab #drivers/media/v4l2-core/ Acked-by: Thomas Hellstrom #drivers/gpu/drm/ttm Signed-off

[REPOST PATCH 4/8] android: convert sync to fence api, v5

2014-06-18 Thread Maarten Lankhorst
in sync_fence_free if not all fences have fired. v3: - Merge Colin Cross' bugfixes, and the android fence merge optimization. v4: - Merge with the upstream fixes. v5: - Fix small style issues pointed out by Thomas Hellstrom. Signed-off-by: Maarten Lankhorst maarten.lankho...@canonical.com Acked-by: John

[REPOST PATCH 0/8] fence synchronization patches

2014-06-18 Thread Maarten Lankhorst
ttm, and make dealing with rcu less painful. Patches slightly updated to fix compilation with armada and new atomic primitives, but otherwise identical. --- Maarten Lankhorst (8): fence: dma-buf cross-device synchronization (v17) seqno-fence: Hardware dma-buf implementation of fencing

[REPOST PATCH 8/8] reservation: add suppport for read-only access using rcu

2014-06-18 Thread Maarten Lankhorst
. reservation_object_test_signaled_rcu() will test if all fences of the reservation_object are signaled without using the ww_mutex. reservation_object_get_excl() is added because touching the fence_excl member directly will trigger a sparse warning. Signed-off-by: Maarten Lankhorst maarten.lankho

[REPOST PATCH 3/8] dma-buf: use reservation objects

2014-06-18 Thread Maarten Lankhorst
This allows reservation objects to be used in dma-buf. it's required for implementing polling support on the fences that belong to a dma-buf. Signed-off-by: Maarten Lankhorst maarten.lankho...@canonical.com Acked-by: Mauro Carvalho Chehab m.che...@samsung.com #drivers/media/v4l2-core/ Acked

[REPOST PATCH 7/8] reservation: update api and add some helpers

2014-06-18 Thread Maarten Lankhorst
. reservation_object_add_shared_fence() and reservation_object_add_excl_fence() are used to assign a new fence to a reservation_object pointer, to complete a reservation. Signed-off-by: Maarten Lankhorst maarten.lankho...@canonical.com Changes since v1: - Add reservation_object_get_excl, reorder code a bit. --- drivers/base/dma

[REPOST PATCH 6/8] dma-buf: add poll support, v3

2014-06-18 Thread Maarten Lankhorst
Thanks to Fengguang Wu for spotting a missing static cast. v2: - Kill unused variable need_shared. v3: - Clarify the BUG() in dma_buf_release some more. (Rob Clark) Signed-off-by: Maarten Lankhorst maarten.lankho...@canonical.com --- drivers/base/dma-buf.c | 108

[REPOST PATCH 5/8] reservation: add support for fences to enable cross-device synchronisation

2014-06-18 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst maarten.lankho...@canonical.com Reviewed-by: Rob Clark robdcl...@gmail.com --- include/linux/reservation.h | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/include/linux/reservation.h b/include/linux/reservation.h index

[REPOST PATCH 2/8] seqno-fence: Hardware dma-buf implementation of fencing (v5)

2014-06-18 Thread Maarten Lankhorst
spinlock pointer to seqno_fence_init v5: Add condition member to allow wait for != 0. Fix small style errors pointed out by checkpatch. Signed-off-by: Maarten Lankhorst maarten.lankho...@canonical.com Reviewed-by: Rob Clark robdcl...@gmail.com #v4 --- Documentation/DocBook/device-drivers.tmpl

[REPOST PATCH 1/8] fence: dma-buf cross-device synchronization (v17)

2014-06-18 Thread Maarten Lankhorst
need to be able to attach one fence to N dma-buf's, so using the list_head in dma-fence struct would be problematic. v5: [ Maarten Lankhorst ] Updated for dma-bikeshed-fence and dma-buf-manager. v6: [ Maarten Lankhorst ] I removed dma_fence_cancel_callback and some comments about checking

Re: [PATCH] fence: Use smp_mb__before_atomic()

2014-06-05 Thread Maarten Lankhorst
op 05-06-14 13:51, Rob Clark schreef: On Wed, Jun 4, 2014 at 1:49 PM, Greg Kroah-Hartman wrote: On Wed, Jun 04, 2014 at 03:28:33PM +0200, Thierry Reding wrote: On Wed, Jun 04, 2014 at 04:57:07PM +0530, Sumit Semwal wrote: Hi Greg, On 30 May 2014 21:38, Greg Kroah-Hartman wrote: On Fri,

Re: [PATCH] fence: Use smp_mb__before_atomic()

2014-06-05 Thread Maarten Lankhorst
op 05-06-14 13:51, Rob Clark schreef: On Wed, Jun 4, 2014 at 1:49 PM, Greg Kroah-Hartman gre...@linuxfoundation.org wrote: On Wed, Jun 04, 2014 at 03:28:33PM +0200, Thierry Reding wrote: On Wed, Jun 04, 2014 at 04:57:07PM +0530, Sumit Semwal wrote: Hi Greg, On 30 May 2014 21:38, Greg

[RFC PATCH v1.4 08/16 1/2] drm/radeon: add timeout argument to radeon_fence_wait_seq

2014-06-03 Thread Maarten Lankhorst
This makes it possible to wait for a specific amount of time, rather than wait until infinity. Signed-off-by: Maarten Lankhorst Reviewed-by: Christian König --- drivers/gpu/drm/radeon/radeon_fence.c | 60 +++ 1 file changed, 40 insertions(+), 20 deletions

[RFC PATCH v1.4 08/16 1/2] drm/radeon: add timeout argument to radeon_fence_wait_seq

2014-06-03 Thread Maarten Lankhorst
This makes it possible to wait for a specific amount of time, rather than wait until infinity. Signed-off-by: Maarten Lankhorst maarten.lankho...@canonical.com Reviewed-by: Christian König deathsim...@vodafone.de --- drivers/gpu/drm/radeon/radeon_fence.c | 60

[RFC PATCH v1.3 08/16 2/2] drm/radeon: use common fence implementation for fences

2014-06-02 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst --- Oops, changed unsigned long in __radeon_fence_wait to long, fixing a subtle bug. drivers/gpu/drm/radeon/radeon.h| 15 +-- drivers/gpu/drm/radeon/radeon_device.c | 60 - drivers/gpu/drm/radeon/radeon_fence.c | 223

[RFC PATCH v1.3 08/16 1/2] drm/radeon: add timeout argument to radeon_fence_wait_seq

2014-06-02 Thread Maarten Lankhorst
This makes it possible to wait for a specific amount of time, rather than wait until infinity. Signed-off-by: Maarten Lankhorst --- Splitted out version, I've noticed that I forgot to convert radeon_fence_wait_empty to long r, fixed. drivers/gpu/drm/radeon/radeon_fence.c | 60

[RFC PATCH v1.2 08/16] drm/radeon: use common fence implementation for fences

2014-06-02 Thread Maarten Lankhorst
Changes since v1: - Fixed interaction with reset handling. + Use exclusive_lock, either with trylock or blocking. + Bump sw irq refcount in the recovery function to prevent fiddling with irq registers during gpu recovery. - Add radeon lockup detection to the default fence wait function.

[RFC PATCH v1.2 08/16] drm/radeon: use common fence implementation for fences

2014-06-02 Thread Maarten Lankhorst
Changes since v1: - Fixed interaction with reset handling. + Use exclusive_lock, either with trylock or blocking. + Bump sw irq refcount in the recovery function to prevent fiddling with irq registers during gpu recovery. - Add radeon lockup detection to the default fence wait function.

[RFC PATCH v1.3 08/16 1/2] drm/radeon: add timeout argument to radeon_fence_wait_seq

2014-06-02 Thread Maarten Lankhorst
This makes it possible to wait for a specific amount of time, rather than wait until infinity. Signed-off-by: Maarten Lankhorst maarten.lankho...@canonical.com --- Splitted out version, I've noticed that I forgot to convert radeon_fence_wait_empty to long r, fixed. drivers/gpu/drm/radeon

[RFC PATCH v1.3 08/16 2/2] drm/radeon: use common fence implementation for fences

2014-06-02 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst maarten.lankho...@canonical.com --- Oops, changed unsigned long in __radeon_fence_wait to long, fixing a subtle bug. drivers/gpu/drm/radeon/radeon.h| 15 +-- drivers/gpu/drm/radeon/radeon_device.c | 60 - drivers/gpu/drm/radeon/radeon_fence.c

Re: [PATCH] fence: Use smp_mb__before_atomic()

2014-05-28 Thread Maarten Lankhorst
-by: Thierry Reding Acked-by: Maarten Lankhorst I saw the patches, but hard to clean up if it's not in the fences tree yet. :-) ~maarten -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo inf

Re: [PATCH] fence: Use smp_mb__before_atomic()

2014-05-28 Thread Maarten Lankhorst
(). Signed-off-by: Thierry Reding tred...@nvidia.com Acked-by: Maarten Lankhorst maarten.lankho...@canonical.com I saw the patches, but hard to clean up if it's not in the fences tree yet. :-) ~maarten -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message

Re: [RFC PATCH 2/2 with seqcount v3] reservation: add suppport for read-only access using rcu

2014-05-20 Thread Maarten Lankhorst
op 20-05-14 17:13, Thomas Hellstrom schreef: On 05/19/2014 03:13 PM, Maarten Lankhorst wrote: op 19-05-14 15:42, Thomas Hellstrom schreef: Hi, Maarten! Some nitpicks, and that krealloc within rcu lock still worries me. Otherwise looks good. /Thomas On 04/23/2014 12:15 PM, Maarten

Re: linux-next: build failure after merge of the dma-buf tree

2014-05-20 Thread Maarten Lankhorst
Hey, op 20-05-14 09:13, Stephen Rothwell schreef: Hi Sumit, After merging the dma-buf tree, today's linux-next build (x86_64 allmodconfig) failed like this: drivers/gpu/drm/tegra/gem.c: In function 'tegra_gem_prime_export': drivers/gpu/drm/tegra/gem.c:423:15: error: macro "dma_buf_export"

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