aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/core/include/core/event.h
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2013-08-27 16:12:57 -0400
committerBen Skeggs <bskeggs@redhat.com>2013-11-08 15:36:03 +1000
commitac51bb09837098c422a8825bc155ccd736b9632d (patch)
treeacea0f5016b1376a64ac42222655c8ef67f98153 /drivers/gpu/drm/nouveau/core/include/core/event.h
parentdrm/nouveau/core: Move event index check from critical section (diff)
downloadlinux-dev-ac51bb09837098c422a8825bc155ccd736b9632d.tar.xz
linux-dev-ac51bb09837098c422a8825bc155ccd736b9632d.zip
drm/nouveau/core: Allow asymmetric nouveau_event_get/_put
Most nouveau event handlers have storage in 'static' containers (structures with lifetimes nearly equivalent to the drm_device), but are dangerously reused via nouveau_event_get/_put. For example, if nouveau_event_get is called more than once for a given handler, the event handler list will be corrupted. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/core/include/core/event.h')
-rw-r--r--drivers/gpu/drm/nouveau/core/include/core/event.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/core/include/core/event.h b/drivers/gpu/drm/nouveau/core/include/core/event.h
index ad4d8c283d5f..cb2f632cb3a5 100644
--- a/drivers/gpu/drm/nouveau/core/include/core/event.h
+++ b/drivers/gpu/drm/nouveau/core/include/core/event.h
@@ -5,8 +5,12 @@
#define NVKM_EVENT_DROP 0
#define NVKM_EVENT_KEEP 1
+/* nouveau_eventh.flags bit #s */
+#define NVKM_EVENT_ENABLE 0
+
struct nouveau_eventh {
struct list_head head;
+ unsigned long flags;
void *priv;
int (*func)(struct nouveau_eventh *, int index);
};