public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: mythripk@ti.com
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH v2 5/5] OMAPDSS: HDMI: Add support to dump clocks through
Date: Thu, 22 Sep 2011 15:01:10 +0300	[thread overview]
Message-ID: <1316692870.2442.24.camel@deskari> (raw)
In-Reply-To: <1316678866-17749-6-git-send-email-mythripk@ti.com>

On Thu, 2011-09-22 at 13:37 +0530, mythripk@ti.com wrote:
> From: Mythri P K <mythripk@ti.com>
> 
> Add support to dump the HDMI regm, regn, and other clock parameters.

The subjects of this and previous patch seem to be still broken. And
while at it, you could fix missing periods and misplaced spaces (like
"foo ,bar") in the descriptions of this patch series.

> +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, "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, "dcofreq\t%u\n", hdmi.ip_data.pll_data.dcofreq);
> +
> +	seq_printf(s, "regsd\t%u\n", hdmi.ip_data.pll_data.regsd);

Printing the dividers is fine, but I think we're usually more interested
in the resulting clocks. So you should print also the clocks. Possibly
internal clocks (like Fint for DSI) also, but at least the output
clocks. I believe for HDMI PLL they are CLKOUTLDO and CLKDCOLDO.

Looking at the dividers also brings up two things not directly related
to this patch:

- What is dcofreq? Looking at the code, it tells if the pixel clock is >
1000MHz. Why is such a field needed, can't the HDMI driver manage that
itself? And if it's needed, why is it called dcofreq, the name doesn't
make much sense to me.

- We are doing HDMI PLL calculations in the omapdss drivers hdmi.c file.
The PLL calculations are PLL specific, and thus should be in the
specific HDMI implementation file, right?

> +	seq_printf(s, "DISPC clock source %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");

Why do you print DISPC clock source? How is that part of HDMI clock
configuration?

> +
> +	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));

Here I think it would be better to use the same format as the already
existing outputs (DSI). And as the PLL source is base clock, it's more
logical to print it first, like DSI does.

 Tomi



  reply	other threads:[~2011-09-22 12:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-22  8:07 [PATCH 0/5] OMAPDSS: HDMI: Debug support and Register cleanup mythripk
2011-09-22  8:07 ` [PATCH v2 1/5] OMAPDSS: HDMI: Move the comments in avi infoframe mythripk
2011-09-22  8:07   ` [PATCH v2 2/5] OMAPDSS: HDMI: Replace hdmi_reg struct with u16 mythripk
2011-09-22  8:07     ` [PATCH v2 3/5] OMAPDSS: HDMI: Add missing register definitions mythripk
2011-09-22  8:07       ` [PATCH v2 4/5] OMAPDSS: HDMI: Add support to dump registers through mythripk
2011-09-22  8:07         ` [PATCH v2 5/5] OMAPDSS: HDMI: Add support to dump clocks through mythripk
2011-09-22 12:01           ` Tomi Valkeinen [this message]
2011-09-23  5:52             ` K, Mythri P
2011-09-23  6:01               ` Tomi Valkeinen
2011-09-23  6:40                 ` K, Mythri P
2011-09-23  7:03                   ` Tomi Valkeinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1316692870.2442.24.camel@deskari \
    --to=tomi.valkeinen@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=mythripk@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox