diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2012-11-25 23:02:28 +0100 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2012-11-29 00:58:11 +0100 |
commit | 124ea297c8f0e0a3a567af0894fdbe05caaf80ec (patch) | |
tree | b0e032a8f31f3c3654d66e6c30f81026f38e394b /drivers/gpu/drm/nouveau/nouveau_chan.c | |
parent | drm/nouveau: remove misleading comment from nouveau_prime_new (diff) | |
download | linux-124ea297c8f0e0a3a567af0894fdbe05caaf80ec.tar.xz linux-124ea297c8f0e0a3a567af0894fdbe05caaf80ec.zip |
drm/nouveau: unpin pushbuffer bo before destroying it
Fixes GART leak (as accounted by nouveau_drm.gem.gart_available).
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_chan.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_chan.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_chan.c b/drivers/gpu/drm/nouveau/nouveau_chan.c index 1363578bf945..174300b6a02e 100644 --- a/drivers/gpu/drm/nouveau/nouveau_chan.c +++ b/drivers/gpu/drm/nouveau/nouveau_chan.c @@ -76,6 +76,8 @@ nouveau_channel_del(struct nouveau_channel **pchan) nouveau_object_del(client, NVDRM_DEVICE, chan->push.handle); nouveau_bo_vma_del(chan->push.buffer, &chan->push.vma); nouveau_bo_unmap(chan->push.buffer); + if (chan->push.buffer && chan->push.buffer->pin_refcnt) + nouveau_bo_unpin(chan->push.buffer); nouveau_bo_ref(NULL, &chan->push.buffer); kfree(chan); } |