Skip to contentSkip to conversation

OMAPDSS: HDMI: Add support to dump clocks through

PATCH In review [email protected] 2 participants 3 messages Sep 23, 2011 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH v3 5/5 OMAPDSS: HDMI: Add support to dump clocks through

From: Mythri P K <[email protected]>

Add support to dump the HDMI PLL dividers such as regm, regn etc and other clock dumps such as pixel clock rate, TMDS clock rate.

changes since V2:
Add pixel clock and TMDS clock dump and remove dcofreq and DISPC clock source print.

---
 drivers/video/omap2/dss/dss.c  |    3 +++
 drivers/video/omap2/dss/dss.h  |    1 +
 drivers/video/omap2/dss/hdmi.c |   33 +++++++++++++++++++++++++++++++++
 3 files changed, 37 insertions(+), 0 deletions(-)
drivers/video/omap2/dss/dss.c +3 -0
index 3e09726..76e2bcd 100644
@@ -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_OMAP4_DSS_HDMI
+	hdmi_dump_clocks(s);
+#endif
 }
 #endif
 
drivers/video/omap2/dss/dss.h +1 -0
index 8652007..ef8770a 100644
@@ -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)
 {
drivers/video/omap2/dss/hdmi.c +33 -0
index 3262f0f..0510655 100644
@@ -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,37 @@ 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 PLL -\n");
+
+	seq_printf(s, "hdmi %s source rate = %lu\n",
+			hdmi.ip_data.pll_data.refsel == HDMI_REFSEL_SYSCLK ?
+			"sysclk" : "pclk/ref1/ref2",
+			clk_get_rate(hdmi.sys_clk));
+
+	seq_printf(s, "Pixel clock frequency = %u\n",
+			hdmi.ip_data.cfg.timings.timings.pixel_clock);
+
+	seq_printf(s, "TMDS clock frequency = %u\n",
+			10 * hdmi.ip_data.cfg.timings.timings.pixel_clock);
+
+	seq_printf(s, "regm\t%u\n", hdmi.ip_data.pll_data.regm);
+
+	seq_printf(s, "regmf\t%u\n", hdmi.ip_data.pll_data.regmf);
+
+	seq_printf(s, "regsd\t%u\n", hdmi.ip_data.pll_data.regsd);
+
+	hdmi_runtime_put();
+}
+
 int omapdss_hdmi_read_edid(u8 *buf, int len)
 {
 	int r;
Signature · 1 line
1.7.5.4
#1 lore raw
Quoted 8 lines · On Fri, 2011-09-23 at 15:02 +0530, [email protected] wrote:

From: Mythri P K <[email protected]>

Add support to dump the HDMI PLL dividers such as regm, regn etc and other clock dumps such as pixel clock rate, TMDS clock rate.

changes since V2:
Add pixel clock and TMDS clock dump and remove dcofreq and DISPC clock source print.

Let's drop this fifth patch for now, I think the hdmi pll code needs a bit cleaning up before we can have a good dump clocks support.

I'll take the patches 1-4 and apply to dss2 master.

Btw, this patch, and the 4th patch, still have broken subject. I guess this is fourth time I mention it. I'll fix it myself in the patches I apply.

Tomi

#2 lore raw

Hi,

Quoted 10 lines · Tomi Valkeinen
Quoted 8 lines · On Fri, 2011-09-23 at 15:02 +0530, [email protected] wrote:

From: Mythri P K <[email protected]>

Add support to dump the HDMI PLL dividers such as regm, regn etc and other clock dumps such as pixel clock rate, TMDS clock rate.

changes since V2:
Add pixel clock and TMDS clock dump and remove dcofreq and DISPC clock source print.

Quoted 9 lines

Let's drop this fifth patch for now, I think the hdmi pll code needs a bit cleaning up before we can have a good dump clocks support.

I'll take the patches 1-4 and apply to dss2 master.

Btw, this patch, and the 4th patch, still have broken subject. I guess this is fourth time I mention it. I'll fix it myself in the patches I apply.

I shall mail the fourth patch , As only change suggested was subject change, I wanted to send it if this patch was ok.
Anyways mailing it to you.

Thanks and regards,
Mythri.
after

Quoted 4 lines

 Tomi

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html