From: Mythri P K <mythr...@ti.com> Add support to dump the HDMI regm, regn, and other clock parameters.
Signed-off-by: Mythri P K <mythr...@ti.com> --- drivers/video/omap2/dss/dss.c | 3 +++ drivers/video/omap2/dss/dss.h | 1 + drivers/video/omap2/dss/hdmi.c | 31 +++++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 0 deletions(-) diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c index 3e09726..816daef 100644 --- a/drivers/video/omap2/dss/dss.c +++ b/drivers/video/omap2/dss/dss.c @@ -732,6 +732,9 @@ void dss_debug_dump_clocks(struct seq_file *s) #ifdef CONFIG_OMAP2_DSS_DSI dsi_dump_clocks(s); #endif +#ifdef CONFIG_OMAP2_DSS_HDMI + hdmi_dump_clocks(s); +#endif } #endif diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h index 8652007..ef8770a 100644 --- a/drivers/video/omap2/dss/dss.h +++ b/drivers/video/omap2/dss/dss.h @@ -473,6 +473,7 @@ void hdmi_uninit_platform_driver(void); int hdmi_init_display(struct omap_dss_device *dssdev); unsigned long hdmi_get_pixel_clock(void); void hdmi_dump_regs(struct seq_file *s); +void hdmi_dump_clocks(struct seq_file *s); #else static inline int hdmi_init_display(struct omap_dss_device *dssdev) { diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index 3262f0f..6751b1a 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c @@ -33,6 +33,8 @@ #include <linux/pm_runtime.h> #include <linux/clk.h> #include <video/omapdss.h> +#include <linux/seq_file.h> + #if defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI) || \ defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI_MODULE) #include <sound/soc.h> @@ -454,6 +456,35 @@ void hdmi_dump_regs(struct seq_file *s) mutex_unlock(&hdmi.lock); } +void hdmi_dump_clocks(struct seq_file *s) +{ + enum omap_dss_clk_source dispc_clk_src; + + dispc_clk_src = dss_get_dispc_clk_source(); + + if (hdmi_runtime_get()) + return; + + seq_printf(s, "HDMI Clock Info\n"); + + seq_printf(s, "regm\t\t%dregmf %u\n", + hdmi.ip_data.pll_data.regm, hdmi.ip_data.pll_data.regm); + + seq_printf(s, "dcofreq\t%dregsd %u\n", + hdmi.ip_data.pll_data.dcofreq, + hdmi.ip_data.pll_data.regsd); + + seq_printf(s, "%s (%s)\t(%s)\n", + dss_get_generic_clk_source_name(dispc_clk_src), + dss_feat_get_clk_source_name(dispc_clk_src), + dispc_clk_src == OMAP_DSS_CLK_SRC_FCK ? + "off" : "on"); + + seq_printf(s, "hdmi fclk source = %d\n", hdmi.ip_data.pll_data.refsel); + + hdmi_runtime_put(); +} + int omapdss_hdmi_read_edid(u8 *buf, int len) { int r; -- 1.7.5.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html