[Intel-gfx] [PATCH] drm/i915: untangle page flip completion
Kristian Høgsberg
krh at bitplanet.net
Thu Feb 4 22:16:02 CET 2010
2010/2/4 Jesse Barnes <jbarnes at virtuousgeek.org>:
> On Thu, 4 Feb 2010 16:00:53 -0500
> Kristian Høgsberg <krh at bitplanet.net> wrote:
>
>> 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().
>
> Oh good point, that's a separate bug I didn't address here. I'll send
> an incremental patch on top to keep refs on these objects across the
> flip.
Ok, if you don't want to re-roll it the patch I guess I'll have to ack
this one ;-)
Reviewed-by: Kristian Høgsberg <krh at bitplanet.net>
More information about the Intel-gfx
mailing list