In order to allow bridge drivers to use DSI transfers in their pre_enable callbacks, pm_runtime_get_sync() should be performed before exynos_dsi_enable(). DSIM_STATE_ENABLED flag now should not guard from calling dsi_host_transfer() before enabling. Signed-off-by: Maciej Purski <m.purski@xxxxxxxxxxx> --- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index 9599e6b..94460b0 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -1312,6 +1312,7 @@ static int exynos_dsi_init(struct exynos_dsi *dsi) { const struct exynos_dsi_driver_data *driver_data = dsi->driver_data; + pm_runtime_get_sync(dsi->dev); exynos_dsi_reset(dsi); exynos_dsi_enable_irq(dsi); @@ -1388,7 +1389,6 @@ static void exynos_dsi_enable(struct drm_encoder *encoder) ret = drm_panel_prepare(dsi->panel); if (ret < 0) { dsi->state &= ~DSIM_STATE_ENABLED; - pm_runtime_put_sync(dsi->dev); return; } @@ -1400,7 +1400,6 @@ static void exynos_dsi_enable(struct drm_encoder *encoder) dsi->state &= ~DSIM_STATE_ENABLED; exynos_dsi_set_display_enable(dsi, false); drm_panel_unprepare(dsi->panel); - pm_runtime_put_sync(dsi->dev); return; } @@ -1566,9 +1565,6 @@ static ssize_t exynos_dsi_host_transfer(struct mipi_dsi_host *host, struct exynos_dsi_transfer xfer; int ret; - if (!(dsi->state & DSIM_STATE_ENABLED)) - return -EINVAL; - if (!(dsi->state & DSIM_STATE_INITIALIZED)) { ret = exynos_dsi_init(dsi); if (ret) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html