Closed digetx closed 5 years ago
@kusma commits are updated, please take a look. If it looks okay now, then I can merge this all sometime later after some more testing. I made some extra changes..
1) now copying won't be broken in 4K chunks and will be a single-large "VFP" copy when possible 2) decided to keep memcpy() for cases of copying from cacheable memory because I got a bit different result this time during testing and memcpy could be ~20% faster for specific cases of cacheline aliasing 3) changed the rule of when to use bounce buffer, it will be used only when both src and dest are uncached, perf tests showed that it is more optimal 4) src address is now always aligned, only dst can be bounced.. perf tests showed that it is more optimal
@kusma Patches updated.
Dropped "offset aligning" copying, we can return to it later once there will be a real use-case (accelerated DownloadFromScreen for example).
Tuned copying performance, there is now tegra_copy_block_vfp_arm() which is a mix of VFP + STMIA, it should be faster than generic memcpy() in all cases of copying sizes.. etc.
BLOCK_SIZE reduced from 4K to 1K, this gives some boost for 2-pass copying.
vfpcpy() now doesn't clobber D8-D15 VFP register and copies 64B at a time since I can't see perf difference in comparison to 128B.
Added __thread
annotation to bounce_buf
. It is not really necessary for a single-threaded Xorg, but now those vfp-copy functions should be thread-safe.
@kusma Re-added tegra_memcpy_vfp_unaligned()
and added EXA DownloadFromScreen
implentation.
@kusma Any more comments? I've been testing (using) opentegra with these patches included for a week without any problems.
Add accelerated memcpy that uses VFP instructions to copy 128 bytes at once, it gives significant boost to copying from uncached buffer. Inspired by results of https://github.com/ssvb/tinymembench.