]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android-sdk/kernel-video.git/commitdiff
OMAPDSS: OMAPFB: return error when can't enable vsync
authorSergiy Kibrik <sergiy.kibrik@globallogic.com>
Thu, 28 Feb 2013 17:45:42 +0000 (19:45 +0200)
committerPraneeth Bajjuri <praneeth@ti.com>
Fri, 12 Jul 2013 22:28:59 +0000 (17:28 -0500)
When device is not active we can't register VSYNC isr, but
must explicitly notify about it, so caller can handle error
and not wait for VSYNC that never happens.

Change-Id: Idc83d8bdc6b8c590fee6dd916717871455c12efd
Signed-off-by: Sergiy Kibrik <sergiy.kibrik@globallogic.com>
drivers/video/omap2/omapfb/omapfb-ioctl.c

index 87d61811e4b65fc2ae5926ebdd11399430e2f5b9..27d7d033f372ff0c4f74e48cb68a88e01df5b701 100644 (file)
@@ -907,15 +907,15 @@ int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd, unsigned long arg)
 
                omapfb_lock(fbdev);
                fbdev->vsync_active = !!p.crt;
-
-               if (display->state == OMAP_DSS_DISPLAY_ACTIVE) {
-                       if (p.crt)
+               if (p.crt)
+                       if (display->state == OMAP_DSS_DISPLAY_ACTIVE)
                                omapfb_enable_vsync(fbdev, display->channel,
                                        true);
                        else
-                               omapfb_enable_vsync(fbdev, display->channel,
-                                       false);
-               }
+                               r = -EBUSY;
+               else
+                       omapfb_enable_vsync(fbdev, display->channel,
+                               false);
                omapfb_unlock(fbdev);
                break;