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