[Intel-gfx] [RFC][PATCH] drm/i915: Fix races in gen4 page flip interrupt handling
Chris Wilson
chris at chris-wilson.co.uk
Tue Feb 19 11:37:18 CET 2013
On Mon, Feb 18, 2013 at 05:16:06PM +0200, ville.syrjala at linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> Use the gen3 logic for handling page flip interrupts on gen4.
We're just missing the other piece of the puzzle:
=0 cantiga:~/git/linux (master)$ git diff | cat
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index c844790..15218bf 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -2544,6 +2544,8 @@ static int i965_irq_postinstall(struct drm_device *dev)
I915_RENDER_COMMAND_PARSER_ERROR_INTERRUPT);
enable_mask = ~dev_priv->irq_mask;
+ enable_mask &= ~(I915_DISPLAY_PLANE_A_FLIP_PENDING_INTERRUPT |
+ I915_DISPLAY_PLANE_B_FLIP_PENDING_INTERRUPT);
enable_mask |= I915_USER_INTERRUPT;
if (IS_G4X(dev))
With that,
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
Tested-by: Chris Wilson <chris at chris-wilson.co.uk>
> Unfortuantely this kills the stall_check since that looks like it can
> easily trigger too early. With the current logic the stall check would
> kick in on the first vblank after the flip has been submitted to the
> ring. If the CS takes longer than that to process the commands in the
> ring, the stall check will cause the page flip to be complete too
> early. That doesn't sound like a very good idea. Something better
> should be deviced if we still need the stall check.
Indeed. I hope that we've fixed up the races that necessiated the stall
check! But if we can think of a similarly cheap sanity check, that
would be a useful addition in future.
But for now we have to do something before Ben complains about us
breaking his vim debugging, so mark it unused.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list