aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/core/core
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2012-11-22 13:27:37 +1000
committerBen Skeggs <bskeggs@redhat.com>2012-11-29 09:58:04 +1000
commit43598875b35fdd3f699954078b7df24b5647a27a (patch)
treec069b8e45c0162807cfac11bd11b663d245e108d /drivers/gpu/drm/nouveau/core/core
parente5e454f918051e4ff4be98777ee25437d48c3a1e (diff)
drm/nouveau/core: implement shortcut for simple engctx construction
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/core/core')
-rw-r--r--drivers/gpu/drm/nouveau/core/core/engctx.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/core/core/engctx.c b/drivers/gpu/drm/nouveau/core/core/engctx.c
index e41b10d5eb5..84c71fad2b6 100644
--- a/drivers/gpu/drm/nouveau/core/core/engctx.c
+++ b/drivers/gpu/drm/nouveau/core/core/engctx.c
@@ -189,6 +189,21 @@ nouveau_engctx_fini(struct nouveau_engctx *engctx, bool suspend)
return nouveau_gpuobj_fini(&engctx->base, suspend);
}
+int
+_nouveau_engctx_ctor(struct nouveau_object *parent,
+ struct nouveau_object *engine,
+ struct nouveau_oclass *oclass, void *data, u32 size,
+ struct nouveau_object **pobject)
+{
+ struct nouveau_engctx *engctx;
+ int ret;
+
+ ret = nouveau_engctx_create(parent, engine, oclass, NULL, 256, 256,
+ NVOBJ_FLAG_ZERO_ALLOC, &engctx);
+ *pobject = nv_object(engctx);
+ return ret;
+}
+
void
_nouveau_engctx_dtor(struct nouveau_object *object)
{