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/include/drm Arm DMA tags with _nranges...
details: https://anonhg.NetBSD.org/src/rev/0d86473c0f78
branches: trunk
changeset: 460838:0d86473c0f78
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Tue Nov 05 23:27:23 2019 +0000
description:
Arm DMA tags with _nranges=0 require no address translation. Handle this
in PHYS_TO_BUS_MEM and BUS_TO_PHYS_MEM instead of panicing.
diffstat:
sys/external/bsd/drm2/include/drm/bus_dma_hacks.h | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diffs (29 lines):
diff -r 3e098305e084 -r 0d86473c0f78 sys/external/bsd/drm2/include/drm/bus_dma_hacks.h
--- a/sys/external/bsd/drm2/include/drm/bus_dma_hacks.h Tue Nov 05 22:22:42 2019 +0000
+++ b/sys/external/bsd/drm2/include/drm/bus_dma_hacks.h Tue Nov 05 23:27:23 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_dma_hacks.h,v 1.17 2018/08/27 15:32:39 riastradh Exp $ */
+/* $NetBSD: bus_dma_hacks.h,v 1.18 2019/11/05 23:27:23 jmcneill Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -51,6 +51,9 @@
{
unsigned i;
+ if (dmat->_nranges == 0)
+ return (bus_addr_t)pa;
+
for (i = 0; i < dmat->_nranges; i++) {
const struct arm32_dma_range *dr = &dmat->_ranges[i];
@@ -64,6 +67,9 @@
{
unsigned i;
+ if (dmat->_nranges == 0)
+ return (paddr_t)ba;
+
for (i = 0; i < dmat->_nranges; i++) {
const struct arm32_dma_range *dr = &dmat->_ranges[i];
Home |
Main Index |
Thread Index |
Old Index