Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/drm2/radeon fix the previous. bus_space_ma...



details:   https://anonhg.NetBSD.org/src/rev/ee52f7012bc3
branches:  trunk
changeset: 336189:ee52f7012bc3
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Feb 16 12:17:57 2015 +0000

description:
fix the previous.  bus_space_map() returns *zero* on success.

diffstat:

 sys/external/bsd/drm2/radeon/radeon_pci.c |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (33 lines):

diff -r 70552f31e70d -r ee52f7012bc3 sys/external/bsd/drm2/radeon/radeon_pci.c
--- a/sys/external/bsd/drm2/radeon/radeon_pci.c Mon Feb 16 10:49:39 2015 +0000
+++ b/sys/external/bsd/drm2/radeon/radeon_pci.c Mon Feb 16 12:17:57 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: radeon_pci.c,v 1.5 2015/02/14 06:58:12 mrg Exp $       */
+/*     $NetBSD: radeon_pci.c,v 1.6 2015/02/16 12:17:57 mrg Exp $       */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeon_pci.c,v 1.5 2015/02/14 06:58:12 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeon_pci.c,v 1.6 2015/02/16 12:17:57 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "vga.h"
@@ -178,8 +178,12 @@
         * think they can.  This stops vga@isa or pcdisplay@isa
         * attaching, and stealing wsdisplay0.  Yuck.
         */
-       sc->sc_temp_set = bus_space_map(pa->pa_memt, 0xb0000, 0x10000, 0,
-                                       &sc->sc_temp_memh);
+       int rv = bus_space_map(pa->pa_memt, 0xb0000, 0x10000, 0,
+                              &sc->sc_temp_memh);
+       sc->sc_temp_set = rv == 0;
+       if (rv != 0)
+               aprint_error_dev(self, "unable to reserve VGA registers for "
+                                      "i386 radeondrmkms hack\n");
 #endif
 
        config_mountroot(self, &radeon_attach_real);



Home | Main Index | Thread Index | Old Index