aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fb.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/fb.h')
-rw-r--r--include/linux/fb.h57
1 files changed, 54 insertions, 3 deletions
diff --git a/include/linux/fb.h b/include/linux/fb.h
index be913ec87169..dff7a728948c 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -4,6 +4,8 @@
4#include <asm/types.h> 4#include <asm/types.h>
5#include <linux/i2c.h> 5#include <linux/i2c.h>
6 6
7struct dentry;
8
7/* Definitions of frame buffers */ 9/* Definitions of frame buffers */
8 10
9#define FB_MAJOR 29 11#define FB_MAJOR 29
@@ -525,12 +527,20 @@ struct fb_cursor_user {
525#define FB_EVENT_MODE_CHANGE_ALL 0x0B 527#define FB_EVENT_MODE_CHANGE_ALL 0x0B
526/* A software display blank change occured */ 528/* A software display blank change occured */
527#define FB_EVENT_CONBLANK 0x0C 529#define FB_EVENT_CONBLANK 0x0C
530/* Get drawing requirements */
531#define FB_EVENT_GET_REQ 0x0D
528 532
529struct fb_event { 533struct fb_event {
530 struct fb_info *info; 534 struct fb_info *info;
531 void *data; 535 void *data;
532}; 536};
533 537
538struct fb_blit_caps {
539 u32 x;
540 u32 y;
541 u32 len;
542 u32 flags;
543};
534 544
535extern int fb_register_client(struct notifier_block *nb); 545extern int fb_register_client(struct notifier_block *nb);
536extern int fb_unregister_client(struct notifier_block *nb); 546extern int fb_unregister_client(struct notifier_block *nb);
@@ -556,11 +566,25 @@ struct fb_pixmap {
556 u32 scan_align; /* alignment per scanline */ 566 u32 scan_align; /* alignment per scanline */
557 u32 access_align; /* alignment per read/write (bits) */ 567 u32 access_align; /* alignment per read/write (bits) */
558 u32 flags; /* see FB_PIXMAP_* */ 568 u32 flags; /* see FB_PIXMAP_* */
569 u32 blit_x; /* supported bit block dimensions (1-32)*/
570 u32 blit_y; /* Format: blit_x = 1 << (width - 1) */
571 /* blit_y = 1 << (height - 1) */
572 /* if 0, will be set to 0xffffffff (all)*/
559 /* access methods */ 573 /* access methods */
560 void (*writeio)(struct fb_info *info, void __iomem *dst, void *src, unsigned int size); 574 void (*writeio)(struct fb_info *info, void __iomem *dst, void *src, unsigned int size);
561 void (*readio) (struct fb_info *info, void *dst, void __iomem *src, unsigned int size); 575 void (*readio) (struct fb_info *info, void *dst, void __iomem *src, unsigned int size);
562}; 576};
563 577
578#ifdef CONFIG_FB_DEFERRED_IO
579struct fb_deferred_io {
580 /* delay between mkwrite and deferred handler */
581 unsigned long delay;
582 struct mutex lock; /* mutex that protects the page list */
583 struct list_head pagelist; /* list of touched pages */
584 /* callback */
585 void (*deferred_io)(struct fb_info *info, struct list_head *pagelist);
586};
587#endif
564 588
565/* 589/*
566 * Frame buffer operations 590 * Frame buffer operations
@@ -579,8 +603,10 @@ struct fb_ops {
579 /* For framebuffers with strange non linear layouts or that do not 603 /* For framebuffers with strange non linear layouts or that do not
580 * work with normal memory mapped access 604 * work with normal memory mapped access
581 */ 605 */
582 ssize_t (*fb_read)(struct file *file, char __user *buf, size_t count, loff_t *ppos); 606 ssize_t (*fb_read)(struct fb_info *info, char __user *buf,
583 ssize_t (*fb_write)(struct file *file, const char __user *buf, size_t count, loff_t *ppos); 607 size_t count, loff_t *ppos);
608 ssize_t (*fb_write)(struct fb_info *info, const char __user *buf,
609 size_t count, loff_t *ppos);
584 610
585 /* checks var and eventually tweaks it to something supported, 611 /* checks var and eventually tweaks it to something supported,
586 * DO NOT MODIFY PAR */ 612 * DO NOT MODIFY PAR */
@@ -634,10 +660,13 @@ struct fb_ops {
634 660
635 /* restore saved state */ 661 /* restore saved state */
636 void (*fb_restore_state)(struct fb_info *info); 662 void (*fb_restore_state)(struct fb_info *info);
663
664 /* get capability given var */
665 void (*fb_get_caps)(struct fb_info *info, struct fb_blit_caps *caps,
666 struct fb_var_screeninfo *var);
637}; 667};
638 668
639#ifdef CONFIG_FB_TILEBLITTING 669#ifdef CONFIG_FB_TILEBLITTING
640
641#define FB_TILE_CURSOR_NONE 0 670#define FB_TILE_CURSOR_NONE 0
642#define FB_TILE_CURSOR_UNDERLINE 1 671#define FB_TILE_CURSOR_UNDERLINE 1
643#define FB_TILE_CURSOR_LOWER_THIRD 2 672#define FB_TILE_CURSOR_LOWER_THIRD 2
@@ -709,6 +738,8 @@ struct fb_tile_ops {
709 /* cursor */ 738 /* cursor */
710 void (*fb_tilecursor)(struct fb_info *info, 739 void (*fb_tilecursor)(struct fb_info *info,
711 struct fb_tilecursor *cursor); 740 struct fb_tilecursor *cursor);
741 /* get maximum length of the tile map */
742 int (*fb_get_tilemax)(struct fb_info *info);
712}; 743};
713#endif /* CONFIG_FB_TILEBLITTING */ 744#endif /* CONFIG_FB_TILEBLITTING */
714 745
@@ -778,6 +809,10 @@ struct fb_info {
778 struct mutex bl_curve_mutex; 809 struct mutex bl_curve_mutex;
779 u8 bl_curve[FB_BACKLIGHT_LEVELS]; 810 u8 bl_curve[FB_BACKLIGHT_LEVELS];
780#endif 811#endif
812#ifdef CONFIG_FB_DEFERRED_IO
813 struct delayed_work deferred_work;
814 struct fb_deferred_io *fbdefio;
815#endif
781 816
782 struct fb_ops *fbops; 817 struct fb_ops *fbops;
783 struct device *device; /* This is the parent */ 818 struct device *device; /* This is the parent */
@@ -879,6 +914,16 @@ extern int fb_blank(struct fb_info *info, int blank);
879extern void cfb_fillrect(struct fb_info *info, const struct fb_fillrect *rect); 914extern void cfb_fillrect(struct fb_info *info, const struct fb_fillrect *rect);
880extern void cfb_copyarea(struct fb_info *info, const struct fb_copyarea *area); 915extern void cfb_copyarea(struct fb_info *info, const struct fb_copyarea *area);
881extern void cfb_imageblit(struct fb_info *info, const struct fb_image *image); 916extern void cfb_imageblit(struct fb_info *info, const struct fb_image *image);
917/*
918 * Drawing operations where framebuffer is in system RAM
919 */
920extern void sys_fillrect(struct fb_info *info, const struct fb_fillrect *rect);
921extern void sys_copyarea(struct fb_info *info, const struct fb_copyarea *area);
922extern void sys_imageblit(struct fb_info *info, const struct fb_image *image);
923extern ssize_t fb_sys_read(struct fb_info *info, char __user *buf,
924 size_t count, loff_t *ppos);
925extern ssize_t fb_sys_write(struct fb_info *info, const char __user *buf,
926 size_t count, loff_t *ppos);
882 927
883/* drivers/video/fbmem.c */ 928/* drivers/video/fbmem.c */
884extern int register_framebuffer(struct fb_info *fb_info); 929extern int register_framebuffer(struct fb_info *fb_info);
@@ -913,6 +958,12 @@ static inline void __fb_pad_aligned_buffer(u8 *dst, u32 d_pitch,
913 } 958 }
914} 959}
915 960
961/* drivers/video/fb_defio.c */
962extern void fb_deferred_io_init(struct fb_info *info);
963extern void fb_deferred_io_cleanup(struct fb_info *info);
964extern int fb_deferred_io_fsync(struct file *file, struct dentry *dentry,
965 int datasync);
966
916/* drivers/video/fbsysfs.c */ 967/* drivers/video/fbsysfs.c */
917extern struct fb_info *framebuffer_alloc(size_t size, struct device *dev); 968extern struct fb_info *framebuffer_alloc(size_t size, struct device *dev);
918extern void framebuffer_release(struct fb_info *info); 969extern void framebuffer_release(struct fb_info *info);