Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

frame sync using HDMI signal? #10

Closed
andreacampanella opened this issue Jun 8, 2018 · 1 comment
Closed

frame sync using HDMI signal? #10

andreacampanella opened this issue Jun 8, 2018 · 1 comment

Comments

@andreacampanella
Copy link

Would be possible to sync the frames using the clock of the hdmi connector and feed in back to the raspberry pi? this behaviour could give a performance boost avoiding to pull the framebuffer.

@juj
Copy link
Owner

juj commented Jun 8, 2018

This is implemented using the #define USE_GPU_VSYNC option and basically it gives you a timer that triggers 60 times a second (or whatever the value is set in the current display mode). This timer however does not have a relation to syncing to anything, since it is not triggering based on applications running on the Pi producing video frames (and it's not syncing to the vsync line of the SPI display either, which it of course should not). Outside the scope of HDMI, it is just an arbitrary periodic timer signalling at 60Hz.

You can try enabling #define USE_GPU_VSYNC to use this to see how well it works for you. On Pi Zero I'm getting stuttering and higher latency than not using it (which then spin polls), but CPU consumption is lower, so it's enabled by default, accepting the stutter and latency that comes with it.

The issue is discussed in raspberrypi/userland#440. If DispmanX adds a callback signal to listen to produced frames, then that would be an appropriate frame sync method that would minimize latency, stuttering and power consumption each.

I'll close this since there's nothing I know to do here, although agreed this is an issue.

@juj juj closed this as completed Jun 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants