drm/nouveau/core/object: separate oclass data out into its own header
authorBen Skeggs <bskeggs@redhat.com>
Tue, 31 Oct 2017 17:56:19 +0000 (03:56 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 2 Nov 2017 03:32:16 +0000 (13:32 +1000)
Want to be able to include this from core/device.h without pulling in
core/object.h.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/include/nvkm/core/object.h
drivers/gpu/drm/nouveau/include/nvkm/core/oclass.h [new file with mode: 0644]

index 96dda350ada310ddec344a2e9c708a1ab58a70b4..5a092ffb5abf87da45db7b297e61425ea1ac943d 100644 (file)
@@ -1,10 +1,8 @@
 #ifndef __NVKM_OBJECT_H__
 #define __NVKM_OBJECT_H__
-#include <core/os.h>
-#include <core/debug.h>
+#include <core/oclass.h>
 struct nvkm_event;
 struct nvkm_gpuobj;
-struct nvkm_oclass;
 
 struct nvkm_object {
        const struct nvkm_object_func *func;
@@ -66,28 +64,4 @@ bool nvkm_object_insert(struct nvkm_object *);
 void nvkm_object_remove(struct nvkm_object *);
 struct nvkm_object *nvkm_object_search(struct nvkm_client *, u64 object,
                                       const struct nvkm_object_func *);
-
-struct nvkm_sclass {
-       int minver;
-       int maxver;
-       s32 oclass;
-       const struct nvkm_object_func *func;
-       int (*ctor)(const struct nvkm_oclass *, void *data, u32 size,
-                   struct nvkm_object **);
-};
-
-struct nvkm_oclass {
-       int (*ctor)(const struct nvkm_oclass *, void *data, u32 size,
-                   struct nvkm_object **);
-       struct nvkm_sclass base;
-       const void *priv;
-       const void *engn;
-       u32 handle;
-       u8  route;
-       u64 token;
-       u64 object;
-       struct nvkm_client *client;
-       struct nvkm_object *parent;
-       struct nvkm_engine *engine;
-};
 #endif
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/oclass.h b/drivers/gpu/drm/nouveau/include/nvkm/core/oclass.h
new file mode 100644 (file)
index 0000000..8e1b945
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef __NVKM_OCLASS_H__
+#define __NVKM_OCLASS_H__
+#include <core/os.h>
+#include <core/debug.h>
+struct nvkm_oclass;
+struct nvkm_object;
+
+struct nvkm_sclass {
+       int minver;
+       int maxver;
+       s32 oclass;
+       const struct nvkm_object_func *func;
+       int (*ctor)(const struct nvkm_oclass *, void *data, u32 size,
+                   struct nvkm_object **);
+};
+
+struct nvkm_oclass {
+       int (*ctor)(const struct nvkm_oclass *, void *data, u32 size,
+                   struct nvkm_object **);
+       struct nvkm_sclass base;
+       const void *priv;
+       const void *engn;
+       u32 handle;
+       u8  route;
+       u64 token;
+       u64 object;
+       struct nvkm_client *client;
+       struct nvkm_object *parent;
+       struct nvkm_engine *engine;
+};
+#endif