diff options
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_object.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_object.c b/drivers/gpu/drm/nouveau/nouveau_object.c index 55c9fdcfa67..c64fd971b86 100644 --- a/drivers/gpu/drm/nouveau/nouveau_object.c +++ b/drivers/gpu/drm/nouveau/nouveau_object.c | |||
@@ -643,10 +643,13 @@ nouveau_gpuobj_gr_new(struct nouveau_channel *chan, u32 handle, int class) | |||
643 | found: | 643 | found: |
644 | switch (oc->engine) { | 644 | switch (oc->engine) { |
645 | case NVOBJ_ENGINE_SW: | 645 | case NVOBJ_ENGINE_SW: |
646 | ret = nouveau_gpuobj_sw_new(chan, class, &gpuobj); | 646 | if (dev_priv->card_type < NV_C0) { |
647 | if (ret) | 647 | ret = nouveau_gpuobj_sw_new(chan, class, &gpuobj); |
648 | return ret; | 648 | if (ret) |
649 | goto insert; | 649 | return ret; |
650 | goto insert; | ||
651 | } | ||
652 | break; | ||
650 | case NVOBJ_ENGINE_GR: | 653 | case NVOBJ_ENGINE_GR: |
651 | if (dev_priv->card_type >= NV_50 && !chan->ramin_grctx) { | 654 | if (dev_priv->card_type >= NV_50 && !chan->ramin_grctx) { |
652 | struct nouveau_pgraph_engine *pgraph = | 655 | struct nouveau_pgraph_engine *pgraph = |
@@ -669,6 +672,10 @@ found: | |||
669 | break; | 672 | break; |
670 | } | 673 | } |
671 | 674 | ||
675 | /* we're done if this is fermi */ | ||
676 | if (dev_priv->card_type >= NV_C0) | ||
677 | return 0; | ||
678 | |||
672 | ret = nouveau_gpuobj_new(dev, chan, | 679 | ret = nouveau_gpuobj_new(dev, chan, |
673 | nouveau_gpuobj_class_instmem_size(dev, class), | 680 | nouveau_gpuobj_class_instmem_size(dev, class), |
674 | 16, | 681 | 16, |