Home | History | Annotate | Line # | Download | only in core
      1 /*	$NetBSD: oproxy.h,v 1.3 2021/12/18 23:45:33 riastradh Exp $	*/
      2 
      3 /* SPDX-License-Identifier: MIT */
      4 #ifndef __NVKM_OPROXY_H__
      5 #define __NVKM_OPROXY_H__
      6 #define nvkm_oproxy(p) container_of((p), struct nvkm_oproxy, base)
      7 #include <core/object.h>
      8 
      9 struct nvkm_oproxy {
     10 	const struct nvkm_oproxy_func *func;
     11 	struct nvkm_object base;
     12 	struct nvkm_object *object;
     13 };
     14 
     15 struct nvkm_oproxy_func {
     16 	void (*dtor[2])(struct nvkm_oproxy *);
     17 	int  (*init[2])(struct nvkm_oproxy *);
     18 	int  (*fini[2])(struct nvkm_oproxy *, bool suspend);
     19 };
     20 
     21 void nvkm_oproxy_ctor(const struct nvkm_oproxy_func *,
     22 		      const struct nvkm_oclass *, struct nvkm_oproxy *);
     23 int  nvkm_oproxy_new_(const struct nvkm_oproxy_func *,
     24 		      const struct nvkm_oclass *, struct nvkm_oproxy **);
     25 #endif
     26