mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Leonard Crestez <leonard.crestez@nxp.com>
To: "stefan@agner.ch" <stefan@agner.ch>
Cc: "A.s. Dong" <aisheng.dong@nxp.com>,
	"marex@denx.de" <marex@denx.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	dl-linux-imx <linux-imx@nxp.com>,
	Robert Chiras <robert.chiras@nxp.com>,
	Marius-cristian Vlad <marius-cristian.vlad@nxp.com>,
	Fabio Estevam <fabio.estevam@nxp.com>,
	"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>,
	Anson Huang <anson.huang@nxp.com>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	Mirela Rabulea <mirela.rabulea@nxp.com>
Subject: Re: [PATCH v3 4/4] drm/mxsfb: Switch to drm_atomic_helper_commit_tail_rpm
Date: Wed, 8 Aug 2018 08:00:15 +0000	[thread overview]
Message-ID: <174c00104b40ebe1f6495e679e115948bb561889.camel@nxp.com> (raw)
In-Reply-To: <da414ab37c3d7c02f059fd3c0470dac9@agner.ch>

On Tue, 2018-08-07 at 21:01 +0200, Stefan Agner wrote:
> On 06.08.2018 21:31, Leonard Crestez wrote:
> > The lcdif block is only powered on when display is active so plane
> > updates when not enabled are not valid. Writing to an unpowered IP block
> > is mostly ignored but can trigger bus errors on some chips.
> > 
> > Prevent this situation by switching to drm_atomic_helper_commit_tail_rpm
> > and having the drm core ensure atomic_plane_update is only called while
> > the crtc is active. This avoids having to keep track of "enabled" bits
> > inside the mxsfb driver.
> > 
> > This also requires handling the vblank event for disable from
> > ~~mxsfb_pipe_update~~ **mxsfb_pipe_disable**.
> 
> Hm, I don't think this is a new requirement. Simple KMS Helper Reference
> clearly states that it should be called from update.
> 
> Probably using drm_atomic_helper_commit_tail_rpm just exacerbates an
> issue which we haven't seen before...
> 
> Since I think it is a general fix, I'd rather prefer have it in a
> separate commit.

I wrote the commit message wrong, what I meant is that it requires
handling the vblank event from *disable*.

Switching to atomic_helper_commit_tail_rpm means atomic_update is no
longer called when !state->active so nobody dispatches the last vblank
event for disabling the crtc. This causes a warning in
drm_atomic_helper_commit_hw_done on disable.

Looking through the docs there seems to be a lot of complexity behind
vblank events so maybe I'm missing something.

  reply	other threads:[~2018-08-08  8:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-06 19:31 [PATCH v3 0/4] drm/mxsfb: Fix runtime PM for unpowering lcdif block Leonard Crestez
2018-08-06 19:31 ` [PATCH v3 1/4] drm/mxsfb: Fix initial corrupt frame when activating display Leonard Crestez
2018-08-07 10:53   ` Philipp Zabel
2018-08-07 18:29   ` Stefan Agner
2018-08-06 19:31 ` [PATCH v3 2/4] drm/mxsfb: Add pm_runtime calls to pipe_enable/disable Leonard Crestez
2018-08-07 18:32   ` Stefan Agner
2018-08-06 19:31 ` [PATCH v3 3/4] drm/mxsfb: Add PM_SLEEP support Leonard Crestez
2018-08-07 18:41   ` Stefan Agner
2018-08-06 19:31 ` [PATCH v3 4/4] drm/mxsfb: Switch to drm_atomic_helper_commit_tail_rpm Leonard Crestez
2018-08-07 19:01   ` Stefan Agner
2018-08-08  8:00     ` Leonard Crestez [this message]
2018-08-08 12:30       ` Stefan Agner

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=174c00104b40ebe1f6495e679e115948bb561889.camel@nxp.com \
    --to=leonard.crestez@nxp.com \
    --cc=aisheng.dong@nxp.com \
    --cc=anson.huang@nxp.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=fabio.estevam@nxp.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=marius-cristian.vlad@nxp.com \
    --cc=mirela.rabulea@nxp.com \
    --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®