From: Philipp Zabel <p.zabel@pengutronix.de>
To: Robert Beckett <bob.beckett@collabora.com>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/imx: correct order of crtc disable
Date: Wed, 19 Jun 2019 11:40:17 +0200 [thread overview]
Message-ID: <1560937217.2398.1.camel@pengutronix.de> (raw)
In-Reply-To: <20190618155003.18499-1-bob.beckett@collabora.com>
Hi Robert,
thank you for the patch.
On Tue, 2019-06-18 at 16:50 +0100, Robert Beckett wrote:
> Notify drm core before sending pending events during crtc disable.
> This fixes the first event after disable having an old stale timestamp
> by having drm_crtc_vblank_off update the timestamp to now.
>
> This was seen while debugging weston log message:
> Warning: computed repaint delay is insane: -8212 msec
>
Would you say this
Fixes: a474478642d5 ("drm/imx: fix crtc vblank state regression")
?
> Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
> ---
> drivers/gpu/drm/imx/ipuv3-crtc.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/imx/ipuv3-crtc.c b/drivers/gpu/drm/imx/ipuv3-crtc.c
> index 9cc1d678674f..c436a28d50e4 100644
> --- a/drivers/gpu/drm/imx/ipuv3-crtc.c
> +++ b/drivers/gpu/drm/imx/ipuv3-crtc.c
> @@ -91,14 +91,14 @@ static void ipu_crtc_atomic_disable(struct drm_crtc *crtc,
> ipu_dc_disable(ipu);
> ipu_prg_disable(ipu);
>
> + drm_crtc_vblank_off(crtc);
> +
This is explained in the commit message and aligns with the
drm_crtc_state @event documentation.
> spin_lock_irq(&crtc->dev->event_lock);
> - if (crtc->state->event) {
> + if (crtc->state->event && !crtc->state->active) {
This is not mentioned though.
If the pending event is not sent here, I assume it will be picked up by
.atomic_flush and will then be sent after the first EOF interrupt after
the modeset is complete. Can you explain this in the commit message?
With that,
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
> drm_crtc_send_vblank_event(crtc, crtc->state->event);
> crtc->state->event = NULL;
> }
> spin_unlock_irq(&crtc->dev->event_lock);
> -
> - drm_crtc_vblank_off(crtc);
> }
>
> static void imx_drm_crtc_reset(struct drm_crtc *crtc)
regards
Philipp
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-06-19 9:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-18 15:50 [PATCH] drm/imx: correct order of crtc disable Robert Beckett
2019-06-19 9:40 ` Philipp Zabel [this message]
2019-06-20 8:50 ` Daniel Vetter
2019-06-20 11:12 ` Robert Beckett
2019-06-20 11:50 ` Philipp Zabel
2019-06-20 12:32 ` Daniel Vetter
2019-06-20 13:30 ` Robert Beckett
2019-06-20 16:29 ` Daniel Vetter
2019-06-20 16:53 ` Robert Beckett
2019-06-21 14:34 ` Robert Beckett
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=1560937217.2398.1.camel@pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=bob.beckett@collabora.com \
--cc=dri-devel@lists.freedesktop.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).