mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 15:49:42 -04:00
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>
This commit is contained in:
committed by
Daniel Vetter
parent
f2c9677be3
commit
23f54beafe
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user