Commit ece1c8ef authored by James Simmons's avatar James Simmons

C99 fixes. Framebuffer console fix.

parent 0dc1531b
...@@ -681,7 +681,6 @@ static void fbcon_deinit(struct vc_data *vc) ...@@ -681,7 +681,6 @@ static void fbcon_deinit(struct vc_data *vc)
p->conp = 0; p->conp = 0;
} }
#define fontwidthvalid(p,w) ((p)->fontwidthmask & FONTWIDTH(w)) #define fontwidthvalid(p,w) ((p)->fontwidthmask & FONTWIDTH(w))
static int fbcon_changevar(int con) static int fbcon_changevar(int con)
...@@ -734,12 +733,14 @@ static int fbcon_changevar(int con) ...@@ -734,12 +733,14 @@ static int fbcon_changevar(int con)
p->fontdata = font->data; p->fontdata = font->data;
} }
#ifdef FBCON_FONTWIDTH8_ONLY
if (!fontwidthvalid(p, vc->vc_font.width)) { if (!fontwidthvalid(p, vc->vc_font.width)) {
/* ++Geert: changed from panic() to `correct and continue' */ /* ++Geert: changed from panic() to `correct and continue' */
printk(KERN_ERR printk(KERN_ERR
"fbcon_set_display: No support for fontwidth %d\n", "fbcon_set_display: No support for fontwidth %d\n",
vc->vc_font.width); vc->vc_font.width);
} }
#endif
updatescrollmode(p, vc); updatescrollmode(p, vc);
old_cols = vc->vc_cols; old_cols = vc->vc_cols;
...@@ -878,12 +879,14 @@ static void fbcon_set_display(int con, int init, int logo) ...@@ -878,12 +879,14 @@ static void fbcon_set_display(int con, int init, int logo)
p->fontdata = font->data; p->fontdata = font->data;
} }
#ifdef FBCON_FONTWIDTH8_ONLY
if (!fontwidthvalid(p, vc->vc_font.width)) { if (!fontwidthvalid(p, vc->vc_font.width)) {
/* ++Geert: changed from panic() to `correct and continue' */ /* ++Geert: changed from panic() to `correct and continue' */
printk(KERN_ERR printk(KERN_ERR
"fbcon_set_display: No support for fontwidth %d\n", "fbcon_set_display: No support for fontwidth %d\n",
vc->vc_font.width); vc->vc_font.width);
} }
#endif
updatescrollmode(p, vc); updatescrollmode(p, vc);
old_cols = vc->vc_cols; old_cols = vc->vc_cols;
......
...@@ -75,30 +75,30 @@ ...@@ -75,30 +75,30 @@
static struct fb_info fb_info; static struct fb_info fb_info;
static struct fb_fix_screeninfo fb_fix __initdata = { static struct fb_fix_screeninfo fb_fix __initdata = {
.id = "G364 8plane", .id = "G364 8plane",
.smem_start = 0x40000000, /* physical address */ .smem_start = 0x40000000, /* physical address */
.type = FB_TYPE_PACKED_PIXELS, .type = FB_TYPE_PACKED_PIXELS,
.visual = FB_VISUAL_PSEUDOCOLOR, .visual = FB_VISUAL_PSEUDOCOLOR,
.ypanstep = 1, .ypanstep = 1,
.accel = FB_ACCEL_NONE, .accel = FB_ACCEL_NONE,
}; };
static struct fb_var_screeninfo fb_var __initdata = { static struct fb_var_screeninfo fb_var __initdata = {
.bits_per_pixel =8, .bits_per_pixel = 8,
.red = { 0, 8, 0 }, .red = { 0, 8, 0 },
green: { 0, 8, 0 }, .green = { 0, 8, 0 },
blue: { 0, 8, 0 }, .blue = { 0, 8, 0 },
activate:FB_ACTIVATE_NOW, .activate = FB_ACTIVATE_NOW,
height: -1, .height = -1,
width: -1, .width = -1,
pixclock:39722, .pixclock = 39722,
left_margin: 40, .left_margin = 40,
right_margin: 24, .right_margin = 24,
upper_margin: 32, .upper_margin = 32,
lower_margin: 11, .lower_margin = 11,
hsync_len: 96, .hsync_len = 96,
vsync_len: 2, .vsync_len = 2,
vmode: FB_VMODE_NONINTERLACED, .vmode = FB_VMODE_NONINTERLACED,
}; };
/* /*
......
...@@ -43,24 +43,27 @@ ...@@ -43,24 +43,27 @@
static struct fb_info fb_info; static struct fb_info fb_info;
static struct fb_var_screeninfo maxinefb_defined = { static struct fb_var_screeninfo maxinefb_defined = {
.xres = 1024, .xres = 1024,
.yres = 768, .yres = 768,
.xres_virtual = 1024, .xres_virtual = 1024,
.yres_virtual = 768, .yres_virtual = 768,
.bits_per_pixel =8, .bits_per_pixel = 8,
.activate = FB_ACTIVATE_NOW, .red.length = 8,
.height = -1, .green.length = 8,
.width = -1, .blue.length = 8,
.vmode = FB_VMODE_NONINTERLACED, .activate = FB_ACTIVATE_NOW,
.height = -1,
.width = -1,
.vmode = FB_VMODE_NONINTERLACED,
}; };
static struct fb_fix_screeninfo maxinefb_fix = { static struct fb_fix_screeninfo maxinefb_fix = {
.id = "Maxine onboard graphics 1024x768x8", .id = "Maxine onboard graphics 1024x768x8",
.smem_len = (1024*768), .smem_len = (1024*768),
.type = FB_TYPE_PACKED_PIXELS, .type = FB_TYPE_PACKED_PIXELS,
.visual = FB_VISUAL_PSEUDOCOLOR, .visual = FB_VISUAL_PSEUDOCOLOR,
.line_length = 1024, .line_length = 1024,
} };
/* Reference to machine type set in arch/mips/dec/prom/identify.c, KM */ /* Reference to machine type set in arch/mips/dec/prom/identify.c, KM */
extern unsigned long mips_machtype; extern unsigned long mips_machtype;
......
...@@ -52,25 +52,28 @@ struct pmag_ba_ramdac_regs { ...@@ -52,25 +52,28 @@ struct pmag_ba_ramdac_regs {
static struct fb_info pmagba_fb_info[3]; static struct fb_info pmagba_fb_info[3];
static struct fb_var_screeninfo pmagbafb_defined = { static struct fb_var_screeninfo pmagbafb_defined = {
.xres = 1024, .xres = 1024,
.yres = 864, .yres = 864,
.xres_virtual = 1024, .xres_virtual = 1024,
.yres_virtual = 864, .yres_virtual = 864,
.bits_per_pixel =8, .bits_per_pixel = 8,
.activate = FB_ACTIVATE_NOW, .red.length = 8,
.height = 274, .green.length = 8,
.width = 195, .blue.length = 8,
.accel = FB_ACCEL_NONE, .activate = FB_ACTIVATE_NOW,
.vmode = FB_VMODE_NONINTERLACED, .height = 274,
} .width = 195,
.accel = FB_ACCEL_NONE,
.vmode = FB_VMODE_NONINTERLACED,
};
static struct fb_fix_screeninfo pmagbafb_fix = { static struct fb_fix_screeninfo pmagbafb_fix = {
.id = "PMAG-BA", .id = "PMAG-BA",
.smem_len = (1024 * 864), .smem_len = (1024 * 864),
.type = FB_TYPE_PACKED_PIXELS, .type = FB_TYPE_PACKED_PIXELS,
.visual = FB_VISUAL_PSEUDOCOLOR, .visual = FB_VISUAL_PSEUDOCOLOR,
.line_length = 1024, .line_length = 1024,
} };
/* /*
* Turn hardware cursor off * Turn hardware cursor off
...@@ -113,7 +116,7 @@ static struct fb_ops pmagbafb_ops = { ...@@ -113,7 +116,7 @@ static struct fb_ops pmagbafb_ops = {
.fb_copyarea = cfb_copyarea, .fb_copyarea = cfb_copyarea,
.fb_imageblit = cfb_imageblit, .fb_imageblit = cfb_imageblit,
.fb_cursor = soft_cursor, .fb_cursor = soft_cursor,
} };
int __init pmagbafb_init_one(int slot) int __init pmagbafb_init_one(int slot)
{ {
...@@ -170,9 +173,4 @@ int __init pmagbafb_init(void) ...@@ -170,9 +173,4 @@ int __init pmagbafb_init(void)
} }
} }
int __init pmagbafb_setup(char *options)
{
return 0;
}
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -55,24 +55,27 @@ struct pmagb_b_ramdac_regs { ...@@ -55,24 +55,27 @@ struct pmagb_b_ramdac_regs {
static struct fb_info pmagbb_fb_info[3]; static struct fb_info pmagbb_fb_info[3];
static struct fb_var_screeninfo pmagbbfb_defined = { static struct fb_var_screeninfo pmagbbfb_defined = {
.xres = 1280, .xres = 1280,
.yres = 1024, .yres = 1024,
.xres_virtual = 1280, .xres_virtual = 1280,
.yres_virtual = 1024, .yres_virtual = 1024,
.bits_per_pixel =8, .bits_per_pixel = 8,
.activate = FB_ACTIVATE_NOW, .red.length = 8,
.height = 274, .green.length = 8,
.width = 195, .blue.length = 8,
.accel_flags = FB_ACCEL_NONE, .activate = FB_ACTIVATE_NOW,
.vmode = FB_VMODE_NONINTERLACED, .height = 274,
.width = 195,
.accel_flags = FB_ACCEL_NONE,
.vmode = FB_VMODE_NONINTERLACED,
}; };
static struct fb_fix_screeninfo pmagbafb_fix = { static struct fb_fix_screeninfo pmagbafb_fix = {
.id = "PMAGB-BA", .id = "PMAGB-BA",
.smem_len = (1280 * 1024), .smem_len = (1280 * 1024),
.type = FB_TYPE_PACKED_PIXELS, .type = FB_TYPE_PACKED_PIXELS,
.visual = FB_VISUAL_PSEUDOCOLOR, .visual = FB_VISUAL_PSEUDOCOLOR,
.line_length = 1280, .line_length = 1280,
} }
/* /*
...@@ -173,9 +176,4 @@ int __init pmagbbfb_init(void) ...@@ -173,9 +176,4 @@ int __init pmagbbfb_init(void)
} }
} }
int __init pmagbbfb_setup(char *options)
{
return 0;
}
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
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