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:35:18 +1000 |
commit | 4669122098c934c598a56122c695c711fb4afb1c (patch) | |
tree | 321049310bbb5037ffdb4bc4431435c572a2a771 /drm | |
parent | 4e351ed8f4e9c41fbe7caab2612eeac6f6c6df80 (diff) | |
download | nouveau-4669122098c934c598a56122c695c711fb4afb1c.tar.gz |
drm: 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 'drm')
-rw-r--r-- | drm/nouveau_bo.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drm/nouveau_bo.c b/drm/nouveau_bo.c index 21ec561ed..bba2960d3 100644 --- a/drm/nouveau_bo.c +++ b/drm/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) { |