All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [PATCH v2 for -fixes] drm/i915: Disable stolen memory when DMAR is active
Date: Tue, 18 Mar 2014 14:59:04 +0200	[thread overview]
Message-ID: <1395147544-16984-1-git-send-email-jani.nikula@intel.com> (raw)
In-Reply-To: <1393589642-9992-1-git-send-email-chris@chris-wilson.co.uk>

From: Chris Wilson <chris@chris-wilson.co.uk>

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 <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>

---

Daniel, is this the color you want?

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 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

  parent reply	other threads:[~2014-03-18 12:58 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
2014-03-18 12:59 ` Jani Nikula [this message]
2014-03-18 16:48   ` [PATCH v2 for -fixes] " 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=1395147544-16984-1-git-send-email-jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.