summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2010-11-24 10:10:23 +1000
committerBen Skeggs <bskeggs@redhat.com>2010-12-21 17:17:26 +1000
commit7460d70355eb568817296d6d3364f72d72eeba70 (patch)
tree45906ffcaa9c99c1ccea36f8d84d67aa4a9bbac4 /drivers/gpu/drm
parent587107b690f567690982fb504047e7b0a6590344 (diff)
downloadlinux-3.10-7460d70355eb568817296d6d3364f72d72eeba70.tar.gz
linux-3.10-7460d70355eb568817296d6d3364f72d72eeba70.tar.bz2
linux-3.10-7460d70355eb568817296d6d3364f72d72eeba70.zip
drm/nvc0: gpuobj_new need only check validity and init the relevant engine
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_object.c15
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)
found:
switch (oc->engine) {
case NVOBJ_ENGINE_SW:
- ret = nouveau_gpuobj_sw_new(chan, class, &gpuobj);
- if (ret)
- return ret;
- goto insert;
+ if (dev_priv->card_type < NV_C0) {
+ ret = nouveau_gpuobj_sw_new(chan, class, &gpuobj);
+ if (ret)
+ return ret;
+ goto insert;
+ }
+ break;
case NVOBJ_ENGINE_GR:
if (dev_priv->card_type >= NV_50 && !chan->ramin_grctx) {
struct nouveau_pgraph_engine *pgraph =
@@ -669,6 +672,10 @@ found:
break;
}
+ /* we're done if this is fermi */
+ if (dev_priv->card_type >= NV_C0)
+ return 0;
+
ret = nouveau_gpuobj_new(dev, chan,
nouveau_gpuobj_class_instmem_size(dev, class),
16,