From: Chris Wilson Date: Fri, 23 Mar 2012 17:38:49 +0000 (+0000) Subject: drm/i915: Initialise GTT MTRR to -1 X-Git-Tag: v3.6-rc1~59^2~115^2~46 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=23f54beafee1c31c7f0127650ec2903d80b3dfeb;p=platform%2Fkernel%2Flinux-exynos.git drm/i915: Initialise GTT MTRR to -1 Fixes a regression from 9e984bc1 (drm/i915: Don't do MTRR setup if PAT is enabled) where we left the MTRR as 0 and so tried to free a MTRR we did not own during unload. Reported-and-tested-by: Ben Widawsky Reviewed-by: Adam Jackson Signed-off-by: Chris Wilson Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 4f690374..a9caf62 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -1923,6 +1923,8 @@ static void i915_mtrr_setup(struct drm_i915_private *dev_priv, unsigned long base, unsigned long size) { + dev_priv->mm.gtt_mtrr = -1; + #if defined(CONFIG_X86_PAT) if (cpu_has_pat) return;