diff options
author | Huacai Chen <chenhuacai@loongson.cn> | 2022-05-31 12:04:10 +0200 |
---|---|---|
committer | Huacai Chen <chenhuacai@loongson.cn> | 2022-06-03 14:09:27 +0200 |
commit | 439057ec3b748b1ff61855d09859f369493e22d8 (patch) | |
tree | 488f331128a8ba653855b4434dcf1825b12804bb /include | |
parent | LoongArch: Add ELF-related definitions (diff) | |
download | linux-439057ec3b748b1ff61855d09859f369493e22d8.tar.xz linux-439057ec3b748b1ff61855d09859f369493e22d8.zip |
LoongArch: Add writecombine support for drm
LoongArch maintains cache coherency in hardware, but its WUC attribute
(Weak-ordered UnCached, which is similar to WC) is out of the scope of
cache coherency machanism. This means WUC can only used for write-only
memory regions.
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: WANG Xuerui <git@xen0n.name>
Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'include')
-rw-r--r-- | include/drm/drm_cache.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/drm/drm_cache.h b/include/drm/drm_cache.h index 22deb216b59c..08e0e3ffad13 100644 --- a/include/drm/drm_cache.h +++ b/include/drm/drm_cache.h @@ -67,6 +67,14 @@ static inline bool drm_arch_can_wc_memory(void) * optimization entirely for ARM and arm64. */ return false; +#elif defined(CONFIG_LOONGARCH) + /* + * LoongArch maintains cache coherency in hardware, but its WUC attribute + * (Weak-ordered UnCached, which is similar to WC) is out of the scope of + * cache coherency machanism. This means WUC can only used for write-only + * memory regions. + */ + return false; #else return true; #endif |