diff options
author | Pauli Nieminen <suokkos@gmail.com> | 2009-08-19 15:20:15 +0300 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2009-08-19 11:59:47 -0400 |
commit | 947df2e5a8e4e701db67219179fb9953df8ff6e6 (patch) | |
tree | 733a5dba806839953f5db01b95feb4b6437c5d25 /src/mesa/drivers/dri/radeon/radeon_dma.c | |
parent | 66e019c6c91e6ae3fb9e26a12d7b7782a0095a8d (diff) |
radeon: Add debug output for dma buffer object numbers.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Diffstat (limited to 'src/mesa/drivers/dri/radeon/radeon_dma.c')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_dma.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_dma.c b/src/mesa/drivers/dri/radeon/radeon_dma.c index edf9ea0f01..a97438e4c7 100644 --- a/src/mesa/drivers/dri/radeon/radeon_dma.c +++ b/src/mesa/drivers/dri/radeon/radeon_dma.c @@ -263,7 +263,7 @@ void radeonFreeDmaRegions(radeonContextPtr rmesa) { struct radeon_dma_bo *dma_bo; struct radeon_dma_bo *temp; - if (RADEON_DEBUG & DEBUG_IOCTL) + if (RADEON_DEBUG & DEBUG_DMA) fprintf(stderr, "%s\n", __FUNCTION__); foreach_s(dma_bo, temp, &rmesa->dma.free) { @@ -308,8 +308,23 @@ void radeonReleaseDmaRegions(radeonContextPtr rmesa) struct radeon_dma_bo *temp; const int expire_at = ++rmesa->dma.free.expire_counter + DMA_BO_FREE_TIME; const int time = rmesa->dma.free.expire_counter; - if (RADEON_DEBUG & DEBUG_IOCTL) - fprintf(stderr, "%s\n", __FUNCTION__); + + if (RADEON_DEBUG & DEBUG_DMA) { + size_t free = 0, + wait = 0, + reserved = 0; + foreach(dma_bo, &rmesa->dma.free) + ++free; + + foreach(dma_bo, &rmesa->dma.wait) + ++wait; + + foreach(dma_bo, &rmesa->dma.reserved) + ++reserved; + + fprintf(stderr, "%s: free %u, wait %u, reserved %u, minimum_size: %u\n", + __FUNCTION__, free, wait, reserved, rmesa->dma.minimum_size); + } /* move waiting bos to free list. wait list provides gpu time to handle data before reuse */ |