driver.h 857 B

1234567891011121314151617181920212223242526
  1. #ifndef __NVIF_DRIVER_H__
  2. #define __NVIF_DRIVER_H__
  3. #include <nvif/os.h>
  4. struct nvif_client;
  5. struct nvif_driver {
  6. const char *name;
  7. int (*init)(const char *name, u64 device, const char *cfg,
  8. const char *dbg, void **priv);
  9. void (*fini)(void *priv);
  10. int (*suspend)(void *priv);
  11. int (*resume)(void *priv);
  12. int (*ioctl)(void *priv, bool super, void *data, u32 size, void **hack);
  13. void __iomem *(*map)(void *priv, u64 handle, u32 size);
  14. void (*unmap)(void *priv, void __iomem *ptr, u32 size);
  15. bool keep;
  16. };
  17. int nvif_driver_init(const char *drv, const char *cfg, const char *dbg,
  18. const char *name, u64 device, struct nvif_client *);
  19. extern const struct nvif_driver nvif_driver_nvkm;
  20. extern const struct nvif_driver nvif_driver_drm;
  21. extern const struct nvif_driver nvif_driver_lib;
  22. extern const struct nvif_driver nvif_driver_null;
  23. #endif