Skip to content

Commit

Permalink
drm/msm/adreno: fix updating ring fence
Browse files Browse the repository at this point in the history
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: f97deca ("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>
  • Loading branch information
robclark committed Aug 17, 2020
1 parent 35c719d commit f228af1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/msm/adreno/adreno_gpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,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;
}

Expand Down

0 comments on commit f228af1

Please sign in to comment.