]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/video/omap2/omapfb/omapfb-ioctl.c
OMAPFB: Change dssdev->manager references
[karo-tx-linux.git] / drivers / video / omap2 / omapfb / omapfb-ioctl.c
index 27a85813c6001e147ad065b5580df4d5370d1010..606b89f12351d4e1cc2cb234fd4e5c481bf82cda 100644 (file)
@@ -70,7 +70,7 @@ static int omapfb_setup_plane(struct fb_info *fbi, struct omapfb_plane_info *pi)
 
        DBG("omapfb_setup_plane\n");
 
-       if (ofbi->num_overlays != 1) {
+       if (ofbi->num_overlays == 0) {
                r = -EINVAL;
                goto out;
        }
@@ -185,7 +185,7 @@ static int omapfb_query_plane(struct fb_info *fbi, struct omapfb_plane_info *pi)
 {
        struct omapfb_info *ofbi = FB2OFB(fbi);
 
-       if (ofbi->num_overlays != 1) {
+       if (ofbi->num_overlays == 0) {
                memset(pi, 0, sizeof(*pi));
        } else {
                struct omap_overlay *ovl;
@@ -599,6 +599,7 @@ int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd, unsigned long arg)
        struct omapfb_info *ofbi = FB2OFB(fbi);
        struct omapfb2_device *fbdev = ofbi->fbdev;
        struct omap_dss_device *display = fb2display(fbi);
+       struct omap_overlay_manager *mgr;
 
        union {
                struct omapfb_update_window_old uwnd_o;
@@ -786,12 +787,14 @@ int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd, unsigned long arg)
 
        case OMAPFB_WAITFORVSYNC:
                DBG("ioctl WAITFORVSYNC\n");
-               if (!display) {
+               if (!display && !display->output && !display->output->manager) {
                        r = -EINVAL;
                        break;
                }
 
-               r = display->manager->wait_for_vsync(display->manager);
+               mgr = display->output->manager;
+
+               r = mgr->wait_for_vsync(mgr);
                break;
 
        case OMAPFB_WAITFORGO: