aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_object.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2011-03-31 23:56:05 -0400
committerBen Skeggs <bskeggs@redhat.com>2011-05-15 20:48:45 -0400
commita82dd49f14742e2529f79feb6360e0993277e788 (patch)
tree96f6f7ee4a792850ccf13c9a75e57f2a5ec920cb /drivers/gpu/drm/nouveau/nouveau_object.c
parent92abe7499239f7b570194b34c50e3772783e2640 (diff)
drm/nouveau: remove remnants of nouveau_pgraph_engine
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.c38
1 files changed, 11 insertions, 27 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_object.c b/drivers/gpu/drm/nouveau/nouveau_object.c
index 9ea3ab98c169..8f97016f5b26 100644
--- a/drivers/gpu/drm/nouveau/nouveau_object.c
+++ b/drivers/gpu/drm/nouveau/nouveau_object.c
@@ -620,7 +620,6 @@ int
620nouveau_gpuobj_gr_new(struct nouveau_channel *chan, u32 handle, int class) 620nouveau_gpuobj_gr_new(struct nouveau_channel *chan, u32 handle, int class)
621{ 621{
622 struct drm_nouveau_private *dev_priv = chan->dev->dev_private; 622 struct drm_nouveau_private *dev_priv = chan->dev->dev_private;
623 struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph;
624 struct drm_device *dev = chan->dev; 623 struct drm_device *dev = chan->dev;
625 struct nouveau_gpuobj_class *oc; 624 struct nouveau_gpuobj_class *oc;
626 int ret; 625 int ret;
@@ -628,37 +627,25 @@ nouveau_gpuobj_gr_new(struct nouveau_channel *chan, u32 handle, int class)
628 NV_DEBUG(dev, "ch%d class=0x%04x\n", chan->id, class); 627 NV_DEBUG(dev, "ch%d class=0x%04x\n", chan->id, class);
629 628
630 list_for_each_entry(oc, &dev_priv->classes, head) { 629 list_for_each_entry(oc, &dev_priv->classes, head) {
631 if (oc->id == class) 630 struct nouveau_exec_engine *eng = dev_priv->eng[oc->engine];
632 goto found;
633 }
634 631
635 NV_ERROR(dev, "illegal object class: 0x%x\n", class); 632 if (oc->id != class)
636 return -EINVAL; 633 continue;
637 634
638found: 635 if (oc->engine == NVOBJ_ENGINE_SW)
639 if (!dev_priv->eng[oc->engine]) {
640 switch (oc->engine) {
641 case NVOBJ_ENGINE_SW:
642 return nouveau_gpuobj_sw_new(chan, handle, class); 636 return nouveau_gpuobj_sw_new(chan, handle, class);
643 case NVOBJ_ENGINE_GR:
644 if ((dev_priv->card_type >= NV_20 && !chan->ramin_grctx) ||
645 (dev_priv->card_type < NV_20 && !chan->pgraph_ctx)) {
646 ret = pgraph->create_context(chan);
647 if (ret)
648 return ret;
649 }
650 637
651 return pgraph->object_new(chan, handle, class); 638 if (!chan->engctx[oc->engine]) {
639 ret = eng->context_new(chan, oc->engine);
640 if (ret)
641 return ret;
652 } 642 }
653 }
654 643
655 if (!chan->engctx[oc->engine]) { 644 return eng->object_new(chan, oc->engine, handle, class);
656 ret = dev_priv->eng[oc->engine]->context_new(chan, oc->engine);
657 if (ret)
658 return ret;
659 } 645 }
660 646
661 return dev_priv->eng[oc->engine]->object_new(chan, oc->engine, handle, class); 647 NV_ERROR(dev, "illegal object class: 0x%x\n", class);
648 return -EINVAL;
662} 649}
663 650
664static int 651static int
@@ -676,9 +663,6 @@ nouveau_gpuobj_channel_init_pramin(struct nouveau_channel *chan)
676 size = 0x2000; 663 size = 0x2000;
677 base = 0; 664 base = 0;
678 665
679 /* PGRAPH context */
680 size += dev_priv->engine.graph.grctx_size;
681
682 if (dev_priv->card_type == NV_50) { 666 if (dev_priv->card_type == NV_50) {
683 /* Various fixed table thingos */ 667 /* Various fixed table thingos */
684 size += 0x1400; /* mostly unknown stuff */ 668 size += 0x1400; /* mostly unknown stuff */