Re: [Intel-gfx] [PATCH 2/2] drm/i915: Don't do MTRR setup if PAT is enabled

2012-03-18 Thread Daniel Vetter
On Wed, Mar 14, 2012 at 11:22:11AM -0400, Adam Jackson wrote:
> 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 

Queued both patches for -next (with a bz link added to the later one),
thanks.
-Daniel
-- 
Daniel Vetter
Mail: dan...@ffwll.ch
Mobile: +41 (0)79 365 57 48
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 2/2] drm/i915: Don't do MTRR setup if PAT is enabled

2012-03-14 Thread Adam Jackson
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 
---
 drivers/gpu/drm/i915/i915_dma.c |6 ++
 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 d52f4a5..cb648d8 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -43,6 +43,7 @@
 #include 
 #include 
 #include 
+#include 
 
 static void i915_write_hws_pga(struct drm_device *dev)
 {
@@ -1897,6 +1898,11 @@ static void
 i915_mtrr_setup(struct drm_i915_private *dev_priv, unsigned long base,
unsigned long size)
 {
+#if defined(CONFIG_X86_PAT)
+   if (cpu_has_pat)
+   return;
+#endif
+
/* Set up a WC MTRR for non-PAT systems.  This is more common than
 * one would think, because the kernel disables PAT on first
 * generation Core chips because WC PAT gets overridden by a UC
-- 
1.7.7.6

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx