From: Leonard Crestez <leonard.crestez@nxp.com>
To: "stefan@agner.ch" <stefan@agner.ch>,
"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>
Cc: dl-linux-imx <linux-imx@nxp.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"marex@denx.de" <marex@denx.de>,
Robert Chiras <robert.chiras@nxp.com>,
Fabio Estevam <fabio.estevam@nxp.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"shawnguo@kernel.org" <shawnguo@kernel.org>,
Anson Huang <anson.huang@nxp.com>,
"airlied@linux.ie" <airlied@linux.ie>,
"l.stach@pengutronix.de" <l.stach@pengutronix.de>,
"kernel@pengutronix.de" <kernel@pengutronix.de>
Subject: Re: [PATCH v2] drm/mxsfb: Fix runtime PM for unpowering lcdif block
Date: Thu, 2 Aug 2018 11:39:14 +0000 [thread overview]
Message-ID: <b5877aaefd8b1a2b440988bfc69779fa45c29256.camel@nxp.com> (raw)
In-Reply-To: <0f22023bf42fc7ba458b285d60e3b866@agner.ch>
On Thu, 2018-08-02 at 13:06 +0200, Stefan Agner wrote:
> On 02.08.2018 12:17, Philipp Zabel wrote:
> > On Tue, 2018-07-31 at 12:17 +0000, Leonard Crestez wrote:
> > > On Tue, 2018-07-31 at 13:54 +0200, Philipp Zabel wrote:
> > > > On Tue, 2018-07-17 at 13:48 +0300, Leonard Crestez wrote:
> > > > > Adding lcdif nodes to a power domain currently does work, it results in
> > > > > black/corrupted screens or hangs. While the driver does enable runtime
> > > > > pm it does not deal correctly with the block being unpowered.
> > > > >
> > > > > Ensure power is on when required by adding pm_runtime_get/put_sync to
> > > > > mxsfb_pipe_enable/disable.
> > > > >
> > > > > Since power is lost on suspend implement PM_SLEEP_OPS using
> > > > > drm_mode_config_helper_suspend/resume.
> > > > >
> > > > > The mxsfb_plane_atomic_update function can get called before
> > > > > mxsfb_pipe_enable while the block is not yet powered. When this happens
> > > > > the write to LCDIF_NEXT_BUF is lost causing corrupt display on unblank
> > > > > until a refresh.
> > > >
> > > > Why does this happen?
> > >
> > > I'm not sure what you're asking but register writes to unpowered or
> > > unclocked blocks are not expected to "just work". Here the write is
> > > ignored/lost but I think on imx8 it can even cause a bus error.
> > >
> > > The approach here is to only set the framebuffer address as part of
> > > activating the display.
> >
> > I wonder why atomic update is called at all while the pipe is not
> > enabled.
>
> It can be made to behave differently (see also my review).
Setting the framebuffer before enabling the crtc makes sense to me,
otherwise an initial corrupt frame would be impossible to avoid.
It's just that it slightly complicates PM for simple devices. Maybe
drm_simple_display_pipe could have prepare/unprepare callbacks for
PM+modeset separate from just crtc enable/disable?
next prev parent reply other threads:[~2018-08-02 11:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-17 10:48 Leonard Crestez
2018-07-31 11:16 ` Leonard Crestez
2018-07-31 11:54 ` Philipp Zabel
2018-07-31 12:17 ` Leonard Crestez
2018-08-02 10:17 ` Philipp Zabel
2018-08-02 11:06 ` Stefan Agner
2018-08-02 11:39 ` Leonard Crestez [this message]
2018-08-01 10:00 ` Stefan Agner
2018-08-02 11:40 ` Philipp Zabel
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=b5877aaefd8b1a2b440988bfc69779fa45c29256.camel@nxp.com \
--to=leonard.crestez@nxp.com \
--cc=airlied@linux.ie \
--cc=anson.huang@nxp.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=fabio.estevam@nxp.com \
--cc=kernel@pengutronix.de \
--cc=l.stach@pengutronix.de \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marex@denx.de \
--cc=p.zabel@pengutronix.de \
--cc=robert.chiras@nxp.com \
--cc=shawnguo@kernel.org \
--cc=stefan@agner.ch \
/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
all inboxes | Powered by JetHome®