From: Leonard Crestez <leonard.crestez@nxp.com>
To: "p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
"stefan@agner.ch" <stefan@agner.ch>,
"marex@denx.de" <marex@denx.de>,
"shawnguo@kernel.org" <shawnguo@kernel.org>
Cc: dl-linux-imx <linux-imx@nxp.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Robert Chiras <robert.chiras@nxp.com>,
Fabio Estevam <fabio.estevam@nxp.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.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: Tue, 31 Jul 2018 12:17:17 +0000 [thread overview]
Message-ID: <c5e9f521edbca4b1b168e4ee6c8fbd41b1ca2261.camel@nxp.com> (raw)
In-Reply-To: <1533038097.3444.13.camel@pengutronix.de>
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.
> > Fix this by not writing gem->paddr if the block is not enabled and
> > instead delaying the write until the next mxsfb_crtc_mode_set_nofb call.
> > At that point also update cur_buf to avoid an initial corrupt frame
> > after resume.
> >
> > Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
>
> Tested-by: Philipp Zabel <p.zabel@pengutronix.de>
>
> on imx6ull-evk, this fixes the initial corrupt frame.
Cool!
next prev parent reply other threads:[~2018-07-31 12:17 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 [this message]
2018-08-02 10:17 ` Philipp Zabel
2018-08-02 11:06 ` Stefan Agner
2018-08-02 11:39 ` Leonard Crestez
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=c5e9f521edbca4b1b168e4ee6c8fbd41b1ca2261.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®