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/pci Use the 64-bit PCI DMA ta...



details:   https://anonhg.NetBSD.org/src/rev/9abab72e2664
branches:  riastradh-drm2
changeset: 788555:9abab72e2664
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Sep 08 16:15:17 2013 +0000

description:
Use the 64-bit PCI DMA tag if available.

Otherwise, it can't handle >32-bit physical addresses, which
uvm_obj_wirepages seems to have a tendency to return.

diffstat:

 sys/external/bsd/drm2/pci/drm_pci.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 01f2799715c6 -r 9abab72e2664 sys/external/bsd/drm2/pci/drm_pci.c
--- a/sys/external/bsd/drm2/pci/drm_pci.c       Sun Sep 08 16:13:55 2013 +0000
+++ b/sys/external/bsd/drm2/pci/drm_pci.c       Sun Sep 08 16:15:17 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_pci.c,v 1.1.2.9 2013/09/08 15:46:22 riastradh Exp $        */
+/*     $NetBSD: drm_pci.c,v 1.1.2.10 2013/09/08 16:15:17 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.9 2013/09/08 15:46:22 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_pci.c,v 1.1.2.10 2013/09/08 16:15:17 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/errno.h>
@@ -105,7 +105,8 @@
        /* XXX Set the power state to D0?  */
 
        dev->bst = pa->pa_memt;
-       dev->bus_dmat = pa->pa_dmat; /* XXX dmat64?  */
+       /* XXX Let the driver say something about 32-bit vs 64-bit DMA?  */
+       dev->bus_dmat = (pci_dma64_available(pa)? pa->pa_dmat64 : pa->pa_dmat);
        dev->dmat = dev->bus_dmat;
        dev->dmat_subregion_p = false;
 



Home | Main Index | Thread Index | Old Index