[Nouveau] [libdrm 04/13] nouveau: add interface to call an object's methods

Ben Skeggs skeggsb at gmail.com
Wed Nov 25 23:14:01 PST 2015


From: Ben Skeggs <bskeggs at redhat.com>

This will expose functionality supported by newer kernel interfaces,
giving access to things such as ZBC controls, perfmon, etc.

Signed-off-by: Ben Skeggs <bskeggs at redhat.com>
---
 nouveau/nouveau-symbol-check | 1 +
 nouveau/nouveau.c            | 7 +++++++
 nouveau/nouveau.h            | 2 ++
 3 files changed, 10 insertions(+)

diff --git a/nouveau/nouveau-symbol-check b/nouveau/nouveau-symbol-check
index 0fef563..7330170 100755
--- a/nouveau/nouveau-symbol-check
+++ b/nouveau/nouveau-symbol-check
@@ -33,6 +33,7 @@ nouveau_device_wrap
 nouveau_getparam
 nouveau_object_del
 nouveau_object_find
+nouveau_object_mthd
 nouveau_object_new
 nouveau_pushbuf_bufctx
 nouveau_pushbuf_data
diff --git a/nouveau/nouveau.c b/nouveau/nouveau.c
index eb741c7..1871e8c 100644
--- a/nouveau/nouveau.c
+++ b/nouveau/nouveau.c
@@ -59,6 +59,13 @@ debug_init(char *args)
 }
 #endif
 
+int
+nouveau_object_mthd(struct nouveau_object *obj,
+		    uint32_t mthd, void *data, uint32_t size)
+{
+	return -ENODEV;
+}
+
 static void
 nouveau_object_fini(struct nouveau_object *obj)
 {
diff --git a/nouveau/nouveau.h b/nouveau/nouveau.h
index 4adda0e..4c95409 100644
--- a/nouveau/nouveau.h
+++ b/nouveau/nouveau.h
@@ -67,6 +67,8 @@ int  nouveau_object_new(struct nouveau_object *parent, uint64_t handle,
 			uint32_t oclass, void *data, uint32_t length,
 			struct nouveau_object **);
 void nouveau_object_del(struct nouveau_object **);
+int  nouveau_object_mthd(struct nouveau_object *, uint32_t mthd,
+			 void *data, uint32_t size);
 void *nouveau_object_find(struct nouveau_object *, uint32_t parent_class);
 
 struct nouveau_device {
-- 
2.6.3



More information about the Nouveau mailing list