driver.h 896 B

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