Re: [PATCH v8 3/3] drm: writeback: Add client capability for exposing writeback connectors

2018-05-23 Thread Maarten Lankhorst
Op 18-05-18 om 17:17 schreef Liviu Dudau: > Due to the fact that writeback connectors behave in a special way > in DRM (they always report being disconnected) we might confuse some > userspace. Add a client capability for writeback connectors that will > filter them out for clients that don't under

Re: [RFC] drm/atomic+msm: add helper to implement legacy dirtyfb

2018-04-04 Thread Maarten Lankhorst
Op 04-04-18 om 12:21 schreef Daniel Vetter: > On Wed, Apr 04, 2018 at 12:03:00PM +0200, Daniel Vetter wrote: >> On Tue, Apr 03, 2018 at 06:42:23PM -0400, Rob Clark wrote: >>> Add an atomic helper to implement dirtyfb support. This is needed to >>> support DSI command-mode panels with x11 userspace

Re: [RFC] drm/atomic+msm: add helper to implement legacy dirtyfb

2018-04-04 Thread Maarten Lankhorst
Op 04-04-18 om 13:37 schreef Rob Clark: > On Wed, Apr 4, 2018 at 6:36 AM, Maarten Lankhorst > wrote: >> Op 04-04-18 om 12:21 schreef Daniel Vetter: >>> On Wed, Apr 04, 2018 at 12:03:00PM +0200, Daniel Vetter wrote: >>>> On Tue, Apr 03, 2018 at 06:42:23PM -04

Re: [RFC] drm/atomic+msm: add helper to implement legacy dirtyfb

2018-04-04 Thread Maarten Lankhorst
Op 04-04-18 om 14:05 schreef Rob Clark: > On Wed, Apr 4, 2018 at 7:49 AM, Maarten Lankhorst > wrote: >> Op 04-04-18 om 13:37 schreef Rob Clark: >>> On Wed, Apr 4, 2018 at 6:36 AM, Maarten Lankhorst >>> wrote: >>>> Op 04-04-18 om 12:21 schreef Daniel V

Re: [RFC] drm/atomic+msm: add helper to implement legacy dirtyfb

2018-04-04 Thread Maarten Lankhorst
Op 04-04-18 om 14:26 schreef Daniel Vetter: > On Wed, Apr 4, 2018 at 2:05 PM, Rob Clark wrote: >> On Wed, Apr 4, 2018 at 7:49 AM, Maarten Lankhorst >> wrote: >>> Op 04-04-18 om 13:37 schreef Rob Clark: >>>> On Wed, Apr 4, 2018 at 6:36 AM, Maarten Lankhorst >

Re: linux-next: build failure after merge of the drm-misc tree

2021-02-10 Thread Maarten Lankhorst
Op 2021-02-10 om 04:11 schreef Stephen Rothwell: > Hi all, > > After merging the drm-misc tree, today's linux-next build (x86_64 > allmodconfig) failed like this: > > drivers/gpu/drm/v3d/v3d_sched.c:263:1: error: return type is an incomplete > type > 263 | v3d_gpu_reset_for_timeout(struct v3d_de

Re: [PATCH 4/6] android: convert sync to fence api, v4

2014-02-24 Thread Maarten Lankhorst
op 19-02-14 14:56, Thomas Hellstrom schreef: >+static void fence_check_cb_func(struct fence *f, struct fence_cb *cb) >+{ >+ struct sync_fence_cb *check = container_of(cb, struct sync_fence_cb, cb); >+ struct sync_fence *fence = check->fence; >+ >+ // TODO: Add a fence->status member and che

[PATCH 0/6] dma-buf synchronization patches (updated)

2014-02-24 Thread Maarten Lankhorst
a comment removed) - add poll support to dma-buf (added comment) --- Maarten Lankhorst (6): fence: dma-buf cross-device synchronization (v17) seqno-fence: Hardware dma-buf implementation of fencing (v5) dma-buf: use reservation objects android: convert sync to fence api, v5

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

2014-02-24 Thread Maarten Lankhorst
nce.h v4: 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

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

2014-02-24 Thread Maarten Lankhorst
r discussion w/ danvet and mlankorst 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 remov

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

2014-02-24 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 --- dr

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

2014-02-24 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

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

2014-02-24 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 4/6] android: convert sync to fence api, v5

2014-02-24 Thread Maarten Lankhorst
allback 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 --- drivers/staging/

Re: [RFC 0/8] Move locking primitives into kernel/locking/

2013-11-05 Thread Maarten Lankhorst
op 05-11-13 14:18, Steven Rostedt schreef: > On Tue, 05 Nov 2013 13:10:44 +0100 > Peter Zijlstra wrote: > >> Hi all, >> >> During Kernel Summit Dave mentioned that there wasn't a clear maintainer for >> locking bits. >> >> To remedy this Ingo suggested gathering all the various locking primitives

Re: [PATCH 4/6] android: convert sync to fence api, v4

2014-03-03 Thread Maarten Lankhorst
op 03-03-14 22:11, Daniel Vetter schreef: On Mon, Feb 17, 2014 at 04:57:19PM +0100, Maarten Lankhorst wrote: Android syncpoints can be mapped to a timeline. This removes the need to maintain a separate api for synchronization. I've left the android trace events in place, but the core

Re: [PATCH 4/6] android: convert sync to fence api, v4

2014-03-04 Thread Maarten Lankhorst
op 04-03-14 09:14, Daniel Vetter schreef: On Tue, Mar 04, 2014 at 08:50:38AM +0100, Maarten Lankhorst wrote: op 03-03-14 22:11, Daniel Vetter schreef: On Mon, Feb 17, 2014 at 04:57:19PM +0100, Maarten Lankhorst wrote: Android syncpoints can be mapped to a timeline. This removes the need to

Re: [PATCH 4/6] android: convert sync to fence api, v4

2014-03-04 Thread Maarten Lankhorst
op 04-03-14 11:00, Daniel Vetter schreef: On Tue, Mar 04, 2014 at 09:20:58AM +0100, Maarten Lankhorst wrote: op 04-03-14 09:14, Daniel Vetter schreef: On Tue, Mar 04, 2014 at 08:50:38AM +0100, Maarten Lankhorst wrote: op 03-03-14 22:11, Daniel Vetter schreef: On Mon, Feb 17, 2014 at 04:57

Re: [PATCH] nouveau, ACPI: fix regression caused by b072e53

2014-02-19 Thread Maarten Lankhorst
using common acpi_check_dsm() interface. Signed-off-by: Jiang Liu --- Hi Maarten, Thanks for bisecting. Could you please help to verify whether this patch fixes the regression? Tested-by: Maarten Lankhorst I was wrong about the operator precedence, seems correct after all. :-) -- To

Re: [PATCH 2/6] seqno-fence: Hardware dma-buf implementation of fencing (v4)

2014-02-19 Thread Maarten Lankhorst
op 17-02-14 19:41, Christian König schreef: Am 17.02.2014 19:24, schrieb Rob Clark: On Mon, Feb 17, 2014 at 12:36 PM, Christian König wrote: Am 17.02.2014 18:27, schrieb Rob Clark: On Mon, Feb 17, 2014 at 11:56 AM, Christian König wrote: Am 17.02.2014 16:56, schrieb Maarten Lankhorst

Re: [x86] 339a3922f6: +4.3% aim7 jobs-per-min

2014-02-20 Thread Maarten Lankhorst
op 20-02-14 14:06, Fengguang Wu schreef: Hi Maarten, We are glad to find that your commit 339a3922f68dcb7d93001f07b7e914d5cf6c066d ("decrease useless padding") increased aim disk_src performance by 4.3%: 74833276be6802b 339a3922f68dcb7d93001f07b --- -

[PATCH 3/7] seqno-fence: Hardware dma-buf implementation of fencing (v4)

2014-01-13 Thread Maarten Lankhorst
oved into dma-fence.c since not much was left of the file. Lots of documentation added. v3: Use fence_ops instead of custom callbacks. Moved to own file to avoid circular dependency between dma-buf.h and fence.h v4: Add spinlock pointer to seqno_fence_init Signed-off-by: Maarten Lankhorst ---

[PATCH 1/7] sched: allow try_to_wake_up to be used internally outside of core.c

2014-01-13 Thread Maarten Lankhorst
The kernel fence implementation doesn't use event queues, but needs to perform the same wake up. The symbol is not exported, since the fence implementation is not built as a module. Signed-off-by: Maarten Lankhorst --- include/linux/wait.h |1 + kernel/sched/core.c |2 +- 2

[PATCH 0/7] dma-buf synchronization patches

2014-01-13 Thread Maarten Lankhorst
The following series implements fence and converts dma-buf and android sync to use it. Patch 6 and 7 add support for polling to dma-buf, blocking until all fences are signaled. --- Maarten Lankhorst (7): sched: allow try_to_wake_up to be used internally outside of core.c fence: dma

[PATCH 2/7] fence: dma-buf cross-device synchronization (v16)

2014-01-13 Thread Maarten Lankhorst
danvet and mlankorst 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_cance

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

2014-01-13 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 --- drivers/base/dma-buf.c | 22 -- drivers/gpu/drm/drm_pr

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

2014-01-13 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst --- include/linux/reservation.h | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/include/linux/reservation.h b/include/linux/reservation.h index 813dae960ebd..92c4851b5a39 100644 --- a/include/linux/reservation.h +++ b

[PATCH 7/7] dma-buf: add poll support

2014-01-13 Thread Maarten Lankhorst
Thanks to Fengguang Wu for spotting a missing static cast. Signed-off-by: Maarten Lankhorst --- drivers/base/dma-buf.c | 102 +++ include/linux/dma-buf.h | 12 ++ 2 files changed, 114 insertions(+) diff --git a/drivers/base/dma-buf.c b

[PATCH 5/7] android: convert sync to fence api, v3

2014-01-13 Thread Maarten Lankhorst
t all fences have fired. v3: - Merge Colin Cross' bugfixes, and the android fence merge optimization. Signed-off-by: Maarten Lankhorst --- drivers/staging/android/Kconfig |1 drivers/staging/android/Makefile |2 drivers/staging/android/sw_sync.c|4 drivers/stagi

Re: [PATCH 1/7] sched: allow try_to_wake_up to be used internally outside of core.c

2014-01-14 Thread Maarten Lankhorst
op 13-01-14 19:50, Colin Cross schreef: > On Mon, Jan 13, 2014 at 4:31 AM, Maarten Lankhorst > wrote: >> The kernel fence implementation doesn't use event queues, but needs >> to perform the same wake up. The symbol is not exported, since the >> fence implementa

Re: [PATCH] x86 efi: efi reverve boot service fix

2013-10-16 Thread Maarten Lankhorst
heck boot service region with kernel text region by: >>> start+size >= __pa_symbol(_text) >>> The end of the above region should be start + size - 1 instead. Acked-by: Maarten Lankhorst >>> I see this problem in ovmf + Fedora 19 grub boot: >>> text s

Re: [PATCH for 3.12] mutex: Avoid gcc version dependent __builtin_constant_p() usage.

2013-10-17 Thread Maarten Lankhorst
op 17-10-13 12:52, Peter Zijlstra schreef: > On Thu, Oct 17, 2013 at 07:45:29PM +0900, Tetsuo Handa wrote: >> Commit 040a0a37 "mutex: Add support for wound/wait style locks" used >> "!__builtin_constant_p(p == NULL)" but gcc 3.x cannot handle such expression >> correctly, leading to boot failure wh

Re: [PATCH for 3.12] mutex: Avoid gcc version dependent__builtin_constant_p() usage.

2013-10-18 Thread Maarten Lankhorst
op 18-10-13 15:13, Ingo Molnar schreef: > * Tetsuo Handa wrote: > >> Peter Zijlstra wrote: >>> On Thu, Oct 17, 2013 at 12:54:21PM +0200, Maarten Lankhorst wrote: >>>> op 17-10-13 12:52, Peter Zijlstra schreef: >>>>> On Thu, Oct 17, 2013 at 07:

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

2014-04-23 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 --- Using seqcount and

[PATCH 01/18] fence: add debugging lines to fence_is_signaled for the callback

2014-07-31 Thread Maarten Lankhorst
fence_is_signaled callback should support being run in atomic context, but not in irq context. Signed-off-by: Maarten Lankhorst --- include/linux/fence.h | 23 +++ 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/include/linux/fence.h b/include/linux/fence.h

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

2014-07-31 Thread Maarten Lankhorst
ade things easier for me. - Added a delayed work for radeon that checks gpu lockups. - Reworked the radeon fence implementation to remove deadlocks, and end up slightly cleaner. --- Maarten Lankhorst (18): fence: add debugging lines to fence_is_signaled for the callback dr

[PATCH 01/19] fence: add debugging lines to fence_is_signaled for the callback

2014-07-31 Thread Maarten Lankhorst
fence_is_signaled callback should support being run in atomic context, but not in irq context. Signed-off-by: Maarten Lankhorst --- include/linux/fence.h | 23 +++ 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/include/linux/fence.h b/include/linux/fence.h

[PATCH 11/19] drm/radeon: use common fence implementation for fences, v2

2014-07-31 Thread Maarten Lankhorst
on the global fence_queue to pick up gpu resets. - Process all fences in radeon_gpu_reset after reset to close a race with the trylock in enable_signaling. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/radeon/radeon.h | 18 +- drivers/gpu/drm/radeon/radeon_device.c | 22

[PATCH 09/19] drm/radeon: handle lockup in delayed work, v2

2014-07-31 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst --- V1 had a nasty bug breaking gpu lockup recovery. The fix is not allowing radeon_fence_driver_check_lockup to take exclusive_lock, and kill it during lockup recovery instead. --- drivers/gpu/drm/radeon/radeon.h|3 + drivers/gpu/drm/radeon

[PATCH 04/19] drm/nouveau: add reservation to nouveau_gem_ioctl_cpu_prep

2014-07-31 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 03/19] drm/ttm: kill off some members to ttm_validate_buffer

2014-07-31 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 |

[PATCH 07/19] drm/ttm: kill fence_lock

2014-07-31 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 02/19] drm/ttm: add interruptible parameter to ttm_eu_reserve_buffers

2014-07-31 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 05/19] drm/nouveau: require reservations for nouveau_fence_sync and nouveau_bo_fence

2014-07-31 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 a/drivers/gpu/drm/nouveau/nouve

[PATCH 08/19] drm/nouveau: rework to new fence interface

2014-07-31 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 14/19] drm/vmwgfx: rework to new fence interface

2014-07-31 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 12/19] drm/qxl: rework to new fence interface

2014-07-31 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_debu

[PATCH 13/19] drm/vmwgfx: get rid of different types of fence_flags entirely

2014-07-31 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 17/19] drm/radeon: use rcu waits in some ioctls

2014-07-31 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 15/19] drm/ttm: flip the switch, and convert to dma_fence

2014-07-31 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 + drivers/gpu/drm/qxl/qxl_drv

[PATCH 18/19] drm/vmwgfx: use rcu in vmw_user_dmabuf_synccpu_grab

2014-07-31 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 f0a689ba9685..a43930162eb6 100644

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

2014-07-31 Thread Maarten Lankhorst
op 31-07-14 17:30, Maarten Lankhorst schreef: > This series applies on top of the driver-core-next branch of > git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git > > Before converting ttm to the new fence interface I had to fix some > drivers to require a res

[PATCH 16/19] drm/nouveau: use rcu in nouveau_gem_ioctl_cpu_prep

2014-07-31 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 19/19] drm/ttm: use rcu in core ttm

2014-07-31 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 9d36cffad3b7..d119ae4419d4 100644 --- a/drivers

[PATCH 10/19] drm/radeon: add timeout argument to radeon_fence_wait_seq

2014-07-31 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 | 50 - 1 file changed, 30 insertions(+), 20 deletions

[PATCH 06/19] drm/ttm: call ttm_bo_wait while inside a reservation

2014-07-31 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 b/drivers/gpu/drm/tt

Re: [GIT PULL] x86 fixes

2014-09-23 Thread Maarten Lankhorst
Hey, Op 23-09-14 om 15:18 schreef Matt Fleming: > On Tue, 23 Sep, at 10:18:07AM, Ard Biesheuvel wrote: >> It will be difficult for me to keep up with this thread over the next >> days, so I have added Leif and Roy on cc. If you need to make any >> changes that affect arm64, they should be able to

Re: page allocator bug in 3.16?

2014-09-25 Thread Maarten Lankhorst
Hey, On 25-09-14 20:55, Peter Hurley wrote: > After several days uptime with a 3.16 kernel (generally running > Thunderbird, emacs, kernel builds, several Chrome tabs on multiple > desktop workspaces) I've been seeing some really extreme slowdowns. > > Mostly the slowdowns are associated with gpu

Re: nouveau crash due to missing channel (WAS: Re: [ANNOUNCE] 3.12.12-rt19)

2014-03-07 Thread Maarten Lankhorst
op 07-03-14 12:18, Sebastian Andrzej Siewior schreef: * Fernando Lopez-Lezcano | 2014-03-01 17:48:29 [-0800]: On 02/23/2014 10:47 AM, Sebastian Andrzej Siewior wrote: Dear RT folks! I'm pleased to announce the v3.12.12-rt19 patch set. Just hit this Oops in my desktop at home: [22328.388996]

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

2014-05-19 Thread Maarten Lankhorst
op 15-05-14 18:13, Christian König schreef: Am 15.05.2014 17:58, schrieb Maarten Lankhorst: op 15-05-14 17:48, Christian König schreef: Am 15.05.2014 16:18, schrieb Maarten Lankhorst: op 15-05-14 15:19, Christian König schreef: Am 15.05.2014 15:04, schrieb Maarten Lankhorst: op 15-05-14 11

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

2014-05-19 Thread Maarten Lankhorst
op 19-05-14 10:27, Christian König schreef: Am 19.05.2014 10:00, schrieb Maarten Lankhorst: op 15-05-14 18:13, Christian König schreef: Am 15.05.2014 17:58, schrieb Maarten Lankhorst: op 15-05-14 17:48, Christian König schreef: Am 15.05.2014 16:18, schrieb Maarten Lankhorst: op 15-05-14 15

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

2014-05-19 Thread Maarten Lankhorst
op 19-05-14 14:30, Christian König schreef: Am 19.05.2014 12:10, schrieb Maarten Lankhorst: op 19-05-14 10:27, Christian König schreef: Am 19.05.2014 10:00, schrieb Maarten Lankhorst: [SNIP] The problem here is that the whole approach collides with the way we do reset handling from a

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

2014-05-19 Thread Maarten Lankhorst
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 Lankhorst wrote: @@ -55,8 +60,8 @@ int reservation_object_reserve_shared(struct reservation_object *obj

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" requ

[PATCH 0/6] dma-buf synchronization patches

2014-02-17 Thread Maarten Lankhorst
had to fix some fallout from the rebase, hopefully everything's clean now, and ready for -next. --- Maarten Lankhorst (6): fence: dma-buf cross-device synchronization (v17) seqno-fence: Hardware dma-buf implementation of fencing (v4) dma-buf: use reservation objects a

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

2014-02-17 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/ --- drivers/base/dma-buf.c |

[PATCH 2/6] seqno-fence: Hardware dma-buf implementation of fencing (v4)

2014-02-17 Thread Maarten Lankhorst
oved into dma-fence.c since not much was left of the file. Lots of documentation added. v3: Use fence_ops instead of custom callbacks. Moved to own file to avoid circular dependency between dma-buf.h and fence.h v4: Add spinlock pointer to seqno_fence_init Signed-off-by: Maarten Lankhorst ---

[PATCH 4/6] android: convert sync to fence api, v4

2014-02-17 Thread Maarten Lankhorst
t all fences have fired. v3: - Merge Colin Cross' bugfixes, and the android fence merge optimization. v4: - Merge with the upstream fixes. Signed-off-by: Maarten Lankhorst --- drivers/staging/android/Kconfig |1 drivers/staging/android/Makefile |2 drivers/staging/android

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

2014-02-17 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst --- include/linux/reservation.h | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/include/linux/reservation.h b/include/linux/reservation.h index 813dae960ebd..92c4851b5a39 100644 --- a/include/linux/reservation.h +++ b

[PATCH 6/6] dma-buf: add poll support, v2

2014-02-17 Thread Maarten Lankhorst
Thanks to Fengguang Wu for spotting a missing static cast. v2: - Kill unused variable need_shared. Signed-off-by: Maarten Lankhorst --- drivers/base/dma-buf.c | 101 +++ include/linux/dma-buf.h | 12 ++ 2 files changed, 113 insertions

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

2014-02-17 Thread Maarten Lankhorst
r discussion w/ danvet and mlankorst 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 remov

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

2014-04-29 Thread Maarten Lankhorst
op 23-04-14 13:15, Maarten Lankhorst schreef: This adds 4 more functions to deal with rcu. reservation_object_get_fences_rcu() will obtain the list of shared and exclusive fences without obtaining the ww_mutex. reservation_object_wait_timeout_rcu() will wait on all fences of the

[RFC PATCH v1 00/16] Convert all ttm drivers to use the new reservation interface

2014-05-14 Thread Maarten Lankhorst
are converted to the fence api, fence_lock is removed and rcu is used in its place. qxl is the first driver to use shared fence slots, but when these patches are applied it's easy to convert nouveau too. I've done it as part of the cross-device gpu synchronization patch series. --

[RFC PATCH v1 03/16] drm/nouveau: add reservation to nouveau_gem_ioctl_cpu_prep

2014-05-14 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

[RFC PATCH v1 01/16] drm/ttm: add interruptible parameter to ttm_eu_reserve_buffers

2014-05-14 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

[RFC PATCH v1 05/16] drm/ttm: call ttm_bo_wait while inside a reservation

2014-05-14 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 b/drivers/gpu/drm/tt

[RFC PATCH v1 04/16] drm/nouveau: require reservations for nouveau_fence_sync and nouveau_bo_fence

2014-05-14 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 a/drivers/gpu/drm/nouveau/nouve

[RFC PATCH v1 02/16] drm/ttm: kill off some members to ttm_validate_buffer

2014-05-14 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 |

[RFC PATCH v1 13/16] drm/nouveau: use rcu in nouveau_gem_ioctl_cpu_prep

2014-05-14 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

[RFC PATCH v1 10/16] drm/vmwgfx: get rid of different types of fence_flags entirely

2014-05-14 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

[RFC PATCH v1 12/16] drm/ttm: flip the switch, and convert to dma_fence

2014-05-14 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 + drivers/gpu/drm/qxl/qxl_drv

[RFC PATCH v1 15/16] drm/vmwgfx: use rcu in vmw_user_dmabuf_synccpu_grab

2014-05-14 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

[RFC PATCH v1 16/16] drm/ttm: use rcu in core ttm

2014-05-14 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

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

2014-05-14 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/radeon/radeon.h| 15 +-- drivers/gpu/drm/radeon/radeon_device.c |1 drivers/gpu/drm/radeon/radeon_fence.c | 189 +--- 3 files changed, 153 insertions(+), 52 deletions(-) diff --git a/drivers/gpu

[RFC PATCH v1 11/16] drm/vmwgfx: rework to new fence interface

2014-05-14 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

[RFC PATCH v1 14/16] drm/radeon: use rcu waits in some ioctls

2014-05-14 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

[RFC PATCH v1 09/16] drm/qxl: rework to new fence interface

2014-05-14 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_debu

[RFC PATCH v1 07/16] drm/nouveau: rework to new fence interface

2014-05-14 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 | 434

[RFC PATCH v1 06/16] drm/ttm: kill fence_lock

2014-05-14 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

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

2014-05-14 Thread Maarten Lankhorst
op 14-05-14 17:29, Christian König schreef: +/* did fence get signaled after we enabled the sw irq? */ +if (atomic64_read(&fence->rdev->fence_drv[fence->ring].last_seq) >= fence->seq) { +radeon_irq_kms_sw_irq_put(fence->rdev, fence->ring); +return false; +} + +fen

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

2014-05-15 Thread Maarten Lankhorst
op 15-05-14 11:21, Christian König schreef: Am 15.05.2014 03:06, schrieb Maarten Lankhorst: op 14-05-14 17:29, Christian König schreef: +/* did fence get signaled after we enabled the sw irq? */ +if (atomic64_read(&fence->rdev->fence_drv[fence->ring].last_seq) &

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

2014-05-15 Thread Maarten Lankhorst
op 15-05-14 11:42, Christian König schreef: Am 15.05.2014 11:38, schrieb Maarten Lankhorst: op 15-05-14 11:21, Christian König schreef: Am 15.05.2014 03:06, schrieb Maarten Lankhorst: op 14-05-14 17:29, Christian König schreef: +/* did fence get signaled after we enabled the sw irq

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

2014-05-15 Thread Maarten Lankhorst
op 15-05-14 15:19, Christian König schreef: Am 15.05.2014 15:04, schrieb Maarten Lankhorst: op 15-05-14 11:42, Christian König schreef: Am 15.05.2014 11:38, schrieb Maarten Lankhorst: op 15-05-14 11:21, Christian König schreef: Am 15.05.2014 03:06, schrieb Maarten Lankhorst: op 14-05-14 17

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

2014-05-15 Thread Maarten Lankhorst
op 15-05-14 17:48, Christian König schreef: Am 15.05.2014 16:18, schrieb Maarten Lankhorst: op 15-05-14 15:19, Christian König schreef: Am 15.05.2014 15:04, schrieb Maarten Lankhorst: op 15-05-14 11:42, Christian König schreef: Am 15.05.2014 11:38, schrieb Maarten Lankhorst: op 15-05-14 11

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

2014-04-09 Thread Maarten Lankhorst
. reservation_object_get_excl() is added because touching the fence_excl member directly will trigger a sparse warning. Signed-off-by: Maarten Lankhorst --- drivers/base/dma-buf.c | 46 +++-- drivers/base/reservation.c | 147 +-- include

[PATCH 0/2] Updates to fence api

2014-04-09 Thread Maarten Lankhorst
M to fence, so I had to keep it in. If nobody objects I'll probably merge that patch through drm, because some care is needed in ttm before it can flip the switch on rcu. --- Maarten Lankhorst (2): reservation: update api and add some helpers [RFC] reservation: add suppport for r

[PATCH 1/2] reservation: update api and add some helpers

2014-04-09 Thread Maarten Lankhorst
assign a new fence to a reservation_object pointer, to complete a reservation. Signed-off-by: Maarten Lankhorst --- drivers/base/dma-buf.c | 35 +++--- drivers/base/fence.c|4 + drivers/base/reservation.c | 154 +++ include/linux

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

2014-04-10 Thread Maarten Lankhorst
Hey, op 10-04-14 10:46, Thomas Hellstrom schreef: Hi! Ugh. This became more complicated than I thought, but I'm OK with moving TTM over to fence while we sort out how / if we're going to use this. While reviewing, it struck me that this is kind of error-prone, and hard to follow since we're op

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

2014-04-10 Thread Maarten Lankhorst
op 10-04-14 13:08, Thomas Hellstrom schreef: On 04/10/2014 12:07 PM, Maarten Lankhorst wrote: Hey, op 10-04-14 10:46, Thomas Hellstrom schreef: Hi! Ugh. This became more complicated than I thought, but I'm OK with moving TTM over to fence while we sort out how / if we're going t

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

2014-04-11 Thread Maarten Lankhorst
op 11-04-14 10:38, Thomas Hellstrom schreef: Hi, Maarten. Here I believe we encounter a lot of locking inconsistencies. First, it seems you're use a number of pointers as RCU pointers without annotating them as such and use the correct rcu macros when assigning those pointers. Some pointers (l

<    1   2   3   4   5   6   >