From: Sean Paul <sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
To: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org
Subject: Re: [PATCH 1/8] drm/msm: dpu: Move pm_runtime_(get|put) from vblank_enable
Date: Tue, 13 Nov 2018 15:57:45 -0500 [thread overview]
Message-ID: <20181113205745.GL154160@art_vandelay> (raw)
In-Reply-To: <20181113205257.170707-1-sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
On Tue, Nov 13, 2018 at 03:52:44PM -0500, Sean Paul wrote:
> From: Sean Paul <seanpaul@chromium.org>
I neglected to add --cover-letter to send-email, so pasting my cover here
instead:
Hi all,
So I kept digging into the locking and dependencies around encoder/crtc and this
is the latest series to pop out. I think things are a bit more clear and safe
at the end. We have now gotten rid of the crtc_lock and the pm_runtime sync
operations in vblank enable/disable, so we should be able to completely turf the
display thread/worker/etc!
Note that this series applies on top of [1].
Thanks!
Sean
[1]- https://lists.freedesktop.org/archives/dri-devel/2018-November/196170.html
>
> There are 4 times that _dpu_crtc_vblank_enable_no_lock() is called:
>
> 1- crtc enable
> 2- crtc disable
> 3- crtc vblank enable
> 4- crtc vblank disable
>
> When we enable or disable the crtc, we call drm_crtc_vblank_on and
> drm_crtc_vblank_off respectively. That will gate vblank enables and
> disables to only being called when the crtc is active. That means that
> we can just enable/disable pm runtime in crtc enable/disable. This will
> be beneficial in trying to eliminate blocking calls from the vblank call
> chain.
>
> Signed-off-by: Sean Paul <seanpaul@chromium.org>
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> index 80de5289ada3..aa2f20c05dd7 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> @@ -777,8 +777,6 @@ static void _dpu_crtc_vblank_enable_no_lock(
> struct drm_encoder *enc;
>
> if (enable) {
> - pm_runtime_get_sync(dev->dev);
> -
> list_for_each_entry(enc, &dev->mode_config.encoder_list, head) {
> if (enc->crtc != crtc)
> continue;
> @@ -801,8 +799,6 @@ static void _dpu_crtc_vblank_enable_no_lock(
>
> dpu_encoder_register_vblank_callback(enc, NULL, NULL);
> }
> -
> - pm_runtime_put_sync(dev->dev);
> }
> }
>
> @@ -902,6 +898,8 @@ static void dpu_crtc_disable(struct drm_crtc *crtc)
> crtc->state->event = NULL;
> spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
> }
> +
> + pm_runtime_put_sync(crtc->dev->dev);
> }
>
> static void dpu_crtc_enable(struct drm_crtc *crtc,
> @@ -917,6 +915,8 @@ static void dpu_crtc_enable(struct drm_crtc *crtc,
> }
> priv = crtc->dev->dev_private;
>
> + pm_runtime_get_sync(crtc->dev->dev);
> +
> DRM_DEBUG_KMS("crtc%d\n", crtc->base.id);
> dpu_crtc = to_dpu_crtc(crtc);
>
> --
> Sean Paul, Software Engineer, Google / Chromium OS
>
--
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno
prev parent reply other threads:[~2018-11-13 20:57 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-13 20:52 [PATCH 1/8] drm/msm: dpu: Move pm_runtime_(get|put) from vblank_enable Sean Paul
2018-11-13 20:52 ` [PATCH 3/8] drm/msm: dpu: Remove vblank_callback from encoder Sean Paul
[not found] ` <20181113205257.170707-3-sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
2018-11-14 0:47 ` Jeykumar Sankaran
[not found] ` <6d9307aae86d14ecbf70a39012b2d9f2-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-11-14 15:13 ` Sean Paul
2018-11-14 19:33 ` Jeykumar Sankaran
[not found] ` <7e02a42c4a0aebc635cf6d798d8a667a-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-11-14 19:43 ` Sean Paul
2018-11-16 18:28 ` Sean Paul
2018-11-13 20:52 ` [PATCH 4/8] drm/msm: dpu: Use atomic_disable for dpu_crtc_disable Sean Paul
2018-11-13 20:52 ` [PATCH 6/8] drm/msm: dpu: Separate crtc assignment from vblank enable Sean Paul
[not found] ` <20181113205257.170707-6-sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
2018-11-14 0:48 ` Jeykumar Sankaran
[not found] ` <a8d1ef336746c930e8274153c82ebf99-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-11-14 15:16 ` Sean Paul
2018-11-14 19:43 ` Jeykumar Sankaran
[not found] ` <25b009f90b6513f788fcc6748ae26e63-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-11-14 19:53 ` Sean Paul
2018-11-14 19:57 ` Ville Syrjälä
[not found] ` <20181114195704.GV9144-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2018-11-14 20:46 ` Jeykumar Sankaran
2018-11-14 20:52 ` Sean Paul
2018-11-14 21:50 ` Jeykumar Sankaran
2018-11-13 20:52 ` [PATCH 7/8] drm/msm: dpu: Remove vblank_requested flag from dpu_crtc Sean Paul
[not found] ` <20181113205257.170707-7-sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
2018-11-14 0:47 ` Jeykumar Sankaran
[not found] ` <fd31b1c96143132b95bc937dfa201e85-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-11-14 15:14 ` Sean Paul
[not found] ` <20181113205257.170707-1-sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
2018-11-13 20:52 ` [PATCH 2/8] drm/msm: dpu: Remove crtc_lock from setup_mixers Sean Paul
2018-11-13 20:52 ` [PATCH 5/8] drm/msm: dpu: Don't bother checking ->enabled in dpu_crtc_vblank Sean Paul
2018-11-13 20:52 ` [PATCH 8/8] drm/msm: dpu: Remove crtc_lock Sean Paul
2018-11-13 20:57 ` Sean Paul [this message]
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=20181113205745.GL154160@art_vandelay \
--to=sean-p7ytbzm4h96eqtr555yldq@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=linux-arm-msm-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