OMAPDSS: add new vsync and line getter ioctls
authorGrazvydas Ignotas <notasas@gmail.com>
Thu, 25 Feb 2016 23:10:19 +0000 (01:10 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 28 Feb 2016 01:55:13 +0000 (03:55 +0200)
commit00943e97e1fcda39c59f503e36f161b99feaf1f7
treed5a4cc7482823bf3a4ce8a6d1cce9d35bc306ff0
parent3474e9495a1769645abe78717e01f087640cc328
OMAPDSS: add new vsync and line getter ioctls

OMAPFB_WAITFORVSYNC_FRAME has an int arg which is the current frame
number (both an input and output). The ioctl only waits if the passed
arg matches the current frame number, otherwise it instantly returns.
It always updates the arg to the current frame number on return.

This can be used for a reliable adaptive vsync implementation where
vsync wait will only happen if the program renders a frame faster
than it's displayed.

OMAPFB_GET_LINE_STATUS reads the line number from OMAP's DISPC hardware.
Note that the number is 0 while blanking (VFP, vsync, VBP).
When the display is off, it seem to always return 2047.
drivers/video/omap2/dss/dispc.c
drivers/video/omap2/omapfb/omapfb-ioctl.c
include/linux/omapfb.h
include/video/omapdss.h