On 06/06/15 07:09, Laurent Pinchart wrote: > Hi Tomi, > > Thank you for the patch. > > On Thursday 04 June 2015 12:02:58 Tomi Valkeinen wrote: >> omap_crtc_disable() waits for pending page flips to finish. However, >> omap_crtc_disable() is always called via omap_atomic_complete() and we >> never have page flips going on at that time. > > Why is that ? Because our omap_atomic_complete() implementation waits for > vblanks before allowing the next atomic commit to run, and that our vblank > IRQ > handler completes all pending page flips ? If so, I believe we have a few > corner cases that won't work properly.
Yes, I think what omap_atomic_complete() is supposed to do is to wait until everything is done for the affected crtcs. But you are right, it wasn't quite correct. > For instance, if the user performs a full mode set on a CRTC without change > the framebuffer, an event can be queued but > drm_atomic_helper_wait_for_vblanks() won't wait for vblank on that CRTC as > framebuffer_changed() will return false. If the next commit then disables the > CRTC the event might not have completed yet. I reworked the event/flip_wait code, removing this patch and 42 and 43. I didn't have time to clean it up properly, but I'm probably not able to work on it for the following days, so I'll post it now. Quick testing went fine. I also pushed it to omapdrm-atomic-v2 branch.