Commit c31cba8a authored by Tomi Valkeinen's avatar Tomi Valkeinen

OMAPDSS: DISPC: fix dispc_mgr_lclk_rate for DIGIT output

dispc_mgr_lclk_rate() cannot currently be called with DIGIT channel
parameter, even if dispc_ovl_lclk_rate() can. Fix this by making
dispc_mgr_lclk_rate() handle DIGIT channel also.
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent dba01625
...@@ -3167,28 +3167,32 @@ unsigned long dispc_mgr_lclk_rate(enum omap_channel channel) ...@@ -3167,28 +3167,32 @@ unsigned long dispc_mgr_lclk_rate(enum omap_channel channel)
unsigned long r; unsigned long r;
u32 l; u32 l;
l = dispc_read_reg(DISPC_DIVISORo(channel)); if (dss_mgr_is_lcd(channel)) {
l = dispc_read_reg(DISPC_DIVISORo(channel));
lcd = FLD_GET(l, 23, 16); lcd = FLD_GET(l, 23, 16);
switch (dss_get_lcd_clk_source(channel)) { switch (dss_get_lcd_clk_source(channel)) {
case OMAP_DSS_CLK_SRC_FCK: case OMAP_DSS_CLK_SRC_FCK:
r = clk_get_rate(dispc.dss_clk); r = clk_get_rate(dispc.dss_clk);
break; break;
case OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC: case OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC:
dsidev = dsi_get_dsidev_from_id(0); dsidev = dsi_get_dsidev_from_id(0);
r = dsi_get_pll_hsdiv_dispc_rate(dsidev); r = dsi_get_pll_hsdiv_dispc_rate(dsidev);
break; break;
case OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DISPC: case OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DISPC:
dsidev = dsi_get_dsidev_from_id(1); dsidev = dsi_get_dsidev_from_id(1);
r = dsi_get_pll_hsdiv_dispc_rate(dsidev); r = dsi_get_pll_hsdiv_dispc_rate(dsidev);
break; break;
default: default:
BUG(); BUG();
return 0; return 0;
} }
return r / lcd; return r / lcd;
} else {
return dispc_fclk_rate();
}
} }
unsigned long dispc_mgr_pclk_rate(enum omap_channel channel) unsigned long dispc_mgr_pclk_rate(enum omap_channel channel)
...@@ -3247,12 +3251,9 @@ static unsigned long dispc_plane_lclk_rate(enum omap_plane plane) ...@@ -3247,12 +3251,9 @@ static unsigned long dispc_plane_lclk_rate(enum omap_plane plane)
{ {
enum omap_channel channel = dispc_ovl_get_channel_out(plane); enum omap_channel channel = dispc_ovl_get_channel_out(plane);
if (dss_mgr_is_lcd(channel)) return dispc_mgr_lclk_rate(channel);
return dispc_mgr_lclk_rate(channel);
else
return dispc_fclk_rate();
} }
static void dispc_dump_clocks_channel(struct seq_file *s, enum omap_channel channel) static void dispc_dump_clocks_channel(struct seq_file *s, enum omap_channel channel)
{ {
int lcd, pcd; int lcd, pcd;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment