Home | History | Annotate | Line # | Download | only in nvif
driver.h revision 1.1.1.2
      1 /*	$NetBSD: driver.h,v 1.1.1.2 2021/12/18 20:15:37 riastradh Exp $	*/
      2 
      3 /* SPDX-License-Identifier: MIT */
      4 #ifndef __NVIF_DRIVER_H__
      5 #define __NVIF_DRIVER_H__
      6 #include <nvif/os.h>
      7 struct nvif_client;
      8 
      9 struct nvif_driver {
     10 	const char *name;
     11 	int (*init)(const char *name, u64 device, const char *cfg,
     12 		    const char *dbg, void **priv);
     13 	void (*fini)(void *priv);
     14 	int (*suspend)(void *priv);
     15 	int (*resume)(void *priv);
     16 	int (*ioctl)(void *priv, bool super, void *data, u32 size, void **hack);
     17 	void __iomem *(*map)(void *priv, u64 handle, u32 size);
     18 	void (*unmap)(void *priv, void __iomem *ptr, u32 size);
     19 	bool keep;
     20 };
     21 
     22 int nvif_driver_init(const char *drv, const char *cfg, const char *dbg,
     23 		     const char *name, u64 device, struct nvif_client *);
     24 
     25 extern const struct nvif_driver nvif_driver_nvkm;
     26 extern const struct nvif_driver nvif_driver_drm;
     27 extern const struct nvif_driver nvif_driver_lib;
     28 extern const struct nvif_driver nvif_driver_null;
     29 #endif
     30