[PATCH] drm/atomic-helpers: Clear up cleanup_done a bit

Daniel Vetter daniel at ffwll.ch
Wed Jun 15 15:26:09 UTC 2016


On Wed, Jun 15, 2016 at 03:29:16PM +0100, Liviu.Dudau at arm.com wrote:
> On Wed, Jun 15, 2016 at 12:24:26PM +0200, Daniel Vetter wrote:
> > It's not obvious at first sight that this is a fastpath, make that
> > clearer with a goto. Fallout from a discussion with Liviu on irc.
> > 
> > v2: Drop bogus hunks that crept in.
> > 
> > Cc: Liviu.Dudau at arm.com
> > Acked-by: Liviu.Dudau at arm.com
> > Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
> > ---
> >  drivers/gpu/drm/drm_atomic_helper.c | 8 +++-----
> >  1 file changed, 3 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> > index 716aa535eb98..0556c95b7ddb 100644
> > --- a/drivers/gpu/drm/drm_atomic_helper.c
> > +++ b/drivers/gpu/drm/drm_atomic_helper.c
> > @@ -1579,11 +1579,8 @@ void drm_atomic_helper_commit_cleanup_done(struct drm_atomic_state *state)
> >  		/* commit_list borrows our reference, need to remove before we
> >  		 * clean up our drm_atomic_state. But only after it actually
> >  		 * completed, otherwise subsequent commits won't stall properly. */
> > -		if (try_wait_for_completion(&commit->flip_done)) {
> > -			list_del(&commit->commit_entry);
> > -			spin_unlock(&crtc->commit_lock);
> > -			continue;
> > -		}
> > +		if (try_wait_for_completion(&commit->flip_done))
> > +			goto del_commit:
> 
> s/:/;/

Yeah I'm pretty good with posting a rebase mess with this one.
Fixed&applied, thanks.
-Daniel

> 
> Liviu
> 
> >  
> >  		spin_unlock(&crtc->commit_lock);
> >  
> > @@ -1597,6 +1594,7 @@ void drm_atomic_helper_commit_cleanup_done(struct drm_atomic_state *state)
> >  				  crtc->base.id, crtc->name);
> >  
> >  		spin_lock(&crtc->commit_lock);
> > +del_commit:
> >  		list_del(&commit->commit_entry);
> >  		spin_unlock(&crtc->commit_lock);
> >  	}
> > -- 
> > 2.8.1
> > 
> 
> -- 
> ====================
> | I would like to |
> | fix the world,  |
> | but they're not |
> | giving me the   |
>  \ source code!  /
>   ---------------
>     ¯\_(ツ)_/¯

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dri-devel mailing list