[Intel-gfx] [PATCH] drm/i915: Use SSE4.1 movntqda to accelerate reads from WC memory
Chris Wilson
chris at chris-wilson.co.uk
Sat Jul 16 12:33:22 UTC 2016
On Sat, Jul 16, 2016 at 01:07:35PM +0100, Chris Wilson wrote:
> +void i915_memcpy_from_wc(void *dst, const void *src, unsigned long len)
> +{
> + GEM_BUG_ON((unsigned long)dst & 15);
> + GEM_BUG_ON((unsigned long)src & 15);
> + GEM_BUG_ON((unsigned long)len & 15);
> +
> +#ifdef CONFIG_AS_MOVNTDQA
> + if (static_branch_likely(&has_movntqa))
> + __movntqda(dst, src, len);
> + else
> +#endif
> + memcpy(dst, src, len);
Ok, actually using this in a patch, the automatic fixup to a plain
memcpy from WC is bad behaviour and instead I want to punt the fallback
to the caller (i.e. return false;)
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list