aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2011-06-02 20:20:52 -0400
committerBen Skeggs <bskeggs@redhat.com>2011-06-23 01:58:52 -0400
commit0320d7910b8905c7a99b3b0be369f91129a59f2f (patch)
treecb73d905fa55f71008cd3b2c0feb3a0ea85498b7 /drivers/gpu
parentfe32b16e7998bae28209834c0f7c21766d7524ec (diff)
drm/nv50-nvc0/chan: inherit vm from fpriv, rather than chan_vm directly
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_object.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_object.c b/drivers/gpu/drm/nouveau/nouveau_object.c
index 8c9895827875..fe95766d03bb 100644
--- a/drivers/gpu/drm/nouveau/nouveau_object.c
+++ b/drivers/gpu/drm/nouveau/nouveau_object.c
@@ -696,13 +696,13 @@ nouveau_gpuobj_channel_init(struct nouveau_channel *chan,
696{ 696{
697 struct drm_device *dev = chan->dev; 697 struct drm_device *dev = chan->dev;
698 struct drm_nouveau_private *dev_priv = dev->dev_private; 698 struct drm_nouveau_private *dev_priv = dev->dev_private;
699 struct nouveau_fpriv *fpriv = nouveau_fpriv(chan->file_priv);
700 struct nouveau_vm *vm = fpriv ? fpriv->vm : dev_priv->chan_vm;
699 struct nouveau_gpuobj *vram = NULL, *tt = NULL; 701 struct nouveau_gpuobj *vram = NULL, *tt = NULL;
700 int ret, i; 702 int ret, i;
701 703
702 NV_DEBUG(dev, "ch%d vram=0x%08x tt=0x%08x\n", chan->id, vram_h, tt_h); 704 NV_DEBUG(dev, "ch%d vram=0x%08x tt=0x%08x\n", chan->id, vram_h, tt_h);
703
704 if (dev_priv->card_type == NV_C0) { 705 if (dev_priv->card_type == NV_C0) {
705 struct nouveau_vm *vm = dev_priv->chan_vm;
706 struct nouveau_vm_pgd *vpgd; 706 struct nouveau_vm_pgd *vpgd;
707 707
708 ret = nouveau_gpuobj_new(dev, NULL, 4096, 0x1000, 0, 708 ret = nouveau_gpuobj_new(dev, NULL, 4096, 0x1000, 0,
@@ -731,7 +731,7 @@ nouveau_gpuobj_channel_init(struct nouveau_channel *chan,
731 * - Allocate per-channel page-directory 731 * - Allocate per-channel page-directory
732 * - Link with shared channel VM 732 * - Link with shared channel VM
733 */ 733 */
734 if (dev_priv->chan_vm) { 734 if (vm) {
735 u32 pgd_offs = (dev_priv->chipset == 0x50) ? 0x1400 : 0x0200; 735 u32 pgd_offs = (dev_priv->chipset == 0x50) ? 0x1400 : 0x0200;
736 u64 vm_vinst = chan->ramin->vinst + pgd_offs; 736 u64 vm_vinst = chan->ramin->vinst + pgd_offs;
737 u32 vm_pinst = chan->ramin->pinst; 737 u32 vm_pinst = chan->ramin->pinst;
@@ -744,7 +744,7 @@ nouveau_gpuobj_channel_init(struct nouveau_channel *chan,
744 if (ret) 744 if (ret)
745 return ret; 745 return ret;
746 746
747 nouveau_vm_ref(dev_priv->chan_vm, &chan->vm, chan->vm_pd); 747 nouveau_vm_ref(vm, &chan->vm, chan->vm_pd);
748 } 748 }
749 749
750 /* RAMHT */ 750 /* RAMHT */