[PATCH] mutex: fix deadlock injection

2013-07-30 Thread Maarten Lankhorst
be able to return -EDEADLK did. Cc: Alex Deucher Signed-off-by: Maarten Lankhorst --- diff --git a/kernel/mutex.c b/kernel/mutex.c index ff05f4b..a52ee7bb 100644 --- a/kernel/mutex.c +++ b/kernel/mutex.c @@ -686,7 +686,7 @@ __ww_mutex_lock(struct ww_mutex *lock, struct ww_acquire_ctx *ctx)

Re: nouveau: check client.base.vm before dereferencing it.

2013-07-30 Thread Maarten Lankhorst
Op 31-07-13 00:55, Dave Jones schreef: > On Thu, Jul 25, 2013 at 12:22:03PM -0400, Dave Jones wrote: > > This recently started happening (since the last DRM merge, 3.10 was fine). > > > > [ 17.751970] Oops: [#1] PREEMPT SMP DEBUG_PAGEALLOC > > [ 17.753911] CPU: 3 PID: 292 Comm: system

Re: [RFC PATCH] drm/radeon: rework to new fence interface

2013-08-20 Thread Maarten Lankhorst
Op 20-08-13 10:37, Christian König schreef: > Am 19.08.2013 21:37, schrieb Maarten Lankhorst: >> Op 19-08-13 14:35, Christian König schreef: >>> Am 19.08.2013 12:17, schrieb Maarten Lankhorst: >>>> [SNIP] >>>> @@ -190,25 +225,24 @@ void radeon_fence_pro

Re: [RFC PATCH] drm/radeon: rework to new fence interface

2013-08-20 Thread Maarten Lankhorst
Op 20-08-13 11:51, Christian König schreef: > Am 20.08.2013 11:36, schrieb Maarten Lankhorst: > [SNIP] > >>>>>> [SNIP] >>>>>> +/** >>>>>> + * radeon_fence_enable_signaling - enable signalling on fence >>>>>> + * @fenc

Re: [PATCH] Change CONFIG_FW_LOADER_USER_HELPER to default n and don't select it

2013-08-06 Thread Maarten Lankhorst
Op 05-08-13 18:29, Andy Lutomirski schreef: > The systemd commit below can delay firmware loading by multiple > minutes if CONFIG_FW_LOADER_USER_HELPER=y. Unfortunately no one > noticed that the systemd-udev change would break new kernels as well > as old kernels. > > Since the kernel apparently c

Re: [PATCH] mutex: fix deadlock injection

2013-08-06 Thread Maarten Lankhorst
Op 07-08-13 02:05, Dave Airlie schreef: > On Tue, Jul 30, 2013 at 6:41 PM, Peter Zijlstra wrote: >> On Tue, Jul 30, 2013 at 10:13:41AM +0200, Maarten Lankhorst wrote: >>> The check needs to be for > 1, because ctx->acquired is already incremented. >>> This wil

[PATCH] udev: fail firmware loading immediately if no search path is defined

2013-08-07 Thread Maarten Lankhorst
om Gundersen wrote: >>>>> On Tue, Aug 6, 2013 at 10:20 AM, Maarten Lankhorst >>>>> wrote: >>>>>> Op 05-08-13 18:29, Andy Lutomirski schreef: >>>>>>> The systemd commit below can delay firmware loading by multiple >>>>>

Re: [GIT] Networking

2013-05-05 Thread Maarten Lankhorst
Hey, Op 05-05-13 04:42, David Miller schreef: > 1) Several routines do not use netdev_features_t to hold such bitmasks, >fixes from Patrick McHardy and Bjørn Mork. > > 2) Update cpsw IRQ software state and the actual HW irq enabling in >the correct order. From Mugunthan V N. > > 3) When s

[PATCH v3 3/3] mutex: Add ww tests to lib/locking-selftest.c. v3

2013-04-28 Thread Maarten Lankhorst
. - Use macros for most of the code. Signed-off-by: Maarten Lankhorst --- lib/locking-selftest.c | 439 ++-- 1 file changed, 420 insertions(+), 19 deletions(-) diff --git a/lib/locking-selftest.c b/lib/locking-selftest.c index c3eb261..9cef196 100644

[PATCH v3 0/3] Wait/wound mutex implementation, v3

2013-04-28 Thread Maarten Lankhorst
that the interface for users of the api will not behave differently. ww_acquire_ctx has been added, and a whole lot of api abuses are now correctly detected because of the extra state carried in ww_acquire_ctx if debugging is enabled. --- Maarten Lankhorst (3): arch: make

[PATCH v3 1/3] arch: make __mutex_fastpath_lock_retval return whether fastpath succeeded or not.

2013-04-28 Thread Maarten Lankhorst
was previously used. Changes since v1, pointed out by Francesco Lavra: - fix a small comment issue in mutex_32.h - fix the __mutex_fastpath_lock_retval macro for mutex-null.h Signed-off-by: Maarten Lankhorst --- arch/ia64/include/asm/mutex.h| 10 -- arch/powerpc/include/asm/mutex.h

[PATCH v3 2/3] mutex: add support for wound/wait style locks, v3

2013-04-28 Thread Maarten Lankhorst
updates. (danvet) Signed-off-by: Maarten Lankhorst Signed-off-by: Daniel Vetter --- Documentation/ww-mutex-design.txt | 322 +++ include/linux/mutex-debug.h |1 include/linux/mutex.h | 257 + kernel/mutex.c

Re: [PATCH v3 2/3] mutex: add support for wound/wait style locks, v3

2013-05-22 Thread Maarten Lankhorst
Hey, Op 30-04-13 21:14, Daniel Vetter schreef: > On Sun, Apr 28, 2013 at 07:04:07PM +0200, Maarten Lankhorst wrote: >> Changes since RFC patch v1: >> - Updated to use atomic_long instead of atomic, since the reservation_id >> was a long. >> - added

Re: [PATCH v3 2/3] mutex: add support for wound/wait style locks, v3

2013-05-22 Thread Maarten Lankhorst
Op 22-05-13 13:37, Peter Zijlstra schreef: >> Are there any issues left? I included the patch you wrote for injecting >> -EDEADLK too >> in my tree. The overwhelming silence makes me think there are either none, or >> nobody cared enough to review it. :( > It didn't manage to reach my inbox it see

Re: [PATCH v3 2/3] mutex: add support for wound/wait style locks, v3

2013-05-22 Thread Maarten Lankhorst
Hey, Op 22-05-13 18:18, Peter Zijlstra schreef: > On Wed, May 22, 2013 at 01:18:14PM +0200, Maarten Lankhorst wrote: > > Lacking the actual msg atm, I'm going to paste in here... Thanks for taking the time to review. >> Subject: [PATCH v3 2/3] mutex: add support for wound/

Re: [PATCH v3 2/3] mutex: add support for wound/wait style locks, v3

2013-05-23 Thread Maarten Lankhorst
Op 22-05-13 19:24, Maarten Lankhorst schreef: > Hey, > > Op 22-05-13 18:18, Peter Zijlstra schreef: >> On Wed, May 22, 2013 at 01:18:14PM +0200, Maarten Lankhorst wrote: >> >> Lacking the actual msg atm, I'm going to paste in here... > Thanks for taking the time

Re: [PATCH v3 2/3] mutex: add support for wound/wait style locks, v3

2013-05-27 Thread Maarten Lankhorst
Op 27-05-13 10:00, Peter Zijlstra schreef: > On Wed, May 22, 2013 at 07:24:38PM +0200, Maarten Lankhorst wrote: >>>> +- Functions to only acquire a single w/w mutex, which results in the >>>> exact same >>>> + semantics as a normal mutex. These function

Re: [PATCH v3 2/3] mutex: add support for wound/wait style locks, v3

2013-05-27 Thread Maarten Lankhorst
Op 27-05-13 11:13, Peter Zijlstra schreef: > On Mon, May 27, 2013 at 10:26:39AM +0200, Maarten Lankhorst wrote: >> Op 27-05-13 10:00, Peter Zijlstra schreef: >>> On Wed, May 22, 2013 at 07:24:38PM +0200, Maarten Lankhorst wrote: >>>>>> +- Functions to only acqui

Re: [PATCH v3 2/3] mutex: add support for wound/wait style locks, v3

2013-05-27 Thread Maarten Lankhorst
Op 27-05-13 10:21, Peter Zijlstra schreef: > On Wed, May 22, 2013 at 07:24:38PM +0200, Maarten Lankhorst wrote: >>>> +static inline void ww_acquire_init(struct ww_acquire_ctx *ctx, >>>> + struct ww_class *ww_class) >>>> +{

Re: [PATCH v3 2/3] mutex: add support for wound/wait style locks, v3

2013-05-27 Thread Maarten Lankhorst
Op 27-05-13 12:24, Peter Zijlstra schreef: > On Mon, May 27, 2013 at 12:01:50PM +0200, Maarten Lankhorst wrote: >>> Again, early.. monday.. would a trylock, even if successful still need >>> the ctx? >> No ctx for trylock is supported. You can still do a trylock while &g

Re: [PATCH v3 2/3] mutex: add support for wound/wait style locks, v3

2013-05-27 Thread Maarten Lankhorst
Op 27-05-13 13:15, Peter Zijlstra schreef: > On Mon, May 27, 2013 at 12:52:00PM +0200, Maarten Lankhorst wrote: >> The reason ttm needed it was because there was another lock that interacted >> with the ctx lock in a weird way. The ww lock it was using was inverted with >> a

[PATCH v4 0/4] add mutex wait/wound/style style locks

2013-05-28 Thread Maarten Lankhorst
debugging, and to annotate. - Cleanup unneeded memory barriers, add comment to the remaining smp_mb(). Thanks to Daniel Vetter, Rob Clark and Peter Zijlstra for their feedback. --- Daniel Vetter (1): mutex: w/w mutex slowpath debugging Maarten Lankhorst (3): arch: make

[PATCH v4 1/4] arch: make __mutex_fastpath_lock_retval return whether fastpath succeeded or not.

2013-05-28 Thread Maarten Lankhorst
was previously used. Changes since v1, pointed out by Francesco Lavra: - fix a small comment issue in mutex_32.h - fix the __mutex_fastpath_lock_retval macro for mutex-null.h Signed-off-by: Maarten Lankhorst --- arch/ia64/include/asm/mutex.h| 10 -- arch/powerpc/include/asm/mutex.h

[PATCH v4 3/4] mutex: Add ww tests to lib/locking-selftest.c. v4

2013-05-28 Thread Maarten Lankhorst
. - Use macros for most of the code. Changes since v3: - Rework tests for the api changes. Signed-off-by: Maarten Lankhorst --- lib/locking-selftest.c | 405 ++-- 1 file changed, 386 insertions(+), 19 deletions(-) diff --git a/lib/locking-selftest.c

[PATCH v4 4/4] mutex: w/w mutex slowpath debugging

2013-05-28 Thread Maarten Lankhorst
.debug definition to work correctly. (mlankhorst) v6: Do not inject -EDEADLK when ctx->acquired == 0, because the _slow paths are merged now. (mlankhorst) Cc: Steven Rostedt Signed-off-by: Daniel Vetter Signed-off-by: Maarten Lankhorst --- include/linux/mutex.h |8 k

[PATCH v4 2/4] mutex: add support for wound/wait style locks, v5

2013-05-28 Thread Maarten Lankhorst
*, normal functions can be used. Inline versions still exist for extra debugging. - Cleanup unneeded memory barriers, add comment to the remaining smp_mb(). Signed-off-by: Maarten Lankhorst Signed-off-by: Daniel Vetter Signed-off-by: Rob Clark --- Documentation/ww-mutex-design.txt | 344

Re: [PATCH v4 3/4] mutex: Add ww tests to lib/locking-selftest.c. v4

2013-05-28 Thread Maarten Lankhorst
Op 28-05-13 21:18, Daniel Vetter schreef: > On Tue, May 28, 2013 at 04:48:45PM +0200, Maarten Lankhorst wrote: >> This stresses the lockdep code in some ways specifically useful to >> ww_mutexes. It adds checks for most of the common locking errors. >> >> Changes s

Re: [PATCH] lockdep: make lock held while freezing check optional

2013-03-07 Thread Maarten Lankhorst
Op 06-03-13 01:30, Mandeep Singh Baines schreef: > This check is turning up a lot of code paths which need to be > fixed so while those paths are fixed, let's make this check > optional so that folks can still use lockdep. I think the config option should be inverted, and make it more clear that yo

[PATCH] efivarfs: loosen restriction on valid names

2013-03-07 Thread Maarten Lankhorst
restriction in efivarfs_valid_name. Signed-off-by: Maarten Lankhorst Cc: sta...@vger.kernel.org [3.8] --- diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c index 8bcb595..3ee1882 100644 --- a/drivers/firmware/efivars.c +++ b/drivers/firmware/efivars.c @@ -921,8 +921,8 @@ static

[PATCH] sysfs: use atomic_inc_unless_negative in sysfs_get_active

2013-03-08 Thread Maarten Lankhorst
It seems that sysfs has an interesting way of doing the same thing. This removes the cpu_relax unfortunately, but if it's really needed, it would be better to add this to include/linux/atomic.h to benefit all atomic ops users. Signed-off-by: Maarten Lankhorst --- diff --git a/fs/sysfs/di

Re: Why is there no nouveau driver maintainer listed in MAINTAINERS?

2012-08-04 Thread Maarten Lankhorst
Hey, Op 04-08-12 18:33, Calvin Walton schreef: > On Sat, 2012-08-04 at 17:49 +0200, richard -rw- weinberger wrote: >> On Sat, Aug 4, 2012 at 5:36 PM, Miles Lane wrote: >>> I would like to report an issue in the nouveau driver, but don't know >>> who to report it to. >> We have a script for this.

Re: [RFC PATCH 1/3] dma-fence: dma-buf synchronization (v5)

2012-08-06 Thread Maarten Lankhorst
Hey Sumit, Op 06-08-12 08:41, Sumit Semwal schreef: > Hi Maarten, > On 27 July 2012 19:09, Maarten Lankhorst > wrote: >> A dma-fence can be attached to a buffer which is being filled or consumed >> by hw, to allow userspace to pass the buffer without waiting to another &g

Re:

2012-08-06 Thread Maarten Lankhorst
Op 06-08-12 18:59, anish kumar schreef: > From: anish kumar > -ESUBJECT -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http:/

[RFC patch 4/4] Re: dma-buf-mgr: multiple dma-buf synchronization (v3)

2012-08-22 Thread Maarten Lankhorst
Hey Dan, Op 16-08-12 01:12, Daniel Vetter schreef: > Hi Maarten, > > Ok, here comes the promised review (finally!), but it's rather a > high-level thingy. I've mostly thought about how we could create a neat > api with the following points. For a bit of clarity, I've grouped the > different consid

Re: [RFC patch 4/4] Re: dma-buf-mgr: multiple dma-buf synchronization (v3)

2012-08-22 Thread Maarten Lankhorst
Hey, Op 22-08-12 14:52, Thomas Hellstrom schreef: > Hi, Maarten, > please see some comments inline. > > On 08/22/2012 01:50 PM, Maarten Lankhorst wrote: >> Hey Dan, >> >> Op 16-08-12 01:12, Daniel Vetter schreef: >>> Hi Maarten, >>> >>>

Re: Drop support for x86-32

2012-08-24 Thread Maarten Lankhorst
Op 24-08-12 12:42, wbrana schreef: > On 8/24/12, Ronnie Collinson wrote: >> Hes just told you what x32 is, if you dont understand that, you cant >> understand why its not a replacement for x32_64 > I know what is x32. x32 is replacement for x86-32, not x86-64. > -- > To unsubscribe from this list:

[PATCH 1/3] dma-fence: dma-buf synchronization (v7)

2012-08-07 Thread Maarten Lankhorst
v3: Fix locking fail in attach_fence() and get_fence() v4: Remove tie-in w/ dma-buf.. after 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 Lank

[PATCH 2/3] dma-bikeshed-fence: Hardware dma-buf implementation of fencing

2012-08-07 Thread Maarten Lankhorst
support this mechanism. It is useful to expose this for graphics cards that have an op to support this. Some cards like i915 can export those, but don't have an option to wait, so they need the software fallback. I extended the original patch by Rob Clark. Signed-off-by: Maarten Lankhorst

[PATCH 3/3] dma-buf-mgr: multiple dma-buf synchronization (v3)

2012-08-07 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst dma-buf-mgr handles the case of reserving single or multiple dma-bufs while trying to prevent deadlocks from buffers being reserved simultaneously. For this to happen extra functions have been introduced: + dma_buf_reserve() + dma_buf_unreserve

Re: [PATCH 1/3] dma-fence: dma-buf synchronization (v7)

2012-08-07 Thread Maarten Lankhorst
Op 07-08-12 19:53, Maarten Lankhorst schreef: > A dma-fence can be attached to a buffer which is being filled or consumed > by hw, to allow userspace to pass the buffer without waiting to another > device. For example, userspace can call page_flip ioctl to display the > next frame

Re: [PATCH 1/3] dma-fence: dma-buf synchronization (v7)

2012-08-09 Thread Maarten Lankhorst
Hey Sumit, Op 08-08-12 08:35, Sumit Semwal schreef: > Hi Maarten, > > On 8 August 2012 00:17, Maarten Lankhorst > wrote: >> Op 07-08-12 19:53, Maarten Lankhorst schreef: >>> A dma-fence can be attached to a buffer which is being filled or consumed >>> by hw, t

[PATCH 1/4] dma-buf: remove fallback for !CONFIG_DMA_SHARED_BUFFER

2012-08-10 Thread Maarten Lankhorst
Documentation says that code requiring dma-buf should add it to select, so inline fallbacks are not going to be used. A link error will make it obvious what went wrong, instead of silently doing nothing at runtime. Signed-off-by: Maarten Lankhorst --- include/linux/dma-buf.h | 99

[PATCH 2/4] dma-fence: dma-buf synchronization (v8 )

2012-08-10 Thread Maarten Lankhorst
v3: Fix locking fail in attach_fence() and get_fence() v4: Remove tie-in w/ dma-buf.. after 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 Lank

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

2012-08-10 Thread Maarten Lankhorst
oved into dma-fence.c since not much was left of the file. Lots of documentation added. Signed-off-by: Maarten Lankhorst --- drivers/base/dma-fence.c | 21 +++ include/linux/dma-fence.h | 61 + 2 files changed, 82 insertions(+) diff --

[PATCH 4/4] dma-buf-mgr: multiple dma-buf synchronization (v3)

2012-08-10 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst dma-buf-mgr handles the case of reserving single or multiple dma-bufs while trying to prevent deadlocks from buffers being reserved simultaneously. For this to happen extra functions have been introduced: + dma_buf_reserve() + dma_buf_unreserve

Re: [Linaro-mm-sig] [PATCH 2/4] dma-fence: dma-buf synchronization (v8 )

2012-08-11 Thread Maarten Lankhorst
Hey, Op 11-08-12 17:14, Rob Clark schreef: > On Fri, Aug 10, 2012 at 3:29 PM, Daniel Vetter wrote: >> On Fri, Aug 10, 2012 at 04:57:52PM +0200, Maarten Lankhorst wrote: >>> A dma-fence can be attached to a buffer which is being filled or consumed >>> by hw, to allow u

Re: [Linaro-mm-sig] [PATCH 3/4] dma-seqno-fence: Hardware dma-buf implementation of fencing (v2)

2012-08-11 Thread Maarten Lankhorst
Op 10-08-12 21:57, Daniel Vetter schreef: > On Fri, Aug 10, 2012 at 04:57:58PM +0200, Maarten Lankhorst wrote: >> This type of fence can be used with hardware synchronization for simple >> hardware that can block execution until the condition >> (dma_buf[offset] - value) >=

Re: [Linaro-mm-sig] [PATCH 2/4] dma-fence: dma-buf synchronization (v8 )

2012-08-13 Thread Maarten Lankhorst
Hey, Op 11-08-12 21:39, Daniel Vetter schreef: > + > + if (!ret) { > + cb->base.flags = 0; > + cb->base.func = __dma_fence_wake_func; > + cb->base.private = priv; > + cb->fence = fence; > + cb->func = func;

Re: [PATCH] x86: efi: Turn off efi_enabled after setup on mixed fw/kernel

2012-08-20 Thread Maarten Lankhorst
Hey, Op 19-08-12 23:48, Olof Johansson schreef: > When 32-bit EFI is used with 64-bit kernel (or vice versa), turn off > efi_enabled once setup is done. Beyond setup, it is normally used to > determine if runtime services are available and we will have none. > > This will resolve issues stemming f

[RFC PATCH 0/8] Dmabuf synchronization

2012-07-10 Thread Maarten Lankhorst
This patch implements my attempt at dmabuf synchronization. The core idea is that a lot of devices will have their own methods of synchronization, but more complicated devices allow some way of fencing, so why not export those as dma-buf? This patchset implements dmabufmgr, which is based on ttm's

[RFC PATCH 1/8] dma-buf-mgr: Try 2

2012-07-10 Thread Maarten Lankhorst
From: Maarten Lankhorst Core code based on ttm_bo and ttm_execbuf_util Signed-off-by: Maarten Lankhorst --- drivers/base/Makefile |2 +- drivers/base/dma-buf-mgr-eu.c | 263 + drivers/base/dma-buf-mgr.c| 149

[RFC PATCH 2/8] prime wip: i915

2012-07-10 Thread Maarten Lankhorst
From: Maarten Lankhorst Export the hardware status page so others can read seqno. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/i915_gem_dmabuf.c | 29 -- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 87 drivers/gpu/drm/i915

[RFC PATCH 3/8] nouveau: Extend prime code

2012-07-10 Thread Maarten Lankhorst
From: Maarten Lankhorst The prime code no longer requires the bo to be backed by a gem object, and cpu access calls have been implemented. This will be needed for exporting fence bo's. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/nouveau/nouveau_drv.h |6 +- drivers/gp

[RFC PATCH 4/8] nouveau: add nouveau_bo_vma_add_access

2012-07-10 Thread Maarten Lankhorst
From: Maarten Lankhorst This is needed to allow creation of read-only vm mappings in fence objects. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/nouveau/nouveau_bo.c |6 +++--- drivers/gpu/drm/nouveau/nouveau_drv.h |6 -- 2 files changed, 7 insertions(+), 5 deletions

[RFC PATCH 6/8] nouveau: nv84 fence prime implementation

2012-07-10 Thread Maarten Lankhorst
From: Maarten Lankhorst Create a dma object for the prime semaphore and every imported sync bo. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/nouveau/nv84_fence.c | 121 -- 1 file changed, 115 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm

[RFC PATCH 5/8] nouveau: Add methods preparing for prime fencing

2012-07-10 Thread Maarten Lankhorst
From: Maarten Lankhorst This can be used by nv84 and nvc0 to implement hardware fencing, earlier systems will require more thought but can fall back to software for now. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/nouveau/nouveau_bo.c |6 +- drivers/gpu/drm/nouveau

[RFC PATCH 7/8] nouveau: nvc0 fence prime implementation

2012-07-10 Thread Maarten Lankhorst
From: Maarten Lankhorst Create a read-only mapping for every imported bo, and create a prime bo in in system memory. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/nouveau/nvc0_fence.c | 104 +- 1 file changed, 89 insertions(+), 15 deletions(-) diff

[RFC PATCH 8/8] nouveau: Prime execbuffer submission synchronization

2012-07-10 Thread Maarten Lankhorst
From: Maarten Lankhorst Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/nouveau/nouveau_gem.c | 121 +++-- 1 file changed, 116 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c index

Re: [PATCH] dma-fence: dma-buf synchronization

2012-07-11 Thread Maarten Lankhorst
f attach time instead, so drivers that support both know if an interrupt needs to be inserted in the command stream or not. > The memory location is itself backed by dma-buf, to simplify mapping > to the device's address space, an idea borrowed from Maarten Lankhorst. > > NOTE: the memo

Re: [Linaro-mm-sig] [PATCH 6/7] reservation: cross-device reservation support

2013-01-22 Thread Maarten Lankhorst
Op 22-01-13 17:47, Francesco Lavra schreef: > On 01/15/2013 01:34 PM, Maarten Lankhorst wrote: >> This adds support for a generic reservations framework that can be >> hooked up to ttm and dma-buf and allows easy sharing of reservations >> across devices. >> >> T

Re: [Linaro-mm-sig] [PATCH 4/7] fence: dma-buf cross-device synchronization (v11)

2013-01-23 Thread Maarten Lankhorst
Op 22-01-13 16:13, Francesco Lavra schreef: > Hi, > > On 01/15/2013 01:34 PM, Maarten Lankhorst wrote: > [...] >> diff --git a/include/linux/fence.h b/include/linux/fence.h >> new file mode 100644 >> index 000..d9f091d >> --- /dev/null >> +++

Re: [Linaro-mm-sig] [PATCH 2/3] mutex: add support for reservation style locks

2013-02-14 Thread Maarten Lankhorst
Hey, Op 14-02-13 11:22, Arnd Bergmann schreef: > On Thursday 07 February 2013, Maarten Lankhorst wrote: > > Hi Maarten, > > I cannot help a lot on this patch set, but there are a few things that > I noticed when reading it. > >> Functions: >> ---

Re: [PATCH] Revert "__d_unalias() should refuse to move mountpoints"

2012-10-12 Thread Maarten Lankhorst
Op 25-09-12 13:29, Eric W. Biederman schreef: > Maarten Lankhorst writes: > >>> Could you try the following patch? This should report what directories >>> cannot be renamed because one of them is a mount point and it gives some >>> real insight into what is going

Re: [PATCH] fb: Rework locking to fix lock ordering on takeover

2013-01-15 Thread Maarten Lankhorst
Hey, Op 13-01-13 01:02, Borislav Petkov schreef: > On Sat, Jan 12, 2013 at 01:13:23PM -0800, Andrew Morton wrote: >> Florian has been taking a month or two's downtime (now expired, I >> think) so I've been waiting for him to reappear to process this one for >> 3.8. >> >> Meanwhile, I guess we coul

[PATCH 0/7] cross-device reservation for dma-buf support

2013-01-15 Thread Maarten Lankhorst
So I'm resending the patch series for reservations. This is identical to my git tree at http://cgit.freedesktop.org/~mlankhorst/linux/ Some changes have been made since my last version. Most notably is the use of mutexes now instead of creating my own lock primitive, that would end up being dupli

[PATCH 4/7] fence: dma-buf cross-device synchronization (v11)

2013-01-15 Thread Maarten Lankhorst
n the fence is passed). v3: Fix locking fail in attach_fence() and get_fence() v4: Remove tie-in w/ dma-buf.. after 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 problem

[PATCH 6/7] reservation: cross-device reservation support

2013-01-15 Thread Maarten Lankhorst
done with the contents of the dma-buf. Signed-off-by: Maarten Lankhorst --- Documentation/DocBook/device-drivers.tmpl | 2 + drivers/base/Makefile | 2 +- drivers/base/reservation.c| 251 ++ include/linux/reservation.h

[PATCH 7/7] reservation: Add lockdep annotation and selftests

2013-01-15 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst --- The self-tests will fail if the commit "lockdep: Check if nested lock is actually held" from linux tip core/locking is not applied. --- lib/Kconfig.debug | 1 + lib/locking-selftest.c | 385 ++--

[PATCH 2/7] mutex: add support for reservation style locks

2013-01-15 Thread Maarten Lankhorst
makes it easier to port ttm over.. Signed-off-by: Maarten Lankhorst --- include/linux/mutex.h | 86 +- kernel/mutex.c| 317 +++--- 2 files changed, 387 insertions(+), 16 deletions(-) diff --git a/include/linux/mutex.h b/include

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

2013-01-15 Thread Maarten Lankhorst
Not exported, since only used by the fence implementation. Signed-off-by: Maarten Lankhorst --- include/linux/wait.h | 1 + kernel/sched/core.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/wait.h b/include/linux/wait.h index 7cb64d4..7aaba95 100644 --- a

[PATCH 1/7] arch: add __mutex_fastpath_lock_retval_arg to generic/sh/x86/powerpc/ia64

2013-01-15 Thread Maarten Lankhorst
Needed for reservation slowpath. --- arch/ia64/include/asm/mutex.h| 20 arch/powerpc/include/asm/mutex.h | 20 arch/sh/include/asm/mutex-llsc.h | 20 arch/x86/include/asm/mutex_32.h | 20 arch/x86/include/asm/

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

2013-01-15 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 ---

Re: [PATCH 2/7] mutex: add support for reservation style locks

2013-01-15 Thread Maarten Lankhorst
Woops, missed the updated patch description.. Op 15-01-13 13:33, Maarten Lankhorst schreef: > makes it easier to port ttm over.. > > Signed-off-by: Maarten Lankhorst mutex_reserve_lock, and mutex_reserve_lock_interruptible: Lock a buffer with a reservation_id set. reservation_id mu

Re: [PATCH 1/7] arch: add __mutex_fastpath_lock_retval_arg to generic/sh/x86/powerpc/ia64

2013-01-15 Thread Maarten Lankhorst
Again, missing entry :( Op 15-01-13 13:33, Maarten Lankhorst schreef: > Needed for reservation slowpath. I was hoping to convert the 'mutexes' in ttm to proper mutexes, so I extended the core mutex code slightly to add support for reservations. This requires however passing a

[PATCH 5/5] reservation: Add lockdep annotation and selftests

2012-09-28 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst --- The self-tests will fail if the commit "lockdep: Check if nested lock is actually held" from linux tip core/locking is not applied. --- drivers/base/reservation.c | 46 +- include/linux/reservation.h | 29 +++- lib/Kconfig.debug

[PATCH 1/5] dma-buf: remove fallback for !CONFIG_DMA_SHARED_BUFFER

2012-09-28 Thread Maarten Lankhorst
Documentation says that code requiring dma-buf should add it to select, so inline fallbacks are not going to be used. A link error will make it obvious what went wrong, instead of silently doing nothing at runtime. Signed-off-by: Maarten Lankhorst --- include/linux/dma-buf.h | 99

[PATCH 2/5] fence: dma-buf cross-device synchronization (v9)

2012-09-28 Thread Maarten Lankhorst
cussion 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 removed dma_fe

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

2012-09-28 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 Signed-off-by: Maarten Lankhorst --- Documentation/DocBook/device-drivers.tmpl |

[PATCH 4/5] reservation: cross-device reservation support

2012-09-28 Thread Maarten Lankhorst
: Maarten Lankhorst --- Documentation/DocBook/device-drivers.tmpl |2 drivers/base/Makefile |2 drivers/base/reservation.c| 285 + include/linux/reservation.h | 179 ++ 4 files changed, 467

Re: [PATCH 1/5] dma-buf: remove fallback for !CONFIG_DMA_SHARED_BUFFER

2012-09-28 Thread Maarten Lankhorst
Hey, Op 28-09-12 14:41, Maarten Lankhorst schreef: > Documentation says that code requiring dma-buf should add it to > select, so inline fallbacks are not going to be used. A link error > will make it obvious what went wrong, instead of silently doing > nothing at runtime. >

Re: [PATCH 4/5] reservation: cross-device reservation support

2012-09-28 Thread Maarten Lankhorst
Op 28-09-12 17:29, Thomas Hellström schreef: > On 9/28/12 2:43 PM, Maarten Lankhorst wrote: >> This adds support for a generic reservations framework that can be >> hooked up to ttm and dma-buf and allows easy sharing of reservations >> across devices. >> >> T

Re: [PATCH 1/5] dma-buf: remove fallback for !CONFIG_DMA_SHARED_BUFFER

2012-09-29 Thread Maarten Lankhorst
Op 28-09-12 22:10, Thomas Hellstrom schreef: > On 09/28/2012 09:42 PM, Thomas Hellstrom wrote: >> On 09/28/2012 04:14 PM, Maarten Lankhorst wrote: >>> Hey, >>> >>> Op 28-09-12 14:41, Maarten Lankhorst schreef: >>>> Documentation says that code re

Re: [PATCH 1/5] dma-buf: remove fallback for !CONFIG_DMA_SHARED_BUFFER

2012-10-01 Thread Maarten Lankhorst
Op 28-09-12 21:42, Thomas Hellstrom schreef: > On 09/28/2012 04:14 PM, Maarten Lankhorst wrote: >> Hey, >> >> Op 28-09-12 14:41, Maarten Lankhorst schreef: >>> Documentation says that code requiring dma-buf should add it to >>> select, so inline fallbacks

Re: [Linaro-mm-sig] [PATCH 5/7] seqno-fence: Hardware dma-buf implementation of fencing (v4)

2013-01-16 Thread Maarten Lankhorst
Op 16-01-13 07:28, Inki Dae schreef: > 2013/1/15 Maarten Lankhorst : >> This type of fence can be used with hardware synchronization for simple >> hardware that can block execution until the condition >> (dma_buf[offset] - value) >= 0 has been met. >> >>

Re: [PATCH v12 5/7] drm/i915/skl: Ensure pipes with changed wms get added to the state

2016-09-20 Thread Maarten Lankhorst
wn, we need to add them ourselves. > >Signed-off-by: Lyude >Reviewed-by: Matt Roper >Cc: sta...@vger.kernel.org >Cc: Ville Syrjälä >Cc: Daniel Vetter >Cc: Radhakrishna Sripada >Cc: Hans de Goede >Signed-off-by: Maarten Lankhorst >

Re: [Intel-gfx] [PATCH v4 0/6] Finally fix watermarks

2016-08-01 Thread Maarten Lankhorst
Op 29-07-16 om 22:33 schreef Matt Roper: > On Fri, Jul 29, 2016 at 12:39:05PM +0300, Ville Syrjälä wrote: >> On Thu, Jul 28, 2016 at 05:03:52PM -0700, Matt Roper wrote: >>> This is completely untested (and probably horribly broken/buggy), but >>> here's a quick mockup of the general approach I was

Re: [RFC v4 1/3] drm/fence: add in-fences support

2016-08-31 Thread Maarten Lankhorst
Op 31-08-16 om 21:07 schreef 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_collectio

Re: [PATCH v8 2/6] drm/i915/gen9: Only copy WM results for changed pipes to skl_hw

2016-08-08 Thread Maarten Lankhorst
use this later > > Fixes: 734fa01f3a17 ("drm/i915/gen9: Calculate watermarks during atomic > 'check' (v2)") > Fixes: 9b6130227495 ("drm/i915/gen9: Re-allocate DDB only for changed pipes") > Signed-off-by: Matt Roper > Signed-off-by: Lyude > Revie

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

2016-08-08 Thread Maarten Lankhorst
Op 20-06-16 om 17:53 schreef Gustavo Padovan: > From: Gustavo Padovan > > When creating a sync_pt the name received wasn't used anywhere. > Now we add it to the sync info debug output to make it easier to indetify > the userspace name of that sync pt. > > Signed-off-by: Gustavo Padovan > --- > d

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

2015-09-07 Thread Maarten Lankhorst
Op 08-09-15 om 01:42 schreef Stephen Rothwell: > Hi all, > > On Thu, 3 Sep 2015 10:49:19 +1000 Stephen Rothwell > wrote: >> After merging the drm-misc tree, today's linux-next build (arm >> multi_v7_defconfig) failed like this: >> >> drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c: In function >> 'mdp

Re: [RFC PATCH] drm/atomic: add ASYNC_UPDATE flag to the Atomic IOCTL.

2018-06-28 Thread Maarten Lankhorst
Op 27-06-18 om 23:25 schreef Enric Balletbo i Serra: > From: Gustavo Padovan > > This flag tells core to jump ahead the queued update if the conditions > in drm_atomic_async_check() are met. That means we are only able to do an > async update if no modeset is pending and update for the same plane

Re: [RFC PATCH] drm: Add per-plane pixel blend mode property

2018-05-17 Thread Maarten Lankhorst
Op 08-05-18 om 12:34 schreef Lowry Li: > Pixel blend modes represent the alpha blending equation > selection, describing how the pixels from the current > plane are composited with the background. > > Add a pixel_blend_mode to drm_plane_state and a > blend_mode_property to drm_plane, and related su

Re: WARNING: lock held when returning to user space in set_property_atomic

2019-01-03 Thread Maarten Lankhorst
Op 30-12-2018 om 07:21 schreef syzbot: > Hello, > > syzbot found the following crash on: > > HEAD commit:    903b77c63167 Merge tag 'linux-kselftest-4.21-rc1' of git:/.. > git tree:   upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=12d0f55340 > kernel config:  https://s

[RFC PATCH] unlock rtnl mutex in ic_open_devs while waiting

2015-01-05 Thread Maarten Lankhorst
This fixes a deadlock with alx_link_check, which takes the rtnl_mutex in a work item to check the link. I have no idea whether alx should be fixed or ipconfig.c, but this saves 120 seconds off my boot time. ;-) Signed-off-by: Maarten Lankhorst --- diff --git a/net/ipv4/ipconfig.c b/net/ipv4

Re: [RFC PATCH] unlock rtnl mutex in ic_open_devs while waiting

2015-01-07 Thread Maarten Lankhorst
Op 06-01-15 om 23:21 schreef David Miller: > From: Maarten Lankhorst > Date: Mon, 05 Jan 2015 14:52:06 +0100 > >> This fixes a deadlock with alx_link_check, which takes the rtnl_mutex in >> a work item to check the link. >> >> I have no idea whether alx should be

Re: [RFC] dma-fence: dma-buf synchronization (v2)

2012-07-13 Thread Maarten Lankhorst
Hey, Op 13-07-12 20:52, Rob Clark schreef: > On Fri, Jul 13, 2012 at 12:35 PM, Tom Cooksey wrote: >> My other thought is around atomicity. Could this be extended to >> (safely) allow for hardware devices which might want to access >> multiple buffers simultaneously? I think it probably can with >

Re: [RFC] dma-fence: dma-buf synchronization (v2)

2012-07-16 Thread Maarten Lankhorst
Hey Rob, Op 13-07-12 17:38, Rob Clark schreef: > ... > +/** > + * dma_buf_attach_fence - Attach a fence to a dma-buf. > + * > + * @buf: the dma-buf to attach to > + * @fence: the fence to attach > + * > + * A fence can only be attached to a single dma-buf. The dma-buf takes > + * ownership of the

Re: [lkp] [drm/i915] 7f072451f2d: [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO underrun

2015-06-15 Thread Maarten Lankhorst
Hey, Op 15-06-15 om 08:58 schreef Huang Ying: > FYI, we noticed the below changes on > > git://anongit.freedesktop.org/drm-intel drm-intel-next-queued > commit 7f072451f2d3d53e4f6939440e15ab36afed2051 ("drm/i915: Implement > intel_crtc_control using atomic state, v4") > > Test Environment check:

Re: [PATCH 1/2] drm/fourcc: add a 10bits fully packed variant of NV12

2018-05-22 Thread Maarten Lankhorst
Op 20-05-18 om 19:17 schreef Randy Li: > This pixel format is a fully packed and 10bits variant of NV12. > A luma pixel would take 10bits in memory, without any > filled bits between pixels in a stride. The color gamut > follows the BT.2020 standard. > > Signed-off-by: Randy Li > --- > drivers/gp

Re: [PATCH 1/2] drm/fourcc: add a 10bits fully packed variant of NV12

2018-05-22 Thread Maarten Lankhorst
Op 20-05-18 om 19:17 schreef Randy Li: > This pixel format is a fully packed and 10bits variant of NV12. > A luma pixel would take 10bits in memory, without any > filled bits between pixels in a stride. The color gamut > follows the BT.2020 standard. > > Signed-off-by: Randy Li > --- > drivers/gp

<    1   2   3   4   5   6   >