diff options
author | Alexandre Courbot <acourbot@nvidia.com> | 2014-12-11 03:09:10 +0900 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2014-12-22 08:37:37 +1000 |
commit | dcccdc143ffa832674a81070cfe4c9a7eb6c8aa1 (patch) | |
tree | 945b73c555ed11d74859b8b065a476c120e45ab0 /drivers/gpu/drm | |
parent | c7e873f85fb60b1af589ac1b0c62353cfe0bbb29 (diff) | |
download | op-kernel-dev-dcccdc143ffa832674a81070cfe4c9a7eb6c8aa1.zip op-kernel-dev-dcccdc143ffa832674a81070cfe4c9a7eb6c8aa1.tar.gz |
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/drm')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bo.c | 4 |
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 21ec561..bba2960 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) { |