]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/nvc0/dmaobj: stub bind function for now so we can call unconditionally
authorBen Skeggs <bskeggs@redhat.com>
Mon, 8 Oct 2012 03:39:13 +0000 (13:39 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 28 Nov 2012 23:56:38 +0000 (09:56 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/core/engine/dmaobj/nvc0.c
drivers/gpu/drm/nouveau/core/engine/fifo/base.c

index 36de449162922be321a54c4c3569e577979d76c3..6fe20d21158f5cd5e2b3e246b9652f9b60af4214 100644 (file)
  */
 
 #include <core/device.h>
+#include <core/gpuobj.h>
+#include <core/class.h>
 
+#include <subdev/fb.h>
 #include <engine/dmaobj.h>
 
 struct nvc0_dmaeng_priv {
        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
 nvc0_dmaeng_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
                 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;
 
        nv_engine(priv)->sclass = nouveau_dmaobj_sclass;
+       priv->base.bind = nvc0_dmaobj_bind;
        return 0;
 }
 
index ca4050c6ea5fa278c90f7dffd728dd908fad799a..a7f41f8725cd51121d5a6bea489c4404e4707226 100644 (file)
@@ -64,12 +64,9 @@ nouveau_fifo_channel_create_(struct nouveau_object *parent,
                return -EINVAL;
        }
 
-       if (dmaeng->bind) {
-               ret = dmaeng->bind(dmaeng, parent, chan->pushdma,
-                                 &chan->pushgpu);
-               if (ret)
-                       return ret;
-       }
+       ret = dmaeng->bind(dmaeng, parent, chan->pushdma, &chan->pushgpu);
+       if (ret)
+               return ret;
 
        /* find a free fifo channel */
        spin_lock_irqsave(&priv->lock, flags);