diff options
author | Antonino A. Daplas <adaplas@gmail.com> | 2007-05-08 03:39:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 14:15:30 -0400 |
commit | 09aaf268eb1d22eee690d26a913f660e2081597f (patch) | |
tree | 9179447608d1c7ee23af266d2bae2eef6d05a1c9 /include/linux | |
parent | 3f9b0880e4a96b02bc0131451f2f6231cd90bd94 (diff) |
fbdev: add fb_read/fb_write functions for framebuffers in system RAM
The functions fb_read() and fb_write in fbmem.c assume that the framebuffer
is in IO memory. However, we have 3 drivers (hecubafb, arcfb, and vfb)
where the framebuffer is allocated from system RAM (via vmalloc). Using
__raw_read/__raw_write (fb_readl/fb_writel) for these drivers is
illegal, especially in other platforms.
Create file read and write methods for these types of drivers. These are
named fb_sys_read() and fb_sys_write().
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/fb.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/fb.h b/include/linux/fb.h index acb6ddb68fa2..70d154a02c5c 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -903,6 +903,10 @@ extern void cfb_imageblit(struct fb_info *info, const struct fb_image *image); | |||
903 | extern void sys_fillrect(struct fb_info *info, const struct fb_fillrect *rect); | 903 | extern void sys_fillrect(struct fb_info *info, const struct fb_fillrect *rect); |
904 | extern void sys_copyarea(struct fb_info *info, const struct fb_copyarea *area); | 904 | extern void sys_copyarea(struct fb_info *info, const struct fb_copyarea *area); |
905 | extern void sys_imageblit(struct fb_info *info, const struct fb_image *image); | 905 | extern void sys_imageblit(struct fb_info *info, const struct fb_image *image); |
906 | extern ssize_t fb_sys_read(struct fb_info *info, char __user *buf, | ||
907 | size_t count, loff_t *ppos); | ||
908 | extern ssize_t fb_sys_write(struct fb_info *info, const char __user *buf, | ||
909 | size_t count, loff_t *ppos); | ||
906 | 910 | ||
907 | /* drivers/video/fbmem.c */ | 911 | /* drivers/video/fbmem.c */ |
908 | extern int register_framebuffer(struct fb_info *fb_info); | 912 | extern int register_framebuffer(struct fb_info *fb_info); |