]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/exynos: dsi: Add support for panel prepare and unprepare routines
authorAjay Kumar <ajaykumar.rs@samsung.com>
Thu, 31 Jul 2014 17:42:06 +0000 (23:12 +0530)
committerThierry Reding <treding@nvidia.com>
Wed, 6 Aug 2014 14:44:11 +0000 (16:44 +0200)
Modify exynos_dsi driver to support the new panel calls:
prepare and unprepare.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/exynos/exynos_drm_dsi.c

index 6302aa64f6c1e328bb315a8ccd70e07e3489d17a..abb5f61992008245c0e6348aeb90c5e3337ac8a8 100644 (file)
@@ -1115,7 +1115,7 @@ static int exynos_dsi_enable(struct exynos_dsi *dsi)
        if (ret < 0)
                return ret;
 
-       ret = drm_panel_enable(dsi->panel);
+       ret = drm_panel_prepare(dsi->panel);
        if (ret < 0) {
                exynos_dsi_poweroff(dsi);
                return ret;
@@ -1124,6 +1124,14 @@ static int exynos_dsi_enable(struct exynos_dsi *dsi)
        exynos_dsi_set_display_mode(dsi);
        exynos_dsi_set_display_enable(dsi, true);
 
+       ret = drm_panel_enable(dsi->panel);
+       if (ret < 0) {
+               exynos_dsi_set_display_enable(dsi, false);
+               drm_panel_unprepare(dsi->panel);
+               exynos_dsi_poweroff(dsi);
+               return ret;
+       }
+
        dsi->state |= DSIM_STATE_ENABLED;
 
        return 0;
@@ -1134,8 +1142,9 @@ static void exynos_dsi_disable(struct exynos_dsi *dsi)
        if (!(dsi->state & DSIM_STATE_ENABLED))
                return;
 
-       exynos_dsi_set_display_enable(dsi, false);
        drm_panel_disable(dsi->panel);
+       exynos_dsi_set_display_enable(dsi, false);
+       drm_panel_unprepare(dsi->panel);
        exynos_dsi_poweroff(dsi);
 
        dsi->state &= ~DSIM_STATE_ENABLED;