Commit 10eeaf12 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/core: allow non-maskable events

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 6d1d1cc9
...@@ -27,8 +27,10 @@ static void ...@@ -27,8 +27,10 @@ static void
nouveau_event_put_locked(struct nouveau_event *event, int index, nouveau_event_put_locked(struct nouveau_event *event, int index,
struct nouveau_eventh *handler) struct nouveau_eventh *handler)
{ {
if (!--event->index[index].refs) if (!--event->index[index].refs) {
if (event->disable)
event->disable(event, index); event->disable(event, index);
}
list_del(&handler->head); list_del(&handler->head);
} }
...@@ -53,9 +55,11 @@ nouveau_event_get(struct nouveau_event *event, int index, ...@@ -53,9 +55,11 @@ nouveau_event_get(struct nouveau_event *event, int index,
spin_lock_irqsave(&event->lock, flags); spin_lock_irqsave(&event->lock, flags);
if (index < event->index_nr) { if (index < event->index_nr) {
list_add(&handler->head, &event->index[index].list); list_add(&handler->head, &event->index[index].list);
if (!event->index[index].refs++) if (!event->index[index].refs++) {
if (event->enable)
event->enable(event, index); event->enable(event, index);
} }
}
spin_unlock_irqrestore(&event->lock, flags); spin_unlock_irqrestore(&event->lock, flags);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment