Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 260113
b: refs/heads/master
c: fe32b16
h: refs/heads/master
i:
  260111: 45de04a
v: v3
  • Loading branch information
Ben Skeggs committed Jun 23, 2011
1 parent 6d93863 commit f4e1159
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b79181cbad3ab40509ea6c985b940d48d90abc0b
refs/heads/master: fe32b16e7998bae28209834c0f7c21766d7524ec
1 change: 1 addition & 0 deletions trunk/drivers/gpu/drm/nouveau/nouveau_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
struct nouveau_fpriv {
spinlock_t lock;
struct list_head channels;
struct nouveau_vm *vm;
};

static inline struct nouveau_fpriv *
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/gpu/drm/nouveau/nouveau_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,7 @@ static void nouveau_card_takedown(struct drm_device *dev)
int
nouveau_open(struct drm_device *dev, struct drm_file *file_priv)
{
struct drm_nouveau_private *dev_priv = dev->dev_private;
struct nouveau_fpriv *fpriv;

fpriv = kzalloc(sizeof(*fpriv), GFP_KERNEL);
Expand All @@ -776,6 +777,9 @@ 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)
nouveau_vm_ref(dev_priv->chan_vm, &fpriv->vm, NULL);

file_priv->driver_priv = fpriv;
return 0;
}
Expand All @@ -791,6 +795,7 @@ void
nouveau_postclose(struct drm_device *dev, struct drm_file *file_priv)
{
struct nouveau_fpriv *fpriv = nouveau_fpriv(file_priv);
nouveau_vm_ref(NULL, &fpriv->vm, NULL);
kfree(fpriv);
}

Expand Down

0 comments on commit f4e1159

Please sign in to comment.