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 Disable the use of WC memo...
details: https://anonhg.NetBSD.org/src/rev/6381627c69dd
branches: trunk
changeset: 968530:6381627c69dd
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sun Jan 19 12:03:27 2020 +0000
description:
Disable the use of WC memory on Arm and Arm64. From Linux:
* The DRM driver stack is designed to work with cache coherent devices
* only, but permits an optimization to be enabled in some cases, where
* for some buffers, both the CPU and the GPU use uncached mappings,
* removing the need for DMA snooping and allocation in the CPU caches.
*
* The use of uncached GPU mappings relies on the correct implementation
* of the PCIe NoSnoop TLP attribute by the platform, otherwise the GPU
* will use cached mappings nonetheless. On x86 platforms, this does not
* seem to matter, as uncached CPU mappings will snoop the caches in any
* case. However, on ARM and arm64, enabling this optimization on a
* platform where NoSnoop is ignored results in loss of coherency, which
* breaks correct operation of the device. Since we have no way of
* detecting whether NoSnoop works or not, just disable this
* optimization entirely for ARM and arm64.
diffstat:
sys/external/bsd/drm2/dist/include/drm/drm_cache.h | 4 +++-
sys/external/bsd/drm2/include/drm/drm_os_netbsd.h | 10 +++++++++-
2 files changed, 12 insertions(+), 2 deletions(-)
diffs (42 lines):
diff -r 7da3f31a2cd3 -r 6381627c69dd sys/external/bsd/drm2/dist/include/drm/drm_cache.h
--- a/sys/external/bsd/drm2/dist/include/drm/drm_cache.h Sun Jan 19 11:29:42 2020 +0000
+++ b/sys/external/bsd/drm2/dist/include/drm/drm_cache.h Sun Jan 19 12:03:27 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_cache.h,v 1.2 2018/08/27 04:58:37 riastradh Exp $ */
+/* $NetBSD: drm_cache.h,v 1.3 2020/01/19 12:03:27 jmcneill Exp $ */
/**************************************************************************
*
@@ -43,6 +43,8 @@
return false;
#elif defined(CONFIG_MIPS) && defined(CONFIG_CPU_LOONGSON3)
return false;
+#elif defined(CONFIG_ARM) || defined(CONFIG_ARM64)
+ return false;
#else
return true;
#endif
diff -r 7da3f31a2cd3 -r 6381627c69dd sys/external/bsd/drm2/include/drm/drm_os_netbsd.h
--- a/sys/external/bsd/drm2/include/drm/drm_os_netbsd.h Sun Jan 19 11:29:42 2020 +0000
+++ b/sys/external/bsd/drm2/include/drm/drm_os_netbsd.h Sun Jan 19 12:03:27 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_os_netbsd.h,v 1.15 2019/11/05 23:29:28 jmcneill Exp $ */
+/* $NetBSD: drm_os_netbsd.h,v 1.16 2020/01/19 12:03:27 jmcneill Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -41,6 +41,14 @@
#define CONFIG_X86_PAT 1
#endif
+#if defined(__arm__)
+#define CONFIG_ARM 1
+#endif
+
+#if defined(__aarch64__)
+#define CONFIG_ARM64 1
+#endif
+
/*
* Nothing meaningfully depends on this; defining this avoids patching
* away some conditionalization in drmP.h.
Home |
Main Index |
Thread Index |
Old Index