linux/drivers/gpu/drm/nouveau/nvif/driver.h
Ben Skeggs a04d04231b drm/nouveau/nvif: import library functions for the ioctl/event interfaces
This is a wrapper around the interfaces defined in an earlier commit,
and is also used by various userspace (either by a libdrm backend, or
libpciaccess) tools/tests.

In the future this will be extended to handle channels, replacing some
long-unloved code we currently use, and allow fifo/display/mpeg (hi
Ilia ;)) engines to all be exposed in the same way.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-08-10 05:13:09 +10:00

21 lines
569 B
C

#ifndef __NVIF_DRIVER_H__
#define __NVIF_DRIVER_H__
struct nvif_driver {
const char *name;
int (*init)(const char *name, u64 device, const char *cfg,
const char *dbg, void **priv);
void (*fini)(void *priv);
int (*suspend)(void *priv);
int (*resume)(void *priv);
int (*ioctl)(void *priv, bool super, void *data, u32 size, void **hack);
void *(*map)(void *priv, u64 handle, u32 size);
void (*unmap)(void *priv, void *ptr, u32 size);
bool keep;
};
extern const struct nvif_driver nvif_driver_nvkm;
extern const struct nvif_driver nvif_driver_lib;
#endif