Add the rt linux 4.1.3-rt3 as base
[kvmfornfv.git] / kernel / drivers / gpu / drm / nouveau / include / nvkm / core / notify.h
1 #ifndef __NVKM_NOTIFY_H__
2 #define __NVKM_NOTIFY_H__
3 #include <core/os.h>
4 struct nvkm_object;
5
6 struct nvkm_notify {
7         struct nvkm_event *event;
8         struct list_head head;
9 #define NVKM_NOTIFY_USER 0
10 #define NVKM_NOTIFY_WORK 1
11         unsigned long flags;
12         int block;
13 #define NVKM_NOTIFY_DROP 0
14 #define NVKM_NOTIFY_KEEP 1
15         int (*func)(struct nvkm_notify *);
16
17         /* set by nvkm_event ctor */
18         u32 types;
19         int index;
20         u32 size;
21
22         struct work_struct work;
23         /* this is const for a *very* good reason - the data might be on the
24          * stack from an irq handler.  if you're not core/notify.c then you
25          * should probably think twice before casting it away...
26          */
27         const void *data;
28 };
29
30 int  nvkm_notify_init(struct nvkm_object *, struct nvkm_event *,
31                       int (*func)(struct nvkm_notify *), bool work,
32                       void *data, u32 size, u32 reply,
33                       struct nvkm_notify *);
34 void nvkm_notify_fini(struct nvkm_notify *);
35 void nvkm_notify_get(struct nvkm_notify *);
36 void nvkm_notify_put(struct nvkm_notify *);
37 void nvkm_notify_send(struct nvkm_notify *, void *data, u32 size);
38 #endif