How can I detect VSYNC through code?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How can I detect VSYNC through code?

1,097 Views
mikejanzen
Contributor I

We are doing video display output from multiple video sources concurrently with Yocto 1.7, Linux 3.10.17, gstreamer 1.2.3, and gstreamer_imx directly to the Linux framebuffer (without X11) on a iMX6 dual processor (GPU is Vivante).

We've noticed video tearing, and want to eliminate that tearing.  The video tearing is illustrated here: Screen tearing - Wikipedia, the free encyclopedia.

We suspect the video tearing is due to performing OpenGL operations (swapping a buffer to the screen) when the HDMI vsync occurs.

Are there any alternate theories as to why the tearing occurs?

How can I write code that detects when this vsync occurs (polling is fine if that's the only way)?

Thanks,

Mike Janzen

0 Kudos
Reply
1 Reply

683 Views
igorpadykov
NXP Employee
NXP Employee

Hi Mike

I am not aware of such codes, but seems one can poll

vsync using associated gpio (setting SION bit in its iomux configuration).

HDMI uses for its input IPU DI as described in

iMX6_Firmware_Guide.pdf  i.MX 6Series Platform SDK  Chapter 15 Configuring

the HDMI Tx Module . For example IPUx_DIx_PIN03 is used as VSYNC and

according to IMX6DQRM Chapter 4 External Signals and Pin Multiplexing,

DI0_PIN3 (ALT5) GPIO4_IO19.

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply