]>
git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blob - drivers/gpu/drm/nouveau/include/nvkm/core/notify.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __NVKM_NOTIFY_H__
3 #define __NVKM_NOTIFY_H__
8 struct nvkm_event
*event
;
10 #define NVKM_NOTIFY_USER 0
11 #define NVKM_NOTIFY_WORK 1
14 #define NVKM_NOTIFY_DROP 0
15 #define NVKM_NOTIFY_KEEP 1
16 int (*func
)(struct nvkm_notify
*);
18 /* set by nvkm_event ctor */
23 struct work_struct work
;
24 /* this is const for a *very* good reason - the data might be on the
25 * stack from an irq handler. if you're not core/notify.c then you
26 * should probably think twice before casting it away...
31 int nvkm_notify_init(struct nvkm_object
*, struct nvkm_event
*,
32 int (*func
)(struct nvkm_notify
*), bool work
,
33 void *data
, u32 size
, u32 reply
,
34 struct nvkm_notify
*);
35 void nvkm_notify_fini(struct nvkm_notify
*);
36 void nvkm_notify_get(struct nvkm_notify
*);
37 void nvkm_notify_put(struct nvkm_notify
*);
38 void nvkm_notify_send(struct nvkm_notify
*, void *data
, u32 size
);