2012-05-07 18:24:27 -06:00
|
|
|
#ifndef __NOUVEAU_ABI16_H__
|
|
|
|
#define __NOUVEAU_ABI16_H__
|
|
|
|
|
|
|
|
#define ABI16_IOCTL_ARGS \
|
|
|
|
struct drm_device *dev, void *data, struct drm_file *file_priv
|
2012-07-19 16:17:34 -06:00
|
|
|
|
2012-05-07 18:24:27 -06:00
|
|
|
int nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS);
|
|
|
|
int nouveau_abi16_ioctl_setparam(ABI16_IOCTL_ARGS);
|
|
|
|
int nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS);
|
|
|
|
int nouveau_abi16_ioctl_channel_free(ABI16_IOCTL_ARGS);
|
|
|
|
int nouveau_abi16_ioctl_grobj_alloc(ABI16_IOCTL_ARGS);
|
|
|
|
int nouveau_abi16_ioctl_notifierobj_alloc(ABI16_IOCTL_ARGS);
|
|
|
|
int nouveau_abi16_ioctl_gpuobj_free(ABI16_IOCTL_ARGS);
|
|
|
|
|
2012-07-19 16:17:34 -06:00
|
|
|
struct nouveau_abi16_ntfy {
|
2015-08-19 22:54:15 -06:00
|
|
|
struct nvif_object object;
|
2012-07-19 16:17:34 -06:00
|
|
|
struct list_head head;
|
2015-01-13 22:36:34 -07:00
|
|
|
struct nvkm_mm_node *node;
|
2012-07-19 16:17:34 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
struct nouveau_abi16_chan {
|
|
|
|
struct list_head head;
|
|
|
|
struct nouveau_channel *chan;
|
|
|
|
struct list_head notifiers;
|
|
|
|
struct nouveau_bo *ntfy;
|
2015-01-13 22:36:34 -07:00
|
|
|
struct nvkm_vma ntfy_vma;
|
|
|
|
struct nvkm_mm heap;
|
2012-07-19 16:17:34 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
struct nouveau_abi16 {
|
2014-08-09 12:10:22 -06:00
|
|
|
struct nvif_device device;
|
2012-07-19 16:17:34 -06:00
|
|
|
struct list_head channels;
|
|
|
|
u64 handles;
|
|
|
|
};
|
|
|
|
|
2015-11-02 17:17:49 -07:00
|
|
|
struct nouveau_abi16 *nouveau_abi16_get(struct drm_file *);
|
2012-07-19 16:17:34 -06:00
|
|
|
int nouveau_abi16_put(struct nouveau_abi16 *, int);
|
|
|
|
void nouveau_abi16_fini(struct nouveau_abi16 *);
|
2015-08-19 22:54:16 -06:00
|
|
|
s32 nouveau_abi16_swclass(struct nouveau_drm *);
|
2015-11-02 18:21:43 -07:00
|
|
|
int nouveau_abi16_usif(struct drm_file *, void *data, u32 size);
|
2012-07-19 16:17:34 -06:00
|
|
|
|
|
|
|
#define NOUVEAU_GEM_DOMAIN_VRAM (1 << 1)
|
|
|
|
#define NOUVEAU_GEM_DOMAIN_GART (1 << 2)
|
|
|
|
|
2012-05-07 18:24:27 -06:00
|
|
|
struct drm_nouveau_channel_alloc {
|
|
|
|
uint32_t fb_ctxdma_handle;
|
|
|
|
uint32_t tt_ctxdma_handle;
|
|
|
|
|
|
|
|
int channel;
|
|
|
|
uint32_t pushbuf_domains;
|
|
|
|
|
|
|
|
/* Notifier memory */
|
|
|
|
uint32_t notifier_handle;
|
|
|
|
|
|
|
|
/* DRM-enforced subchannel assignments */
|
|
|
|
struct {
|
|
|
|
uint32_t handle;
|
|
|
|
uint32_t grclass;
|
|
|
|
} subchan[8];
|
|
|
|
uint32_t nr_subchan;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct drm_nouveau_channel_free {
|
|
|
|
int channel;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct drm_nouveau_grobj_alloc {
|
|
|
|
int channel;
|
|
|
|
uint32_t handle;
|
|
|
|
int class;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct drm_nouveau_notifierobj_alloc {
|
|
|
|
uint32_t channel;
|
|
|
|
uint32_t handle;
|
|
|
|
uint32_t size;
|
|
|
|
uint32_t offset;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct drm_nouveau_gpuobj_free {
|
|
|
|
int channel;
|
|
|
|
uint32_t handle;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define NOUVEAU_GETPARAM_PCI_VENDOR 3
|
|
|
|
#define NOUVEAU_GETPARAM_PCI_DEVICE 4
|
|
|
|
#define NOUVEAU_GETPARAM_BUS_TYPE 5
|
|
|
|
#define NOUVEAU_GETPARAM_FB_SIZE 8
|
|
|
|
#define NOUVEAU_GETPARAM_AGP_SIZE 9
|
|
|
|
#define NOUVEAU_GETPARAM_CHIPSET_ID 11
|
|
|
|
#define NOUVEAU_GETPARAM_VM_VRAM_BASE 12
|
|
|
|
#define NOUVEAU_GETPARAM_GRAPH_UNITS 13
|
|
|
|
#define NOUVEAU_GETPARAM_PTIMER_TIME 14
|
|
|
|
#define NOUVEAU_GETPARAM_HAS_BO_USAGE 15
|
|
|
|
#define NOUVEAU_GETPARAM_HAS_PAGEFLIP 16
|
|
|
|
struct drm_nouveau_getparam {
|
|
|
|
uint64_t param;
|
|
|
|
uint64_t value;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct drm_nouveau_setparam {
|
|
|
|
uint64_t param;
|
|
|
|
uint64_t value;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define DRM_IOCTL_NOUVEAU_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GETPARAM, struct drm_nouveau_getparam)
|
|
|
|
#define DRM_IOCTL_NOUVEAU_SETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_SETPARAM, struct drm_nouveau_setparam)
|
|
|
|
#define DRM_IOCTL_NOUVEAU_CHANNEL_ALLOC DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_CHANNEL_ALLOC, struct drm_nouveau_channel_alloc)
|
|
|
|
#define DRM_IOCTL_NOUVEAU_CHANNEL_FREE DRM_IOW (DRM_COMMAND_BASE + DRM_NOUVEAU_CHANNEL_FREE, struct drm_nouveau_channel_free)
|
|
|
|
#define DRM_IOCTL_NOUVEAU_GROBJ_ALLOC DRM_IOW (DRM_COMMAND_BASE + DRM_NOUVEAU_GROBJ_ALLOC, struct drm_nouveau_grobj_alloc)
|
|
|
|
#define DRM_IOCTL_NOUVEAU_NOTIFIEROBJ_ALLOC DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_NOTIFIEROBJ_ALLOC, struct drm_nouveau_notifierobj_alloc)
|
|
|
|
#define DRM_IOCTL_NOUVEAU_GPUOBJ_FREE DRM_IOW (DRM_COMMAND_BASE + DRM_NOUVEAU_GPUOBJ_FREE, struct drm_nouveau_gpuobj_free)
|
|
|
|
|
|
|
|
#endif
|