From b03e0caf5e153551cb71065ffaa4361b7f7e492b Mon Sep 17 00:00:00 2001 From: notaz Date: Sat, 25 Jun 2011 01:49:35 +0300 Subject: gpus: return DMA word count to avoid 1 list walk --- plugins/dfxvideo/gpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins/dfxvideo/gpu.c') diff --git a/plugins/dfxvideo/gpu.c b/plugins/dfxvideo/gpu.c index 9a614de..0d105f8 100644 --- a/plugins/dfxvideo/gpu.c +++ b/plugins/dfxvideo/gpu.c @@ -1042,6 +1042,7 @@ long CALLBACK GPUdmaChain(uint32_t * baseAddrL, uint32_t addr) uint32_t dmaMem; unsigned char * baseAddrB; short count;unsigned int DMACommandCounter = 0; + long dmaWords = 0; GPUIsBusy; @@ -1056,6 +1057,7 @@ long CALLBACK GPUdmaChain(uint32_t * baseAddrL, uint32_t addr) if(CheckForEndlessLoop(addr)) break; count = baseAddrB[addr+3]; + dmaWords += 1 + count; dmaMem=addr+4; @@ -1067,7 +1069,7 @@ long CALLBACK GPUdmaChain(uint32_t * baseAddrL, uint32_t addr) GPUIsIdle; - return 0; + return dmaWords; } //////////////////////////////////////////////////////////////////////// -- cgit v1.2.3