Commit 23f54bea authored by Chris Wilson's avatar Chris Wilson Committed by Daniel Vetter

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: default avatarBen Widawsky <ben@bwidawsk.net>
Reviewed-by: default avatarAdam Jackson <ajax@redhat.com>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent f2c9677b
...@@ -1923,6 +1923,8 @@ static void ...@@ -1923,6 +1923,8 @@ static void
i915_mtrr_setup(struct drm_i915_private *dev_priv, unsigned long base, i915_mtrr_setup(struct drm_i915_private *dev_priv, unsigned long base,
unsigned long size) unsigned long size)
{ {
dev_priv->mm.gtt_mtrr = -1;
#if defined(CONFIG_X86_PAT) #if defined(CONFIG_X86_PAT)
if (cpu_has_pat) if (cpu_has_pat)
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment