Hey, I was reading your code of the libDrmRenderer and I was wondering about one thing, maybe you can help me out.
In libDrmRenderer the schedule-buffer-for-page-flip-function is called right away when we get the page-flip-done event. If I am right, this means the next buffer to display is read out of queue and scheduled for page-flip right after the page-flip of the previous buffer happens. This seems to me to add some delay, because there could have been a new buffer between the time I schedule the buffer for page-flip and the actual page flip event. (with 60Hz display, the delay could be 16ms.)
Am I wrong with my assumption and is there maybe a better way to do this to reduce delay? Can I use VBlank callback or use waitForVBlank function to schedule my buffer for page-flip or is it already to late when vblank callback ist called?
I have found in the documentation a note:
" drmModePageFlip does not wait for rendering to complete, nor is future rendering blocked until the flip completes. This differs from KMS based implementations that utilize implicit synchronization. When using EGLOutput together with DRM-NVDC, synchronization is handled internally."
Does that mean I can call this function again with a new buffer so that the old one will be overwritten? This would be different from other implementations I have read about where it will return -EBUSY if called already before the next flip was done.