linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@codeaurora.org>
To: Rob Clark <robdclark@gmail.com>
Cc: Russell King - ARM Linux <linux@armlinux.org.uk>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Rafael Wysocki <rjw@rjwysocki.net>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Rob Herring <robh@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Mark Brown <broonie@kernel.org>,
	Rajendra Nayak <rnayak@codeaurora.org>,
	Shiraz Hashim <shashim@codeaurora.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [RFC 0/5] drivers: Add boot constraints core
Date: Fri, 7 Jul 2017 15:39:02 -0700	[thread overview]
Message-ID: <20170707223902.GI22780@codeaurora.org> (raw)
In-Reply-To: <CAF6AEGvH3Vivi8d=MyXsv3x9J9AenAdLN9pr9RtucQ+AwZTO=A@mail.gmail.com>

On 07/05, Rob Clark wrote:
> On Thu, Jun 29, 2017 at 5:00 PM, Stephen Boyd <sboyd@codeaurora.org> wrote:
> > On 06/29, Russell King - ARM Linux wrote:
> >>
> >> As far as the memory being used goes, they probably locate the frame
> >> buffer well away from the kernel or any area that the kernel is likely
> >> to use during decompression.
> >>
> >> It's probably also marked as a reserved memory region in DT to avoid
> >> the kernel touching it during boot, or _maybe_ they just locate it
> >> somewhere in memory that they've tested that the kernel doesn't touch
> >> until after their kernel has initialised the LCD controller (thereby
> >> avoiding the memory being permanently consumed.)
> >>
> >
> > Yes. The display controller is typically pointed to a memory
> > carveout that we treat as reserved in the kernel. I'm fairly
> > certain that we avoid the "permanently consumed" problem by
> > making it a carveout for the display controller, so that when the
> > display controller probes it can take ownership of the memory
> > from the bootloader.
> >
> 
> For aarch64/arm64 booting with EFI, the bootloader passes info about
> memory layout to the kernel (including the fact that the framebuffer
> is carved out) so kernel doesn't clobber the scanout buffer.  The
> non-EFI case, the bootloader should (not that lk does) patch up the
> fdt reserved memory node w/ correct address/size.  I think
> lk+downstream just relies on luck.
> 

Downstream+lk seems to be doing a carveout with reserved-memory
in DT[1]. The bootloader isn't updating the DT to indicate this,
instead we rely on an agreement between bootloader and kernel's
DT file to have the carveout. Once the display driver configures
things enough to allocate another display buffer it actually
frees the memory back to the system[2]. Most of the code for this
splash screen stuff is in that mdss_mdp_splash_logo.c file.

[1] https://source.codeaurora.org/quic/la/kernel/msm-4.4/tree/arch/arm/boot/dts/qcom/msm8996.dtsi?h=rel/msm-4.4#n231
[2] https://source.codeaurora.org/quic/la/kernel/msm-4.4/tree/drivers/video/fbdev/msm/mdss_mdp_splash_logo.c?h=rel/msm-4.4#n252

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

      reply	other threads:[~2017-07-07 22:39 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-28 10:26 [RFC 0/5] drivers: Add boot constraints core Viresh Kumar
2017-06-28 10:26 ` [RFC 1/5] " Viresh Kumar
2017-06-28 15:55   ` Randy Dunlap
2017-06-29  3:51     ` Viresh Kumar
2017-06-29 12:50       ` Russell King - ARM Linux
2017-06-29 14:49         ` Viresh Kumar
2017-06-28 10:26 ` [RFC 2/5] drivers: boot_constraint: Add support for supply constraints Viresh Kumar
2017-06-28 10:26 ` [RFC 3/5] drivers: boot_constraint: Add boot_constraints_disable kernel parameter Viresh Kumar
2017-06-28 15:51   ` Randy Dunlap
2017-06-28 10:26 ` [RFC 4/5] drivers: boot_constraint: Add debugfs support Viresh Kumar
2017-06-28 15:46   ` Randy Dunlap
2017-06-29  4:11     ` Viresh Kumar
2017-06-28 10:26 ` [RFC 5/5] drivers: Code to test boot constraints Viresh Kumar
2017-06-29 12:40 ` [RFC 0/5] drivers: Add boot constraints core Enrico Weigelt, metux IT consult
2017-06-29 14:47   ` Viresh Kumar
2017-06-29 15:06     ` Enrico Weigelt, metux IT consult
2017-06-30  3:16       ` Viresh Kumar
2017-06-30  3:33         ` Chen-Yu Tsai
2017-06-30  3:55           ` Viresh Kumar
2017-06-30  4:05             ` Chen-Yu Tsai
2017-06-30  4:12               ` Viresh Kumar
2017-06-30  4:22                 ` Chen-Yu Tsai
2017-06-30  5:12                   ` Viresh Kumar
2017-06-30  6:36                     ` Chen-Yu Tsai
2017-06-30  8:43                       ` Viresh Kumar
2017-06-30 12:10                         ` Mark Brown
2017-07-03  6:15                           ` Viresh Kumar
2017-07-03 15:07                             ` Mark Brown
2017-07-04  6:45                               ` Viresh Kumar
2017-06-30 12:12                   ` Mark Brown
2017-06-29 12:49 ` Russell King - ARM Linux
2017-06-29 13:05   ` Enrico Weigelt, metux IT consult
2017-06-29 14:58   ` Viresh Kumar
2017-06-29 15:43     ` Russell King - ARM Linux
2017-06-29 21:00       ` Stephen Boyd
2017-07-05 22:07         ` Rob Clark
2017-07-07 22:39           ` Stephen Boyd [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=20170707223902.GI22780@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=rjw@rjwysocki.net \
    --cc=rnayak@codeaurora.org \
    --cc=robdclark@gmail.com \
    --cc=robh@kernel.org \
    --cc=shashim@codeaurora.org \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.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).