]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
OMAPDSS: fix set_timings
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Wed, 5 Sep 2012 11:09:33 +0000 (14:09 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 7 Sep 2012 17:02:13 +0000 (20:02 +0300)
set_timings function of DSS's output drivers are not consistent. Some of
them disable the output, set the timings, and re-enable the output. Some
set the timings on the fly, while the output is enabled. And some just
store the given timings, so that they will be taken into use next time
the output is enabled.

We require the DISPC output to be disabled when changing the timings,
and so we can change all the output drivers' set_timings to just store
the given timings.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/omap2/dss/display.c
drivers/video/omap2/dss/dpi.c
drivers/video/omap2/dss/hdmi.c
drivers/video/omap2/dss/sdi.c
drivers/video/omap2/dss/venc.c

index 5bd957e85505465990301d4a78abf4dd2f8e05a4..5f09d503d61965c111f814c4b624fcee76ee2eb9 100644 (file)
@@ -142,7 +142,11 @@ static ssize_t display_timings_store(struct device *dev,
        if (r)
                return r;
 
+       dssdev->driver->disable(dssdev);
        dssdev->driver->set_timings(dssdev, &t);
+       r = dssdev->driver->enable(dssdev);
+       if (r)
+               return r;
 
        return size;
 }
index 99b9851f84290e5980495b07067900793b5be6cc..5ccce9b69e428fd555508bccbd2c5bddc0da64b3 100644 (file)
@@ -277,26 +277,12 @@ EXPORT_SYMBOL(omapdss_dpi_display_disable);
 void omapdss_dpi_set_timings(struct omap_dss_device *dssdev,
                struct omap_video_timings *timings)
 {
-       int r;
-
        DSSDBG("dpi_set_timings\n");
 
        mutex_lock(&dpi.lock);
 
        dpi.timings = *timings;
 
-       if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) {
-               r = dispc_runtime_get();
-               if (r)
-                       return;
-
-               dpi_set_mode(dssdev);
-
-               dispc_runtime_put();
-       } else {
-               dss_mgr_set_timings(dssdev->manager, timings);
-       }
-
        mutex_unlock(&dpi.lock);
 }
 EXPORT_SYMBOL(omapdss_dpi_set_timings);
index ccfc677c910ab42bfc23f8211a811f7ccb6eaeb3..83f18458a406658385ff32b9c453da5b4abda11c 100644 (file)
@@ -632,18 +632,6 @@ void omapdss_hdmi_display_set_timing(struct omap_dss_device *dssdev,
        if (t != NULL)
                hdmi.ip_data.cfg = *t;
 
-       if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) {
-               int r;
-
-               hdmi_power_off(dssdev);
-
-               r = hdmi_power_on(dssdev);
-               if (r)
-                       DSSERR("failed to power on device\n");
-       } else {
-               dss_mgr_set_timings(dssdev->manager, &t->timings);
-       }
-
        mutex_unlock(&hdmi.lock);
 }
 
index 3bf1bfe2958536e2072c9a86ec8242a3ff0c56fe..c87e07ebb16da2f8da845a8bf8f2764862fa6bbb 100644 (file)
@@ -152,17 +152,7 @@ EXPORT_SYMBOL(omapdss_sdi_display_disable);
 void omapdss_sdi_set_timings(struct omap_dss_device *dssdev,
                struct omap_video_timings *timings)
 {
-       int r;
-
        sdi.timings = *timings;
-
-       if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) {
-               omapdss_sdi_display_disable(dssdev);
-
-               r = omapdss_sdi_display_enable(dssdev);
-               if (r)
-                       DSSERR("failed to set new timings\n");
-       }
 }
 EXPORT_SYMBOL(omapdss_sdi_set_timings);
 
index 45252cf034b36191cb3f41b3274bb29e0bad33b4..17b31029a7934adbabb473a578078a0d80cee797 100644 (file)
@@ -564,19 +564,6 @@ void omapdss_venc_set_timings(struct omap_dss_device *dssdev,
 
        venc.timings = *timings;
 
-       if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) {
-               int r;
-
-               /* turn the venc off and on to get new timings to use */
-               venc_power_off(dssdev);
-
-               r = venc_power_on(dssdev);
-               if (r)
-                       DSSERR("failed to power on VENC\n");
-       } else {
-               dss_mgr_set_timings(dssdev->manager, timings);
-       }
-
        mutex_unlock(&venc.venc_lock);
 }