public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>,
	Chris Wilson <chris@chris-wilson.co.uk>Daniel Vetter
	<daniel@ffwll.ch>,
	intel-gfx@lists.freedesktop.org,
	Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [PATCH] drm/i915: Disable stolen memory when DMAR is active
Date: Fri, 14 Mar 2014 15:10:10 +0200	[thread overview]
Message-ID: <87iorh0vv1.fsf@intel.com> (raw)
In-Reply-To: <20140305173955.GN17001@phenom.ffwll.local>

On Wed, 05 Mar 2014, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Wed, Mar 05, 2014 at 03:32:54PM +0000, Chris Wilson wrote:
>> On Wed, Mar 05, 2014 at 04:17:17PM +0100, Daniel Vetter wrote:
>> > On Fri, Feb 28, 2014 at 12:14:02PM +0000, Chris Wilson wrote:
>> > > 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.
>> > > 
>> > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68535
>> > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>> > > Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
>> > > ---
>> > >  drivers/gpu/drm/i915/i915_gem_stolen.c | 14 ++++++++++++++
>> > >  1 file changed, 14 insertions(+)
>> > > 
>> > > diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c b/drivers/gpu/drm/i915/i915_gem_stolen.c
>> > > index 984ada1b0084..13a849afe479 100644
>> > > --- a/drivers/gpu/drm/i915/i915_gem_stolen.c
>> > > +++ b/drivers/gpu/drm/i915/i915_gem_stolen.c
>> > > @@ -325,11 +325,25 @@ void i915_gem_cleanup_stolen(struct drm_device *dev)
>> > >  	drm_mm_takedown(&dev_priv->mm.stolen);
>> > >  }
>> > >  
>> > > +static bool need_dmar_wa(struct drm_device *dev)
>> > > +{
>> > > +#ifdef CONFIG_INTEL_IOMMU
>> > > +	if (INTEL_INFO(dev)->gen >= 6 && intel_iommu_gfx_mapped)
>> > 
>> > Why the gen check in here? Without that we could just check
>> > intel_iommu_gfx_mapped and shovel the #ifdef into stolen init. No need to
>> > spread it out like that imo.
>> 
>> It's almost as if it was cut'n'paste from another VTd w/a. I'm worried
>> that this is too big a hammer. I would have expected more complaints if
>> VTd was this broken since 3.9. Otoh, it is a severe bug.
>
> We've had piles of bugs in our stolen detection, combined with very few
> people having vt-d capable machines (thanks to intel's differentation) and
> probably even fewer having it enabled I'm not so much surprised.
>
> On top of that lots of noise on the interwebz that dmar is trouble for
> intel gfx on linux, so people probably just disable it and carry on ...

So what's the verdict on this one?

BR,
Jani.


-- 
Jani Nikula, Intel Open Source Technology Center

  reply	other threads:[~2014-03-14 13:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-28 12:14 [PATCH] drm/i915: Disable stolen memory when DMAR is active Chris Wilson
2014-03-05 15:17 ` Daniel Vetter
2014-03-05 15:32   ` Chris Wilson
2014-03-05 17:39     ` Daniel Vetter
2014-03-14 13:10       ` Jani Nikula [this message]
2014-03-18 12:59 ` [PATCH v2 for -fixes] " Jani Nikula
2014-03-18 16:48   ` Daniel Vetter
2014-03-18 16:50     ` Daniel Vetter
2014-03-19  9:07       ` Jani Nikula
2014-03-19 20:51   ` David Woodhouse
2014-03-20  7:36     ` Jani Nikula
2014-03-20  7:49       ` David Woodhouse
2014-03-20  9:23         ` Jani Nikula
2014-03-20  9:45         ` Daniel Vetter
2014-03-20 10:21           ` David Woodhouse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87iorh0vv1.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel@ffwll.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox