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.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 04a58f33ec53..a973be2cfe61 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -617,6 +617,12 @@ struct fb_ops {
617 617
618 /* perform fb specific mmap */ 618 /* perform fb specific mmap */
619 int (*fb_mmap)(struct fb_info *info, struct file *file, struct vm_area_struct *vma); 619 int (*fb_mmap)(struct fb_info *info, struct file *file, struct vm_area_struct *vma);
620
621 /* save current hardware state */
622 void (*fb_save_state)(struct fb_info *info);
623
624 /* restore saved state */
625 void (*fb_restore_state)(struct fb_info *info);
620}; 626};
621 627
622#ifdef CONFIG_FB_TILEBLITTING 628#ifdef CONFIG_FB_TILEBLITTING
@@ -726,6 +732,18 @@ struct fb_tile_ops {
726 from userspace */ 732 from userspace */
727#define FBINFO_MISC_TILEBLITTING 0x20000 /* use tile blitting */ 733#define FBINFO_MISC_TILEBLITTING 0x20000 /* use tile blitting */
728 734
735/* A driver may set this flag to indicate that it does want a set_par to be
736 * called every time when fbcon_switch is executed. The advantage is that with
737 * this flag set you can really be shure that set_par is always called before
738 * any of the functions dependant on the correct hardware state or altering
739 * that state, even if you are using some broken X releases. The disadvantage
740 * is that it introduces unwanted delays to every console switch if set_par
741 * is slow. It is a good idea to try this flag in the drivers initialization
742 * code whenever there is a bug report related to switching between X and the
743 * framebuffer console.
744 */
745#define FBINFO_MISC_ALWAYS_SETPAR 0x40000
746
729struct fb_info { 747struct fb_info {
730 int node; 748 int node;
731 int flags; 749 int flags;
@@ -817,6 +835,18 @@ struct fb_info {
817 835
818#endif 836#endif
819 837
838#if defined (__BIG_ENDIAN)
839#define FB_LEFT_POS(bpp) (32 - bpp)
840#define FB_SHIFT_HIGH(val, bits) ((val) >> (bits))
841#define FB_SHIFT_LOW(val, bits) ((val) << (bits))
842#define FB_BIT_NR(b) (7 - (b))
843#else
844#define FB_LEFT_POS(bpp) (0)
845#define FB_SHIFT_HIGH(val, bits) ((val) << (bits))
846#define FB_SHIFT_LOW(val, bits) ((val) >> (bits))
847#define FB_BIT_NR(b) (b)
848#endif
849
820 /* 850 /*
821 * `Generic' versions of the frame buffer device operations 851 * `Generic' versions of the frame buffer device operations
822 */ 852 */