Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1364333
| From | Alexey Brodkin <Alexey.Brodkin@synopsys.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4/5 v4] arc: Add our own implementation of fb_pgprotect() |
| Date | 2016-03-24 17:50 +0100 |
| Message-ID | <rggCm-5mT-11@gated-at.bofh.it> (permalink) |
| References | <rggCm-5mT-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
During mmaping of frame-buffer pages to user-space
fb_protect() is called to set proper page settings.
In case of ARC we need to mark pages that are mmaped to
user as uncached because of 2 reasons:
* Huge amount of data if passing through data cache will
thrash cache a lot making cache almost useless for other
less traffic hungry processes.
* Data written by user in FB will be immediately available for
hardware (such as PGU etc) without requirements to flush data
cache regularly.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: linux-snps-arc@lists.infradead.org
---
Changes v3 -> v4:
* This change was introduced only in v4.
arch/arc/include/asm/fb.h | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
create mode 100644 arch/arc/include/asm/fb.h
diff --git a/arch/arc/include/asm/fb.h b/arch/arc/include/asm/fb.h
new file mode 100644
index 0000000..bd3f68c
--- /dev/null
+++ b/arch/arc/include/asm/fb.h
@@ -0,0 +1,19 @@
+#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_noncached(vma->vm_page_prot);
+}
+
+static inline int fb_is_primary_device(struct fb_info *info)
+{
+ return 0;
+}
+
+#endif /* _ASM_FB_H_ */
--
2.5.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/5 v4] drm: Add support of ARC PGU display controller Alexey Brodkin <Alexey.Brodkin@synopsys.com> - 2016-03-24 17:50 +0100
[PATCH 3/5 v4] MAINTAINERS: Add maintainer for ARC PGU display controller Alexey Brodkin <Alexey.Brodkin@synopsys.com> - 2016-03-24 17:50 +0100
[PATCH 4/5 v4] arc: Add our own implementation of fb_pgprotect() Alexey Brodkin <Alexey.Brodkin@synopsys.com> - 2016-03-24 17:50 +0100
[PATCH 5/5 v4] arc: axs10x - add support of ARC PGU Alexey Brodkin <Alexey.Brodkin@synopsys.com> - 2016-03-24 17:50 +0100
[PATCH 2/5 v4] drm: Add DT bindings documentation for ARC PGU display controller Alexey Brodkin <Alexey.Brodkin@synopsys.com> - 2016-03-24 17:50 +0100
Re: [PATCH 2/5 v4] drm: Add DT bindings documentation for ARC PGU display controller Rob Herring <robh@kernel.org> - 2016-03-25 15:50 +0100
[PATCH 1/5 v4] drm: Add support of ARC PGU display controller Alexey Brodkin <Alexey.Brodkin@synopsys.com> - 2016-03-24 17:50 +0100
csiph-web