Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 228629
b: refs/heads/master
c: effd6e0
h: refs/heads/master
i:
  228627: a66b4b5
v: v3
  • Loading branch information
Ben Skeggs committed Dec 21, 2010
1 parent c36fc4b commit 3186cc1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7460d70355eb568817296d6d3364f72d72eeba70
refs/heads/master: effd6e066f406277254ad7603cf2c7465c4f114b
24 changes: 20 additions & 4 deletions trunk/drivers/gpu/drm/nouveau/nouveau_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -779,14 +779,33 @@ nouveau_gpuobj_channel_init(struct nouveau_channel *chan,

NV_DEBUG(dev, "ch%d vram=0x%08x tt=0x%08x\n", chan->id, vram_h, tt_h);

if (dev_priv->card_type == NV_C0) {
struct nouveau_vm *vm = dev_priv->chan_vm;
struct nouveau_vm_pgd *vpgd;

ret = nouveau_gpuobj_new(dev, NULL, 4096, 0x1000, 0,
&chan->ramin);
if (ret)
return ret;

nouveau_vm_ref(vm, &chan->vm, NULL);

vpgd = list_first_entry(&vm->pgd_list, struct nouveau_vm_pgd, head);
nv_wo32(chan->ramin, 0x0200, lower_32_bits(vpgd->obj->vinst));
nv_wo32(chan->ramin, 0x0204, upper_32_bits(vpgd->obj->vinst));
nv_wo32(chan->ramin, 0x0208, 0xffffffff);
nv_wo32(chan->ramin, 0x020c, 0x000000ff);
return 0;
}

/* Allocate a chunk of memory for per-channel object storage */
ret = nouveau_gpuobj_channel_init_pramin(chan);
if (ret) {
NV_ERROR(dev, "init pramin\n");
return ret;
}

/* NV50/NVC0 VM
/* NV50 VM
* - Allocate per-channel page-directory
* - Link with shared channel VM
*/
Expand Down Expand Up @@ -884,9 +903,6 @@ nouveau_gpuobj_channel_takedown(struct nouveau_channel *chan)

NV_DEBUG(dev, "ch%d\n", chan->id);

if (!chan->ramht)
return;

nouveau_ramht_ref(NULL, &chan->ramht, chan);

nouveau_vm_ref(NULL, &chan->vm, chan->vm_pd);
Expand Down

0 comments on commit 3186cc1

Please sign in to comment.