diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-05-16 11:44:13 +0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-06-17 15:00:55 +0400 |
commit | 5391e87d1259e45fbb153aad97fe21a41403b534 (patch) | |
tree | 0b0a144fade93e13d90bda00964b44dce48fc20f /drivers/video/omap2/dss/dispc.c | |
parent | 94954fcb8030cd5545dcfc5b8c94fa224e20985d (diff) | |
download | linux-5391e87d1259e45fbb153aad97fe21a41403b534.tar.xz |
OMAPDSS: remove dispc's dependency to VENC/HDMI
DISPC needs to know the clock rate for DIGIT (i.e. TV) channel, and this
clock is provided by either VENC or HDMI modules. Currently DISPC will
call a function in VENC/HDMI, asking what the clock rate is. This means
we have a fixed dependency from DISPC to both VENC and HDMI.
To have a more generic approach, and in particular to allow adding OMAP5
HDMI driver, we need to remove this dependency. This patch makes
VENC/HDMI inform DISPC when the their clock changes, thus reversing the
dependency and removing the issue.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/dispc.c')
-rw-r--r-- | drivers/video/omap2/dss/dispc.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index 83d7bb9da609..02a7340111df 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c @@ -103,6 +103,7 @@ static struct { int irq; unsigned long core_clk_rate; + unsigned long tv_pclk_rate; u32 fifo_size[DISPC_MAX_NR_FIFOS]; /* maps which plane is using a fifo. fifo-id -> plane-id */ @@ -3071,22 +3072,15 @@ unsigned long dispc_mgr_pclk_rate(enum omap_channel channel) return r / pcd; } else { - enum dss_hdmi_venc_clk_source_select source; - - source = dss_get_hdmi_venc_clk_source(); - - switch (source) { - case DSS_VENC_TV_CLK: - return venc_get_pixel_clock(); - case DSS_HDMI_M_PCLK: - return hdmi_get_pixel_clock(); - default: - BUG(); - return 0; - } + return dispc.tv_pclk_rate; } } +void dispc_set_tv_pclk(unsigned long pclk) +{ + dispc.tv_pclk_rate = pclk; +} + unsigned long dispc_core_clk_rate(void) { return dispc.core_clk_rate; |