drm/i915: Initialise GTT MTRR to -1
authorChris Wilson <[email protected]>
Fri, 23 Mar 2012 17:38:49 +0000 (17:38 +0000)
committerDaniel Vetter <[email protected]>
Wed, 28 Mar 2012 20:07:57 +0000 (22:07 +0200)
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 <[email protected]>
Reviewed-by: Adam Jackson <[email protected]>
Signed-off-by: Chris Wilson <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
drivers/gpu/drm/i915/i915_dma.c

index 4f690374fffe46b1ddc4d60583b61a7ee745ec02..a9caf62b5dd23a31cbd1f45c378f2731af816d82 100644 (file)
@@ -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;