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 drm: Teach bus_dma_hacks.h...
details: https://anonhg.NetBSD.org/src/rev/5567784810f8
branches: trunk
changeset: 368573:5567784810f8
user: riastradh <riastradh%NetBSD.org@localhost>
date: Tue Jul 19 23:19:44 2022 +0000
description:
drm: Teach bus_dma_hacks.h about alpha.
Not sure if this is correct! Someone who knows alpha should vet.
diffstat:
sys/external/bsd/drm2/include/drm/bus_dma_hacks.h | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diffs (30 lines):
diff -r 3743bcc676dc -r 5567784810f8 sys/external/bsd/drm2/include/drm/bus_dma_hacks.h
--- a/sys/external/bsd/drm2/include/drm/bus_dma_hacks.h Tue Jul 19 23:19:35 2022 +0000
+++ b/sys/external/bsd/drm2/include/drm/bus_dma_hacks.h Tue Jul 19 23:19:44 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_dma_hacks.h,v 1.24 2021/12/19 12:03:21 riastradh Exp $ */
+/* $NetBSD: bus_dma_hacks.h,v 1.25 2022/07/19 23:19:44 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -85,6 +85,11 @@
# define PHYS_TO_BUS_MEM(dmat, paddr) ((bus_addr_t)(paddr))
# define BUS_MEM_TO_PHYS(dmat, baddr) ((paddr_t)(baddr))
#elif defined(__powerpc__)
+#elif defined(__alpha__)
+# define PHYS_TO_BUS_MEM(dmat, paddr) \
+ ((bus_addr_t)(paddr) | (dmat)->_wbase)
+# define BUS_MEM_TO_PHYS(dmat, baddr) \
+ ((paddr_t)((baddr) & ~(bus_addr_t)(dmat)->_wbase))
#else
# error DRM GEM/TTM need new MI bus_dma APIs! Halp!
#endif
@@ -117,6 +122,8 @@
return dmat->_bounce_thresh && pa >= dmat->_bounce_thresh;
#elif defined(__sparc__) || defined(__sparc64__)
return false; /* no bounce buffers ever */
+#elif defined(__alpha__)
+ return (dmat->_wsize == 0 ? false : pa >= dmat->_wsize);
#endif
}
Home |
Main Index |
Thread Index |
Old Index