From 3ec25e59854b6b03ad763bc374d3475a50f562d8 Mon Sep 17 00:00:00 2001 From: Pauli Nieminen Date: Mon, 15 Feb 2010 13:45:28 +0200 Subject: Use memcpy instead of memove for RADEONSwapCopy. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit memcpy has about 25% better performance than memmove when destination is GTT (wc caching). Changing memmove to memcpy in SwapCopy will reduce CPU time spent moving data between host and GPU. memcpy will specially help Xv when playing high resolution videos. The swap path doesn't support overlapping memory copies either so extra safety is not worth the performance hit in commonly used code path. Signed-off-by: Pauli Nieminen [ Michel Dänzer: Fixed up whitespace ] --- src/radeon_accel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/radeon_accel.c b/src/radeon_accel.c index 02905dd1..f0d94c30 100644 --- a/src/radeon_accel.c +++ b/src/radeon_accel.c @@ -980,7 +980,7 @@ void RADEONCopySwap(uint8_t *dst, uint8_t *src, unsigned int size, int swap) } } if (src != dst) - memmove(dst, src, size); + memcpy(dst, src, size); } /* Copies a single pass worth of data for a hostdata blit set up by -- cgit v1.2.3