Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / drivers / gpu / drm / nouveau / include / nvif / notify.h
blob4ed1692306575f0b1b9594dad7f71eb99480a272
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __NVIF_NOTIFY_H__
3 #define __NVIF_NOTIFY_H__
5 struct nvif_notify {
6 struct nvif_object *object;
7 int index;
9 #define NVIF_NOTIFY_USER 0
10 #define NVIF_NOTIFY_WORK 1
11 unsigned long flags;
12 atomic_t putcnt;
13 void (*dtor)(struct nvif_notify *);
14 #define NVIF_NOTIFY_DROP 0
15 #define NVIF_NOTIFY_KEEP 1
16 int (*func)(struct nvif_notify *);
18 /* this is const for a *very* good reason - the data might be on the
19 * stack from an irq handler. if you're not nvif/notify.c then you
20 * should probably think twice before casting it away...
22 const void *data;
23 u32 size;
24 struct work_struct work;
27 int nvif_notify_init(struct nvif_object *, int (*func)(struct nvif_notify *),
28 bool work, u8 type, void *data, u32 size, u32 reply,
29 struct nvif_notify *);
30 int nvif_notify_fini(struct nvif_notify *);
31 int nvif_notify_get(struct nvif_notify *);
32 int nvif_notify_put(struct nvif_notify *);
33 int nvif_notify(const void *, u32, const void *, u32);
34 #endif