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

Kristian Høgsberg krh at bitplanet.net
Thu Feb 4 22:00:53 CET 2010


On Tue, Jan 26, 2010 at 5:40 PM, 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.
>
> Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>

Yeah, I see what's going on, nice catch.  I think we need to reference
the pending_flip_obj to keep it alive between intel_crtc_page_flip()
and intel_finish_page_flip(), right?  It gets pinned and fenced, but
that doesn't prevent userspace from destroying the object in the
meantime.  In which case we're in trouble when we try to access the
object in intel_finish_page_flip().

cheers,
Kristian



More information about the Intel-gfx mailing list