From patchwork Tue Feb 19 10:37:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 2162551 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id D9D323FDF1 for ; Tue, 19 Feb 2013 10:39:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B7D70E64A3 for ; Tue, 19 Feb 2013 02:39:29 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id 8D58BE64A0 for ; Tue, 19 Feb 2013 02:37:28 -0800 (PST) Received: from azsmga002.ch.intel.com ([10.2.17.35]) by azsmga101.ch.intel.com with ESMTP; 19 Feb 2013 02:37:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.84,694,1355126400"; d="scan'208";a="203931480" Received: from unknown (HELO cantiga.alporthouse.com) ([10.255.12.93]) by AZSMGA002.ch.intel.com with SMTP; 19 Feb 2013 02:37:25 -0800 Received: by cantiga.alporthouse.com (sSMTP sendmail emulation); Tue, 19 Feb 2013 10:37:18 +0000 Date: Tue, 19 Feb 2013 10:37:18 +0000 From: Chris Wilson To: ville.syrjala@linux.intel.com Message-ID: <20130219103718.GA8388@cantiga.alporthouse.com> Mail-Followup-To: Chris Wilson , ville.syrjala@linux.intel.com, intel-gfx@lists.freedesktop.org References: <1361200566-30940-1-git-send-email-ville.syrjala@linux.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1361200566-30940-1-git-send-email-ville.syrjala@linux.intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: intel-gfx@lists.freedesktop.org Subject: Re: [Intel-gfx] [RFC][PATCH] drm/i915: Fix races in gen4 page flip interrupt handling X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org On Mon, Feb 18, 2013 at 05:16:06PM +0200, ville.syrjala@linux.intel.com wrote: > From: Ville Syrjälä > > 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 Tested-by: Chris Wilson > 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 --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))