Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[xsrc/trunk]: xsrc/external/mit/xf86-video-nv/dist/src add powerpc-specific b...
details: https://anonhg.NetBSD.org/xsrc/rev/48fb8c6c6603
branches: trunk
changeset: 9974:48fb8c6c6603
user: macallan <macallan%NetBSD.org@localhost>
date: Thu Jul 12 21:16:33 2018 +0000
description:
add powerpc-specific barrier instructions, use them a bit more
now this mostly works on G5
diffstat:
external/mit/xf86-video-nv/dist/src/nv_local.h | 21 +++++++++++++--------
1 files changed, 13 insertions(+), 8 deletions(-)
diffs (43 lines):
diff -r 668f94eaf905 -r 48fb8c6c6603 external/mit/xf86-video-nv/dist/src/nv_local.h
--- a/external/mit/xf86-video-nv/dist/src/nv_local.h Tue Jun 05 22:07:47 2018 +0000
+++ b/external/mit/xf86-video-nv/dist/src/nv_local.h Thu Jul 12 21:16:33 2018 +0000
@@ -54,8 +54,17 @@
#define VGA_WR08(p,i,d) NV_WR08(p,i,d)
#define VGA_RD08(p,i) NV_RD08(p,i)
-#define NVDmaNext(pNv, data) \
- (pNv)->dmaBase[(pNv)->dmaCurrent++] = (data)
+#if defined(__i386__)
+#define _NV_FENCE() outb(0x3D0, 0);
+#elif defined(__powerpc__)
+#define _NV_FENCE() __asm("eieio; sync;");
+#else
+#define _NV_FENCE() mem_barrier();
+#endif
+
+#define NVDmaNext(pNv, data) { \
+ (pNv)->dmaBase[(pNv)->dmaCurrent++] = (data); \
+ _NV_FENCE() }
#define NVDmaStart(pNv, tag, size) { \
if((pNv)->dmaFree <= (size)) \
@@ -64,17 +73,13 @@
(pNv)->dmaFree -= ((size) + 1); \
}
-#if defined(__i386__)
-#define _NV_FENCE() outb(0x3D0, 0);
-#else
-#define _NV_FENCE() mem_barrier();
-#endif
-
#define WRITE_PUT(pNv, data) { \
volatile CARD8 scratch; \
_NV_FENCE() \
scratch = (pNv)->FbStart[0]; \
+ _NV_FENCE() \
(pNv)->FIFO[0x0010] = (data) << 2; \
+ _NV_FENCE() \
mem_barrier(); \
}
Home |
Main Index |
Thread Index |
Old Index