[Intel-gfx] [PATCH] drm/i915: untangle page flip completion

Chris Wilson chris at chris-wilson.co.uk
Wed Jan 27 10:08:24 CET 2010


On Tue, 26 Jan 2010 14:40:05 -0800, Jesse Barnes <jbarnes at virtuousgeek.org> wrote:
> When a new page flip is requested, we need to both queue an unpin for
> the current framebuffer, and also increment the flip pending count on
> the newly submitted buffer.
> 
> At flip finish time, we need to unpin the old fb and decrement the flip
> pending count on the new buffer.
> 
> The old code was conflating the two, and led to hangs when new direct
> rendered apps were started, replacing the existing frame buffer.  This
> patch splits out the buffers and prevents the hangs.

I'm not seeing where old_fb_obj != pending_flip_obj. Indeed, you only take
a reference on old_fb_obj.

>  
>  	/* Initial scanout buffer will have a 0 pending flip count */
>  	if ((atomic_read(&obj_priv->pending_flip) == 0) ||

I'm still a little skeptical about this one - I keep trying to work how we
end up with the old scanout buffer on the flip path. It seems like this
patch is trying to tell me something...
-ickle

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list