aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/core/include/core/object.h
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2012-11-07 16:16:41 +1000
committerBen Skeggs <bskeggs@redhat.com>2012-11-29 09:57:45 +1000
commitcbe7270d48670889a88705478a68d000b0bc3f6e (patch)
tree6a4f2cdf8863a2e61c7e7b6dda017159528850e4 /drivers/gpu/drm/nouveau/core/include/core/object.h
parent65c78660fbbdac1e4f1d35fad1164d4536463189 (diff)
drm/nouveau/core: expose full method calling capabilities with nv_exec
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>
Diffstat (limited to 'drivers/gpu/drm/nouveau/core/include/core/object.h')
-rw-r--r--drivers/gpu/drm/nouveau/core/include/core/object.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/core/include/core/object.h b/drivers/gpu/drm/nouveau/core/include/core/object.h
index 48834a9c0f0..eee1c7bca0a 100644
--- a/drivers/gpu/drm/nouveau/core/include/core/object.h
+++ b/drivers/gpu/drm/nouveau/core/include/core/object.h
@@ -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)
{