提交 9e984bc1 编写于 作者: A Adam Jackson 提交者: Daniel Vetter

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: NAdam Jackson <ajax@redhat.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41648Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 e2b665c4
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/module.h> #include <linux/module.h>
#include <acpi/video.h> #include <acpi/video.h>
#include <asm/pat.h>
static void i915_write_hws_pga(struct drm_device *dev) static void i915_write_hws_pga(struct drm_device *dev)
{ {
...@@ -1918,6 +1919,11 @@ static void ...@@ -1918,6 +1919,11 @@ 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)
{ {
#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 /* Set up a WC MTRR for non-PAT systems. This is more common than
* one would think, because the kernel disables PAT on first * one would think, because the kernel disables PAT on first
* generation Core chips because WC PAT gets overridden by a UC * generation Core chips because WC PAT gets overridden by a UC
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册