dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: devel@driverdev.osuosl.org, Sascha Hauer <kernel@pengutronix.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	DRI mailing list <dri-devel@lists.freedesktop.org>,
	Shawn Guo <shawn.guo@freescale.com>
Subject: Re: [PATCH] imx-drm: imx-hdmi: fix hdmi hotplug detection initial state
Date: Wed, 11 Jun 2014 17:34:47 +0200	[thread overview]
Message-ID: <1402500887.4107.229.camel@paszta.hi.pengutronix.de> (raw)
In-Reply-To: <20140611081744.GB23430@n2100.arm.linux.org.uk>

Hi Russell,

Am Mittwoch, den 11.06.2014, 09:17 +0100 schrieb Russell King - ARM
Linux:
> On Tue, Jun 10, 2014 at 10:32:25AM -0300, Fabio Estevam wrote:
> > On Tue, Jun 10, 2014 at 9:58 AM, Fabio Estevam <festevam@gmail.com> wrote:
> > > On Mon, Jun 9, 2014 at 5:09 PM, Russell King - ARM Linux
> > > <linux@arm.linux.org.uk> wrote:
> > >
> > >> Right, so the problem isn't at the HDMI level, but at the DI level... so
> > >> that's where we need to debug what's being setup.  I left some debugging
> > >> in ipu-di.c - could you try enabling that please?
> > >
> > > Booting the kernel with the HDMI cable connected (no image is seen on
> > > HDMI, only on LVDS):
> > 
> > In case it helps, I am also able to reproduce the problem on a
> > imx6dl-hummingboard using the attached debug patch.
> 
> Thanks, that's most useful for my testing.  I have a version of the HB
> here which has an LVDS connector on... but I have no LVDS panel to
> connect to it.
> 
> Anyway, this is the pertinent information which confirms what's going
> on... from /sys/kernel/debug/clk/clk_summary - reformatting a little:
> 
[...]
>
> Now, can we satisfy the combination of required clocks...
> 
> 	LDB - 65MHz pixel clock,
> 		* 7 => 455MHz shift clock
> 				(note that had PLL3 PFD3 been routed to
> 				 the LDB clocks, then we'd almost have
> 				 this - 454.7MHz.)
> 
> 	HDMI - 148.5MHz pixel clock
> 		* 2 => 297MHz
> 		* 3 => 445.5MHz
> 		* 4 => 594MHz (note that had PLL2 PFD1 been routed to
> 				the IPU DI clocks, this would get
> 				1080, 720, 576 and 480 p/i modes.)

That would have been nice. Also there's the Audio PLL which is similar
to the Video PLL, only with a different post divider.

> Well, that question becomes whether 446MHz (3sf) and 455MHz are close
> enough.  Given that the HDMI clock is related to the audio clock, we
> should try to maintain its accuracy.  So, subsituting 446MHz as the
> LDB shift clock would give us a clock of 63.6MHz, which is a little
> over a 2% error.
> 
> The problem here is that we need more inteligence from CCF in order to
> do that - we need it to be able to reprogram the dividers so that the
> IPU DI0 clock remains at 148.5MHz while increasing the output of
> pll5_video_div three-fold.

Part of this could be achieved if clock notifiers would have a way to
give feedback to the core code when they NAK a clock change.

[...]
> I've just been digging in a few LVDS panel data sheets, and it seems many
> have quite a tolerance on the clock.  A 640x480 panel (Optrex) says
> anything between 20 and 30MHz is acceptable.  An 800x600 Toshiba works
> out at anything between 29MHz and 40MHz.  AUO 1024x768 gives a range of
> 50 to 81MHz.  However, there are some other AUO panels which we have in
> drm_panel which specify an exact frequency.  We don't have the ability
> in drm_panel to specify a range of frequencies - it may be useful if
> we did, since we could use that to work out whether we can drive both
> simultaneously off one PLL or one of the fixed clocks.

For this reason struct display_timing includes minimum, maximum and
typical values for all timing parameters. This is also supported by
the display timing device tree bindings:
Documentation/devicetree/bindings/video/display-timing.txt
Unfortunately there is no code yet that can make use of this
information.

regards
Philipp

  reply	other threads:[~2014-06-11 15:35 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-06 13:56 [PATCH] imx-drm: imx-hdmi: fix hdmi hotplug detection initial state Russell King
2014-06-06 14:06 ` Greg Kroah-Hartman
2014-06-09 13:44 ` Fabio Estevam
2014-06-09 14:06   ` Russell King - ARM Linux
2014-06-09 14:29     ` Fabio Estevam
2014-06-09 14:33       ` Shawn Guo
2014-06-09 15:19         ` Fabio Estevam
2014-06-09 17:49       ` Russell King - ARM Linux
2014-06-09 18:15         ` Fabio Estevam
2014-06-09 18:38           ` Fabio Estevam
2014-06-09 18:47             ` Fabio Estevam
2014-06-09 20:09               ` Russell King - ARM Linux
2014-06-09 21:03                 ` Fabio Estevam
2014-06-10 12:58                 ` Fabio Estevam
2014-06-10 13:32                   ` Fabio Estevam
2014-06-11  8:17                     ` Russell King - ARM Linux
2014-06-11 15:34                       ` Philipp Zabel [this message]
2014-06-16 14:13                       ` Fabio Estevam
2014-06-16 21:49                         ` Russell King - ARM Linux
2014-06-10 15:13                   ` Russell King - ARM Linux
2014-06-10 16:14                     ` Russell King - ARM Linux
2014-06-10 17:04                       ` Russell King - ARM Linux
2014-06-10 17:36                         ` Fabio Estevam
2014-06-09 19:29             ` Russell King - ARM Linux
2014-06-09 19:29           ` Russell King - ARM Linux
2014-06-10 18:54       ` Tim Harvey
2014-06-10 19:03         ` Fabio Estevam

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=1402500887.4107.229.camel@paszta.hi.pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=devel@driverdev.osuosl.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel@pengutronix.de \
    --cc=linux@arm.linux.org.uk \
    --cc=shawn.guo@freescale.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;
as well as URLs for NNTP newsgroup(s).