Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 228626
b: refs/heads/master
c: 9980556
h: refs/heads/master
v: v3
  • Loading branch information
Ben Skeggs committed Dec 21, 2010
1 parent aec9fb9 commit 92a94ec
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8984e046153eb1d6b0b24626169f9c6e58232e1b
refs/heads/master: 99805566d93d69b7daf2373aba9fae52a62396f4
16 changes: 16 additions & 0 deletions trunk/drivers/gpu/drm/nouveau/nvc0_instmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ struct nvc0_instmem_priv {
struct nouveau_channel *bar1;
struct nouveau_gpuobj *bar3_pgd;
struct nouveau_channel *bar3;
struct nouveau_gpuobj *chan_pgd;
};

int
Expand Down Expand Up @@ -179,6 +180,18 @@ nvc0_instmem_init(struct drm_device *dev)
if (ret)
goto error;

/* channel vm */
ret = nouveau_vm_new(dev, 0, (1ULL << 40), 0x0008000000ULL, &vm);
if (ret)
goto error;

ret = nouveau_gpuobj_new(dev, NULL, 0x8000, 4096, 0, &priv->chan_pgd);
if (ret)
goto error;

nouveau_vm_ref(vm, &dev_priv->chan_vm, priv->chan_pgd);
nouveau_vm_ref(NULL, &vm, NULL);

nvc0_instmem_resume(dev);
return 0;
error:
Expand All @@ -198,6 +211,9 @@ nvc0_instmem_takedown(struct drm_device *dev)
nv_wr32(dev, 0x1704, 0x00000000);
nv_wr32(dev, 0x1714, 0x00000000);

nouveau_vm_ref(NULL, &dev_priv->chan_vm, priv->chan_pgd);
nouveau_gpuobj_ref(NULL, &priv->chan_pgd);

nvc0_channel_del(&priv->bar1);
nouveau_vm_ref(NULL, &dev_priv->bar1_vm, priv->bar1_pgd);
nouveau_gpuobj_ref(NULL, &priv->bar1_pgd);
Expand Down

0 comments on commit 92a94ec

Please sign in to comment.