summaryrefslogtreecommitdiff
path: root/arch/loongarch/include/asm/fb.h
diff options
context:
space:
mode:
authorHuacai Chen <chenhuacai@loongson.cn>2022-05-31 18:04:11 +0800
committerHuacai Chen <chenhuacai@loongson.cn>2022-06-03 20:09:28 +0800
commit7153c3cbb5b9b99755659b97861fd4fc909ed86f (patch)
tree307ba0baa2827ac8426e032cab988e29eb6d55cd /arch/loongarch/include/asm/fb.h
parentfcdfe9d22bed08409968a751e93112f742208be6 (diff)
downloadlwn-7153c3cbb5b9b99755659b97861fd4fc909ed86f.tar.gz
lwn-7153c3cbb5b9b99755659b97861fd4fc909ed86f.zip
LoongArch: Add misc common routines
Add some misc common routines for LoongArch, including: asm-offsets routines, futex functions, i/o memory access functions, frame-buffer functions, procfs information display, etc. 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 'arch/loongarch/include/asm/fb.h')
-rw-r--r--arch/loongarch/include/asm/fb.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/loongarch/include/asm/fb.h b/arch/loongarch/include/asm/fb.h
new file mode 100644
index 000000000000..3116bde8772d
--- /dev/null
+++ b/arch/loongarch/include/asm/fb.h
@@ -0,0 +1,23 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
+ */
+#ifndef _ASM_FB_H_
+#define _ASM_FB_H_
+
+#include <linux/fb.h>
+#include <linux/fs.h>
+#include <asm/page.h>
+
+static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
+ unsigned long off)
+{
+ vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
+}
+
+static inline int fb_is_primary_device(struct fb_info *info)
+{
+ return 0;
+}
+
+#endif /* _ASM_FB_H_ */