Module Name:    xsrc
Committed By:   jmcneill
Date:           Sun Feb 13 20:06:20 UTC 2011

Modified Files:
        xsrc/external/mit/xf86-video-openchrome/dist/src: via_memcpy.c

Log Message:
Remove a couple '#ifdef linux's to let the driver use optimized memcpy
functions on NetBSD for video copy. Gives nearly 2x performance on my
test system (previously "kernel" memcpy was always used):

CHROME(0): Benchmarking video copy.  Less time is better.
CHROME(0): Timed   libc YUV420 copy... 3000272. Throughput: 315.6 MiB/s.
CHROME(0): Timed kernel YUV420 copy... 3024946. Throughput: 313.0 MiB/s.
CHROME(0): Timed    SSE YUV420 copy... 1591352. Throughput: 595.0 MiB/s.
CHROME(0): Timed    MMX YUV420 copy... 2566279. Throughput: 369.0 MiB/s.
CHROME(0): Ditching 3DNow! YUV420 copy. Not supported by CPU.
CHROME(0): Timed   MMX2 YUV420 copy... 1696662. Throughput: 558.1 MiB/s.
CHROME(0): Using SSE YUV42X copy for video.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
    xsrc/external/mit/xf86-video-openchrome/dist/src/via_memcpy.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xf86-video-openchrome/dist/src/via_memcpy.c
diff -u xsrc/external/mit/xf86-video-openchrome/dist/src/via_memcpy.c:1.1.1.1 xsrc/external/mit/xf86-video-openchrome/dist/src/via_memcpy.c:1.2
--- xsrc/external/mit/xf86-video-openchrome/dist/src/via_memcpy.c:1.1.1.1	Thu May 27 07:31:58 2010
+++ xsrc/external/mit/xf86-video-openchrome/dist/src/via_memcpy.c	Sun Feb 13 20:06:19 2011
@@ -311,8 +311,6 @@
     }
 
 
-#if !defined(__i386__) || (defined(linux) && defined(__i386__))
-
 static void
 libc_YUV42X(unsigned char *dst, const unsigned char *src,
             int dstPitch, int w, int h, int yuv422)
@@ -350,8 +348,6 @@
         }
     }
 }
-#endif
-
 
 #ifdef __i386__
 
@@ -417,7 +413,6 @@
     }
 }
 
-#ifdef linux
 PREFETCH_FUNC(sse, SSE, SSE,, FENCE)
 PREFETCH_FUNC(mmxext, MMXEXT, SSE, EMMS, FENCEMMS)
 PREFETCH_FUNC(now, MMX, NOW, FEMMS, FEMMS)
@@ -517,7 +512,6 @@
     }
     return 0;
 }
-#endif /* linux */
 
 /*
  * Benchmark the video copy routines and choose the fastest.
@@ -527,7 +521,6 @@
 {
     ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
 
-#ifdef linux
     char buf[BSIZ];
     unsigned char *buf1, *buf2, *buf3;
     char *tmpBuf, *endBuf;
@@ -649,11 +642,6 @@
                "Using %s YUV42X copy for %s.\n",
                mcFunctions[bestSoFar].mName, copyType);
     return mcFunctions[bestSoFar].mFunc;
-#else
-    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-               "Using Linux kernel memcpy for video.\n");
-    return kernel_YUV42X;
-#endif /* linux */
 }
 
 #else

Reply via email to