Source-Changes-HG archive

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

[src/riastradh-drm2]: src/sys/external/bsd/drm2 Use PCI_BAR(m), not PCI_MAPRE...



details:   https://anonhg.NetBSD.org/src/rev/b0ca2ed01af7
branches:  riastradh-drm2
changeset: 788502:b0ca2ed01af7
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Jul 24 04:05:34 2013 +0000

description:
Use PCI_BAR(m), not PCI_MAPREG_START + m, which is wrong.

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/i915_dma.c |  2 +-
 sys/external/bsd/drm2/pci/drm_pci.c            |  6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diffs (39 lines):

diff -r 555136ec2065 -r b0ca2ed01af7 sys/external/bsd/drm2/dist/drm/i915/i915_dma.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c    Wed Jul 24 04:05:18 2013 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c    Wed Jul 24 04:05:34 2013 +0000
@@ -1619,7 +1619,7 @@
                bus_size_t size;
 
                if (pci_mapreg_info(dev->pdev->pd_pa.pa_pc,
-                       dev->pdev->pd_pa.pa_tag, (PCI_MAPREG_START + mmio_bar),
+                       dev->pdev->pd_pa.pa_tag, PCI_BAR(mmio_bar),
                        PCI_MAPREG_TYPE_MEM,
                        &addr, &size, NULL /* XXX flags? */)) {
                        ret = -EIO;         /* XXX */
diff -r 555136ec2065 -r b0ca2ed01af7 sys/external/bsd/drm2/pci/drm_pci.c
--- a/sys/external/bsd/drm2/pci/drm_pci.c       Wed Jul 24 04:05:18 2013 +0000
+++ b/sys/external/bsd/drm2/pci/drm_pci.c       Wed Jul 24 04:05:34 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_pci.c,v 1.1.2.7 2013/07/24 03:58:51 riastradh Exp $        */
+/*     $NetBSD: drm_pci.c,v 1.1.2.8 2013/07/24 04:05:34 riastradh 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.1.2.7 2013/07/24 03:58:51 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_pci.c,v 1.1.2.8 2013/07/24 04:05:34 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/errno.h>
@@ -114,7 +114,7 @@
            KM_SLEEP);
        for (unit = 0; unit < dev->bus_nmaps; unit++) {
                struct drm_bus_map *const bm = &dev->bus_maps[unit];
-               const int reg = (PCI_MAPREG_START + (unit*4));
+               const int reg = PCI_BAR(unit);
                const pcireg_t type =
                    pci_mapreg_type(pa->pa_pc, pa->pa_tag, reg);
 



Home | Main Index | Thread Index | Old Index