提交 7460d703 编写于 作者: B Ben Skeggs

drm/nvc0: gpuobj_new need only check validity and init the relevant engine

Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
上级 587107b6
...@@ -643,10 +643,13 @@ nouveau_gpuobj_gr_new(struct nouveau_channel *chan, u32 handle, int class) ...@@ -643,10 +643,13 @@ nouveau_gpuobj_gr_new(struct nouveau_channel *chan, u32 handle, int class)
found: found:
switch (oc->engine) { switch (oc->engine) {
case NVOBJ_ENGINE_SW: case NVOBJ_ENGINE_SW:
ret = nouveau_gpuobj_sw_new(chan, class, &gpuobj); if (dev_priv->card_type < NV_C0) {
if (ret) ret = nouveau_gpuobj_sw_new(chan, class, &gpuobj);
return ret; if (ret)
goto insert; return ret;
goto insert;
}
break;
case NVOBJ_ENGINE_GR: case NVOBJ_ENGINE_GR:
if (dev_priv->card_type >= NV_50 && !chan->ramin_grctx) { if (dev_priv->card_type >= NV_50 && !chan->ramin_grctx) {
struct nouveau_pgraph_engine *pgraph = struct nouveau_pgraph_engine *pgraph =
...@@ -669,6 +672,10 @@ nouveau_gpuobj_gr_new(struct nouveau_channel *chan, u32 handle, int class) ...@@ -669,6 +672,10 @@ nouveau_gpuobj_gr_new(struct nouveau_channel *chan, u32 handle, int class)
break; break;
} }
/* we're done if this is fermi */
if (dev_priv->card_type >= NV_C0)
return 0;
ret = nouveau_gpuobj_new(dev, chan, ret = nouveau_gpuobj_new(dev, chan,
nouveau_gpuobj_class_instmem_size(dev, class), nouveau_gpuobj_class_instmem_size(dev, class),
16, 16,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册