dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Cc: Haneen Mohammed <hamohammed.sa@gmail.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	DRI Development <dri-devel@lists.freedesktop.org>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH 2/3] drm/vkms: Use wait_for_flip_done
Date: Tue, 3 Sep 2019 17:12:50 +0200	[thread overview]
Message-ID: <20190903151250.GZ2112@phenom.ffwll.local> (raw)
In-Reply-To: <20190903124906.sytisd2swa77zh4h@smtp.gmail.com>

On Tue, Sep 03, 2019 at 08:49:06AM -0400, Rodrigo Siqueira wrote:
> On 07/19, Daniel Vetter wrote:
> > It's the recommended version, wait_for_vblanks is a bit a hacky
> > interim thing that predates all the flip_done tracking. It's
> > unfortunately still the default ...
> 
> Just one question, is it safe to replace drm_atomic_helper_wait_for_vblanks by
> drm_atomic_helper_wait_for_flip_done? I noticed that only six drivers use these
> functions; they are:
> 
> * atmel-hlcdc
> * mediatek
> * msm
> * tegra
> * tilcdc
> * virtio
> 
> If we change these drivers, can we drop the helper
> drm_atomic_helper_wait_for_vblanks?

Yes, but there might be a tiny behaviour change, that's why I haven't just
made it the default.

Also note that wait_for_vblanks is still the default in the
atomic_commit_tail (seee drm_atomic_helper_commit_tail), so there's a pile
more drivers using this implicitly.

But yeah would be really great to fix that all up, since I think
wait_for_flip_done is the better function. Maybe a todo.rst? Or perhaps we
should at least do it for atomic helpers, and just see what breaks? As a
start for this conversion.

> Reviewed-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>

Thanks, Daniel

> 
> Thanks
> 
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> > Cc: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
> > Cc: Haneen Mohammed <hamohammed.sa@gmail.com>
> > Cc: Daniel Vetter <daniel@ffwll.ch>
> > ---
> >  drivers/gpu/drm/vkms/vkms_drv.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/vkms/vkms_drv.c b/drivers/gpu/drm/vkms/vkms_drv.c
> > index 44ab9f8ef8be..80524a22412a 100644
> > --- a/drivers/gpu/drm/vkms/vkms_drv.c
> > +++ b/drivers/gpu/drm/vkms/vkms_drv.c
> > @@ -83,7 +83,7 @@ static void vkms_atomic_commit_tail(struct drm_atomic_state *old_state)
> >  
> >  	drm_atomic_helper_commit_hw_done(old_state);
> >  
> > -	drm_atomic_helper_wait_for_vblanks(dev, old_state);
> > +	drm_atomic_helper_wait_for_flip_done(dev, old_state);
> >  
> >  	for_each_old_crtc_in_state(old_state, crtc, old_crtc_state, i) {
> >  		struct vkms_crtc_state *vkms_state =
> > -- 
> > 2.22.0
> > 
> 
> -- 
> Rodrigo Siqueira
> Software Engineer, Advanced Micro Devices (AMD)
> https://siqueira.tech



-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-09-03 15:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-19 15:23 [PATCH 1/3] drm/vblank: Document and fix vblank count barrier semantics Daniel Vetter
2019-07-19 15:23 ` [PATCH 2/3] drm/vkms: Use wait_for_flip_done Daniel Vetter
2019-09-03 12:49   ` Rodrigo Siqueira
2019-09-03 15:12     ` Daniel Vetter [this message]
2019-07-19 15:23 ` [PATCH 3/3] drm/vkms: Reduce critical section in vblank_simulate Daniel Vetter
2019-09-03 12:50   ` Rodrigo Siqueira
2019-09-03 15:16     ` Daniel Vetter
2019-07-19 17:06 ` [Intel-gfx] [PATCH 1/3] drm/vblank: Document and fix vblank count barrier semantics Ville Syrjälä
2019-07-19 18:33   ` Daniel Vetter
2019-07-19 18:56     ` Ville Syrjälä
2019-07-23 13:13   ` [PATCH] " Daniel Vetter
2019-08-19 16:21     ` Ville Syrjälä
2019-09-03 12:47     ` Rodrigo Siqueira
2019-09-03 15:09       ` [Intel-gfx] " Daniel Vetter
2019-09-03 15:17         ` Rodrigo Siqueira
2019-09-03 15:46           ` Daniel Vetter

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=20190903151250.GZ2112@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hamohammed.sa@gmail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rodrigosiqueiramelo@gmail.com \
    /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