These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / gpu / drm / nouveau / include / nvkm / core / oproxy.h
diff --git a/kernel/drivers/gpu/drm/nouveau/include/nvkm/core/oproxy.h b/kernel/drivers/gpu/drm/nouveau/include/nvkm/core/oproxy.h
new file mode 100644 (file)
index 0000000..bd52236
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef __NVKM_OPROXY_H__
+#define __NVKM_OPROXY_H__
+#define nvkm_oproxy(p) container_of((p), struct nvkm_oproxy, base)
+#include <core/object.h>
+
+struct nvkm_oproxy {
+       const struct nvkm_oproxy_func *func;
+       struct nvkm_object base;
+       struct nvkm_object *object;
+};
+
+struct nvkm_oproxy_func {
+       void (*dtor[2])(struct nvkm_oproxy *);
+       int  (*init[2])(struct nvkm_oproxy *);
+       int  (*fini[2])(struct nvkm_oproxy *, bool suspend);
+};
+
+void nvkm_oproxy_ctor(const struct nvkm_oproxy_func *,
+                     const struct nvkm_oclass *, struct nvkm_oproxy *);
+int  nvkm_oproxy_new_(const struct nvkm_oproxy_func *,
+                     const struct nvkm_oclass *, struct nvkm_oproxy **);
+#endif