diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2013-04-26 12:03:10 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2013-04-26 15:38:16 +1000 |
commit | 10eeaf123dd55cd2c1d2d23366d211dafbe71bde (patch) | |
tree | 4f95a37ea89fd8574293d855fb8efe2eadeae0aa /drivers/gpu | |
parent | 6d1d1cc97b8b24e9f7842de13f4b00393392c990 (diff) | |
download | op-kernel-dev-10eeaf123dd55cd2c1d2d23366d211dafbe71bde.zip op-kernel-dev-10eeaf123dd55cd2c1d2d23366d211dafbe71bde.tar.gz |
drm/nouveau/core: allow non-maskable events
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/nouveau/core/core/event.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/core/core/event.c b/drivers/gpu/drm/nouveau/core/core/event.c index 6d01e0f..7eb81c1 100644 --- a/drivers/gpu/drm/nouveau/core/core/event.c +++ b/drivers/gpu/drm/nouveau/core/core/event.c @@ -27,8 +27,10 @@ static void nouveau_event_put_locked(struct nouveau_event *event, int index, struct nouveau_eventh *handler) { - if (!--event->index[index].refs) - event->disable(event, index); + if (!--event->index[index].refs) { + if (event->disable) + event->disable(event, index); + } list_del(&handler->head); } @@ -53,8 +55,10 @@ nouveau_event_get(struct nouveau_event *event, int index, spin_lock_irqsave(&event->lock, flags); if (index < event->index_nr) { list_add(&handler->head, &event->index[index].list); - if (!event->index[index].refs++) - event->enable(event, index); + if (!event->index[index].refs++) { + if (event->enable) + event->enable(event, index); + } } spin_unlock_irqrestore(&event->lock, flags); } |