summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nouveau_object.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2011-03-31 23:50:18 (GMT)
committerBen Skeggs <bskeggs@redhat.com>2011-05-16 00:48:06 (GMT)
commit2703c21a82301f5c31ba5679e2d56422bd4cd404 (patch)
tree5c47247ff2ea9b103ecc7492bce19e2577b2e489 /drivers/gpu/drm/nouveau/nouveau_object.c
parent6dfdd7a61e8fc25552d9de1cb25272324dfc4c13 (diff)
downloadlinux-2703c21a82301f5c31ba5679e2d56422bd4cd404.tar.xz
drm/nv50/gr: move to exec engine interfaces
This needs a massive cleanup, but to catch bugs from the interface changes vs the engine code cleanup, this will be done later. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_object.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_object.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_object.c b/drivers/gpu/drm/nouveau/nouveau_object.c
index 4fb05b6..9ea3ab9 100644
--- a/drivers/gpu/drm/nouveau/nouveau_object.c
+++ b/drivers/gpu/drm/nouveau/nouveau_object.c
@@ -636,18 +636,20 @@ nouveau_gpuobj_gr_new(struct nouveau_channel *chan, u32 handle, int class)
return -EINVAL;
found:
- switch (oc->engine) {
- case NVOBJ_ENGINE_SW:
- return nouveau_gpuobj_sw_new(chan, handle, class);
- case NVOBJ_ENGINE_GR:
- if ((dev_priv->card_type >= NV_20 && !chan->ramin_grctx) ||
- (dev_priv->card_type < NV_20 && !chan->pgraph_ctx)) {
- ret = pgraph->create_context(chan);
- if (ret)
- return ret;
- }
+ if (!dev_priv->eng[oc->engine]) {
+ switch (oc->engine) {
+ case NVOBJ_ENGINE_SW:
+ return nouveau_gpuobj_sw_new(chan, handle, class);
+ case NVOBJ_ENGINE_GR:
+ if ((dev_priv->card_type >= NV_20 && !chan->ramin_grctx) ||
+ (dev_priv->card_type < NV_20 && !chan->pgraph_ctx)) {
+ ret = pgraph->create_context(chan);
+ if (ret)
+ return ret;
+ }
- return pgraph->object_new(chan, handle, class);
+ return pgraph->object_new(chan, handle, class);
+ }
}
if (!chan->engctx[oc->engine]) {