Skip to content
Commit 7cc29fcd authored by Marijn Suijten's avatar Marijn Suijten Committed by Rob Clark
Browse files

drm/msm: a5xx: Make preemption reset case reentrant



nr_rings is reset to 1, but when this function is called for a second
(and third!) time nr_rings > 1 is false, thus the else case is entered
to set up a buffer for the RPTR shadow and consequently written to
RB_RPTR_ADDR, hanging platforms without WHERE_AM_I firmware support.

Restructure the condition in such a way that shadow buffer setup only
ever happens when has_whereami is true; otherwise preemption is only
finalized when the number of ring buffers has not been reset to 1 yet.

Fixes: 8907afb4 ("drm/msm: Allow a5xx to mark the RPTR shadow as privileged")
Signed-off-by: default avatarMarijn Suijten <marijn.suijten@somainline.org>
Tested-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Reviewed-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
parent 05ae91d9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment