Displaying 4 results from an estimated 4 matches for "nouveau_event_handler_cr".
2013 Aug 27
0
[PATCH 3/9] drm/nouveau: Allocate local event handlers
Prepare for transition to RCU-based event handler list;
since RCU list traversal may have stale pointers, local
storage may go out of scope before handler completes.
Introduce nouveau_event_handler_create/_destroy which provides
suitable semantics for multiple, temporary event handlers.
Signed-off-by: Peter Hurley <peter at hurleysoftware.com>
---
drivers/gpu/drm/nouveau/core/core/event.c | 24 +++++++++++++++++++++++
drivers/gpu/drm/nouveau/core/include/core/event.h | 6 ++++++...
2013 Aug 27
11
[PATCH 0/9] drm/nouveau: Cleanup event/handler design
This series was originally motivated by a deadlock, introduced in
commit 1d7c71a3e2f77336df536855b0efd2dc5bdeb41b
'drm/nouveau/disp: port vblank handling to event interface',
due to inverted lock order between nouveau_drm_vblank_enable()
and nouveau_drm_vblank_handler() (the complete
lockdep report is included in the patch 4/5 changelog).
Because this series fixes the vblank event
2013 Aug 27
0
[PATCH 5/9] drm/nouveau: Add install/remove semantics for event handlers
...uveau_event *event, int index,
+ struct nouveau_eventh *handler)
+{
+ unsigned long flags;
+
+ if (index >= event->index_nr)
+ return;
+
+ spin_lock_irqsave(&event->lock, flags);
+ list_del(&handler->head);
+ spin_unlock_irqrestore(&event->lock, flags);
+}
+
int
nouveau_event_handler_create(struct nouveau_event *event, int index,
int (*func)(struct nouveau_eventh*, int),
void *priv, struct nouveau_eventh **phandler)
{
struct nouveau_eventh *handler;
+ unsigned long flags;
handler = *phandler = kzalloc(sizeof(*handler), GFP_KERNEL);
if (!handler)
retur...
2013 Aug 27
0
[PATCH 6/9] drm/nouveau: Convert event handler list to RCU
...@@ -51,7 +52,7 @@ nouveau_event_handler_remove(struct nouveau_event *event, int index,
return;
spin_lock_irqsave(&event->lock, flags);
- list_del(&handler->head);
+ list_del_rcu(&handler->head);
spin_unlock_irqrestore(&event->lock, flags);
}
@@ -71,7 +72,7 @@ nouveau_event_handler_create(struct nouveau_event *event, int index,
__set_bit(NVKM_EVENT_ENABLE, &handler->flags);
spin_lock_irqsave(&event->lock, flags);
- list_add(&handler->head, &event->index[index].list);
+ list_add_rcu(&handler->head, &event->index[index].list);
if (...