Alexandre Courbot
2014-Dec-10 18:09 UTC
[Nouveau] [PATCH] 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 at nvidia.com> --- drm/nouveau_bo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drm/nouveau_bo.c b/drm/nouveau_bo.c index 686fbd62381e..038d7e30c305 100644 --- a/drm/nouveau_bo.c +++ b/drm/nouveau_bo.c @@ -1573,8 +1573,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) { -- 2.1.3
Apparently Analagous Threads
- [PATCH 1/2] ttm: remove special handling of coherent objects
- [PATCH v5 0/4] drm: nouveau: memory coherency on ARM
- [PATCH v4 0/6] drm: nouveau: memory coherency on ARM
- [PATCH v5] drm/nouveau: map pages using DMA API
- [PATCH v5] drm/nouveau: map pages using DMA API