Skip to content

Commit 0f4706d

Browse files
icklejnikula
authored andcommitted
drm/i915: Disable stolen memory when DMAR is active
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 <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Cc: [email protected] Signed-off-by: Jani Nikula <[email protected]>
1 parent 8259383 commit 0f4706d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/gpu/drm/i915/i915_gem_stolen.c

+7
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,13 @@ int i915_gem_init_stolen(struct drm_device *dev)
214214
struct drm_i915_private *dev_priv = dev->dev_private;
215215
int bios_reserved = 0;
216216

217+
#ifdef CONFIG_INTEL_IOMMU
218+
if (intel_iommu_gfx_mapped) {
219+
DRM_INFO("DMAR active, disabling use of stolen memory\n");
220+
return 0;
221+
}
222+
#endif
223+
217224
if (dev_priv->gtt.stolen_size == 0)
218225
return 0;
219226

0 commit comments

Comments
 (0)