From: Archit Taneja <architt-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
To: Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
hoegsberg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
abhinavk-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v2 4/6] drm/msm: Issue queued events when disabling crtc
Date: Mon, 2 Apr 2018 10:53:15 +0530 [thread overview]
Message-ID: <0d69abf7-c425-2bd1-ef66-de465c46896d@codeaurora.org> (raw)
In-Reply-To: <20180328190657.218661-5-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
On Thursday 29 March 2018 12:36 AM, Sean Paul wrote:
> Ensure that any queued events are issued when disabling the crtc. This
> avoids timeouts when we come back and wait for dependencies (like the
> previous frame's flip_done).
Reviewed-by: Archit Taneja <architt@codeaurora.org>
>
> Changes in v2:
> - None
>
> Signed-off-by: Sean Paul <seanpaul@chromium.org>
> ---
> drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c
> index 76b96081916f..10271359789e 100644
> --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c
> +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c
> @@ -430,6 +430,7 @@ static void mdp5_crtc_atomic_disable(struct drm_crtc *crtc,
> struct mdp5_crtc_state *mdp5_cstate = to_mdp5_crtc_state(crtc->state);
> struct mdp5_kms *mdp5_kms = get_kms(crtc);
> struct device *dev = &mdp5_kms->pdev->dev;
> + unsigned long flags;
>
> DBG("%s", crtc->name);
>
> @@ -445,6 +446,14 @@ static void mdp5_crtc_atomic_disable(struct drm_crtc *crtc,
> mdp_irq_unregister(&mdp5_kms->base, &mdp5_crtc->err);
> pm_runtime_put_sync(dev);
>
> + if (crtc->state->event && !crtc->state->active) {
> + WARN_ON(mdp5_crtc->event);
> + spin_lock_irqsave(&mdp5_kms->dev->event_lock, flags);
> + drm_crtc_send_vblank_event(crtc, crtc->state->event);
> + crtc->state->event = NULL;
> + spin_unlock_irqrestore(&mdp5_kms->dev->event_lock, flags);
> + }
> +
> mdp5_crtc->enabled = false;
> }
>
>
_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno
next prev parent reply other threads:[~2018-04-02 5:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-28 19:06 [PATCH v2 0/6] drm/msm: Switch to atomic helpers Sean Paul
2018-03-28 19:06 ` [PATCH v2 1/6] drm/msm: Use drm_private_obj/state instead of subclassing Sean Paul
[not found] ` <20180328190657.218661-2-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-04-02 5:01 ` Archit Taneja
[not found] ` <20180328190657.218661-1-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-03-28 19:06 ` [PATCH v2 2/6] drm/msm: Refactor complete_commit() to look more the helpers Sean Paul
[not found] ` <20180328190657.218661-3-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-04-02 5:22 ` Archit Taneja
2018-03-28 19:06 ` [PATCH v2 3/6] drm/msm: Mark the crtc->state->event consumed Sean Paul
[not found] ` <20180328190657.218661-4-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-04-02 5:22 ` Archit Taneja
2018-03-28 19:06 ` [PATCH v2 4/6] drm/msm: Issue queued events when disabling crtc Sean Paul
[not found] ` <20180328190657.218661-5-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-04-02 5:23 ` Archit Taneja [this message]
2018-03-28 19:06 ` [PATCH v2 5/6] drm/msm: Remove msm_commit/worker, use atomic helper commit Sean Paul
2018-03-28 19:06 ` [PATCH v2 6/6] drm/msm: Switch to atomic_helper_commit() Sean Paul
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=0d69abf7-c425-2bd1-ef66-de465c46896d@codeaurora.org \
--to=architt-sgv2jx0feol9jmxxk+q4oq@public.gmane.org \
--cc=abhinavk-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=hoegsberg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.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