mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-20 19:09:52 +07:00
04b8867758
We want a supervisor client of NVKM (such as the DRM) to be able to allow sharing of resources (such as memory objects) between clients. To allow this, the supervisor creates all its clients as children of itself, and will use an upcoming ioctl to permit sharing. Currently it's not possible for indirect clients to use subclients. Supporting this will require an additional field in the main ioctl. This isn't important currently, but will need to be fixed for virt. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
27 lines
857 B
C
27 lines
857 B
C
#ifndef __NVIF_DRIVER_H__
|
|
#define __NVIF_DRIVER_H__
|
|
#include <nvif/os.h>
|
|
struct nvif_client;
|
|
|
|
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 __iomem *(*map)(void *priv, u64 handle, u32 size);
|
|
void (*unmap)(void *priv, void __iomem *ptr, u32 size);
|
|
bool keep;
|
|
};
|
|
|
|
int nvif_driver_init(const char *drv, const char *cfg, const char *dbg,
|
|
const char *name, u64 device, struct nvif_client *);
|
|
|
|
extern const struct nvif_driver nvif_driver_nvkm;
|
|
extern const struct nvif_driver nvif_driver_drm;
|
|
extern const struct nvif_driver nvif_driver_lib;
|
|
extern const struct nvif_driver nvif_driver_null;
|
|
#endif
|