From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/i915: enable semaphores on gen6 if dmar is not active Date: Thu, 10 May 2012 10:35:48 +0200 Message-ID: <20120510083548.GC4867@phenom.ffwll.local> References: <1336603220-24531-1-git-send-email-daniel.vetter@ffwll.ch> <20120509160357.05e038e7@bwidawsk.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f49.google.com (mail-ee0-f49.google.com [74.125.83.49]) by gabe.freedesktop.org (Postfix) with ESMTP id C451E9EC29 for ; Thu, 10 May 2012 01:34:40 -0700 (PDT) Received: by eekd17 with SMTP id d17so429694eek.36 for ; Thu, 10 May 2012 01:34:39 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20120509160357.05e038e7@bwidawsk.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Ben Widawsky Cc: Daniel Vetter , Intel Graphics Development List-Id: intel-gfx@lists.freedesktop.org On Wed, May 09, 2012 at 04:03:57PM -0700, Ben Widawsky wrote: > On Thu, 10 May 2012 00:40:20 +0200 > Daniel Vetter wrote: > > > Inspired by the recent ppgtt regression report, where switching of > > dmar only for the gpu seems to fix things completely, I've looked > > again at the semaphores+vt-d situation. > > > > Contrary to my earlier testing a few months back my system is now > > stable with dmar disabled for the igd, and not only when disabling > > dmar completely. > > > > So I'm rather hopeful that all our recent fixes for snb have changed > > things for code and it's time to try enabling semaphores again. We've > > also had issues with enabling semaphores which are not vt-d related, > > but I guess these are all fixed by the autoreport-disabling and lazy > > request fix. And there's only one way to find out whether there are > > still other issues ... > > > > When I've tried to apply this patch I've noticed that semaphores on > > gen6 have already silently been added in > > > > commit 2911a35b2e4eb87ec48d03aeb11f019e51ae3c0d > > Author: Ben Widawsky > > Date: Thu Apr 5 14:47:36 2012 -0700 > > > > drm/i915: use semaphores for the display plane > > > > Fix this up by only checking whether dmar is enabled on the gfx (not > > on the entire system). > > Heh. It wasn't on purpose! I want to blame this on git, but I honestly > don't know what happened. I guess because we've changed the defaults there so bloody often, this could easily be a bisect artifact ;-) > > Cc: Ben Widawsky > > Cc: Chris Wilson > > Signed-Off-by: Daniel Vetter > Reviewed-by: Ben Widawsky Thanks, patch pushed out. -Daniel > > > --- > > drivers/gpu/drm/i915/i915_drv.c | 6 ++++-- > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c > > index 77b7a50..1ccfc23 100644 > > --- a/drivers/gpu/drm/i915/i915_drv.c > > +++ b/drivers/gpu/drm/i915/i915_drv.c > > @@ -407,9 +407,11 @@ bool i915_semaphore_is_enabled(struct drm_device *dev) > > if (i915_semaphores >= 0) > > return i915_semaphores; > > > > +#ifdef CONFIG_INTEL_IOMMU > > /* Enable semaphores on SNB when IO remapping is off */ > > - if (INTEL_INFO(dev)->gen == 6) > > - return !intel_iommu_enabled; > > + if (INTEL_INFO(dev)->gen == 6 && intel_iommu_gfx_mapped) > > + return false; > > +#endif > > > > return 1; > > } > > > > -- > Ben Widawsky, Intel Open Source Technology Center -- Daniel Vetter Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48