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>
This commit is contained in:
parent
65c78660fb
commit
cbe7270d48
|
@ -109,19 +109,25 @@ int nouveau_object_del(struct nouveau_object *, u32 parent, u32 handle);
|
||||||
void nouveau_object_debug(void);
|
void nouveau_object_debug(void);
|
||||||
|
|
||||||
static inline int
|
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;
|
struct nouveau_omthds *method = nv_oclass(obj)->omthds;
|
||||||
|
|
||||||
while (method && method->call) {
|
while (method && method->call) {
|
||||||
if (method->method == mthd)
|
if (method->method == mthd)
|
||||||
return method->call(obj, mthd, &data, sizeof(data));
|
return method->call(obj, mthd, data, size);
|
||||||
method++;
|
method++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int
|
||||||
|
nv_call(void *obj, u32 mthd, u32 data)
|
||||||
|
{
|
||||||
|
return nv_exec(obj, mthd, &data, sizeof(data));
|
||||||
|
}
|
||||||
|
|
||||||
static inline u8
|
static inline u8
|
||||||
nv_ro08(void *obj, u64 addr)
|
nv_ro08(void *obj, u64 addr)
|
||||||
{
|
{
|
||||||
|
|
Reference in New Issue