]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] More display -> fb_info fixes for new fbdev
authorPetr Vandrovec <vandrove@vc.cvut.cz>
Fri, 16 Aug 2002 09:57:02 +0000 (02:57 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Fri, 16 Aug 2002 09:57:02 +0000 (02:57 -0700)
This is the second part of "broken cfb* support in the 2.5.31-bk".  I
needed fbcon-cfb2 on one of my systems, and so I went through all
fbcon-* drivers and fixed them.

line_length, type, type_aux and visual were moved from display to
fb_info in last James Simmon's fbdev update.  Unfortunately lowlevel
support modules were not updated.

drivers/video/fbcon-afb.c
drivers/video/fbcon-cfb2.c
drivers/video/fbcon-hga.c
drivers/video/fbcon-ilbm.c
drivers/video/fbcon-mfb.c
drivers/video/fbcon.c

index a94e77d3ae6b21aff42afeb51b400fae4a095aee..6afee164b6090989ae7ac8a6013175a009aea367 100644 (file)
@@ -160,8 +160,8 @@ static u8 expand_table[1024] = {
 
 void fbcon_afb_setup(struct display *p)
 {
-    if (p->line_length)
-       p->next_line = p->line_length;
+    if (p->fb_info->fix.line_length)
+       p->next_line = p->fb_info->fix.line_length;
     else
        p->next_line = p->var.xres_virtual>>3;
     p->next_plane = p->var.yres_virtual*p->next_line;
index 0b5df2ee0e22faf95c36339388ad55ebbe619d7f..e4896a6ce9e3bf66f34962f9b9fae953c299d7eb 100644 (file)
@@ -50,7 +50,7 @@ static u_char nibbletab_cfb2[]={
 
 void fbcon_cfb2_setup(struct display *p)
 {
-    p->next_line = p->line_length ? p->line_length : p->var.xres_virtual>>2;
+    p->next_line = p->fb_info->fix.line_length ? p->fb_info->fix.line_length : p->var.xres_virtual>>2;
     p->next_plane = 0;
 }
 
index 7e4659451dc3a57f86d5ab7404fc3ee9be5581da..4cb12c6e47f5a9d553d33c475b8cb48aec691276 100644 (file)
@@ -45,7 +45,7 @@ void fbcon_hga_setup(struct display *p)
 {
        DPRINTK("fbcon_hga_setup: ll:%d\n", (int)p->line_length);
 
-       p->next_line = p->line_length;
+       p->next_line = p->fb_info->fix.line_length;
        p->next_plane = 0;
 }
 
index 7f7a62491b15bf68c9598d0d103440775fb4a4d4..157736e809a7fbeab4deac13d2c14ee4e0b8abce 100644 (file)
 
 void fbcon_ilbm_setup(struct display *p)
 {
-    if (p->line_length) {
-       p->next_line = p->line_length*p->var.bits_per_pixel;
-       p->next_plane = p->line_length;
+    if (p->fb_info->fix.line_length) {
+       p->next_line = p->fb_info->fix.line_length*p->var.bits_per_pixel;
+       p->next_plane = p->fb_info->fix.line_length;
     } else {
-       p->next_line = p->type_aux;
-       p->next_plane = p->type_aux/p->var.bits_per_pixel;
+       p->next_line = p->fb_info->fix.type_aux;
+       p->next_plane = p->fb_info->fix.type_aux/p->var.bits_per_pixel;
     }
 }
 
index b9fda42e5114bca91f18a8f0c0e7376daf3336f3..21b7b3ddaba7d36f2e87b80e06da2d092973539e 100644 (file)
@@ -25,8 +25,8 @@
 
 void fbcon_mfb_setup(struct display *p)
 {
-    if (p->line_length)
-       p->next_line = p->line_length;
+    if (p->fb_info->fix.line_length)
+       p->next_line = p->fb_info->fix.line_length;
     else
        p->next_line = p->var.xres_virtual>>3;
     p->next_plane = 0;
index 81cc382e8ad5db4c2c171d5624f6f4024729db4b..e6916fa97b85a06db9136a29eb7cf4cfcdb31c60 100644 (file)
@@ -2344,7 +2344,7 @@ static int __init fbcon_show_logo( void )
 
 #if defined(CONFIG_FBCON_IPLAN2P2) || defined(CONFIG_FBCON_IPLAN2P4) || \
     defined(CONFIG_FBCON_IPLAN2P8)
-           int line_length = p->line_length;
+           int line_length = info->fix.line_length;
 
            /* for support of Atari interleaved planes */
 #define MAP_X(x)       (line_length ? (x) : ((x) & ~1)*depth + ((x) & 1))
@@ -2388,12 +2388,12 @@ static int __init fbcon_show_logo( void )
 #if defined(CONFIG_FBCON_MFB) || defined(CONFIG_FBCON_AFB) || \
     defined(CONFIG_FBCON_ILBM) || defined(CONFIG_FBCON_HGA)
 
-       if (depth == 1 && (p->fix.type == FB_TYPE_PACKED_PIXELS ||
-                          p->fix.type == FB_TYPE_PLANES ||
-                          p->fix.type == FB_TYPE_INTERLEAVED_PLANES)) {
+       if (depth == 1 && (info->fix.type == FB_TYPE_PACKED_PIXELS ||
+                          info->fix.type == FB_TYPE_PLANES ||
+                          info->fix.type == FB_TYPE_INTERLEAVED_PLANES)) {
 
            /* monochrome */
-           unsigned char inverse = p->inverse || p->visual == FB_VISUAL_MONO01
+           unsigned char inverse = p->inverse || info->fix.visual == FB_VISUAL_MONO01
                ? 0x00 : 0xff;
 
            int is_hga = !strncmp(p->fb_info->modename, "HGA", 3);