Module Name: src Committed By: jmcneill Date: Thu Feb 10 10:21:40 UTC 2011
Modified Files: src/sys/arch/x86/x86: genfb_machdep.c Log Message: Unfortunately the current MTRR code can't grow an existing WC mapping, and since we don't know the total framebuffer size setting up an MTRR here would prevent X from creating a larger one later. Instead map the framebuffer with BUS_SPACE_MAP_PREFETCHABLE and hope that PAT is supported. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/x86/x86/genfb_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/x86/x86/genfb_machdep.c diff -u src/sys/arch/x86/x86/genfb_machdep.c:1.7 src/sys/arch/x86/x86/genfb_machdep.c:1.8 --- src/sys/arch/x86/x86/genfb_machdep.c:1.7 Wed Feb 9 13:24:24 2011 +++ src/sys/arch/x86/x86/genfb_machdep.c Thu Feb 10 10:21:40 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: genfb_machdep.c,v 1.7 2011/02/09 13:24:24 jmcneill Exp $ */ +/* $NetBSD: genfb_machdep.c,v 1.8 2011/02/10 10:21:40 jmcneill Exp $ */ /*- * Copyright (c) 2009 Jared D. McNeill <jmcne...@invisible.ca> @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: genfb_machdep.c,v 1.7 2011/02/09 13:24:24 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: genfb_machdep.c,v 1.8 2011/02/10 10:21:40 jmcneill Exp $"); #include "opt_mtrr.h" @@ -100,6 +100,7 @@ void x86_genfb_mtrr_init(uint64_t physaddr, uint32_t size) { +#if notyet #ifdef MTRR struct mtrr mtrr; int error, n; @@ -129,6 +130,7 @@ #else aprint_debug("%s: kernel lacks MTRR option\n", __func__); #endif +#endif } int @@ -158,7 +160,7 @@ err = _x86_memio_map(t, (bus_addr_t)fbinfo->physaddr, fbinfo->width * fbinfo->stride, - BUS_SPACE_MAP_LINEAR, &h); + BUS_SPACE_MAP_LINEAR | BUS_SPACE_MAP_PREFETCHABLE, &h); if (err) { aprint_error("x86_genfb_cnattach: couldn't map framebuffer\n"); return 0;