Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 329621
b: refs/heads/master
c: 092599d
h: refs/heads/master
i:
  329619: b40ba07
v: v3
  • Loading branch information
Ben Skeggs committed Oct 3, 2012
1 parent b8feb6a commit a3bed0f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 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: 73a60c0d218a292f8ef29d3467726ff26ed366fc
refs/heads/master: 092599da308bf56b96c849ecdd315b8a1a13ca52
19 changes: 2 additions & 17 deletions trunk/drivers/gpu/drm/nouveau/core/subdev/instmem/nv50.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ nv50_channel_del(struct nouveau_channel **pchan)
if (!chan)
return;

nouveau_gpuobj_ref(NULL, &chan->ramfc);
nouveau_vm_ref(NULL, &chan->vm, chan->vm_pd);
nouveau_gpuobj_ref(NULL, &chan->vm_pd);
if (drm_mm_initialized(&chan->ramin_heap))
Expand All @@ -68,7 +67,6 @@ nv50_channel_new(struct drm_device *dev, u32 size, struct nouveau_vm *vm,
{
struct drm_nouveau_private *dev_priv = dev->dev_private;
u32 pgd = (dev_priv->chipset == 0x50) ? 0x1400 : 0x0200;
u32 fc = (dev_priv->chipset == 0x50) ? 0x0000 : 0x4200;
struct nouveau_channel *chan;
int ret, i;

Expand All @@ -83,17 +81,13 @@ nv50_channel_new(struct drm_device *dev, u32 size, struct nouveau_vm *vm,
return ret;
}

ret = drm_mm_init(&chan->ramin_heap, 0x6000, chan->ramin->size - 0x6000);
ret = drm_mm_init(&chan->ramin_heap, pgd, chan->ramin->size - pgd);
if (ret) {
nv50_channel_del(&chan);
return ret;
}

ret = nouveau_gpuobj_new_fake(dev, chan->ramin->pinst == ~0 ? ~0 :
chan->ramin->pinst + pgd,
chan->ramin->vinst + pgd,
0x4000, NVOBJ_FLAG_ZERO_ALLOC,
&chan->vm_pd);
ret = nouveau_gpuobj_new(dev, chan, 0x4000, 0, 0, &chan->vm_pd);
if (ret) {
nv50_channel_del(&chan);
return ret;
Expand All @@ -110,15 +104,6 @@ nv50_channel_new(struct drm_device *dev, u32 size, struct nouveau_vm *vm,
return ret;
}

ret = nouveau_gpuobj_new_fake(dev, chan->ramin->pinst == ~0 ? ~0 :
chan->ramin->pinst + fc,
chan->ramin->vinst + fc, 0x100,
NVOBJ_FLAG_ZERO_ALLOC, &chan->ramfc);
if (ret) {
nv50_channel_del(&chan);
return ret;
}

*pchan = chan;
return 0;
}
Expand Down

0 comments on commit a3bed0f

Please sign in to comment.