From 5e7850917fc213882d4e409634c526a8ff310e1e Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 10 Aug 2011 11:25:36 +0300 Subject: [PATCH] OMAP: DSS2: fix clock sources on error and uninit DPI and DSI were not cleaning up the clock source in error or uninit cases. Set the clock source back to PRCM. Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/dss/dpi.c | 4 +++- drivers/video/omap2/dss/dsi.c | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c index 046ce0806e14..dc698bd7e92f 100644 --- a/drivers/video/omap2/dss/dpi.c +++ b/drivers/video/omap2/dss/dpi.c @@ -83,8 +83,10 @@ static int dpi_set_dsi_clk(struct omap_dss_device *dssdev, bool is_tft, dss_select_dispc_clk_source(dssdev->clocks.dispc.dispc_fclk_src); r = dispc_set_clock_div(dssdev->manager->id, &dispc_cinfo); - if (r) + if (r) { + dss_select_dispc_clk_source(OMAP_DSS_CLK_SRC_FCK); return r; + } *fck = dsi_cinfo.dsi_pll_hsdiv_dispc_clk; *lck_div = dispc_cinfo.lck_div; diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index ae6bf1d46c97..c951a75e7021 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c @@ -4184,6 +4184,8 @@ err3: err2: dss_select_dispc_clk_source(OMAP_DSS_CLK_SRC_FCK); dss_select_dsi_clk_source(dsi_module, OMAP_DSS_CLK_SRC_FCK); + dss_select_lcd_clk_source(dssdev->manager->id, OMAP_DSS_CLK_SRC_FCK); + err1: dsi_pll_uninit(dsidev, true); err0: @@ -4209,6 +4211,7 @@ static void dsi_display_uninit_dsi(struct omap_dss_device *dssdev, dss_select_dispc_clk_source(OMAP_DSS_CLK_SRC_FCK); dss_select_dsi_clk_source(dsi_module, OMAP_DSS_CLK_SRC_FCK); + dss_select_lcd_clk_source(dssdev->manager->id, OMAP_DSS_CLK_SRC_FCK); dsi_cio_uninit(dssdev); dsi_pll_uninit(dsidev, disconnect_lanes); } -- 2.20.1