All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fbdev: Add support for AVR32
@ 2007-05-07 15:20 Haavard Skinnemoen
  2007-05-07 20:47 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Haavard Skinnemoen @ 2007-05-07 15:20 UTC (permalink / raw)
  To: linux-fbdev-devel; +Cc: Linux Kernel list, akpm, Haavard Skinnemoen

Provide framebuffer page protection flags and definitions of
fb_readl/fb_writel for AVR32.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
---
Please let me know if you want me to push this myself through the
AVR32 tree.

 drivers/video/fbmem.c |    4 ++++
 include/linux/fb.h    |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 2822526..babf8a9 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -1198,6 +1198,10 @@ fb_mmap(struct file *file, struct vm_area_struct * vma)
 	pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE;
 #elif defined(__arm__) || defined(__sh__) || defined(__m32r__)
 	vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
+#elif defined(__avr32__)
+	vma->vm_page_prot = __pgprot((pgprot_val(vma->vm_page_prot)
+				      & ~_PAGE_CACHABLE)
+				     | (_PAGE_BUFFER | _PAGE_DIRTY));
 #elif defined(__ia64__)
 	if (efi_range_is_wc(vma->vm_start, vma->vm_end - vma->vm_start))
 		vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
diff --git a/include/linux/fb.h b/include/linux/fb.h
index be913ec..deb2365 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -833,7 +833,7 @@ struct fb_info {
 #define fb_writeq sbus_writeq
 #define fb_memset sbus_memset_io
 
-#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || (defined(__sh__) && !defined(__SH5__)) || defined(__powerpc__)
+#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || (defined(__sh__) && !defined(__SH5__)) || defined(__powerpc__) || defined(__avr32__)
 
 #define fb_readb __raw_readb
 #define fb_readw __raw_readw
-- 
1.4.4.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] fbdev: Add support for AVR32
  2007-05-07 15:20 [PATCH] fbdev: Add support for AVR32 Haavard Skinnemoen
@ 2007-05-07 20:47 ` David Miller
  2007-05-07 22:55   ` [Linux-fbdev-devel] " Antonino A. Daplas
  0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2007-05-07 20:47 UTC (permalink / raw)
  To: hskinnemoen; +Cc: linux-fbdev-devel, linux-kernel, akpm

From: Haavard Skinnemoen <hskinnemoen@atmel.com>
Date: Mon,  7 May 2007 17:20:33 +0200

> Provide framebuffer page protection flags and definitions of
> fb_readl/fb_writel for AVR32.
> 
> Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>

This isn't directed to you specifically, I'm just making a general
comment.

We're at the point where these two snippets of code in the fb layer
are a total mess of ifdefs.

It's time we made an include/asm-foo/fb.h header file and abstracted
out the necessary details there.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Linux-fbdev-devel] [PATCH] fbdev: Add support for AVR32
  2007-05-07 20:47 ` David Miller
@ 2007-05-07 22:55   ` Antonino A. Daplas
  2007-05-07 22:57     ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Antonino A. Daplas @ 2007-05-07 22:55 UTC (permalink / raw)
  To: linux-fbdev-devel; +Cc: hskinnemoen, akpm, linux-kernel, David S. Miller

On Mon, 2007-05-07 at 13:47 -0700, David Miller wrote:
> From: Haavard Skinnemoen <hskinnemoen@atmel.com>
> Date: Mon,  7 May 2007 17:20:33 +0200
> 

> We're at the point where these two snippets of code in the fb layer
> are a total mess of ifdefs.
> 
> It's time we made an include/asm-foo/fb.h header file and abstracted
> out the necessary details there.
> 

I agree. I'll start working on this.

Tony



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Linux-fbdev-devel] [PATCH] fbdev: Add support for AVR32
  2007-05-07 22:55   ` [Linux-fbdev-devel] " Antonino A. Daplas
@ 2007-05-07 22:57     ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2007-05-07 22:57 UTC (permalink / raw)
  To: adaplas; +Cc: linux-fbdev-devel, hskinnemoen, akpm, linux-kernel

From: "Antonino A. Daplas" <adaplas@gmail.com>
Date: Tue, 08 May 2007 06:55:52 +0800

> On Mon, 2007-05-07 at 13:47 -0700, David Miller wrote:
> > From: Haavard Skinnemoen <hskinnemoen@atmel.com>
> > Date: Mon,  7 May 2007 17:20:33 +0200
> > 
> 
> > We're at the point where these two snippets of code in the fb layer
> > are a total mess of ifdefs.
> > 
> > It's time we made an include/asm-foo/fb.h header file and abstracted
> > out the necessary details there.
> > 
> 
> I agree. I'll start working on this.
> 
> Tony

Thanks a lot Tony.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-05-07 22:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-07 15:20 [PATCH] fbdev: Add support for AVR32 Haavard Skinnemoen
2007-05-07 20:47 ` David Miller
2007-05-07 22:55   ` [Linux-fbdev-devel] " Antonino A. Daplas
2007-05-07 22:57     ` David Miller

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.