kernel_samsung_a53x/drivers/gpu/drm/msm/adreno
Vladimir Lypak 2a3b8254f9 drm/msm/a5xx: workaround early ring-buffer emptiness check
[ Upstream commit a30f9f65b5ac82d4390548c32ed9c7f05de7ddf5 ]

There is another cause for soft lock-up of GPU in empty ring-buffer:
race between GPU executing last commands and CPU checking ring for
emptiness. On GPU side IRQ for retire is triggered by CACHE_FLUSH_TS
event and RPTR shadow (which is used to check ring emptiness) is updated
a bit later from CP_CONTEXT_SWITCH_YIELD. Thus if GPU is executing its
last commands slow enough or we check that ring too fast we will miss a
chance to trigger switch to lower priority ring because current ring isn't
empty just yet. This can escalate to lock-up situation described in
previous patch.
To work-around this issue we keep track of last submit sequence number
for each ring and compare it with one written to memptrs from GPU during
execution of CACHE_FLUSH_TS event.

Fixes: b1fc2839d2f9 ("drm/msm: Implement preemption for A5XX targets")
Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com>
Patchwork: https://patchwork.freedesktop.org/patch/612047/
Signed-off-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-23 23:21:22 +01:00
..
a2xx.xml.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
a2xx_gpu.c drm/msm: Drop priv->lastctx 2024-11-23 23:21:22 +01:00
a2xx_gpu.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
a3xx.xml.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
a3xx_gpu.c drm/msm: Drop priv->lastctx 2024-11-23 23:21:22 +01:00
a3xx_gpu.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
a4xx.xml.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
a4xx_gpu.c drm/msm: Drop priv->lastctx 2024-11-23 23:21:22 +01:00
a4xx_gpu.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
a5xx.xml.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
a5xx_debugfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
a5xx_gpu.c drm/msm/a5xx: workaround early ring-buffer emptiness check 2024-11-23 23:21:22 +01:00
a5xx_gpu.h drm/msm/a5xx: workaround early ring-buffer emptiness check 2024-11-23 23:21:22 +01:00
a5xx_power.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
a5xx_preempt.c drm/msm/a5xx: workaround early ring-buffer emptiness check 2024-11-23 23:21:22 +01:00
a6xx.xml.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
a6xx_gmu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
a6xx_gmu.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
a6xx_gmu.xml.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
a6xx_gpu.c drm/msm: Drop priv->lastctx 2024-11-23 23:21:22 +01:00
a6xx_gpu.h drm/msm: Drop priv->lastctx 2024-11-23 23:21:22 +01:00
a6xx_gpu_state.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
a6xx_gpu_state.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
a6xx_hfi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
a6xx_hfi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adreno_common.xml.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adreno_device.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adreno_gpu.c drm/msm: Fix incorrect file name output in adreno_request_fw() 2024-11-23 23:21:21 +01:00
adreno_gpu.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adreno_pm4.xml.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00