drm/i915: Align start for memcpy_from_wc
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 11 Dec 2019 11:04:37 +0000 (11:04 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 11 Dec 2019 22:40:41 +0000 (22:40 +0000)
commit6aacb5a3b0bccfa207ef2710f106020c1d749f1d
tree3481faf9d8deb5f95a8c1b4e624c8b6299e99b02
parent51696691aba3d1a3e74a9ad9e615abd06532a11e
drm/i915: Align start for memcpy_from_wc

The movntqda requires 16-byte alignment for the source pointer. Avoid
falling back to clflush if the source pointer is misaligned by doing the
doing a small uncached memcpy to fixup the alignments.

v2: Turn the unaligned copy into a genuine helper

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191211110437.4082687-5-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_cmd_parser.c
drivers/gpu/drm/i915/i915_memcpy.c
drivers/gpu/drm/i915/i915_memcpy.h