aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorJaya Kumar <jayakumar.lkml@gmail.com>2007-05-08 00:37:37 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 11:15:26 -0700
commit60b59beafba875aef6d378078bce0baf2287ae14 (patch)
treebb599c0e2ad43ee8f515a9f9af009442931b6a37 /include/linux
parent3a2842480bbef42c3c90e14c1f378360d8c20a0c (diff)
downloadkernel_samsung_tuna-60b59beafba875aef6d378078bce0baf2287ae14.zip
kernel_samsung_tuna-60b59beafba875aef6d378078bce0baf2287ae14.tar.gz
kernel_samsung_tuna-60b59beafba875aef6d378078bce0baf2287ae14.tar.bz2
fbdev: mm: Deferred IO support
This implements deferred IO support in fbdev. Deferred IO is a way to delay and repurpose IO. This implementation is done using mm's page_mkwrite and page_mkclean hooks in order to detect, delay and then rewrite IO. This functionality is used by hecubafb. [adaplas] This is useful for graphics hardware with no directly addressable/mappable framebuffer. Implementing this will allow the "framebuffer" to be accesible from user space via mmap(). Signed-off-by: Jaya Kumar <jayakumar.lkml@gmail.com> 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.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/fb.h b/include/linux/fb.h
index be913ec..8a8255b 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -561,6 +561,16 @@ struct fb_pixmap {
void (*readio) (struct fb_info *info, void *dst, void __iomem *src, unsigned int size);
};
+#ifdef CONFIG_FB_DEFERRED_IO
+struct fb_deferred_io {
+ /* delay between mkwrite and deferred handler */
+ unsigned long delay;
+ struct mutex lock; /* mutex that protects the page list */
+ struct list_head pagelist; /* list of touched pages */
+ /* callback */
+ void (*deferred_io)(struct fb_info *info, struct list_head *pagelist);
+};
+#endif
/*
* Frame buffer operations
@@ -778,6 +788,10 @@ struct fb_info {
struct mutex bl_curve_mutex;
u8 bl_curve[FB_BACKLIGHT_LEVELS];
#endif
+#ifdef CONFIG_FB_DEFERRED_IO
+ struct delayed_work deferred_work;
+ struct fb_deferred_io *fbdefio;
+#endif
struct fb_ops *fbops;
struct device *device; /* This is the parent */
@@ -913,6 +927,12 @@ static inline void __fb_pad_aligned_buffer(u8 *dst, u32 d_pitch,
}
}
+#ifdef CONFIG_FB_DEFERRED_IO
+/* drivers/video/fb_defio.c */
+extern void fb_deferred_io_init(struct fb_info *info);
+extern void fb_deferred_io_cleanup(struct fb_info *info);
+#endif
+
/* drivers/video/fbsysfs.c */
extern struct fb_info *framebuffer_alloc(size_t size, struct device *dev);
extern void framebuffer_release(struct fb_info *info);