Commit 5dfd412e authored by Petr Vandrovec's avatar Petr Vandrovec Committed by Linus Torvalds

[PATCH] More display -> fb_info fixes for new fbdev

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.
parent 062dffea
......@@ -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;
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -32,12 +32,12 @@
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;
}
}
......
......@@ -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;
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment