From f9b8562f32b77a27c872d4c70a86995032541107 Mon Sep 17 00:00:00 2001 From: Pauli Nieminen Date: Tue, 18 Aug 2009 14:30:51 -0400 Subject: [PATCH] radeon: balance dma buffer mapping In radeonRefillCurrentDmaRegion() make sure we unmap the previous buffer. --- src/mesa/drivers/dri/radeon/radeon_dma.c | 4 ++++ 1 file changed, 4 insertions(+) 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); -- 2.30.2