Skip to content

Commit

Permalink
drm/nouveau: fix missing return statement in nouveau_ttm_tt_unpopulate
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexandre Courbot authored and Ben Skeggs committed Dec 21, 2014
1 parent c7e873f commit dcccdc1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/gpu/drm/nouveau/nouveau_bo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit dcccdc1

Please sign in to comment.