fbdev: add support for handoff from firmware to hw framebuffers
[sfrench/cifs-2.6.git] / include / linux / fb.h
index f563c50139325b98c11ec5ea492b36d9aa1b7ee3..3c5562a52167bc69da24edd6b9684008c3356c76 100644 (file)
@@ -173,8 +173,12 @@ struct fb_fix_screeninfo {
 /* Interpretation of offset for color fields: All offsets are from the right,
  * inside a "pixel" value, which is exactly 'bits_per_pixel' wide (means: you
  * can use the offset as right argument to <<). A pixel afterwards is a bit
- * stream and is written to video memory as that unmodified. This implies
- * big-endian byte order if bits_per_pixel is greater than 8.
+ * stream and is written to video memory as that unmodified.
+ *
+ * For pseudocolor: offset and length should be the same for all color
+ * components. Offset specifies the position of the least significant bit
+ * of the pallette index in a pixel value. Length indicates the number
+ * of available palette entries (i.e. # of entries = 1 << length).
  */
 struct fb_bitfield {
        __u32 offset;                   /* beginning of bitfield        */
@@ -673,6 +677,9 @@ struct fb_ops {
        /* get capability given var */
        void (*fb_get_caps)(struct fb_info *info, struct fb_blit_caps *caps,
                            struct fb_var_screeninfo *var);
+
+       /* teardown any resources to do with this framebuffer */
+       void (*fb_destroy)(struct fb_info *info);
 };
 
 #ifdef CONFIG_FB_TILEBLITTING
@@ -782,6 +789,8 @@ struct fb_tile_ops {
 #define FBINFO_MISC_USEREVENT          0x10000 /* event request
                                                  from userspace */
 #define FBINFO_MISC_TILEBLITTING       0x20000 /* use tile blitting */
+#define FBINFO_MISC_FIRMWARE           0x40000 /* a replaceable firmware
+                                                 inited framebuffer */
 
 /* 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
@@ -850,7 +859,12 @@ struct fb_info {
        u32 state;                      /* Hardware state i.e suspend */
        void *fbcon_par;                /* fbcon use-only private area */
        /* From here on everything is device dependent */
-       void *par;      
+       void *par;
+       /* we need the PCI or similiar aperture base/size not
+          smem_start/size as smem_start may just be an object
+          allocated inside the aperture so may not actually overlap */
+       resource_size_t aperture_base;
+       resource_size_t aperture_size;
 };
 
 #ifdef MODULE