[PATCH] fbdev code cleanup

From: James A Simmons (jsimmons@acsu.buffalo.edu)
Date: Wed Jan 05 2000 - 10:22:17 EST


 This patch fixes a few multihead bugs. It also places fb_var_screeninfo,
fb_fix_screeninfo, and fbcmap into fb_info. This will eventually lead to
the moving of struct display out of the fbdev drivers into fbcon.c. Also
alot of the fields in struct display are copied from fb_fix_screeninfo.
Once all drivers use fix inside fb_info we can eliminate these duplicated
fields in struct display. This will reduce the code in all drivers and
make fbdev driver writing easier. This change doesn't effect the present
fbdev drivers but I have modified vfb.c to reflect how the drivers could
be changed and why the changes. The patch is against a 2.3.36 kernel.
Thank you.

Codito, ergo sum - "I code, therefore I am"
James Simmons (o_
fbdev/gfx developer (o_ (o_ //\
http://www.linux-fbdev.org (/)_ (/)_ V_/_
http://linuxgfx.sourceforge.net

diff -urN linux-2.3.36/drivers/video/fbcon.c linux-test/drivers/video/fbcon.c
--- linux-2.3.36/drivers/video/fbcon.c Wed Dec 15 15:28:32 1999
+++ linux-test/drivers/video/fbcon.c Wed Jan 5 09:02:52 2000
@@ -311,6 +311,10 @@
        fb_display[unit]._fontheightlog = fontheightlog;
        fb_display[unit].userfont = userfont;
        fb_display[unit].fb_info = newfb;
+ if (conp)
+ conp->vc_display_fg = &newfb->display_fg;
+ if (!newfb->display_fg)
+ newfb->display_fg = conp;
        if (!newfb->changevar)
            newfb->changevar = oldfb->changevar;
        /* tell console var has changed */
@@ -1167,8 +1171,12 @@
 
 static inline void fbcon_softback_note(struct vc_data *conp, int t, int count)
 {
- unsigned short *p = (unsigned short *)
- (conp->vc_origin + t * conp->vc_size_row);
+ unsigned short *p;
+
+ if (conp->vc_num != fg_console)
+ return;
+ p = (unsigned short *)(conp->vc_origin + t * conp->vc_size_row);
+
     while (count) {
             scr_memcpyw((u16 *)softback_in, p, conp->vc_size_row);
             count--;
diff -urN linux-2.3.36/drivers/video/fbmem.c linux-test/drivers/video/fbmem.c
--- linux-2.3.36/drivers/video/fbmem.c Wed Dec 29 10:13:36 1999
+++ linux-test/drivers/video/fbmem.c Wed Jan 5 09:02:52 2000
@@ -428,7 +428,7 @@
         /* frame buffer memory */
         start = fix.smem_start;
         len = (start & ~PAGE_MASK)+fix.smem_len;
- len = (len+~PAGE_MASK) & PAGE_MASK; /* someone's on crack. */
+ len = PAGE_ALIGN(len);
         if (off >= len) {
                 /* memory mapped io */
                 off -= len;
diff -urN linux-2.3.36/drivers/video/vfb.c linux-test/drivers/video/vfb.c
--- linux-2.3.36/drivers/video/vfb.c Wed Nov 10 15:09:56 1999
+++ linux-test/drivers/video/vfb.c Wed Jan 5 09:02:52 2000
@@ -1,8 +1,40 @@
 /*
  * linux/drivers/video/vfb.c -- Virtual frame buffer device
  *
+ * Copyright (C) 1999 James Simmons
+ *
  * Copyright (C) 1997 Geert Uytterhoeven
  *
+ * I have started rewriting this driver as a example of the upcoming new API
+ * The primary goal is to remove the console code from fbdev and place it
+ * into fbcon.c. This reduces the code and makes writing a new fbdev driver
+ * easy since the author doesn't need to worry about console internals.
+ *
+ * First the roles of struct fb_info and struct display have changed. For
+ * each framebuffer device you can allocate a set of viritual terminals to
+ * it. Only one virtual terminal can be active per framebuffer device.
+ * So I have struct fb_info represent the current hardware state of the
+ * framebuffer. Meaning the resolution of the active VT (the one your looking
+ * at) and other data is stored in the fb_info struct. When you VT switch
+ * the current video state then is stored into struct display for that
+ * terminal you just switched away from. Then the current video state is set
+ * to the data values stored in struct display for the VT you are switching
+ * too. As you can see doing this makes the con parameter pretty much useless
+ * for the fb_ops functions. As it should be. Since struct display is used to
+ * represent the video state of the hardware for each terminal it also
+ * represents the extra parameters for a framebuffer device to act as a
+ * console terminal. In the future these parameters will be handled inside
+ * of fbcon.c so they will be of no concern to the driver writer.
+ *
+ * Also having fb_var_screeninfo and other data in fb_info pretty much
+ * eliminates the need for get_fix and get_var. Once all drivers use the
+ * fix,var, and cmap field fbcon can be written around these fields. This
+ * will also eliminate the need to regenerate fb_var_screeninfo and
+ * fb_fix_screeninfo data every time the get_var and get_fix functions are
+ * called as many drivers do now. The fb_var_screeninfo and
+ * fb_fix_screeninfo field in fb_info can be generated just in set_var and
+ * placed into struct fb_info.
+ *
  * This file is subject to the terms and conditions of the GNU General Public
  * License. See the file COPYING in the main directory of this archive for
  * more details.
@@ -61,7 +93,6 @@
     u32 cfb32[16];
 #endif
 } fbcon_cmap;
-static char vfb_name[16] = "Virtual FB";
 
 static struct fb_var_screeninfo vfb_default = {
     /* 640x480, 8 bpp */
@@ -71,13 +102,18 @@
     0, FB_VMODE_NONINTERLACED
 };
 
+static struct fb_fix_screeninfo vfb_fix = {
+ "Virtual FB", (unsigned long) NULL, 0, FB_TYPE_PACKED_PIXELS, 0,
+ FB_VISUAL_PSEUDOCOLOR, 1, 1, 1, 0, (unsigned long) NULL, 0, FB_ACCEL_NONE
+};
+
 static int vfb_enable = 0; /* disabled by default */
 
 
     /*
      * Interface used by the world
      */
-
+int vfb_init(void);
 int vfb_setup(char*);
 
 static int vfb_open(struct fb_info *info, int user);
@@ -102,26 +138,19 @@
      * Interface to the low level console driver
      */
 
-int vfb_init(void);
 static int vfbcon_switch(int con, struct fb_info *info);
 static int vfbcon_updatevar(int con, struct fb_info *info);
 static void vfbcon_blank(int blank, struct fb_info *info);
 
-
     /*
      * Internal routines
      */
 
 static u_long get_line_length(int xres_virtual, int bpp);
-static void vfb_encode_fix(struct fb_fix_screeninfo *fix,
- struct fb_var_screeninfo *var);
-static void set_color_bitfields(struct fb_var_screeninfo *var);
 static int vfb_getcolreg(u_int regno, u_int *red, u_int *green, u_int *blue,
                          u_int *transp, struct fb_info *info);
 static int vfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
                          u_int transp, struct fb_info *info);
-static void do_install_cmap(int con, struct fb_info *info);
-
 
 static struct fb_ops vfb_ops = {
     vfb_open, vfb_release, vfb_get_fix, vfb_get_var, vfb_set_var, vfb_get_cmap,
@@ -157,13 +186,7 @@
 static int vfb_get_fix(struct fb_fix_screeninfo *fix, int con,
                        struct fb_info *info)
 {
- struct fb_var_screeninfo *var;
-
- if (con == -1)
- var = &vfb_default;
- else
- var = &fb_display[con].var;
- vfb_encode_fix(fix, var);
+ *fix = info->fix;
     return 0;
 }
 
@@ -175,11 +198,7 @@
 static int vfb_get_var(struct fb_var_screeninfo *var, int con,
                        struct fb_info *info)
 {
- if (con == -1)
- *var = vfb_default;
- else
- *var = fb_display[con].var;
- set_color_bitfields(var);
+ *var = info->var;
     return 0;
 }
 
@@ -192,14 +211,13 @@
                        struct fb_info *info)
 {
     int err, activate = var->activate;
- int oldxres, oldyres, oldvxres, oldvyres, oldbpp;
     u_long line_length;
 
     struct display *display;
     if (con >= 0)
- display = &fb_display[con];
+ display = &fb_display[con];
     else
- display = &disp; /* used during initialization */
+ display = &disp; /* used during initialization */
 
     /*
      * FB_VMODE_CONUPDATE and FB_VMODE_SMOOTH_XPAN are equal!
@@ -208,8 +226,8 @@
 
     if (var->vmode & FB_VMODE_CONUPDATE) {
         var->vmode |= FB_VMODE_YWRAP;
- var->xoffset = display->var.xoffset;
- var->yoffset = display->var.yoffset;
+ var->xoffset = info->var.xoffset;
+ var->yoffset = info->var.yoffset;
     }
 
     /*
@@ -229,13 +247,10 @@
         var->bits_per_pixel = 8;
     else if (var->bits_per_pixel <= 16)
         var->bits_per_pixel = 16;
-#if 0
- /* fbcon doesn't support this (yet) */
     else if (var->bits_per_pixel <= 24)
         var->bits_per_pixel = 24;
     else if (var->bits_per_pixel <= 32)
         var->bits_per_pixel = 32;
-#endif
     else
         return -EINVAL;
 
@@ -246,65 +261,113 @@
     if (line_length*var->yres_virtual > videomemorysize)
         return -ENOMEM;
 
- set_color_bitfields(var);
+ switch (var->bits_per_pixel) {
+ case 1:
+ case 8:
+ var->red.offset = 0;
+ var->red.length = 8;
+ var->green.offset = 0;
+ var->green.length = 8;
+ var->blue.offset = 0;
+ var->blue.length = 8;
+ var->transp.offset = 0;
+ var->transp.length = 0;
+ break;
+ case 15: /* RGBA 1555 */
+ var->red.offset = 0;
+ var->red.length = 5;
+ var->green.offset = 5;
+ var->green.length = 5;
+ var->blue.offset = 10;
+ var->blue.length = 5;
+ var->transp.offset = 15;
+ var->transp.length = 1;
+ case 16: /* RGB 565 */
+ var->red.offset = 0;
+ var->red.length = 5;
+ var->green.offset = 5;
+ var->green.length = 6;
+ var->blue.offset = 11;
+ var->blue.length = 5;
+ var->transp.offset = 0;
+ var->transp.length = 0;
+ break;
+ case 24: /* RGB 888 */
+ var->red.offset = 0;
+ var->red.length = 8;
+ var->green.offset = 8;
+ var->green.length = 8;
+ var->blue.offset = 16;
+ var->blue.length = 8;
+ var->transp.offset = 0;
+ var->transp.length = 0;
+ break;
+ case 32: /* RGBA 8888 */
+ var->red.offset = 0;
+ var->red.length = 8;
+ var->green.offset = 8;
+ var->green.length = 8;
+ var->blue.offset = 16;
+ var->blue.length = 8;
+ var->transp.offset = 24;
+ var->transp.length = 8;
+ break;
+ }
+ var->red.msb_right = 0;
+ var->green.msb_right = 0;
+ var->blue.msb_right = 0;
+ var->transp.msb_right = 0;
 
     if ((activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW) {
- oldxres = display->var.xres;
- oldyres = display->var.yres;
- oldvxres = display->var.xres_virtual;
- oldvyres = display->var.yres_virtual;
- oldbpp = display->var.bits_per_pixel;
- display->var = *var;
- if (oldxres != var->xres || oldyres != var->yres ||
- oldvxres != var->xres_virtual || oldvyres != var->yres_virtual ||
- oldbpp != var->bits_per_pixel) {
- struct fb_fix_screeninfo fix;
-
- vfb_encode_fix(&fix, var);
- display->screen_base = (char *)videomemory;
- display->visual = fix.visual;
- display->type = fix.type;
- display->type_aux = fix.type_aux;
- display->ypanstep = fix.ypanstep;
- display->ywrapstep = fix.ywrapstep;
- display->line_length = fix.line_length;
- display->can_soft_blank = 1;
- display->inverse = 0;
+ if (info->var.xres != var->xres || info->var.yres != var->yres ||
+ info->var.xres_virtual != var->xres_virtual ||
+ info->var.yres_virtual != var->yres_virtual ||
+ info->var.bits_per_pixel != var->bits_per_pixel) {
+ /* Set the video mode. For a real video card we would fill in
+ * fb_info->par which is the hardware dependent structure.
+ */
             switch (var->bits_per_pixel) {
 #ifdef FBCON_HAS_MFB
                 case 1:
+ info->fix.visual = FB_VISUAL_MONO01;
                     display->dispsw = &fbcon_mfb;
                     break;
 #endif
 #ifdef FBCON_HAS_CFB2
                 case 2:
+ info->fix.visual = FB_VISUAL_STATIC_PSEUDOCOLOR;
                     display->dispsw = &fbcon_cfb2;
                     break;
 #endif
 #ifdef FBCON_HAS_CFB4
                 case 4:
+ info->fix.visual = FB_VISUAL_STATIC_PSEUDOCOLOR;
                     display->dispsw = &fbcon_cfb4;
                     break;
 #endif
 #ifdef FBCON_HAS_CFB8
                 case 8:
+ info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
                     display->dispsw = &fbcon_cfb8;
                     break;
 #endif
 #ifdef FBCON_HAS_CFB16
                 case 16:
+ info->fix.visual = FB_VISUAL_TRUECOLOR;
                     display->dispsw = &fbcon_cfb16;
                     display->dispsw_data = fbcon_cmap.cfb16;
                     break;
 #endif
 #ifdef FBCON_HAS_CFB24
                 case 24:
+ info->fix.visual = FB_VISUAL_DIRECTCOLOR;
                     display->dispsw = &fbcon_cfb24;
                     display->dispsw_data = fbcon_cmap.cfb24;
                     break;
 #endif
 #ifdef FBCON_HAS_CFB32
                 case 32:
+ info->fix.visual = FB_VISUAL_DIRECTCOLOR;
                     display->dispsw = &fbcon_cfb32;
                     display->dispsw_data = fbcon_cmap.cfb32;
                     break;
@@ -313,13 +376,25 @@
                     display->dispsw = &fbcon_dummy;
                     break;
             }
+ info->fix.line_length = get_line_length(var->xres_virtual,
+ var->bits_per_pixel);
+ info->var = *var;
+
+ display->visual = info->fix.visual;
+ display->type = info->fix.type;
+ display->type_aux = info->fix.type_aux;
+ display->ypanstep = info->fix.ypanstep;
+ display->ywrapstep = info->fix.ywrapstep;
+ display->line_length = info->fix.line_length;
+ display->can_soft_blank = 1;
+ display->inverse = 0;
+
             if (fb_info.changevar)
                 (*fb_info.changevar)(con);
         }
- if (oldbpp != var->bits_per_pixel) {
- if ((err = fb_alloc_cmap(&display->cmap, 0, 0)))
+ if (info->var.bits_per_pixel != var->bits_per_pixel) {
+ if ((err = fb_set_cmap(&info->cmap, 1, vfb_setcolreg, info)))
                 return err;
- do_install_cmap(con, info);
         }
     }
     return 0;
@@ -336,23 +411,20 @@
                            struct fb_info *info)
 {
     if (var->vmode & FB_VMODE_YWRAP) {
- if (var->yoffset < 0 ||
- var->yoffset >= fb_display[con].var.yres_virtual ||
+ if (var->yoffset < 0 || var->yoffset >= info->var.yres_virtual ||
             var->xoffset)
             return -EINVAL;
     } else {
- if (var->xoffset+fb_display[con].var.xres >
- fb_display[con].var.xres_virtual ||
- var->yoffset+fb_display[con].var.yres >
- fb_display[con].var.yres_virtual)
- return -EINVAL;
+ if (var->xoffset + var->xres > info->var.xres_virtual ||
+ var->yoffset + var->yres > info->var.yres_virtual)
+ return -EINVAL;
     }
- fb_display[con].var.xoffset = var->xoffset;
- fb_display[con].var.yoffset = var->yoffset;
+ info->var.xoffset = var->xoffset;
+ info->var.yoffset = var->yoffset;
     if (var->vmode & FB_VMODE_YWRAP)
- fb_display[con].var.vmode |= FB_VMODE_YWRAP;
+ info->var.vmode |= FB_VMODE_YWRAP;
     else
- fb_display[con].var.vmode &= ~FB_VMODE_YWRAP;
+ info->var.vmode &= ~FB_VMODE_YWRAP;
     return 0;
 }
 
@@ -363,14 +435,7 @@
 static int vfb_get_cmap(struct fb_cmap *cmap, int kspc, int con,
                         struct fb_info *info)
 {
- if (con == currcon) /* current console? */
- return fb_get_cmap(cmap, kspc, vfb_getcolreg, info);
- else if (fb_display[con].cmap.len) /* non default colormap? */
- fb_copy_cmap(&fb_display[con].cmap, cmap, kspc ? 0 : 2);
- else
- fb_copy_cmap(fb_default_cmap(1<<fb_display[con].var.bits_per_pixel),
- cmap, kspc ? 0 : 2);
- return 0;
+ return fb_get_cmap(cmap, kspc, vfb_getcolreg, info);
 }
 
     /*
@@ -380,18 +445,7 @@
 static int vfb_set_cmap(struct fb_cmap *cmap, int kspc, int con,
                         struct fb_info *info)
 {
- int err;
-
- if (!fb_display[con].cmap.len) { /* no colormap allocated? */
- if ((err = fb_alloc_cmap(&fb_display[con].cmap,
- 1<<fb_display[con].var.bits_per_pixel, 0)))
- return err;
- }
- if (con == currcon) /* current console? */
- return fb_set_cmap(cmap, kspc, vfb_setcolreg, info);
- else
- fb_copy_cmap(cmap, &fb_display[con].cmap, kspc ? 0 : 1);
- return 0;
+ return fb_set_cmap(cmap, kspc, vfb_setcolreg, info);
 }
 
 
@@ -425,7 +479,6 @@
     return 0;
 }
 
-
     /*
      * Initialisation
      */
@@ -438,16 +491,30 @@
     if (!(videomemory = (u_long)vmalloc(videomemorysize)))
         return -ENOMEM;
 
- strcpy(fb_info.modename, vfb_name);
+ /*
+ * For real video cards we use ioremap.
+ */
+ fb_info.disp->screen_base = phys_to_virt(videomemory);
+ vfb_fix.smem_start = videomemory;
+ vfb_fix.smem_len = videomemorysize;
+
+ strcpy(fb_info.modename, vfb_fix.id);
     fb_info.changevar = NULL;
     fb_info.node = -1;
     fb_info.fbops = &vfb_ops;
+ fb_info.var = vfb_default;
+ fb_info.fix = vfb_fix;
     fb_info.disp = &disp;
     fb_info.switch_con = &vfbcon_switch;
     fb_info.updatevar = &vfbcon_updatevar;
     fb_info.blank = &vfbcon_blank;
     fb_info.flags = FBINFO_FLAG_DEFAULT;
+
+ /* Set the default color map */
+ fb_info.cmap.len = 1<<fb_info.var.bits_per_pixel;
+ fb_alloc_cmap(&fb_info.cmap, fb_info.cmap.len, 0);
 
+ /* Set the default video mode */
     vfb_set_var(&vfb_default, -1, &fb_info);
 
     if (register_framebuffer(&fb_info) < 0) {
@@ -460,16 +527,24 @@
     return 0;
 }
 
-
 static int vfbcon_switch(int con, struct fb_info *info)
 {
- /* Do we have to save the colormap? */
- if (fb_display[currcon].cmap.len)
- fb_get_cmap(&fb_display[currcon].cmap, 1, vfb_getcolreg, info);
-
- currcon = con;
- /* Install new colormap */
- do_install_cmap(con, info);
+ /* Save the colormap and video mode */
+ fb_copy_cmap(&info->cmap, &fb_display[currcon].cmap, 0);
+
+ memcpy(&fb_display[currcon].var, &info->var,
+ sizeof(struct fb_var_screeninfo));
+
+ /* Install a new colormap and change the video mode. By default fbcon
+ * sets all the colormaps and video modes to the default values at
+ * bootup.
+ */
+ fb_copy_cmap(&fb_display[con].cmap, &info->cmap, 0);
+ fb_set_cmap(&info->cmap, 1, vfb_setcolreg, info);
+
+ memcpy(&info->var, &fb_display[con].var,
+ sizeof(struct fb_var_screeninfo));
+ vfb_set_var(&info->var, con, &fb_info);
     return 0;
 }
 
@@ -501,89 +576,7 @@
     length >>= 3;
     return(length);
 }
-
-static void vfb_encode_fix(struct fb_fix_screeninfo *fix,
- struct fb_var_screeninfo *var)
-{
- memset(fix, 0, sizeof(struct fb_fix_screeninfo));
- strcpy(fix->id, vfb_name);
- fix->smem_start = videomemory;
- fix->smem_len = videomemorysize;
- fix->type = FB_TYPE_PACKED_PIXELS;
- fix->type_aux = 0;
- switch (var->bits_per_pixel) {
- case 1:
- fix->visual = FB_VISUAL_MONO01;
- break;
- case 2:
- case 4:
- case 8:
- fix->visual = FB_VISUAL_PSEUDOCOLOR;
- break;
- case 16:
- case 24:
- case 32:
- fix->visual = FB_VISUAL_TRUECOLOR;
- break;
- }
- fix->ywrapstep = 1;
- fix->xpanstep = 1;
- fix->ypanstep = 1;
- fix->line_length = get_line_length(var->xres_virtual, var->bits_per_pixel);
-}
-
-static void set_color_bitfields(struct fb_var_screeninfo *var)
-{
- switch (var->bits_per_pixel) {
- case 1:
- case 8:
- var->red.offset = 0;
- var->red.length = 8;
- var->green.offset = 0;
- var->green.length = 8;
- var->blue.offset = 0;
- var->blue.length = 8;
- var->transp.offset = 0;
- var->transp.length = 0;
- break;
- case 16: /* RGB 565 */
- var->red.offset = 0;
- var->red.length = 5;
- var->green.offset = 5;
- var->green.length = 6;
- var->blue.offset = 11;
- var->blue.length = 5;
- var->transp.offset = 0;
- var->transp.length = 0;
- break;
- case 24: /* RGB 888 */
- var->red.offset = 0;
- var->red.length = 8;
- var->green.offset = 8;
- var->green.length = 8;
- var->blue.offset = 16;
- var->blue.length = 8;
- var->transp.offset = 0;
- var->transp.length = 0;
- break;
- case 32: /* RGBA 8888 */
- var->red.offset = 0;
- var->red.length = 8;
- var->green.offset = 8;
- var->green.length = 8;
- var->blue.offset = 16;
- var->blue.length = 8;
- var->transp.offset = 24;
- var->transp.length = 8;
- break;
- }
- var->red.msb_right = 0;
- var->green.msb_right = 0;
- var->blue.msb_right = 0;
- var->transp.msb_right = 0;
-}
-
-
+
     /*
      * Read a single color register and split it into
      * colors/transparent. Return != 0 for invalid regno.
@@ -621,19 +614,6 @@
     palette[regno].blue = blue;
     return 0;
 }
-
-
-static void do_install_cmap(int con, struct fb_info *info)
-{
- if (con != currcon)
- return;
- if (fb_display[con].cmap.len)
- fb_set_cmap(&fb_display[con].cmap, 1, vfb_setcolreg, info);
- else
- fb_set_cmap(fb_default_cmap(1<<fb_display[con].var.bits_per_pixel), 1,
- vfb_setcolreg, info);
-}
-
 
 #ifdef MODULE
 int init_module(void)
diff -urN linux-2.3.36/include/linux/fb.h linux-test/include/linux/fb.h
--- linux-2.3.36/include/linux/fb.h Tue Dec 7 19:35:36 1999
+++ linux-test/include/linux/fb.h Wed Jan 5 09:10:40 2000
@@ -209,6 +209,12 @@
         unsigned dpms : 1; /* supports DPMS */
 };
 
+/* VESA Blanking Levels */
+#define VESA_NO_BLANKING 0
+#define VESA_VSYNC_SUSPEND 1
+#define VESA_HSYNC_SUSPEND 2
+#define VESA_POWERDOWN 3
+
 #ifdef __KERNEL__
 
 #include <linux/fs.h>
@@ -259,9 +265,13 @@
    char modename[40]; /* default video mode */
    kdev_t node;
    int flags;
+ int chip_type; /* Seperate similar cards apart */
 #define FBINFO_FLAG_MODULE 1 /* Low-level driver is a module */
+ struct fb_var_screeninfo var; /* Current var */
+ struct fb_fix_screeninfo fix; /* Current fix */
+ struct fb_monspecs monspecs; /* Current Monitor specs */
+ struct fb_cmap cmap; /* Current colormap */
    struct fb_ops *fbops;
- struct fb_monspecs monspecs;
    struct display *disp; /* initial display variable */
    struct vc_data *display_fg; /* Console visible on this display */
    char fontname[40]; /* default font name */
@@ -273,8 +283,8 @@
    void (*blank)(int, struct fb_info*); /* tell fb to (un)blank the screen */
                                         /* arg = 0: unblank */
                                         /* arg > 0: VESA level (arg-1) */
-
    /* From here on everything is device dependent */
+ void *par;
 };
 
 #ifdef MODULE
@@ -380,13 +390,6 @@
                        struct fb_info *fb_info);
 extern struct fb_cmap *fb_default_cmap(int len);
 extern void fb_invert_cmaps(void);
-
-/* VESA Blanking Levels */
-#define VESA_NO_BLANKING 0
-#define VESA_VSYNC_SUSPEND 1
-#define VESA_HSYNC_SUSPEND 2
-#define VESA_POWERDOWN 3
-
 
 struct fb_videomode {
     const char *name; /* optional */

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jan 07 2000 - 21:00:03 EST