Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 344696
b: refs/heads/master
c: 5aaee69
h: refs/heads/master
v: v3
  • Loading branch information
Tomi Valkeinen committed Dec 12, 2012
1 parent da95672 commit d31ea01
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 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: d10ecc5887a5671f2c71752b1624549a4a48b1fe
refs/heads/master: 5aaee69d7fe02d1ffb76b6a31a588efa5f2742e3
4 changes: 2 additions & 2 deletions trunk/drivers/video/omap2/dss/dispc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2970,7 +2970,7 @@ unsigned long dispc_fclk_rate(void)

switch (dss_get_dispc_clk_source()) {
case OMAP_DSS_CLK_SRC_FCK:
r = clk_get_rate(dispc.dss_clk);
r = dss_get_dispc_clk_rate();
break;
case OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC:
dsidev = dsi_get_dsidev_from_id(0);
Expand Down Expand Up @@ -3002,7 +3002,7 @@ unsigned long dispc_mgr_lclk_rate(enum omap_channel channel)

switch (dss_get_lcd_clk_source(channel)) {
case OMAP_DSS_CLK_SRC_FCK:
r = clk_get_rate(dispc.dss_clk);
r = dss_get_dispc_clk_rate();
break;
case OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC:
dsidev = dsi_get_dsidev_from_id(0);
Expand Down
12 changes: 12 additions & 0 deletions trunk/drivers/video/omap2/dss/dss.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ static struct {

struct clk *dpll4_m4_ck;
struct clk *dss_clk;
unsigned long dss_clk_rate;

unsigned long cache_req_pck;
unsigned long cache_prate;
Expand Down Expand Up @@ -489,6 +490,10 @@ int dss_set_clock_div(struct dss_clock_info *cinfo)
return -EINVAL;
}

dss.dss_clk_rate = clk_get_rate(dss.dss_clk);

WARN_ONCE(dss.dss_clk_rate != cinfo->fck, "clk rate mismatch");

DSSDBG("fck = %ld (%d)\n", cinfo->fck, cinfo->fck_div);

return 0;
Expand All @@ -502,6 +507,11 @@ unsigned long dss_get_dpll4_rate(void)
return 0;
}

unsigned long dss_get_dispc_clk_rate(void)
{
return dss.dss_clk_rate;
}

static int dss_setup_default_clock(void)
{
unsigned long max_dss_fck, prate;
Expand Down Expand Up @@ -953,6 +963,8 @@ static int __init omap_dsshw_probe(struct platform_device *pdev)
if (r)
goto err_runtime_get;

dss.dss_clk_rate = clk_get_rate(dss.dss_clk);

/* Select DPLL */
REG_FLD_MOD(DSS_CONTROL, 0, 0, 0);

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/video/omap2/dss/dss.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ void dss_overlay_kobj_uninit(struct omap_overlay *ovl);
int dss_init_platform_driver(void) __init;
void dss_uninit_platform_driver(void);

unsigned long dss_get_dispc_clk_rate(void);
int dss_dpi_select_source(enum omap_channel channel);
void dss_select_hdmi_venc_clk_source(enum dss_hdmi_venc_clk_source_select);
enum dss_hdmi_venc_clk_source_select dss_get_hdmi_venc_clk_source(void);
Expand Down

0 comments on commit d31ea01

Please sign in to comment.