diff mbox

[RFC] drm/i915: Fix races in gen4 page flip interrupt handling

Message ID 20130219103718.GA8388@cantiga.alporthouse.com (mailing list archive)
State New, archived
Headers show

Commit Message

Chris Wilson Feb. 19, 2013, 10:37 a.m. UTC
On Mon, Feb 18, 2013 at 05:16:06PM +0200, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@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

With that,

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: Chris Wilson <chris@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
diff mbox

Patch

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))