1 #ifndef __NVKM_EVENT_H__
2 #define __NVKM_EVENT_H__
4 /* return codes from event handlers */
5 #define NVKM_EVENT_DROP 0
6 #define NVKM_EVENT_KEEP 1
8 /* nouveau_eventh.flags bit #s */
9 #define NVKM_EVENT_ENABLE 0
11 struct nouveau_eventh {
12 struct nouveau_event *event;
13 struct list_head head;
16 int (*func)(void *, int);
20 struct nouveau_event {
25 void (*enable)(struct nouveau_event *, int index);
26 void (*disable)(struct nouveau_event *, int index);
30 struct list_head list;
35 int nouveau_event_create(int index_nr, struct nouveau_event **);
36 void nouveau_event_destroy(struct nouveau_event **);
37 void nouveau_event_trigger(struct nouveau_event *, int index);
39 int nouveau_event_new(struct nouveau_event *, int index,
40 int (*func)(void *, int), void *,
41 struct nouveau_eventh **);
42 void nouveau_event_ref(struct nouveau_eventh *, struct nouveau_eventh **);
43 void nouveau_event_get(struct nouveau_eventh *);
44 void nouveau_event_put(struct nouveau_eventh *);