aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2012-03-14 11:22:11 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-03-18 13:48:10 -0400
commit9e984bc1dffd405138ff22356188b6a1677c64c8 (patch)
tree0c331dcac92c8f6bc21744b849ea83faf6bfd35d
parente2b665c48099d9c2229a187467761da4882eb066 (diff)
drm/i915: Don't do MTRR setup if PAT is enabled
Some newer BIOSes are shipping with all MTRRs already populated. These BIOSes are all on machines with sufficiently new CPUs that the referenced errata doesn't apply anyway, so just don't try to claim the MTRR. Signed-off-by: Adam Jackson <ajax@redhat.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41648 Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index fa5c276b7992..ee7775c55450 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -43,6 +43,7 @@
43#include <linux/slab.h> 43#include <linux/slab.h>
44#include <linux/module.h> 44#include <linux/module.h>
45#include <acpi/video.h> 45#include <acpi/video.h>
46#include <asm/pat.h>
46 47
47static void i915_write_hws_pga(struct drm_device *dev) 48static void i915_write_hws_pga(struct drm_device *dev)
48{ 49{
@@ -1918,6 +1919,11 @@ static void
1918i915_mtrr_setup(struct drm_i915_private *dev_priv, unsigned long base, 1919i915_mtrr_setup(struct drm_i915_private *dev_priv, unsigned long base,
1919 unsigned long size) 1920 unsigned long size)
1920{ 1921{
1922#if defined(CONFIG_X86_PAT)
1923 if (cpu_has_pat)
1924 return;
1925#endif
1926
1921 /* Set up a WC MTRR for non-PAT systems. This is more common than 1927 /* Set up a WC MTRR for non-PAT systems. This is more common than
1922 * one would think, because the kernel disables PAT on first 1928 * one would think, because the kernel disables PAT on first
1923 * generation Core chips because WC PAT gets overridden by a UC 1929 * generation Core chips because WC PAT gets overridden by a UC