diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2011-03-31 19:50:18 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2011-05-15 20:48:06 -0400 |
commit | 2703c21a82301f5c31ba5679e2d56422bd4cd404 (patch) | |
tree | 5c47247ff2ea9b103ecc7492bce19e2577b2e489 /drivers/gpu/drm/nouveau/nouveau_object.c | |
parent | 6dfdd7a61e8fc25552d9de1cb25272324dfc4c13 (diff) |
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.c | 24 |
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 4fb05b6c6985..9ea3ab98c169 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) | |||
636 | return -EINVAL; | 636 | return -EINVAL; |
637 | 637 | ||
638 | found: | 638 | found: |
639 | switch (oc->engine) { | 639 | if (!dev_priv->eng[oc->engine]) { |
640 | case NVOBJ_ENGINE_SW: | 640 | switch (oc->engine) { |
641 | return nouveau_gpuobj_sw_new(chan, handle, class); | 641 | case NVOBJ_ENGINE_SW: |
642 | case NVOBJ_ENGINE_GR: | 642 | return nouveau_gpuobj_sw_new(chan, handle, class); |
643 | if ((dev_priv->card_type >= NV_20 && !chan->ramin_grctx) || | 643 | case NVOBJ_ENGINE_GR: |
644 | (dev_priv->card_type < NV_20 && !chan->pgraph_ctx)) { | 644 | if ((dev_priv->card_type >= NV_20 && !chan->ramin_grctx) || |
645 | ret = pgraph->create_context(chan); | 645 | (dev_priv->card_type < NV_20 && !chan->pgraph_ctx)) { |
646 | if (ret) | 646 | ret = pgraph->create_context(chan); |
647 | return ret; | 647 | if (ret) |
648 | } | 648 | return ret; |
649 | } | ||
649 | 650 | ||
650 | return pgraph->object_new(chan, handle, class); | 651 | return pgraph->object_new(chan, handle, class); |
652 | } | ||
651 | } | 653 | } |
652 | 654 | ||
653 | if (!chan->engctx[oc->engine]) { | 655 | if (!chan->engctx[oc->engine]) { |