[PATCH] drm/i915: check to see if SIMD registers are available before using SIMD

Sebastian Andrzej Siewior bigeasy at linutronix.de
Fri May 1 10:42:15 UTC 2020


On 2020-04-30 16:10:16 [-0600], Jason A. Donenfeld wrote:
> Sometimes it's not okay to use SIMD registers, the conditions for which
> have changed subtly from kernel release to kernel release. Usually the
> pattern is to check for may_use_simd() and then fallback to using
> something slower in the unlikely case SIMD registers aren't available.
> So, this patch fixes up i915's accelerated memcpy routines to fallback
> to boring memcpy if may_use_simd() is false.

That would indicate that these functions are used from IRQ/softirq which
break otherwise if the kernel is also using the registers. The crypto
code uses it for that purpose.

So
   Reviewed-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>

May I ask how large the memcpy can be? I'm asking in case it is large
and an explicit rescheduling point might be needed.

> Cc: stable at vger.kernel.org
> Signed-off-by: Jason A. Donenfeld <Jason at zx2c4.com>

Sebastian


More information about the dri-devel mailing list