search for: nouveau_event_put_lock

Displaying 10 results from an estimated 10 matches for "nouveau_event_put_lock".

2013 Aug 27
0
[PATCH 7/9] drm/nouveau: Fold nouveau_event_put_locked into caller
nouveau_event_put_locked() only has 1 call site; fold into caller. Signed-off-by: Peter Hurley <peter at hurleysoftware.com> --- drivers/gpu/drm/nouveau/core/core/event.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/nouveau/core/core/event.c b/drivers/gp...
2013 Dec 01
0
3.12 nvidia switcheroo regression
...: 2 PID: 2738 Comm: bash Tainted: PF O 3.12.2-ninja+ #3 Hardware name: Apple Inc. MacBookPro10,1/Mac-C3EC7CD22292981F, BIOS MBP101.88Z.00EE.B02.1208081132 08/08/2012 task: ffff880262bb5d00 ti: ffff88008624e000 task.ti: ffff88008624e000 RIP: 0010:[<ffffffffa0159b81>] [<ffffffffa0159b81>] nouveau_event_put_locked+0x31/0x60 [nouveau] RSP: 0018:ffff88008624fd48 EFLAGS: 00010097 RAX: dead000000200200 RBX: ffff88025e8bad88 RCX: 0000000000000010 RDX: dead000000100100 RSI: 0000000000000011 RDI: ffff88025ef36400 RBP: ffff88008624fd50 R08: 0000000000000217 R09: 000000000000052d R10: 0000000000000000 R11: ffff8800...
2013 Aug 12
2
[PATCH] drm/nouveau: fix vblank deadlock
.../gpu/drm/nouveau/core/core/event.c b/drivers/gpu/drm/nouveau/core/core/event.c index 7eb81c1..78bff7c 100644 --- a/drivers/gpu/drm/nouveau/core/core/event.c +++ b/drivers/gpu/drm/nouveau/core/core/event.c @@ -23,43 +23,64 @@ #include <core/os.h> #include <core/event.h> -static void -nouveau_event_put_locked(struct nouveau_event *event, int index, - struct nouveau_eventh *handler) -{ - if (!--event->index[index].refs) { - if (event->disable) - event->disable(event, index); - } - list_del(&handler->head); -} - void nouveau_event_put(struct nouveau_event *event, int index,...
2013 Aug 27
11
[PATCH 0/9] drm/nouveau: Cleanup event/handler design
...andlers drm/nouveau: Move event index check from critical section drm/nouveau: Allocate local event handlers drm/nouveau: Allow asymmetric nouveau_event_get/_put drm/nouveau: Add install/remove semantics for event handlers drm/nouveau: Convert event handler list to RCU drm/nouveau: Fold nouveau_event_put_locked into caller drm/nouveau: Simplify event interface drm/nouveau: Simplify event handler interface drivers/gpu/drm/nouveau/core/core/event.c | 121 +++++++++++++++++---- .../gpu/drm/nouveau/core/engine/software/nv50.c | 32 ++++-- .../gpu/drm/nouveau/core/engine/software/nvc0.c...
2013 Aug 19
0
[PATCH] drm/nouveau: fix vblank deadlock
...gpu/drm/nouveau/core/core/event.c > index 7eb81c1..78bff7c 100644 > --- a/drivers/gpu/drm/nouveau/core/core/event.c > +++ b/drivers/gpu/drm/nouveau/core/core/event.c > @@ -23,43 +23,64 @@ > #include <core/os.h> > #include <core/event.h> > > -static void > -nouveau_event_put_locked(struct nouveau_event *event, int index, > - struct nouveau_eventh *handler) > -{ > - if (!--event->index[index].refs) { > - if (event->disable) > - event->disable(event, index); > - } > - list_del(&handler->head); > -} > - > void > nouvea...
2013 Aug 27
0
[PATCH 5/9] drm/nouveau: Add install/remove semantics for event handlers
...+ return; + + spin_lock_irqsave(&event->lock, flags); + if (!--event->index[index].refs) { + if (event->disable) + event->disable(event, index); + } + list_del(&handler->head); + spin_unlock_irqrestore(&event->lock, flags); kfree(handler); } @@ -56,7 +108,6 @@ nouveau_event_put_locked(struct nouveau_event *event, int index, if (event->disable) event->disable(event, index); } - list_del(&handler->head); } } @@ -85,7 +136,6 @@ nouveau_event_get(struct nouveau_event *event, int index, spin_lock_irqsave(&event->lock, flags); if (!__test_...
2013 Aug 27
0
[PATCH 3/9] drm/nouveau: Allocate local event handlers
...= func; + handler->priv = priv; + nouveau_event_get(event, index, handler); + return 0; +} + +void +nouveau_event_handler_destroy(struct nouveau_event *event, int index, + struct nouveau_eventh *handler) +{ + nouveau_event_put(event, index, handler); + kfree(handler); +} + static void nouveau_event_put_locked(struct nouveau_event *event, int index, struct nouveau_eventh *handler) diff --git a/drivers/gpu/drm/nouveau/core/include/core/event.h b/drivers/gpu/drm/nouveau/core/include/core/event.h index ad4d8c2..bdf1a0a 100644 --- a/drivers/gpu/drm/nouveau/core/include/core/event.h +++ b/drivers/gpu/d...
2013 Aug 27
0
[PATCH 4/9] drm/nouveau: Allow asymmetric nouveau_event_get/_put
...anged, 18 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/nouveau/core/core/event.c b/drivers/gpu/drm/nouveau/core/core/event.c index 1a8d685..0a65ede 100644 --- a/drivers/gpu/drm/nouveau/core/core/event.c +++ b/drivers/gpu/drm/nouveau/core/core/event.c @@ -51,11 +51,13 @@ static void nouveau_event_put_locked(struct nouveau_event *event, int index, struct nouveau_eventh *handler) { - if (!--event->index[index].refs) { - if (event->disable) - event->disable(event, index); + if (__test_and_clear_bit(NVKM_EVENT_ENABLE, &handler->flags)) { + if (!--event->index[index].refs) {...
2013 Aug 28
0
[PATCH 0/9] drm/nouveau: Cleanup event/handler design
...ve event index check from critical section > drm/nouveau: Allocate local event handlers > drm/nouveau: Allow asymmetric nouveau_event_get/_put > drm/nouveau: Add install/remove semantics for event handlers > drm/nouveau: Convert event handler list to RCU > drm/nouveau: Fold nouveau_event_put_locked into caller > drm/nouveau: Simplify event interface > drm/nouveau: Simplify event handler interface > > drivers/gpu/drm/nouveau/core/core/event.c | 121 +++++++++++++++++---- > .../gpu/drm/nouveau/core/engine/software/nv50.c | 32 ++++-- > .../gpu/drm/nouveau/c...
2013 Aug 27
0
[PATCH 6/9] drm/nouveau: Convert event handler list to RCU
...or_each_entry_safe(handler, temp, &event->index[index].list, head) { + rcu_read_lock(); + list_for_each_entry_rcu(handler, &event->index[index].list, head) { if (test_bit(NVKM_EVENT_ENABLE, &handler->flags)) { if (handler->func(handler, index) == NVKM_EVENT_DROP) - nouveau_event_put_locked(event, index, handler); + nouveau_event_put(event, index, handler); } } - spin_unlock_irqrestore(&event->lock, flags); + rcu_read_unlock(); } void diff --git a/drivers/gpu/drm/nouveau/core/engine/software/nv50.c b/drivers/gpu/drm/nouveau/core/engine/software/nv50.c index dfce1f...