[Intel-gfx] [PATCH] drm/i915: untangle page flip completion
krh at bitplanet.net
Thu Feb 4 18:09:25 PST 2010
On Thu, Feb 4, 2010 at 8:45 PM, Zhenyu Wang <zhenyuw at linux.intel.com> wrote:
> On 2010.01.27 08:44:07 -0800, Jesse Barnes wrote:
>> In intel_crtc_page_flip we save off the current intel_fb->obj for later
>> unpinning. Later on in the function, we reset intel_fb to the fb that
>> was passed into the ioctl, a different object (the new fb).
>> I think that was the core of this confusion. But maybe you're seeing
>> something I'm not, I've been staring at this for a long time and it's
>> all just a blur to me now.
> I think this is exactly what I have been tracking yesterday on page flip
> pending issue for execbuf hang on Ironlake. So also
> Reviewed-by: Zhenyu Wang <zhenyuw at linux.intel.com>
> And I met some issue with your current Ironlake page flip enable patch,
> and I did "flip finish: ... not pending?" error. As instead of flip pending
> irq status on previous chips, Ironlake looks only having flip done irq, so
> I think we can do the prepare_page_flip in page flip ioctl for it, and then
> track the finish action when we receive flip done, like below (although not
> rebasing onto your patch yet..).
> I'll give it more spin, or you maybe also can test?
That could be true... it's how I wanted to do it for the older
chipsets, and it's how it's documented, but it turns out that the hw
doesn't work that way. On my GM45, the FLIP_PENDING interrupt is
delivered when the ring processes the MI_DISPLAY_FLIP command, instead
of when the flip is done, contraty to what is spelled out in the
documentation. If Ironlake works as documented, it should be possible
to call intel_prepare_page_flip() and then intel_finish_page_flip()
directly from the interrupt handler. Note that
intel_prepare_page_flip() takes a plane and intel_finish_page_flip()
takes a pipe.
More information about the Intel-gfx