From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: linux-fbdev@vger.kernel.org
Subject: Re: [PATCH 6/6] ARM: mach-shmobile: add HDMI support to the ap4evb
Date: Mon, 05 Jul 2010 15:38:44 +0000 [thread overview]
Message-ID: <Pine.LNX.4.64.1007051714290.2152@axis700.grange> (raw)
In-Reply-To: <Pine.LNX.4.64.1006301152570.17489@axis700.grange>
On Mon, 5 Jul 2010, Magnus Damm wrote:
> On Wed, Jun 30, 2010 at 6:55 PM, Guennadi Liakhovetski
> <g.liakhovetski@gmx.de> wrote:
> > Support HDMI in 720p mode.
> >
> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > ---
> > arch/arm/mach-shmobile/board-ap4evb.c | 128 ++++++++++++++++++++++++++++++++-
> > 1 files changed, 127 insertions(+), 1 deletions(-)
>
> Hi Guennadi,
>
> Thanks for your work on this!
>
> > --- a/arch/arm/mach-shmobile/board-ap4evb.c
> > +++ b/arch/arm/mach-shmobile/board-ap4evb.c
> > @@ -645,8 +732,36 @@ static void __init gpio_no_direction(u32 addr)
> > #define GPIO_PORT9CR 0xE6051009
> > #define GPIO_PORT10CR 0xE605100A
> >
> > +static int __init hdmi_init_pm_clock(void)
> > +{
> > + struct clk *hdmi_pm = clk_get(NULL, "sh-hdmi.0"),
> > + *lcdc1_pm = clk_get(&lcdc1_device.dev, "sh_mobile_lcdc_fb.1");
> > + int ret;
> > +
> > + if (!IS_ERR(hdmi_pm)) {
> > + ret = clk_enable(hdmi_pm);
> > + if (ret < 0)
> > + pr_err("Cannot enable clock: %d\n", ret);
> > + } else {
> > + pr_err("Cannot get HDMI PM: %ld\n", PTR_ERR(hdmi_pm));
> > + }
> > +
> > + if (!IS_ERR(lcdc1_pm)) {
> > + ret = clk_enable(lcdc1_pm);
> > + if (ret < 0)
> > + pr_err("Cannot enable clock: %d\n", ret);
> > + } else {
> > + pr_err("Cannot get LCDC1 PM: %ld\n", PTR_ERR(lcdc1_pm));
> > + }
> > +
> > + return 0;
> > +}
>
> This part I'm not so happy with.
>
> Question 1:
>
> Why do you need to statically enable the LCDC clock here? I guess it
> works around the fact that Runtime PM is missing at this point? The
> LCDC driver should manage its own clocks. With this in place the
> clocks will never be disabled and your Runtime PM changes to the LCDC
> driver will never actually stop the clocks.
Not yet on ARM, no. The change to the lcdcfb runtime-pm, that actually
does anything at all with HDMI on ap4evb is the addition of ->display_on
and ->display_off calls.
> Question 2:
>
> And why do we need to enable the HDMI clock here? Same reason as
> above? I imagine that the HDMI driver already does Runtime PM?
Exactly, just like with MIPI (see ap4evb_init_display_clk()).
> Also, you should not need to pass any strings to clk_get(). clkdev
> should be able to figure out the binding from the device name.
Ok
Thanks
Guennadi
---
Guennadi Liakhovetski
prev parent reply other threads:[~2010-07-05 15:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-30 9:55 [PATCH 6/6] ARM: mach-shmobile: add HDMI support to the ap4evb board Guennadi Liakhovetski
2010-07-05 4:27 ` [PATCH 6/6] ARM: mach-shmobile: add HDMI support to the ap4evb Magnus Damm
2010-07-05 15:38 ` Guennadi Liakhovetski [this message]
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=Pine.LNX.4.64.1007051714290.2152@axis700.grange \
--to=g.liakhovetski@gmx.de \
--cc=linux-fbdev@vger.kernel.org \
/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