All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
To: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org,
	Alexey Brodkin <Alexey.Brodkin@synopsys.com>,
	linux-snps-arc@lists.infradead.org
Subject: [PATCH 4/5 v4] arc: Add our own implementation of fb_pgprotect()
Date: Thu, 24 Mar 2016 19:48:35 +0300	[thread overview]
Message-ID: <1458838116-24954-5-git-send-email-abrodkin@synopsys.com> (raw)
In-Reply-To: <1458838116-24954-1-git-send-email-abrodkin@synopsys.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: Alexey.Brodkin@synopsys.com (Alexey Brodkin)
To: linux-snps-arc@lists.infradead.org
Subject: [PATCH 4/5 v4] arc: Add our own implementation of fb_pgprotect()
Date: Thu, 24 Mar 2016 19:48:35 +0300	[thread overview]
Message-ID: <1458838116-24954-5-git-send-email-abrodkin@synopsys.com> (raw)
In-Reply-To: <1458838116-24954-1-git-send-email-abrodkin@synopsys.com>

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 at synopsys.com>
Cc: linux-snps-arc at 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

  parent reply	other threads:[~2016-03-24 16:49 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-24 16:48 [PATCH 0/5 v4] drm: Add support of ARC PGU display controller Alexey Brodkin
2016-03-24 16:48 ` Alexey Brodkin
2016-03-24 16:48 ` Alexey Brodkin
2016-03-24 16:48 ` [PATCH 1/5 " Alexey Brodkin
2016-03-24 16:48   ` Alexey Brodkin
2016-03-24 16:48   ` Alexey Brodkin
2016-03-24 17:37   ` kbuild test robot
2016-03-24 17:37     ` kbuild test robot
2016-03-24 17:37     ` kbuild test robot
2016-03-24 21:12     ` Alexey Brodkin
2016-03-24 21:12       ` Alexey Brodkin
2016-03-24 21:12       ` Alexey Brodkin
2016-03-24 16:48 ` [PATCH 2/5 v4] drm: Add DT bindings documentation for " Alexey Brodkin
2016-03-24 16:48   ` Alexey Brodkin
2016-03-24 16:48   ` Alexey Brodkin
2016-03-25 14:39   ` Rob Herring
2016-03-25 14:39     ` Rob Herring
2016-03-25 14:39     ` Rob Herring
2016-03-24 16:48 ` [PATCH 3/5 v4] MAINTAINERS: Add maintainer " Alexey Brodkin
2016-03-24 16:48   ` Alexey Brodkin
2016-03-24 16:48   ` Alexey Brodkin
2016-03-24 16:48 ` Alexey Brodkin [this message]
2016-03-24 16:48   ` [PATCH 4/5 v4] arc: Add our own implementation of fb_pgprotect() Alexey Brodkin
2016-03-24 16:48 ` [PATCH 5/5 v4] arc: axs10x - add support of ARC PGU Alexey Brodkin
2016-03-24 16:48   ` Alexey Brodkin
2016-03-24 16:48   ` Alexey Brodkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1458838116-24954-5-git-send-email-abrodkin@synopsys.com \
    --to=alexey.brodkin@synopsys.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-snps-arc@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.