summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nv50_instmem.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-01-17 21:57:59 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-17 21:57:59 +0300
commit584ef2cd70acb0e473ba51e1073c2c5c95a2d27a (patch)
tree8cbed7283567438fda8aea75a2ad4761acc6d826 /drivers/gpu/drm/nouveau/nv50_instmem.c
parente1288cd72f54e7fc16ae9ebb4d0647537ef848d4 (diff)
parent25b2ec5b643c9ea784e5a51e5e9602cd536965f2 (diff)
downloadlinux-584ef2cd70acb0e473ba51e1073c2c5c95a2d27a.tar.xz
Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: drm/radeon/kms: balance asic_reset functions drm/radeon/kms: remove duplicate card_posted() functions drm/radeon/kms: add module option for pcie gen2 drm/radeon/kms: fix typo in evergreen safe reg drm/nouveau: fix gpu page faults triggered by plymouthd drm/nouveau: greatly simplify mm, killing some bugs in the process drm/nvc0: enable protection of system-use-only structures in vm drm/nv40: initialise 0x17xx on all chipsets that have it drm/nv40: make detection of 0x4097-ful chipsets available everywhere
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv50_instmem.c')
-rw-r--r--drivers/gpu/drm/nouveau/nv50_instmem.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_instmem.c b/drivers/gpu/drm/nouveau/nv50_instmem.c
index 2e1b1cd19a4b..ea0041810ae3 100644
--- a/drivers/gpu/drm/nouveau/nv50_instmem.c
+++ b/drivers/gpu/drm/nouveau/nv50_instmem.c
@@ -332,8 +332,11 @@ nv50_instmem_get(struct nouveau_gpuobj *gpuobj, u32 size, u32 align)
gpuobj->vinst = node->vram->offset;
if (gpuobj->flags & NVOBJ_FLAG_VM) {
- ret = nouveau_vm_get(dev_priv->chan_vm, size, 12,
- NV_MEM_ACCESS_RW | NV_MEM_ACCESS_SYS,
+ u32 flags = NV_MEM_ACCESS_RW;
+ if (!(gpuobj->flags & NVOBJ_FLAG_VM_USER))
+ flags |= NV_MEM_ACCESS_SYS;
+
+ ret = nouveau_vm_get(dev_priv->chan_vm, size, 12, flags,
&node->chan_vma);
if (ret) {
vram->put(dev, &node->vram);