linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Abhinav Kumar <abhinavk-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
To: Sean Paul <sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
Cc: 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, 09 Oct 2018 13:43:43 -0700	[thread overview]
Message-ID: <58b57e5b85ca1d40bb1c99021a73de07@codeaurora.org> (raw)
In-Reply-To: <20181009135930.GE154160@art_vandelay>

On 2018-10-09 06:59, Sean Paul wrote:
> 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
> 
Alright, in that case

Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>

>> 
>> >  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);
>> >  	}
>> >  }
_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

      reply	other threads:[~2018-10-09 20:43 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
2018-10-09 20:43         ` Abhinav Kumar [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=58b57e5b85ca1d40bb1c99021a73de07@codeaurora.org \
    --to=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=sean-p7yTbzM4H96eqtR555YLDQ@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;
as well as URLs for NNTP newsgroup(s).