drm/nvc0/dmaobj: stub bind function for now so we can call unconditionally
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
@@ -23,13 +23,35 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <core/device.h>
|
#include <core/device.h>
|
||||||
|
#include <core/gpuobj.h>
|
||||||
|
#include <core/class.h>
|
||||||
|
|
||||||
|
#include <subdev/fb.h>
|
||||||
#include <engine/dmaobj.h>
|
#include <engine/dmaobj.h>
|
||||||
|
|
||||||
struct nvc0_dmaeng_priv {
|
struct nvc0_dmaeng_priv {
|
||||||
struct nouveau_dmaeng base;
|
struct nouveau_dmaeng base;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static int
|
||||||
|
nvc0_dmaobj_bind(struct nouveau_dmaeng *dmaeng,
|
||||||
|
struct nouveau_object *parent,
|
||||||
|
struct nouveau_dmaobj *dmaobj,
|
||||||
|
struct nouveau_gpuobj **pgpuobj)
|
||||||
|
{
|
||||||
|
int ret = 0;
|
||||||
|
|
||||||
|
if (!nv_iclass(parent, NV_ENGCTX_CLASS)) {
|
||||||
|
switch (nv_mclass(parent->parent)) {
|
||||||
|
default:
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
nvc0_dmaeng_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
|
nvc0_dmaeng_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
|
||||||
struct nouveau_oclass *oclass, void *data, u32 size,
|
struct nouveau_oclass *oclass, void *data, u32 size,
|
||||||
@@ -44,6 +66,7 @@ nvc0_dmaeng_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
nv_engine(priv)->sclass = nouveau_dmaobj_sclass;
|
nv_engine(priv)->sclass = nouveau_dmaobj_sclass;
|
||||||
|
priv->base.bind = nvc0_dmaobj_bind;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -64,12 +64,9 @@ nouveau_fifo_channel_create_(struct nouveau_object *parent,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dmaeng->bind) {
|
ret = dmaeng->bind(dmaeng, parent, chan->pushdma, &chan->pushgpu);
|
||||||
ret = dmaeng->bind(dmaeng, parent, chan->pushdma,
|
if (ret)
|
||||||
&chan->pushgpu);
|
return ret;
|
||||||
if (ret)
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* find a free fifo channel */
|
/* find a free fifo channel */
|
||||||
spin_lock_irqsave(&priv->lock, flags);
|
spin_lock_irqsave(&priv->lock, flags);
|
||||||
|
Reference in New Issue
Block a user