summaryrefslogtreecommitdiff
path: root/lib/igt_rand.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2018-02-27 21:45:14 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2018-03-01 08:46:14 +0000
commit6a06d014a38fc8282f7dda7c11e5cacd9daf44ca (patch)
tree3ed22f665ea29a563f9298618ea5d119e2d5e24d /lib/igt_rand.h
parent5aed726a723d0abd42e36a26dd6349739fefd568 (diff)
lib: Provide an accelerated routine for readback from WC
Reading from WC is awfully slow as each access is uncached and so performed synchronously, stalling for the memory load. x86 did introduce some new instructions in SSE 4.1 to provide a small internal buffer to accelerate reading back a cacheline at a time from uncached memory, for this purpose. v2: Don't be lazy and handle misalignment. v3: Switch out of sse41 before emitting the generic memcpy routine v4: Replace opencoded memcpy_from_wc v5: Always flush the internal buffer before use (Eric) v6: Assume bulk moves, so check for dst alignment. v7: Use _mm_fence for _buitlin_ia32_mfence for consistency, remove superfluous defines (Ville) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Eric Anholt <eric@anholt.net> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'lib/igt_rand.h')
0 files changed, 0 insertions, 0 deletions