0001
0002 #ifndef __NVKM_NOTIFY_H__
0003 #define __NVKM_NOTIFY_H__
0004 #include <core/os.h>
0005 struct nvkm_object;
0006
0007 struct nvkm_notify {
0008 struct nvkm_event *event;
0009 struct list_head head;
0010 #define NVKM_NOTIFY_USER 0
0011 #define NVKM_NOTIFY_WORK 1
0012 unsigned long flags;
0013 int block;
0014 #define NVKM_NOTIFY_DROP 0
0015 #define NVKM_NOTIFY_KEEP 1
0016 int (*func)(struct nvkm_notify *);
0017
0018
0019 u32 types;
0020 int index;
0021 u32 size;
0022
0023 struct work_struct work;
0024
0025
0026
0027
0028 const void *data;
0029 };
0030
0031 int nvkm_notify_init(struct nvkm_object *, struct nvkm_event *,
0032 int (*func)(struct nvkm_notify *), bool work,
0033 void *data, u32 size, u32 reply,
0034 struct nvkm_notify *);
0035 void nvkm_notify_fini(struct nvkm_notify *);
0036 void nvkm_notify_get(struct nvkm_notify *);
0037 void nvkm_notify_put(struct nvkm_notify *);
0038 void nvkm_notify_send(struct nvkm_notify *, void *data, u32 size);
0039 #endif