[Intel-gfx] [PATCH] drm/i915: untangle page flip completion
Zhenyu Wang
zhenyuw at linux.intel.com
Fri Feb 5 02:45:09 CET 2010
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?
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 50ddf4a..eabdb85 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -310,19 +310,17 @@ irqreturn_t ironlake_irq_handler(struct drm_device *dev)
ironlake_opregion_gse_intr(dev);
if (de_iir & DE_PLANEA_FLIP_DONE)
- intel_prepare_page_flip(dev, 0);
+ intel_finish_page_flip(dev, 0);
if (de_iir & DE_PLANEB_FLIP_DONE)
- intel_prepare_page_flip(dev, 1);
+ intel_finish_page_flip(dev, 1);
if (de_iir & DE_PIPEA_VBLANK) {
drm_handle_vblank(dev, 0);
- intel_finish_page_flip(dev, 0);
}
if (de_iir & DE_PIPEB_VBLANK) {
drm_handle_vblank(dev, 1);
- intel_finish_page_flip(dev, 1);
}
/* check event from PCH */
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 0cf764a..26ea815 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -4208,6 +4208,13 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
/* Reference the old fb object for the scheduled work. */
drm_gem_object_reference(work->obj);
+ /* On Ironlake, page flip irq is for 'done' event, so try to
+ make page flip prepare here, and will handle finish job after
+ receive page flip done irq.
+ */
+ if (IS_IRONLAKE(dev))
+ intel_prepare_page_flip(dev, intel_crtc->plane);
+
crtc->fb = fb;
i915_gem_object_flush_write_domain(obj);
drm_vblank_get(dev, intel_crtc->pipe);
--
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/f91a5762/attachment.sig>
More information about the Intel-gfx
mailing list