From patchwork Mon Aug 22 08:27:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 1084562 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7M8RlEI020525 for ; Mon, 22 Aug 2011 08:28:05 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756083Ab1HVI1e (ORCPT ); Mon, 22 Aug 2011 04:27:34 -0400 Received: from na3sys009aog113.obsmtp.com ([74.125.149.209]:59233 "EHLO na3sys009aog113.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755842Ab1HVI1d (ORCPT ); Mon, 22 Aug 2011 04:27:33 -0400 Received: from mail-bw0-f47.google.com ([209.85.214.47]) (using TLSv1) by na3sys009aob113.postini.com ([74.125.148.12]) with SMTP ID DSNKTlIS8/extwSsQFDIDjmyJSa96GNEiHNq@postini.com; Mon, 22 Aug 2011 01:27:33 PDT Received: by mail-bw0-f47.google.com with SMTP id zu17so5355811bkb.34 for ; Mon, 22 Aug 2011 01:27:31 -0700 (PDT) Received: by 10.204.5.137 with SMTP id 9mr36736bkv.55.1314001650980; Mon, 22 Aug 2011 01:27:30 -0700 (PDT) Received: from localhost.localdomain (a62-248-128-208.elisa-laajakaista.fi [62.248.128.208]) by mx.google.com with ESMTPS id n24sm1839229bkd.8.2011.08.22.01.27.28 (version=SSLv3 cipher=OTHER); Mon, 22 Aug 2011 01:27:29 -0700 (PDT) From: Tomi Valkeinen To: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org Cc: archit@ti.com, Tomi Valkeinen Subject: [PATCH 2/4] OMAP: DSS2: fix clock sources on error and uninit Date: Mon, 22 Aug 2011 11:27:14 +0300 Message-Id: <1314001636-18036-3-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1314001636-18036-1-git-send-email-tomi.valkeinen@ti.com> References: <1314001636-18036-1-git-send-email-tomi.valkeinen@ti.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 22 Aug 2011 08:28:05 +0000 (UTC) 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 deletions(-) diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c index 046ce08..dc698bd 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 ae6bf1d..c951a75 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); }