summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@nvidia.com>2014-12-10 21:09:10 +0300
committerBen Skeggs <bskeggs@redhat.com>2014-12-22 01:37:37 +0300
commitdcccdc143ffa832674a81070cfe4c9a7eb6c8aa1 (patch)
tree945b73c555ed11d74859b8b065a476c120e45ab0 /drivers/gpu
parentc7e873f85fb60b1af589ac1b0c62353cfe0bbb29 (diff)
downloadlinux-dcccdc143ffa832674a81070cfe4c9a7eb6c8aa1.tar.xz
drm/nouveau: fix missing return statement in nouveau_ttm_tt_unpopulate
nouveau_ttm_tt_unpopulate() is supposed to return right after calling ttm_dma_unpopulate() in the case of a coherent buffer. The return statement was omitted, leading to the pages being unmapped twice. Fix this. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_bo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 21ec561edc99..bba2960d3dfb 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -1572,8 +1572,10 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt *ttm)
* so use the DMA API for them.
*/
if (!nv_device_is_cpu_coherent(device) &&
- ttm->caching_state == tt_uncached)
+ ttm->caching_state == tt_uncached) {
ttm_dma_unpopulate(ttm_dma, dev->dev);
+ return;
+ }
#if __OS_HAS_AGP
if (drm->agp.stat == ENABLED) {