Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 228522
b: refs/heads/master
c: 18a16a7
h: refs/heads/master
v: v3
  • Loading branch information
Ben Skeggs committed Dec 3, 2010
1 parent c00e9a0 commit 2895848
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 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: 938c40ed69b2c1eceb72247b5e8975b28afc195f
refs/heads/master: 18a16a768c3d37f5bfdbb414217b530294d5d442
10 changes: 2 additions & 8 deletions trunk/drivers/gpu/drm/nouveau/nouveau_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -926,20 +926,14 @@ int nouveau_ioctl_gpuobj_free(struct drm_device *dev, void *data,
struct drm_file *file_priv)
{
struct drm_nouveau_gpuobj_free *objfree = data;
struct nouveau_gpuobj *gpuobj;
struct nouveau_channel *chan;
int ret = -ENOENT;
int ret;

chan = nouveau_channel_get(dev, file_priv, objfree->channel);
if (IS_ERR(chan))
return PTR_ERR(chan);

gpuobj = nouveau_ramht_find(chan, objfree->handle);
if (gpuobj) {
nouveau_ramht_remove(chan, objfree->handle);
ret = 0;
}

ret = nouveau_ramht_remove(chan, objfree->handle);
nouveau_channel_put(&chan);
return ret;
}
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/gpu/drm/nouveau/nouveau_ramht.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,18 +214,19 @@ nouveau_ramht_remove_hash(struct nouveau_channel *chan, u32 handle)
spin_unlock_irqrestore(&chan->ramht->lock, flags);
}

void
int
nouveau_ramht_remove(struct nouveau_channel *chan, u32 handle)
{
struct nouveau_ramht_entry *entry;

entry = nouveau_ramht_remove_entry(chan, handle);
if (!entry)
return;
return -ENOENT;

nouveau_ramht_remove_hash(chan, entry->handle);
nouveau_gpuobj_ref(NULL, &entry->gpuobj);
kfree(entry);
return 0;
}

struct nouveau_gpuobj *
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/gpu/drm/nouveau/nouveau_ramht.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ extern void nouveau_ramht_ref(struct nouveau_ramht *, struct nouveau_ramht **,

extern int nouveau_ramht_insert(struct nouveau_channel *, u32 handle,
struct nouveau_gpuobj *);
extern void nouveau_ramht_remove(struct nouveau_channel *, u32 handle);
extern int nouveau_ramht_remove(struct nouveau_channel *, u32 handle);
extern struct nouveau_gpuobj *
nouveau_ramht_find(struct nouveau_channel *chan, u32 handle);

Expand Down

0 comments on commit 2895848

Please sign in to comment.