linux-omap 2.6.39: sync with meta-texasinstruments
[openembedded.git] / recipes / linux / linux-omap-2.6.39 / sakoman / 0003-OMAP2PLUS-DSS2-Fix-Return-correct-lcd-clock-source-f.patch
blob0bef2d2f6629cbecb68f263145821b15d026bf7c
1 From 29d6de29d3d0d2ac9fe0572cd4e0485757eca550 Mon Sep 17 00:00:00 2001
2 From: Archit Taneja <archit@ti.com>
3 Date: Thu, 31 Mar 2011 13:23:35 +0530
4 Subject: [PATCH 03/31] OMAP2PLUS: DSS2: Fix: Return correct lcd clock source for OMAP2/3
6 dss.lcd_clk_source is set to the default value DSS_CLK_SRC_FCK at dss_init.
7 For OMAP2 and OMAP3, the dss.lcd_clk_source should always be the same as
8 dss.dispc_clk_source. The function dss_get_lcd_clk_source() always returns the
9 default value DSS_CLK_SRC_FCK for OMAP2/3. This leads to wrong clock dumps when
10 dispc_clk_source is not DSS_CLK_SRC_FCK.
12 Correct this function to always return dss.dispc_clk_source for OMAP2/3.
14 Signed-off-by: Archit Taneja <archit@ti.com>
15 Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
16 ---
17 drivers/video/omap2/dss/dss.c | 10 ++++++++--
18 1 files changed, 8 insertions(+), 2 deletions(-)
20 diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c
21 index 3f1fee6..c3b48a0 100644
22 --- a/drivers/video/omap2/dss/dss.c
23 +++ b/drivers/video/omap2/dss/dss.c
24 @@ -385,8 +385,14 @@ enum dss_clk_source dss_get_dsi_clk_source(void)
26 enum dss_clk_source dss_get_lcd_clk_source(enum omap_channel channel)
28 - int ix = channel == OMAP_DSS_CHANNEL_LCD ? 0 : 1;
29 - return dss.lcd_clk_source[ix];
30 + if (dss_has_feature(FEAT_LCD_CLK_SRC)) {
31 + int ix = channel == OMAP_DSS_CHANNEL_LCD ? 0 : 1;
32 + return dss.lcd_clk_source[ix];
33 + } else {
34 + /* LCD_CLK source is the same as DISPC_FCLK source for
35 + * OMAP2 and OMAP3 */
36 + return dss.dispc_clk_source;
37 + }
40 /* calculate clock rates using dividers in cinfo */
41 --
42 1.6.6.1