summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/video/fbdev/core/Kconfig8
-rw-r--r--include/linux/fb.h13
2 files changed, 21 insertions, 0 deletions
diff --git a/drivers/video/fbdev/core/Kconfig b/drivers/video/fbdev/core/Kconfig
index 528e4dd2199c..85434381b6c6 100644
--- a/drivers/video/fbdev/core/Kconfig
+++ b/drivers/video/fbdev/core/Kconfig
@@ -136,6 +136,14 @@ config FB_DEFERRED_IO
bool
depends on FB_CORE
+config FB_DMA_HELPERS
+ bool
+ depends on FB_CORE
+ select FB_SYS_COPYAREA
+ select FB_SYS_FILLRECT
+ select FB_SYS_FOPS
+ select FB_SYS_IMAGEBLIT
+
config FB_IO_HELPERS
bool
depends on FB_CORE
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 43458f582f35..cb23f7d7df10 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -591,6 +591,19 @@ extern ssize_t fb_sys_write(struct fb_info *info, const char __user *buf,
__FB_DEFAULT_SYS_OPS_DRAW, \
__FB_DEFAULT_SYS_OPS_MMAP
+/*
+ * Helpers for framebuffers in DMA-able memory
+ */
+
+#define __FB_DEFAULT_DMA_OPS_RDWR \
+ .fb_read = fb_sys_read, \
+ .fb_write = fb_sys_write
+
+#define __FB_DEFAULT_DMA_OPS_DRAW \
+ .fb_fillrect = sys_fillrect, \
+ .fb_copyarea = sys_copyarea, \
+ .fb_imageblit = sys_imageblit
+
/* drivers/video/fbmem.c */
extern int register_framebuffer(struct fb_info *fb_info);
extern void unregister_framebuffer(struct fb_info *fb_info);