Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 344591
b: refs/heads/master
c: c31cba8
h: refs/heads/master
i:
  344589: afc7f4c
  344587: 6d461eb
  344583: 1b422c5
  344575: 578532e
v: v3
  • Loading branch information
Tomi Valkeinen committed Oct 24, 2012
1 parent aafd60c commit 4b88823
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 25 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dba01625a3c94e58b98f3f2d7058237a5ea02fa2
refs/heads/master: c31cba8af8c2fde418c146e3ead341d5053f3225
49 changes: 25 additions & 24 deletions trunk/drivers/video/omap2/dss/dispc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3167,28 +3167,32 @@ unsigned long dispc_mgr_lclk_rate(enum omap_channel channel)
unsigned long r;
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)) {
case OMAP_DSS_CLK_SRC_FCK:
r = clk_get_rate(dispc.dss_clk);
break;
case OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC:
dsidev = dsi_get_dsidev_from_id(0);
r = dsi_get_pll_hsdiv_dispc_rate(dsidev);
break;
case OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DISPC:
dsidev = dsi_get_dsidev_from_id(1);
r = dsi_get_pll_hsdiv_dispc_rate(dsidev);
break;
default:
BUG();
return 0;
}
switch (dss_get_lcd_clk_source(channel)) {
case OMAP_DSS_CLK_SRC_FCK:
r = clk_get_rate(dispc.dss_clk);
break;
case OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC:
dsidev = dsi_get_dsidev_from_id(0);
r = dsi_get_pll_hsdiv_dispc_rate(dsidev);
break;
case OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DISPC:
dsidev = dsi_get_dsidev_from_id(1);
r = dsi_get_pll_hsdiv_dispc_rate(dsidev);
break;
default:
BUG();
return 0;
}

return r / lcd;
return r / lcd;
} else {
return dispc_fclk_rate();
}
}

unsigned long dispc_mgr_pclk_rate(enum omap_channel channel)
Expand Down Expand Up @@ -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);

if (dss_mgr_is_lcd(channel))
return dispc_mgr_lclk_rate(channel);
else
return dispc_fclk_rate();

return dispc_mgr_lclk_rate(channel);
}

static void dispc_dump_clocks_channel(struct seq_file *s, enum omap_channel channel)
{
int lcd, pcd;
Expand Down

0 comments on commit 4b88823

Please sign in to comment.