diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-12-13 01:43:33 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-12-13 01:43:33 -0500 |
commit | d00d598ffbba974d9045ba8b95296655fe2162c5 (patch) | |
tree | 93bdc3bf4ec728d554c54e3f1f51cb5597f53a31 /include | |
parent | b5632303401c231bf270ef36f1013e52caf4caf9 (diff) | |
parent | be0d9b6c7aeaad1683059c00131cabd4c894c17c (diff) | |
download | linux-d00d598ffbba974d9045ba8b95296655fe2162c5.tar.gz linux-d00d598ffbba974d9045ba8b95296655fe2162c5.tar.bz2 linux-d00d598ffbba974d9045ba8b95296655fe2162c5.zip |
Merge branch 'master'
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fb.h | 30 |
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 { /* perform fb specific mmap */ int (*fb_mmap)(struct fb_info *info, struct file *file, struct vm_area_struct *vma); + + /* save current hardware state */ + void (*fb_save_state)(struct fb_info *info); + + /* restore saved state */ + void (*fb_restore_state)(struct fb_info *info); }; #ifdef CONFIG_FB_TILEBLITTING @@ -726,6 +732,18 @@ struct fb_tile_ops { from userspace */ #define FBINFO_MISC_TILEBLITTING 0x20000 /* use tile blitting */ +/* A driver may set this flag to indicate that it does want a set_par to be + * called every time when fbcon_switch is executed. The advantage is that with + * this flag set you can really be shure that set_par is always called before + * any of the functions dependant on the correct hardware state or altering + * that state, even if you are using some broken X releases. The disadvantage + * is that it introduces unwanted delays to every console switch if set_par + * is slow. It is a good idea to try this flag in the drivers initialization + * code whenever there is a bug report related to switching between X and the + * framebuffer console. + */ +#define FBINFO_MISC_ALWAYS_SETPAR 0x40000 + struct fb_info { int node; int flags; @@ -817,6 +835,18 @@ struct fb_info { #endif +#if defined (__BIG_ENDIAN) +#define FB_LEFT_POS(bpp) (32 - bpp) +#define FB_SHIFT_HIGH(val, bits) ((val) >> (bits)) +#define FB_SHIFT_LOW(val, bits) ((val) << (bits)) +#define FB_BIT_NR(b) (7 - (b)) +#else +#define FB_LEFT_POS(bpp) (0) +#define FB_SHIFT_HIGH(val, bits) ((val) << (bits)) +#define FB_SHIFT_LOW(val, bits) ((val) >> (bits)) +#define FB_BIT_NR(b) (b) +#endif + /* * `Generic' versions of the frame buffer device operations */ |