From: Rajendra Nayak <rnayak@codeaurora.org>
To: Rob Clark <robdclark@gmail.com>, linux-clk@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org,
Stephen Boyd <sboyd@codeaurora.org>,
Archit Taneja <architt@codeaurora.org>,
Mike Turquette <mturquette@baylibre.com>
Subject: Re: [RFC] clk: inherit display clocks enabled by bootloader
Date: Wed, 5 Jul 2017 08:57:35 +0530 [thread overview]
Message-ID: <fbc5b229-b48b-59bb-b217-590d9499b0ea@codeaurora.org> (raw)
In-Reply-To: <20170704175117.8636-1-robdclark@gmail.com>
On 07/04/2017 11:21 PM, Rob Clark wrote:
> The goal here is to support inheriting a display setup by bootloader,
> although there may also be some non-display related use-cases.
>
> Rough idea is to add a flag for clks and power domains that might
> already be enabled when kernel starts, and make corresponding fixups
> to clk enable/prepare_count and power-domain state so that these are
> not automatically disabled late in boot.
>
> If bootloader is enabling display, and kernel is using efifb before
> real display driver is loaded (potentially from kernel module after
> userspace starts, in a typical distro kernel), we don't want to kill
> the clocks and power domains that are used by the display before
> userspace starts.
>
> Second part will be (*waves hands*) for drm/msm to check if display
> related clocks are enabled when it is loaded, and if so use drm
> atomic framework's hooks to read back hw state to sync existing
> display state w/ software state, and skip the initial clk_enable.
> Therefore inheriting the enable done by bootloader.
>
> Obviously this should be split up into multiple patches and many
> TODOs addressed. But I guess this is enough for now to start
> discussing the approach, and in particular how drm and clock/pd
> drivers work together to handle handover from bootloader.
>
> The CLK_INHERIT_BOOTLOADER and related gsdc flag should only be set
> on leaf nodes.
> ---
> A bit hacky right now, but display survives clk_disable_unused()
> and genpd_power_off_unused(). It hangs just after that late in
> boot, which I'm still debugging (might be unrelated shenanigans).
> And haven't started on the drm/msm side of this. But I figured
> it was half baked enough to send out for comments/ideas, or to
> see if anyone had some different idea about how to solve this.
Another RFC proposed around to handle similar situations is
https://lkml.org/lkml/2017/6/28/188
That one though, I guess deals with only regulator supplies for now.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
next prev parent reply other threads:[~2017-07-05 3:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-04 17:51 [RFC] clk: inherit display clocks enabled by bootloader Rob Clark
2017-07-04 18:45 ` Geert Uytterhoeven
2017-07-04 19:02 ` Rob Clark
2017-07-05 3:27 ` Rajendra Nayak [this message]
2017-07-05 10:06 ` Rob Clark
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=fbc5b229-b48b-59bb-b217-590d9499b0ea@codeaurora.org \
--to=rnayak@codeaurora.org \
--cc=architt@codeaurora.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=robdclark@gmail.com \
--cc=sboyd@codeaurora.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