[DrmBackend] Straighten out EGL surface buffer release logic on page flip
ClosedPublic

Authored by romangg on Mar 15 2017, 6:35 PM.

Details

Summary

Currently the EGL surface buffer is released while the buffer is still being scanned out to the display. This is not the correct behavior, since it should be only released after the buffer is not scanned out anymore (i.e. the next buffer was page flipped).
I just realized the above isn't true, since we always ran into the first branch of pageFlippedBufferRemover, if the buffer uses a surface. Still imo the patched code makes more sense structurally and I'm wondering how the display removal has worked before.

The only caveat is, that in order to remove an output correctly, we need to release the buffer manually now before the EGL surface is destroyed.

Test Plan

Tested in non atomic mode (atomic mode is obsolete right now until my other WIP patch is ready to be merged): Login, logout, suspend, normal use.

Diff Detail

Repository
R108 KWin
Lint
Lint Skipped
Unit
Unit Tests Skipped
romangg created this revision.Mar 15 2017, 6:35 PM
Restricted Application added a subscriber: kwin. · View Herald TranscriptMar 15 2017, 6:35 PM
romangg retitled this revision from [DrmBackend] Wait for next page flip to release EGL surface buffer to [DrmBackend] dic EGL surface buffer release after page flip.Mar 15 2017, 6:43 PM
romangg retitled this revision from [DrmBackend] dic EGL surface buffer release after page flip to [DrmBackend] Straighten out EGL surface buffer release logic on page flip.Mar 15 2017, 6:50 PM
romangg edited the summary of this revision. (Show Details)
romangg updated this revision to Diff 12526.Mar 16 2017, 5:12 PM

Fix VT switching and make sure outputs are cleaned up also in between page flips (i.e. next buffer is set).

graesslin accepted this revision.Mar 17 2017, 4:45 PM
This revision is now accepted and ready to land.Mar 17 2017, 4:45 PM
This revision was automatically updated to reflect the committed changes.