patch-2.3.50 linux/drivers/video/vesafb.c
Next file: linux/drivers/video/vgacon.c
Previous file: linux/drivers/video/riva/fbdev.c
Back to the patch index
Back to the overall index
-  Lines: 15
-  Date:
Sat Mar  4 20:03:50 2000
-  Orig file: 
v2.3.49/linux/drivers/video/vesafb.c
-  Orig date: 
Thu Mar  2 14:36:23 2000
diff -u --recursive --new-file v2.3.49/linux/drivers/video/vesafb.c linux/drivers/video/vesafb.c
@@ -648,8 +648,12 @@
 	 * region already (FIXME) */
 	request_region(0x3c0, 32, "vesafb");
 
-	if (mtrr)
-		mtrr_add(video_base, video_size, MTRR_TYPE_WRCOMB, 1);
+	if (mtrr) {
+		int temp_size = video_size;
+		while (mtrr_add(video_base, temp_size, MTRR_TYPE_WRCOMB, 1)==-EINVAL) {
+			temp_size >>= 1;
+		}
+	}
 	
 	strcpy(fb_info.modename, "VESA VGA");
 	fb_info.changevar = NULL;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)