]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
OMAP: DSS2: OMAPFB: add support for FBIO_WAITFORVSYNC
authorGrazvydas Ignotas <notasas@gmail.com>
Fri, 2 Jul 2010 20:54:56 +0000 (22:54 +0200)
committerTomi Valkeinen <tomi.valkeinen@nokia.com>
Thu, 5 Aug 2010 13:52:19 +0000 (16:52 +0300)
FBIO_WAITFORVSYNC is a stardard ioctl for waiting vsync, already
used by some userspace, so add it as an alias for OMAPFB_WAITFORVSYNC.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
drivers/video/omap2/omapfb/omapfb-ioctl.c

index 994f6a091b49dbf2af1f080ee426286367481d91..6f435450987e7596d1e81963ea53bcc82bcd3f42 100644 (file)
@@ -610,6 +610,7 @@ int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd, unsigned long arg)
                struct omapfb_vram_info         vram_info;
                struct omapfb_tearsync_info     tearsync_info;
                struct omapfb_display_info      display_info;
+               u32                             crt;
        } p;
 
        int r = 0;
@@ -768,6 +769,17 @@ int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd, unsigned long arg)
                        r = -EFAULT;
                break;
 
+       case FBIO_WAITFORVSYNC:
+               if (get_user(p.crt, (__u32 __user *)arg)) {
+                       r = -EFAULT;
+                       break;
+               }
+               if (p.crt != 0) {
+                       r = -ENODEV;
+                       break;
+               }
+               /* FALLTHROUGH */
+
        case OMAPFB_WAITFORVSYNC:
                DBG("ioctl WAITFORVSYNC\n");
                if (!display) {