aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorChris Wilson2012-03-23 17:38:49 +0000
committerDaniel Vetter2012-03-28 22:07:57 +0200
commit23f54beafee1c31c7f0127650ec2903d80b3dfeb (patch)
tree1cbbd94881f1cc2aa6ff50376fe6bba015e72765 /drivers/gpu
parentf2c9677be3158c31ba19f527e2be0f7a519e19d1 (diff)
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 <ben@bwidawsk.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 4f690374fffe..a9caf62b5dd2 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;