Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Sean Paul <sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
To: Abhinav Kumar <abhinavk-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
Cc: Sean Paul <sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>,
	Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	linux-arm-msm-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] drm/msm: Grab a vblank reference when waiting for commit_done
Date: Tue, 9 Oct 2018 09:59:30 -0400	[thread overview]
Message-ID: <20181009135930.GE154160@art_vandelay> (raw)
In-Reply-To: <b1d9ce5c2d638519916f57088dec68a0-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>

On Mon, Oct 08, 2018 at 06:38:11PM -0700, Abhinav Kumar wrote:
> On 2018-10-03 13:22, Sean Paul wrote:
> > From: Sean Paul <seanpaul@chromium.org>
> > 
> > Similar to the atomic helpers, we should enable vblank while we're
> > waiting for the commit to finish. DPU needs this, MDP5 seems to work
> > fine without it.
> > 
> > Signed-off-by: Sean Paul <seanpaul@chromium.org>
> > ---
> As such I dont see any issue with this patch but I have a question overall
> on chrome vblank handling.
> For a video mode panel, we will keep the HW resources enabled (including
> vsync related clocks) till device
> is suspended.
> 
> The vblank_get and vblank_put are only controlling the register/deregister
> of the vblank IRQ callback which
> send the events to the userspace and anything pending on vsync completion.
> 
> Does the chrome userspace turn ON/OFF the vblank using vblank_ctrl IOCTL Or
> does it guarantee it to be?
>

No not explicitly. The issue I was seeing is that when userspace (this issue is
not specific to chrome) does a commit we get a frame_done timeout. So while the
hardware might still be active, the worker to signal frame_done is not unless
the vblank_ref is > 0.

> If so, is this patch just more of a safety check to make sure that vsync
> events remain ON till the frame is done?
> 
> Because HW wise it should be and this shouldnt be needed.

It is definitely needed, unless you want 60ms (the frame_done timeout) between
frames :-)

Sean

> 
> >  drivers/gpu/drm/msm/msm_atomic.c | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/msm/msm_atomic.c
> > b/drivers/gpu/drm/msm/msm_atomic.c
> > index c1f1779c980f..2b7bb6e166d3 100644
> > --- a/drivers/gpu/drm/msm/msm_atomic.c
> > +++ b/drivers/gpu/drm/msm/msm_atomic.c
> > @@ -32,7 +32,12 @@ static void msm_atomic_wait_for_commit_done(struct
> > drm_device *dev,
> >  		if (!new_crtc_state->active)
> >  			continue;
> > 
> > +		if (drm_crtc_vblank_get(crtc))
> > +			continue;
> > +
> >  		kms->funcs->wait_for_crtc_commit_done(kms, crtc);
> > +
> > +		drm_crtc_vblank_put(crtc);
> >  	}
> >  }

-- 
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

  parent reply	other threads:[~2018-10-09 13:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-03 20:22 [PATCH] drm/msm: Grab a vblank reference when waiting for commit_done Sean Paul
     [not found] ` <20181003202231.178601-1-sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
2018-10-09  1:38   ` Abhinav Kumar
     [not found]     ` <b1d9ce5c2d638519916f57088dec68a0-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-10-09 13:59       ` Sean Paul [this message]
2018-10-09 20:43         ` Abhinav Kumar

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=20181009135930.GE154160@art_vandelay \
    --to=sean-p7ytbzm4h96eqtr555yldq@public.gmane.org \
    --cc=abhinavk-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=linux-arm-msm-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@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