summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-12-13 11:36:18 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-12-13 11:36:18 -0500
commitd22a8ccff761c81f2930bd90fa5712e51a0e9a62 (patch)
tree52a92cf1b9a65e4440276706c4b4e879d4008a87 /include/linux
parent783e3385a134305d49d7b431df6e591265e7ec14 (diff)
parent98684a9d91bceff829b6dc7adf0f662d59cfa6e3 (diff)
downloadop-kernel-dev-d22a8ccff761c81f2930bd90fa5712e51a0e9a62.zip
op-kernel-dev-d22a8ccff761c81f2930bd90fa5712e51a0e9a62.tar.gz
Merge branch 'upstream-fixes'
Diffstat (limited to 'include/linux')
-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 04a58f3..a973be2 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
*/
OpenPOWER on IntegriCloud