Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci cap mappable framebuffer size at 64MB before div...



details:   https://anonhg.NetBSD.org/src/rev/92ac468e075d
branches:  trunk
changeset: 792700:92ac468e075d
user:      macallan <macallan%NetBSD.org@localhost>
date:      Tue Jan 14 09:46:42 2014 +0000

description:
cap mappable framebuffer size at 64MB before dividing it up for each output
now we can actually access the 2nd fb on boards with more than 64MB VRAM

diffstat:

 sys/dev/pci/radeonfb.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (40 lines):

diff -r fcfdc30686de -r 92ac468e075d sys/dev/pci/radeonfb.c
--- a/sys/dev/pci/radeonfb.c    Tue Jan 14 08:03:07 2014 +0000
+++ b/sys/dev/pci/radeonfb.c    Tue Jan 14 09:46:42 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: radeonfb.c,v 1.80 2014/01/14 01:35:13 macallan Exp $ */
+/*     $NetBSD: radeonfb.c,v 1.81 2014/01/14 09:46:42 macallan Exp $ */
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.80 2014/01/14 01:35:13 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.81 2014/01/14 09:46:42 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -627,6 +627,10 @@
 
        radeonfb_set_fbloc(sc);
 
+       /* 64 MB should be enough -- more just wastes map entries */
+       if (sc->sc_memsz > (64 << 20))
+               sc->sc_memsz = (64 << 20);
+
        for (i = 0; radeonfb_limits[i].size; i++) {
                if (sc->sc_memsz >= radeonfb_limits[i].size) {
                        sc->sc_maxx = radeonfb_limits[i].maxx;
@@ -748,10 +752,6 @@
                goto error;
        }
 
-       /* 64 MB should be enough -- more just wastes map entries */
-       if (sc->sc_memsz > (64 << 20))
-               sc->sc_memsz = (64 << 20);
-
        sc->sc_memt = pa->pa_memt;
        if (bus_space_map(sc->sc_memt, sc->sc_memaddr, sc->sc_memsz,
                BUS_SPACE_MAP_LINEAR, &sc->sc_memh) != 0) {



Home | Main Index | Thread Index | Old Index