1 /* SPDX-License-Identifier: MIT */
2 #ifndef __NOUVEAU_ABI16_H__
3 #define __NOUVEAU_ABI16_H__
5 #define ABI16_IOCTL_ARGS \
6 struct drm_device *dev, void *data, struct drm_file *file_priv
8 int nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS);
9 int nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS);
10 int nouveau_abi16_ioctl_channel_free(ABI16_IOCTL_ARGS);
11 int nouveau_abi16_ioctl_grobj_alloc(ABI16_IOCTL_ARGS);
12 int nouveau_abi16_ioctl_notifierobj_alloc(ABI16_IOCTL_ARGS);
13 int nouveau_abi16_ioctl_gpuobj_free(ABI16_IOCTL_ARGS);
15 struct nouveau_abi16_ntfy {
16 struct nvif_object object;
17 struct list_head head;
18 struct nvkm_mm_node *node;
21 struct nouveau_abi16_chan {
22 struct list_head head;
23 struct nouveau_channel *chan;
24 struct nvif_object ce;
25 struct list_head notifiers;
26 struct nouveau_bo *ntfy;
27 struct nouveau_vma *ntfy_vma;
29 struct nouveau_sched *sched;
32 struct nouveau_abi16 {
33 struct nvif_device device;
34 struct list_head channels;
38 struct nouveau_abi16 *nouveau_abi16_get(struct drm_file *);
39 int nouveau_abi16_put(struct nouveau_abi16 *, int);
40 void nouveau_abi16_fini(struct nouveau_abi16 *);
41 s32 nouveau_abi16_swclass(struct nouveau_drm *);
42 int nouveau_abi16_usif(struct drm_file *, void *data, u32 size);
44 #define NOUVEAU_GEM_DOMAIN_VRAM (1 << 1)
45 #define NOUVEAU_GEM_DOMAIN_GART (1 << 2)
47 struct drm_nouveau_grobj_alloc {
53 struct drm_nouveau_notifierobj_alloc {
60 struct drm_nouveau_gpuobj_free {
65 struct drm_nouveau_setparam {
70 #define DRM_IOCTL_NOUVEAU_SETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_SETPARAM, struct drm_nouveau_setparam)
71 #define DRM_IOCTL_NOUVEAU_GROBJ_ALLOC DRM_IOW (DRM_COMMAND_BASE + DRM_NOUVEAU_GROBJ_ALLOC, struct drm_nouveau_grobj_alloc)
72 #define DRM_IOCTL_NOUVEAU_NOTIFIEROBJ_ALLOC DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_NOTIFIEROBJ_ALLOC, struct drm_nouveau_notifierobj_alloc)
73 #define DRM_IOCTL_NOUVEAU_GPUOBJ_FREE DRM_IOW (DRM_COMMAND_BASE + DRM_NOUVEAU_GPUOBJ_FREE, struct drm_nouveau_gpuobj_free)