From: Pauli Nieminen Date: Tue, 18 Aug 2009 18:30:51 +0000 (-0400) Subject: radeon: balance dma buffer mapping X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f9b8562f32b77a27c872d4c70a86995032541107;p=mesa.git radeon: balance dma buffer mapping In radeonRefillCurrentDmaRegion() make sure we unmap the previous buffer. --- diff --git a/src/mesa/drivers/dri/radeon/radeon_dma.c b/src/mesa/drivers/dri/radeon/radeon_dma.c index b2376ea28b5..30191845b98 100644 --- a/src/mesa/drivers/dri/radeon/radeon_dma.c +++ b/src/mesa/drivers/dri/radeon/radeon_dma.c @@ -180,6 +180,10 @@ void radeonRefillCurrentDmaRegion(radeonContextPtr rmesa, int size) rmesa->dma.flush(rmesa->glCtx); } + /* unmap old reserved bo */ + if (!is_empty_list(&rmesa->dma.reserved)) + radeon_bo_unmap(first_elem(&rmesa->dma.reserved)->bo); + if (is_empty_list(&rmesa->dma.free)) { struct radeon_dma_bo *dma_bo = CALLOC(sizeof(struct radeon_dma_bo)); assert(dma_bo);