Skip to content

Commit

Permalink
drm/i915: Initialise GTT MTRR to -1
Browse files Browse the repository at this point in the history
Fixes a regression from 9e984bc (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>
  • Loading branch information
Chris Wilson authored and Daniel Vetter committed Mar 28, 2012
1 parent f2c9677 commit 23f54be
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/i915/i915_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 23f54be

Please sign in to comment.