Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/msm/a5xx: disable preemption in submits by default

Fine grain preemption (switching from/to points within submits)
requires extra handling in command stream of those submits, especially
when rendering with tiling (using GMEM). However this handling is
missing at this point in mesa (and always was). For this reason we get
random GPU faults and hangs if more than one priority level is used
because local preemption is enabled prior to executing command stream
from submit.
With that said it was ahead of time to enable local preemption by
default considering the fact that even on downstream kernel it is only
enabled if requested via UAPI.

Fixes: a7a4c19c36de ("drm/msm/a5xx: fix setting of the CP_PREEMPT_ENABLE_LOCAL register")
Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com>
Patchwork: https://patchwork.freedesktop.org/patch/612041/
Signed-off-by: Rob Clark <robdclark@chromium.org>

authored by

Vladimir Lypak and committed by
Rob Clark
db9dec2d 16007768

+6 -2
+6 -2
drivers/gpu/drm/msm/adreno/a5xx_gpu.c
··· 150 150 OUT_PKT7(ring, CP_SET_PROTECTED_MODE, 1); 151 151 OUT_RING(ring, 1); 152 152 153 - /* Enable local preemption for finegrain preemption */ 153 + /* 154 + * Disable local preemption by default because it requires 155 + * user-space to be aware of it and provide additional handling 156 + * to restore rendering state or do various flushes on switch. 157 + */ 154 158 OUT_PKT7(ring, CP_PREEMPT_ENABLE_LOCAL, 1); 155 - OUT_RING(ring, 0x1); 159 + OUT_RING(ring, 0x0); 156 160 157 161 /* Allow CP_CONTEXT_SWITCH_YIELD packets in the IB2 */ 158 162 OUT_PKT7(ring, CP_YIELD_ENABLE, 1);