1
0
Fork 0

drm/msm/adreno: fix updating ring fence

[ Upstream commit f228af11df ]

We need to set it to the most recent completed fence, not the most
recent submitted.  Otherwise we have races where we think we can retire
submits that the GPU is not finished with, if the GPU doesn't manage to
overwrite the seqno before we look at it.

This can show up with hang recovery if one of the submits after the
crashing submit also hangs after it is replayed.

Fixes: f97decac5f ("drm/msm: Support multiple ringbuffers")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
5.4-rM2-2.2.x-imx-squashed
Rob Clark 2020-08-12 17:03:09 -07:00 committed by Greg Kroah-Hartman
parent effd3b89f7
commit 3e9eb1e893
1 changed files with 1 additions and 1 deletions

View File

@ -350,7 +350,7 @@ int adreno_hw_init(struct msm_gpu *gpu)
ring->next = ring->start;
/* reset completed fence seqno: */
ring->memptrs->fence = ring->seqno;
ring->memptrs->fence = ring->fctx->completed_fence;
ring->memptrs->rptr = 0;
}