From: dsd@laptop.org (Daniel Drake)
To: linux-arm-kernel@lists.infradead.org
Subject: armada_drm clock selection
Date: Sat, 29 Jun 2013 14:15:58 -0600 [thread overview]
Message-ID: <CAMLZHHTFF2Ca7vr-gccLxPMW=vjAwApCLgtKJRQpz-bT5KVv=g@mail.gmail.com> (raw)
In-Reply-To: <20130629192616.GC3353@n2100.arm.linux.org.uk>
On Sat, Jun 29, 2013 at 1:26 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> So, I'd suggest that an initial approach would be something along the
> lines of:
> - if there is an external clock, can it generate the desired rate?
> if yes, use it.
> - otherwise, get the clock rate from the internal clocks and calculate
> the appropriate divider. Use which ever one gives you the best
> approximation that's better than (eg) 1%. If not, fail the mode set.
This sounds sane to me.
According to your earlier mail, armada 510 is the only current target
platform that has external clocks. For the fallback on internal
clocks, we would not try to change the rate of any of them, we would
just look at how close they can bring us to what is needed, as you
describe.
If any clocks are broken or useless on a specific platform, then they
can be excluded from the DT or platform data. So this is really not
far off from the ideas from Sebastian and me where we would simply
pass in the information about the "interesting" clocks and be done
with it.
I agree that we need the DT have a way of not only providing the
clock, but also indicating which clock in the SCLK register it refers
to, and I also think the way to do that is by having a fixed,
documented clock naming scheme. So that should not be a problem. I'll
avoid putting register values in the DT.
I think that resolves all the open questions that I had, so I will
work on this early next week.
> This now brings me on to another important subject with DT vs DRM.
> The way DRM is setup, it expects all resources for a particular
> implementation to be known at 'drm_device' creation time. You can't
> "hot-plug" additional parts of the "drm system" together. What this
> means is that at driver load time (to use DRM terms) all parts must
> be known.
Its unfortunate that we can't hotplug the DRM bits, but at least that
is no longer an open question.
The super-device approach sounds sane and would seem to reflect on
other parts of the DT that I have worked with. It seems reasonable to
take the viewpoint that the LCD is a child connected to the display
controller parent, which is what the DT layout suggests.
I wonder what other DRM drivers do DT-wise? Maybe I will look into
that after we've progressed with the clocks.
Daniel
prev parent reply other threads:[~2013-06-29 20:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-28 20:11 armada_drm clock selection Daniel Drake
2013-06-28 21:18 ` Russell King - ARM Linux
2013-06-28 21:51 ` Russell King - ARM Linux
2013-06-29 15:06 ` Daniel Drake
2013-06-29 15:58 ` Sebastian Hesselbarth
2013-06-29 18:45 ` Russell King - ARM Linux
2013-06-29 18:55 ` Sebastian Hesselbarth
2013-06-29 19:26 ` Russell King - ARM Linux
2013-06-29 20:15 ` Daniel Drake [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='CAMLZHHTFF2Ca7vr-gccLxPMW=vjAwApCLgtKJRQpz-bT5KVv=g@mail.gmail.com' \
--to=dsd@laptop.org \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).