From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH v2 for -fixes] drm/i915: Disable stolen memory when DMAR is active Date: Tue, 18 Mar 2014 17:50:44 +0100 Message-ID: <20140318165044.GF30571@phenom.ffwll.local> References: <1393589642-9992-1-git-send-email-chris@chris-wilson.co.uk> <1395147544-16984-1-git-send-email-jani.nikula@intel.com> <20140318164828.GE30571@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f48.google.com (mail-ee0-f48.google.com [74.125.83.48]) by gabe.freedesktop.org (Postfix) with ESMTP id 55C936EBCB for ; Tue, 18 Mar 2014 09:50:48 -0700 (PDT) Received: by mail-ee0-f48.google.com with SMTP id b57so4925575eek.35 for ; Tue, 18 Mar 2014 09:50:47 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140318164828.GE30571@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Jani Nikula Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Tue, Mar 18, 2014 at 05:48:28PM +0100, Daniel Vetter wrote: > On Tue, Mar 18, 2014 at 02:59:04PM +0200, Jani Nikula wrote: > > From: Chris Wilson > > > > We have reports of heavy screen corruption if we try to use the stolen > > memory reserved by the BIOS whilst the DMA-Remapper is active. This > > quirk may be only specific to a few machines or BIOSes, but first lets > > apply the big hammer and always disable use of stolen memory when DMAR > > is active. > > > > v2 by Jani: Rebase on -fixes, only look at intel_iommu_gfx_mapped. > > > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68535 > > Signed-off-by: Chris Wilson > > Cc: Daniel Vetter > > Signed-off-by: Jani Nikula > > > > --- > > > > Daniel, is this the color you want? > > Yeah, colour looks shiny ;-) Reviewed-by: Daniel Vetter Correction, cc: stable is missing. -Daniel > > > > Signed-off-by: Jani Nikula > > --- > > drivers/gpu/drm/i915/i915_gem_stolen.c | 7 +++++++ > > 1 file changed, 7 insertions(+) > > > > diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c b/drivers/gpu/drm/i915/i915_gem_stolen.c > > index d58b4e287e32..28d24caa49f3 100644 > > --- a/drivers/gpu/drm/i915/i915_gem_stolen.c > > +++ b/drivers/gpu/drm/i915/i915_gem_stolen.c > > @@ -214,6 +214,13 @@ int i915_gem_init_stolen(struct drm_device *dev) > > struct drm_i915_private *dev_priv = dev->dev_private; > > int bios_reserved = 0; > > > > +#ifdef CONFIG_INTEL_IOMMU > > + if (intel_iommu_gfx_mapped) { > > + DRM_INFO("DMAR active, disabling use of stolen memory\n"); > > + return 0; > > + } > > +#endif > > + > > if (dev_priv->gtt.stolen_size == 0) > > return 0; > > > > -- > > 1.7.9.5 > > > > -- > Daniel Vetter > Software Engineer, Intel Corporation > +41 (0) 79 365 57 48 - http://blog.ffwll.ch -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch