[PATCH] Use MTRRs by default for vesafb on x86-64

Andi Kleen
2003-05-15T14:45:15Z

x86-64 cannot call the 32bit VESA BIOS. This means when vesafb is active
it does software copying in the vesa frame buffer. This is insanely slow
when the frame buffer is not marked for write combining.

Some discussion showed that the use_mtrr flag was only off for some
old broken ET4000 ISA card. x86-64 has no ISA, so this is no concern.
Make the default depend on CONFIG_ISA.

Patch for 2.5.69. Originally suggested by Gerd Knorr.

-Andi

--- linux/drivers/video/vesafb.c 2003-05-08 04:52:58.000000000 +0200
+++ linux-2.5.69-amd64/drivers/video/vesafb.c 2003-05-15 16:55:51.000000000 +0200
@@ -51,7 +51,11 @@
static u32 pseudo_palette[17];

static int inverse = 0;
+#ifndef CONFIG_ISA
+static int mtrr = 1;
+#else
static int mtrr = 0;
+#endif

static int pmi_setpal = 0; /* pmi for palette changes ??? */
static int ypan = 0; /* 0..nothing, 1..ypan, 2..ywrap */