DSS2: check for ovl paddr only when enabling
authorTomi Valkeinen <tomi.valkeinen@nokia.com>
Tue, 7 Apr 2009 07:01:58 +0000 (10:01 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Fri, 1 May 2009 16:45:01 +0000 (19:45 +0300)
It seems Xvideo uses SETUP_PLANE ioctl even when
the fb memory has not been allocated. Sigh.

drivers/video/omap2/dss/overlay.c

index 9209acf..c047206 100644 (file)
@@ -281,6 +281,11 @@ int dss_check_overlay(struct omap_overlay *ovl, struct omap_display *display)
 
        info = &ovl->info;
 
+       if (info->paddr == 0) {
+               DSSDBG("check_overlay failed: paddr 0\n");
+               return -EINVAL;
+       }
+
        display->get_resolution(display, &dw, &dh);
 
        DSSDBG("check_overlay %d: (%d,%d %dx%d -> %dx%d) disp (%dx%d)\n",
@@ -331,9 +336,6 @@ static int dss_ovl_set_overlay_info(struct omap_overlay *ovl,
        int r;
        struct omap_overlay_info old_info;
 
-       if (info->paddr == 0)
-               return -EINVAL;
-
        old_info = ovl->info;
        ovl->info = *info;