[Intel-gfx] [PATCH] drm/i915: untangle page flip completion
Zhenyu Wang
zhenyuw at linux.intel.com
Fri Feb 5 03:49:21 CET 2010
On 2010.02.04 21:09:25 -0500, Kristian Høgsberg wrote:
> >
> > 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.
Maybe just because now we will always enable FLIP_PENDING irq via always
unmask it in IMR, so after MI_DISPLAY_FLIP cmd we'll get a flip pending
interrupt...The device programming chapter in the spec has more info, and
looks if we want the behavior for flip done irq only, we just need to _not_
unmask FLIP_PENDING in IMR.
As from the spec, when MI_DISPLAY_FLIP cmd executes, FLIP_PENDING irq in
ISR will be set to 1, and in next vblank when flip is performed, FLIP_PENDING
in ISR will be set to 0, and IMR bit will be unmasked too (hw will do that?),
which then cause IIR bit set to generate the irq. This is really special case
as noted by spec too. By that way we may get the flip done behavior on older
chips too.
> 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.
>
yeah, so the patch in my last mail tried to pass crtc->plane for
intel_prepare_page_flip(), but we won't have plane info in irq handler right?
Although we currently don't exchange plane to pipe mapping (plane A always
mapped to pipe A), but this is still safe to do.
--
Open Source Technology Center, Intel ltd.
$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20100205/bbbd362a/attachment.sig>
More information about the Intel-gfx
mailing list