changeset 4482:9c6ab57cfdde

using MTRR
author nick
date Sat, 02 Feb 2002 18:28:55 +0000
parents b8ec9cc1b2c5
children fb4b914eab8a
files vidix/drivers/mga_vid.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/vidix/drivers/mga_vid.c	Sat Feb 02 18:18:58 2002 +0000
+++ b/vidix/drivers/mga_vid.c	Sat Feb 02 18:28:55 2002 +0000
@@ -1246,7 +1246,7 @@
 int vixInit(void)
 {
     unsigned int card_option = 0;
-
+    int err;
     printf("[mga] init\n");
 
     mga_vid_in_use = 0;
@@ -1341,7 +1341,8 @@
 
     printf("[mga] MMIO at %p, IRQ: %d, framebuffer: %p\n",
         mga_mmio_base, mga_irq, mga_mem_base);
-
+    err = mtrr_set_type(pci_info.base0,mga_ram_size*1024*1024,MTRR_TYPE_WRCOMB);
+    if(!err) printf("[mga] Set write-combining type of video memory\n");
 #ifdef MGA_ALLOW_IRQ
     if (mga_irq != -1)
     {