Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev Map the video RAM cacheable/prefetchable, it's very ...



details:   https://anonhg.NetBSD.org/src/rev/875f61f8aed7
branches:  trunk
changeset: 967139:875f61f8aed7
user:      ad <ad%NetBSD.org@localhost>
date:      Sun Dec 01 14:18:51 2019 +0000

description:
Map the video RAM cacheable/prefetchable, it's very slow and this helps a bit.

diffstat:

 sys/dev/ic/vga.c        |   8 +++++---
 sys/dev/ic/vga_raster.c |  10 ++++++----
 sys/dev/isa/pcdisplay.c |   7 ++++---
 3 files changed, 15 insertions(+), 10 deletions(-)

diffs (88 lines):

diff -r 455c7315ca75 -r 875f61f8aed7 sys/dev/ic/vga.c
--- a/sys/dev/ic/vga.c  Sun Dec 01 14:04:52 2019 +0000
+++ b/sys/dev/ic/vga.c  Sun Dec 01 14:18:51 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vga.c,v 1.116 2019/11/10 21:16:35 chs Exp $ */
+/* $NetBSD: vga.c,v 1.117 2019/12/01 14:18:51 ad Exp $ */
 
 /*
  * Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vga.c,v 1.116 2019/11/10 21:16:35 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vga.c,v 1.117 2019/12/01 14:18:51 ad Exp $");
 
 #include "opt_vga.h"
 /* for WSCONS_SUPPORT_PCVTFONTS */
@@ -544,7 +544,9 @@
            &vh->vh_ioh_6845))
                panic("vga_init: couldn't map 6845 io");
 
-       if (bus_space_map(vh->vh_memt, 0xa0000, 0x20000, 0, &vh->vh_allmemh))
+       if (bus_space_map(vh->vh_memt, 0xa0000, 0x20000, 
+           BUS_SPACE_MAP_CACHEABLE | BUS_SPACE_MAP_PREFETCHABLE,
+           &vh->vh_allmemh))
                panic("vga_init: couldn't map memory");
 
        if (bus_space_subregion(vh->vh_memt, vh->vh_allmemh,
diff -r 455c7315ca75 -r 875f61f8aed7 sys/dev/ic/vga_raster.c
--- a/sys/dev/ic/vga_raster.c   Sun Dec 01 14:04:52 2019 +0000
+++ b/sys/dev/ic/vga_raster.c   Sun Dec 01 14:18:51 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vga_raster.c,v 1.45 2019/11/10 21:16:35 chs Exp $      */
+/*     $NetBSD: vga_raster.c,v 1.46 2019/12/01 14:18:51 ad Exp $       */
 
 /*
  * Copyright (c) 2001, 2002 Bang Jun-Young
@@ -56,7 +56,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vga_raster.c,v 1.45 2019/11/10 21:16:35 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vga_raster.c,v 1.46 2019/12/01 14:18:51 ad Exp $");
 
 #include "opt_vga.h"
 #include "opt_wsmsgattrs.h" /* for WSDISPLAY_CUSTOM_OUTPUT */
@@ -395,8 +395,10 @@
            &vh->vh_ioh_6845))
                panic("vga_raster_init: couldn't map 6845 io");
 
-       if (bus_space_map(vh->vh_memt, 0xa0000, 0x20000, 0, &vh->vh_allmemh))
-               panic("vga_raster_init: couldn't map memory");
+       if (bus_space_map(vh->vh_memt, 0xa0000, 0x20000,
+           BUS_SPACE_MAP_CACHEABLE | BUS_SPACE_MAP_PREFETCHABLE,
+           &vh->vh_allmemh))
+               panic("vga_init: couldn't map memory");
 
        if (bus_space_subregion(vh->vh_memt, vh->vh_allmemh, 0, 0x10000,
            &vh->vh_memh))
diff -r 455c7315ca75 -r 875f61f8aed7 sys/dev/isa/pcdisplay.c
--- a/sys/dev/isa/pcdisplay.c   Sun Dec 01 14:04:52 2019 +0000
+++ b/sys/dev/isa/pcdisplay.c   Sun Dec 01 14:18:51 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pcdisplay.c,v 1.43 2018/04/21 15:10:28 mlelstv Exp $ */
+/* $NetBSD: pcdisplay.c,v 1.44 2019/12/01 14:18:51 ad Exp $ */
 
 /*
  * Copyright (c) 1998
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcdisplay.c,v 1.43 2018/04/21 15:10:28 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcdisplay.c,v 1.44 2019/12/01 14:18:51 ad Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -190,7 +190,8 @@
        dc->mono = mono;
 
        if (bus_space_map(memt, mono ? 0xb0000 : 0xb8000, 0x8000,
-                         0, &ph->ph_memh))
+           BUS_SPACE_MAP_CACHEABLE | BUS_SPACE_MAP_PREFETCHABLE,
+           &ph->ph_memh))
                panic("pcdisplay_init: cannot map memory");
        if (bus_space_map(iot, mono ? 0x3b0 : 0x3d0, 0x10,
                          0, &ph->ph_ioh_6845))



Home | Main Index | Thread Index | Old Index