]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
drm/nouveau/core: expose full method calling capabilities with nv_exec
authorBen Skeggs <bskeggs@redhat.com>
Wed, 7 Nov 2012 06:16:41 +0000 (16:16 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 28 Nov 2012 23:57:45 +0000 (09:57 +1000)
nv_call() just allows mthd+u32 submission, nv_exec() exposes the
mthd+data+size interface which will be used in future commits.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/core/include/core/object.h

index 48834a9c0f00bc072b14ba163c4ed5b3fd616589..eee1c7bca0a39cb2ef8a8b1b9e196df05d24ccd9 100644 (file)
@@ -109,19 +109,25 @@ int nouveau_object_del(struct nouveau_object *, u32 parent, u32 handle);
 void nouveau_object_debug(void);
 
 static inline int
-nv_call(void *obj, u32 mthd, u32 data)
+nv_exec(void *obj, u32 mthd, void *data, u32 size)
 {
        struct nouveau_omthds *method = nv_oclass(obj)->omthds;
 
        while (method && method->call) {
                if (method->method == mthd)
-                       return method->call(obj, mthd, &data, sizeof(data));
+                       return method->call(obj, mthd, data, size);
                method++;
        }
 
        return -EINVAL;
 }
 
+static inline int
+nv_call(void *obj, u32 mthd, u32 data)
+{
+       return nv_exec(obj, mthd, &data, sizeof(data));
+}
+
 static inline u8
 nv_ro08(void *obj, u64 addr)
 {