Source-Changes-HG archive

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

[src/netbsd-8]: src/sys/external/bsd/drm2/pci Pull up following revision(s) (...



details:   https://anonhg.NetBSD.org/src/rev/6fbf5df083bd
branches:  netbsd-8
changeset: 447652:6fbf5df083bd
user:      martin <martin%NetBSD.org@localhost>
date:      Sun Jan 20 15:35:03 2019 +0000

description:
Pull up following revision(s) (requested by dholland in ticket #1165):

        sys/external/bsd/drm2/pci/drm_pci.c: revision 1.32

Don't try to interpret the second half of a 64-bit BAR as another one.
>From msaitoh@.

diffstat:

 sys/external/bsd/drm2/pci/drm_pci.c |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (33 lines):

diff -r 34fec5106251 -r 6fbf5df083bd sys/external/bsd/drm2/pci/drm_pci.c
--- a/sys/external/bsd/drm2/pci/drm_pci.c       Thu Jan 17 17:25:53 2019 +0000
+++ b/sys/external/bsd/drm2/pci/drm_pci.c       Sun Jan 20 15:35:03 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_pci.c,v 1.17.2.1 2017/08/01 23:12:06 snj Exp $     */
+/*     $NetBSD: drm_pci.c,v 1.17.2.2 2019/01/20 15:35:03 martin Exp $  */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_pci.c,v 1.17.2.1 2017/08/01 23:12:06 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_pci.c,v 1.17.2.2 2019/01/20 15:35:03 martin Exp $");
 
 #include <sys/types.h>
 #include <sys/errno.h>
@@ -145,6 +145,14 @@
                        continue;
                }
 
+               /*
+                * If it's a 64-bit mapping, don't interpret the second
+                * half of it as another BAR in the next iteration of
+                * the loop -- move on to the next unit.
+                */
+               if (PCI_MAPREG_MEM_TYPE(type) == PCI_MAPREG_MEM_TYPE_64BIT)
+                       unit++;
+
                /* Inquire about it.  We'll map it in drm_core_ioremap.  */
                if (pci_mapreg_info(pa->pa_pc, pa->pa_tag, reg, type,
                        &bm->bm_base, &bm->bm_size, &bm->bm_flags) != 0) {



Home | Main Index | Thread Index | Old Index