Skip to content
Commit 12db28ab authored by Chris Wilson's avatar Chris Wilson
Browse files

sna: Reorder vblank/flip event handling to avoid TearFree recursion

TearFree wants to grab the most recently used scanout for rendering the
next frame into. If the flip event was still pending, we would then
query the drm event buffer for any pending completions, but this would
proceed to execute all the other events before the flip events as well.
Since we they were out of sequence, we pushed them into a buffer to
execute afterwards, however we forgot the side effects of the flip
handlers, for example see commit af36a4ab ("sna: Defer submission
of the next shadow frame until halfway through") and that there may have
been events read from drm into a local buffer inside sna_mode_wakeup()
that haven't been processed yet.

Eliminate the need for calling sna_mode_wakeup() by ensuring that all
flip events have been completed first before handing the vblank
callbacks and potential drawing, ensuring the correct ordering.

References: https://bugs.freedesktop.org/show_bug.cgi?id=105720


Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
parent ca6a57d5
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