Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 260136
b: refs/heads/master
c: e41f26e
h: refs/heads/master
v: v3
  • Loading branch information
Ben Skeggs committed Jun 23, 2011
1 parent 4748413 commit 0fada2e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 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: 2fd3db6f1457050bdebf97e45147ce6827e1742a
refs/heads/master: e41f26e7d18951086611bc78cc35e244bd01d1ca
12 changes: 11 additions & 1 deletion trunk/drivers/gpu/drm/nouveau/nouveau_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,7 @@ nouveau_open(struct drm_device *dev, struct drm_file *file_priv)
{
struct drm_nouveau_private *dev_priv = dev->dev_private;
struct nouveau_fpriv *fpriv;
int ret;

fpriv = kzalloc(sizeof(*fpriv), GFP_KERNEL);
if (unlikely(!fpriv))
Expand All @@ -777,8 +778,17 @@ nouveau_open(struct drm_device *dev, struct drm_file *file_priv)
spin_lock_init(&fpriv->lock);
INIT_LIST_HEAD(&fpriv->channels);

if (dev_priv->card_type >= NV_50)
if (dev_priv->card_type == NV_50) {
ret = nouveau_vm_new(dev, 0, (1ULL << 40), 0x0020000000ULL,
&fpriv->vm);
if (ret) {
kfree(fpriv);
return ret;
}
} else
if (dev_priv->card_type >= NV_C0) {
nouveau_vm_ref(dev_priv->chan_vm, &fpriv->vm, NULL);
}

file_priv->driver_priv = fpriv;
return 0;
Expand Down

0 comments on commit 0fada2e

Please sign in to comment.