public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCHv3 5/5] OMAPDSS: HDMI: Add support to dump clocks through
@ 2011-09-23  9:32 mythripk
  2011-09-23 10:45 ` Tomi Valkeinen
  0 siblings, 1 reply; 3+ messages in thread
From: mythripk @ 2011-09-23  9:32 UTC (permalink / raw)
  To: tomi.valkeinen, linux-omap; +Cc: Mythri P K

From: Mythri P K <mythripk@ti.com>

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.

Signed-off-by: Mythri P K <mythripk@ti.com>
---
 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(-)

diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c
index 3e09726..76e2bcd 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_OMAP4_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..0510655 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,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;
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCHv3 5/5] OMAPDSS: HDMI: Add support to dump clocks through
  2011-09-23  9:32 [PATCHv3 5/5] OMAPDSS: HDMI: Add support to dump clocks through mythripk
@ 2011-09-23 10:45 ` Tomi Valkeinen
  2011-09-23 11:20   ` K, Mythri P
  0 siblings, 1 reply; 3+ messages in thread
From: Tomi Valkeinen @ 2011-09-23 10:45 UTC (permalink / raw)
  To: mythripk; +Cc: linux-omap

On Fri, 2011-09-23 at 15:02 +0530, mythripk@ti.com wrote:
> From: Mythri P K <mythripk@ti.com>
> 
> 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



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCHv3 5/5] OMAPDSS: HDMI: Add support to dump clocks through
  2011-09-23 10:45 ` Tomi Valkeinen
@ 2011-09-23 11:20   ` K, Mythri P
  0 siblings, 0 replies; 3+ messages in thread
From: K, Mythri P @ 2011-09-23 11:20 UTC (permalink / raw)
  To: Tomi Valkeinen; +Cc: linux-omap

Hi,

On Fri, Sep 23, 2011 at 4:15 PM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> On Fri, 2011-09-23 at 15:02 +0530, mythripk@ti.com wrote:
>> From: Mythri P K <mythripk@ti.com>
>>
>> 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.
>
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
>  Tomi
>
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-09-23 11:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-23  9:32 [PATCHv3 5/5] OMAPDSS: HDMI: Add support to dump clocks through mythripk
2011-09-23 10:45 ` Tomi Valkeinen
2011-09-23 11:20   ` K, Mythri P

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox