Commit 115f4504 authored by James Simmons's avatar James Simmons

Removed currcon and other console related code. Very little is now left.

parent 5916159c
......@@ -75,13 +75,11 @@ anakinfb_init(void)
memset(&fb_info, 0, sizeof(struct fb_info));
fb_info.node = NODEV;
fb_info.currcon = -1;
fb_info.flags = FBINFO_FLAG_DEFAULT;
fb_info.fbops = &anakinfb_ops;
fb_info.var = anakinfb_var;
fb_info.fix = anakinfb_fix;
strcpy(fb_info.fontname, "VGA8x16");
fb_info.updatevar = gen_update_var;
if (!(request_mem_region(VGA_START, VGA_SIZE, "vga")))
return -ENOMEM;
if (fb_info.screen_base = ioremap(VGA_START, VGA_SIZE)) {
......
......@@ -264,13 +264,11 @@ int __init clps711xfb_init(void)
memset(cfb, 0, sizeof(*cfb));
memset((void *)PAGE_OFFSET, 0, 0x14000);
cfb->currcon = -1;
strcpy(cfb->fix.id, "clps7111");
cfb->screen_base = (void *)PAGE_OFFSET;
cfb->fix.smem_start = PAGE_OFFSET;
cfb->fix.smem_len = 0x14000;
cfb->fix.type = FB_TYPE_PACKED_PIXELS;
cfb->fix.type = FB_TYPE_PACKED_PIXELS;
cfb->var.xres = 640;
cfb->var.xres_virtual = 640;
......@@ -283,7 +281,6 @@ int __init clps711xfb_init(void)
cfb->var.width = -1;
cfb->fbops = &clps7111fb_ops;
cfb->updatevar = gen_update_var;
cfb->flags = FBINFO_FLAG_DEFAULT;
fb_alloc_cmap(&cfb->cmap, CMAP_SIZE, 0);
......
......@@ -235,10 +235,8 @@ unsigned long __init dnfb_init(unsigned long mem_start)
int err;
fb_info.fontname[0] = 0;
fb_info.updatevar = gen_update_var;
fb_info.node = NODEV;
fb_info.fbops = &dn_fb_ops;
fb_info.currcon = -1;
fb_info.fix = dnfb_fix;
fb_info.var = dnfb_var;
fb_info.screen_base = (u_char *) fb_info.fix.smem_start;
......
......@@ -105,10 +105,9 @@ void fbcon_vga_planes_setup(struct display *p)
void fbcon_vga_planes_bmove(struct display *p, int sy, int sx, int dy, int dx,
int height, int width)
{
char *src;
char *dest;
int line_ofs;
int x;
struct fb_info *info = p->fb_info;
char *dest, *src;
int line_ofs, x;
setmode(1);
setop(0);
......@@ -119,9 +118,9 @@ void fbcon_vga_planes_bmove(struct display *p, int sy, int sx, int dy, int dx,
height *= fontheight(p);
if (dy < sy || (dy == sy && dx < sx)) {
line_ofs = p->fb_info->fix.line_length - width;
dest = p->fb_info->screen_base + dx + dy * p->fb_info->fix.line_length;
src = p->fb_info->screen_base + sx + sy * p->fb_info->fix.line_length;
line_ofs = info->fix.line_length - width;
dest = info->screen_base + dx + dy * info->fix.line_length;
src = info->screen_base + sx + sy * info->fix.line_length;
while (height--) {
for (x = 0; x < width; x++) {
readb(src);
......@@ -133,9 +132,9 @@ void fbcon_vga_planes_bmove(struct display *p, int sy, int sx, int dy, int dx,
dest += line_ofs;
}
} else {
line_ofs = p->fb_info->fix.line_length - width;
dest = p->fb_info->screen_base + dx + width + (dy + height - 1) * p->fb_info->fix.line_length;
src = p->fb_info->screen_base + sx + width + (sy + height - 1) * p->fb_info->fix.line_length;
line_ofs = info->fix.line_length - width;
dest = info->screen_base + dx + width + (dy + height - 1) * info->fix.line_length;
src = info->screen_base + sx + width + (sy + height - 1) * info->fix.line_length;
while (height--) {
for (x = 0; x < width; x++) {
dest--;
......@@ -177,137 +176,48 @@ void fbcon_vga_planes_clear(struct vc_data *conp, struct display *p, int sy, int
}
}
void fbcon_ega_planes_putc(struct vc_data *conp, struct display *p, int c, int yy, int xx)
{
int fg = attr_fgcol(p,c);
int bg = attr_bgcol(p,c);
int y;
u8 *cdat = p->fontdata + (c & p->charmask) * fontheight(p);
char *where = p->fb_info->screen_base + xx + yy * p->fb_info->fix.line_length * fontheight(p);
setmode(0);
setop(0);
setsr(0xf);
setcolor(bg);
selectmask();
setmask(0xff);
for (y = 0; y < fontheight(p); y++, where += p->fb_info->fix.line_length)
rmw(where);
where -= p->fb_info->fix.line_length * y;
setcolor(fg);
selectmask();
for (y = 0; y < fontheight(p); y++, where += p->fb_info->fix.line_length)
if (cdat[y]) {
setmask(cdat[y]);
rmw(where);
}
}
void fbcon_vga_planes_putc(struct vc_data *conp, struct display *p, int c, int yy, int xx)
{
int fg = attr_fgcol(p,c);
int bg = attr_bgcol(p,c);
int y;
u8 *cdat = p->fontdata + (c & p->charmask) * fontheight(p);
char *where = p->fb_info->screen_base + xx + yy * p->fb_info->fix.line_length * fontheight(p);
setmode(2);
setop(0);
setsr(0xf);
setcolor(fg);
selectmask();
setmask(0xff);
writeb(bg, where);
rmb();
readb(where); /* fill latches */
setmode(3);
wmb();
for (y = 0; y < fontheight(p); y++, where += p->fb_info->fix.line_length)
writeb(cdat[y], where);
wmb();
}
/* 28.50 in my test */
void fbcon_ega_planes_putcs(struct vc_data *conp, struct display *p, const unsigned short *s,
int count, int yy, int xx)
void fbcon_accel_putc(struct vc_data *vc, struct display *p, int c, int yy,
int xx)
{
u16 c = scr_readw(s);
int fg = attr_fgcol(p, c);
int bg = attr_bgcol(p, c);
char *where;
int n;
setmode(2);
setop(0);
selectmask();
setmask(0xff);
where = p->fb_info->screen_base + xx + yy * p->fb_info->fix.line_length * fontheight(p);
writeb(bg, where);
rmb();
readb(where); /* fill latches */
wmb();
selectmask();
for (n = 0; n < count; n++) {
int c = scr_readw(s++) & p->charmask;
u8 *cdat = p->fontdata + c * fontheight(p);
u8 *end = cdat + fontheight(p);
while (cdat < end) {
outb(*cdat++, GRAPHICS_DATA_REG);
wmb();
writeb(fg, where);
where += p->fb_info->fix.line_length;
}
where += 1 - p->fb_info->fix.line_length * fontheight(p);
}
wmb();
struct fb_info *info = p->fb_info;
unsigned short charmask = p->charmask;
unsigned int width = ((fontwidth(p)+7)>>3);
struct fb_image image;
image.fg_color = attr_fgcol(p, c);
image.bg_color = attr_bgcol(p, c);
image.dx = xx * fontwidth(p);
image.dy = yy * fontheight(p);
image.width = fontwidth(p);
image.height = fontheight(p);
image.depth = 1;
image.data = p->fontdata + (c & charmask)*fontheight(p)*width;
info->fbops->fb_imageblit(info, &image);
}
/* 6.96 in my test */
void fbcon_vga_planes_putcs(struct vc_data *conp, struct display *p, const unsigned short *s,
int count, int yy, int xx)
void fbcon_accel_putcs(struct vc_data *vc, struct display *p,
const unsigned short *s, int count, int yy, int xx)
{
u16 c = scr_readw(s);
int fg = attr_fgcol(p, c);
int bg = attr_bgcol(p, c);
char *where;
int n;
setmode(2);
setop(0);
setsr(0xf);
setcolor(fg);
selectmask();
setmask(0xff);
where = p->fb_info->screen_base + xx + yy * p->fb_info->fix.line_length * fontheight(p);
writeb(bg, where);
rmb();
readb(where); /* fill latches */
setmode(3);
wmb();
for (n = 0; n < count; n++) {
int y;
int c = scr_readw(s++) & p->charmask;
u8 *cdat = p->fontdata + (c & p->charmask) * fontheight(p);
for (y = 0; y < fontheight(p); y++, cdat++) {
writeb (*cdat, where);
where += p->fb_info->fix.line_length;
}
where += 1 - p->fb_info->fix.line_length * fontheight(p);
}
wmb();
struct fb_info *info = p->fb_info;
unsigned short charmask = p->charmask;
unsigned int width = ((fontwidth(p)+7)>>3);
struct fb_image image;
image.fg_color = attr_fgcol(p, *s);
image.bg_color = attr_bgcol(p, *s);
image.dx = xx * fontwidth(p);
image.dy = yy * fontheight(p);
image.width = fontwidth(p);
image.height = fontheight(p);
image.depth = 1;
while (count--) {
image.data = p->fontdata +
(scr_readw(s++) & charmask) * fontheight(p) * width;
info->fbops->fb_imageblit(info, &image);
image.dx += fontwidth(p);
}
}
void fbcon_vga_planes_revc(struct display *p, int xx, int yy)
......@@ -332,18 +242,8 @@ struct display_switch fbcon_vga_planes = {
setup: fbcon_vga_planes_setup,
bmove: fbcon_vga_planes_bmove,
clear: fbcon_vga_planes_clear,
putc: fbcon_vga_planes_putc,
putcs: fbcon_vga_planes_putcs,
revc: fbcon_vga_planes_revc,
fontwidthmask: FONTWIDTH(8)
};
struct display_switch fbcon_ega_planes = {
setup: fbcon_vga_planes_setup,
bmove: fbcon_vga_planes_bmove,
clear: fbcon_vga_planes_clear,
putc: fbcon_ega_planes_putc,
putcs: fbcon_ega_planes_putcs,
putc: fbcon_accel_putc,
putcs: fbcon_accel_putcs,
revc: fbcon_vga_planes_revc,
fontwidthmask: FONTWIDTH(8)
};
......@@ -369,14 +269,8 @@ EXPORT_SYMBOL(fbcon_vga_planes);
EXPORT_SYMBOL(fbcon_vga_planes_setup);
EXPORT_SYMBOL(fbcon_vga_planes_bmove);
EXPORT_SYMBOL(fbcon_vga_planes_clear);
EXPORT_SYMBOL(fbcon_vga_planes_putc);
EXPORT_SYMBOL(fbcon_vga_planes_putcs);
EXPORT_SYMBOL(fbcon_vga_planes_revc);
EXPORT_SYMBOL(fbcon_ega_planes);
EXPORT_SYMBOL(fbcon_ega_planes_putc);
EXPORT_SYMBOL(fbcon_ega_planes_putcs);
/*
* Overrides for Emacs so that we follow Linus's tabbing style.
* ---------------------------------------------------------------------------
......
......@@ -749,6 +749,7 @@ register_framebuffer(struct fb_info *fb_info)
if (!registered_fb[i])
break;
fb_info->node = mk_kdev(FB_MAJOR, i);
fb_info->currcon = -1;
registered_fb[i] = fb_info;
if (!fb_ever_opened[i]) {
struct module *owner = fb_info->fbops->owner;
......
......@@ -268,8 +268,6 @@ int __init fm2fb_init(void)
fb_info.flags = FBINFO_FLAG_DEFAULT;
/* The below feilds will go away !!!! */
fb_info.currcon = -1;
fb_info.updatevar = gen_update_var;
fb_alloc_cmap(&fb_info.cmap, 16, 0);
if (register_framebuffer(&fb_info) < 0)
......
......@@ -243,9 +243,7 @@ int __init g364fb_init(void)
fb_info.fix = fb_fix;
fb_info.flags = FBINFO_FLAG_DEFAULT;
fb_info.currcon = -1;
fb_info.fontname[0] = '\0';
fb_info.updatevar = gen_update_var;
fb_alloc_cmap(&fb_info.cmap, 255, 0);
if (register_framebuffer(&fb_info) < 0)
......
......@@ -162,8 +162,6 @@ int __init hitfb_init(void)
fb_info.pseudo_palette = pseudo_palette;
fb_info.flags = FBINFO_FLAG_DEFAULT;
fb_info.currcon = -1;
fb_info.updatevar = gen_update_var;
fb_info.screen_base = (void *) hitfb_fix.smem_start;
size = (fb_info.var.bits_per_pixel == 8) ? 256 : 16;
......
......@@ -158,9 +158,6 @@ int __init hpfb_init_one(unsigned long base)
fb_info.fix = hpfb_fix;
fb_info.screen_base = (char *)hpfb_fix.smem_start; // FIXME
/* The below feilds will go away !!!! */
fb_info.currcon = -1;
fb_info.updatevar = gen_update_var;
fb_alloc_cmap(&fb_info.cmap, 256, 0);
if (register_framebuffer(&fb_info) < 0)
......
......@@ -530,9 +530,7 @@ static void __init offb_init_fb(const char *name, const char *full_name,
info->screen_base = ioremap(address, fix->smem_len);
info->par = par;
info->pseudo_palette = (void *) (info + 1);
info->currcon = -1;
info->fontname[0] = '\0';
info->updatevar = gen_update_var;
info->flags = FBINFO_FLAG_DEFAULT;
fb_alloc_cmap(&info->cmap, 256, 0);
......
......@@ -36,8 +36,6 @@
#include <asm/dec/tc.h>
#include "pmag-ba-fb.h"
#include <video/fbcon.h>
struct pmag_ba_ramdac_regs {
unsigned char addr_low;
unsigned char pad0[3];
......
......@@ -112,8 +112,6 @@ int q40fb_init(void)
fb_info.screen_base = (char *) q40fb_fix.smem_start;
/* The below feilds will go away !!!! */
fb_info.currcon = -1;
fb_info.updatevar = gen_update_var;
fb_alloc_cmap(&fb_info.cmap, 16, 0);
master_outb(3, DISPLAY_CONTROL_REG);
......
......@@ -719,8 +719,6 @@ int __init sgivwfb_init(void)
fb_info.fbops = &sgivwfb_ops;
fb_info.pseudo_palette = pseudo_palette;
fb_info.par = &default_par;
fb_info.currcon = -1;
fb_info.updatevar = gen_update_var;
fb_info.flags = FBINFO_FLAG_DEFAULT;
fb_info.screen_base =
......
......@@ -418,15 +418,6 @@ int __init xxxfb_init(void)
info.flags = FBINFO_FLAG_DEFAULT;
info.par = current_par;
/* The following has to be set but in th efuture will go away */
strcpy(info.modename, xxxfb_fix.id);
info.changevar = NULL;
info.currcon = -1;
info.disp = &disp;
info.switch_con = gen_switch;
info.updatevar = gen_update_var;
/*
* This should give a reasonable default video mode. The following is
* done when we can set a video mode.
......
......@@ -1074,11 +1074,6 @@ static int __devinit tdfxfb_probe(struct pci_dev *pdev,
info->pseudo_palette = (void *)(info->par + 1);
info->flags = FBINFO_FLAG_DEFAULT;
/* The below fields will go away !!!! */
strcpy(info->modename, info->fix.id);
info->currcon = -1;
info->updatevar = gen_update_var;
if (!mode_option)
mode_option = "640x480@60";
......
......@@ -292,12 +292,10 @@ int __init tx3912fb_init(void)
return -ENOMEM;
fb_info.node = NODEV;
fb_info.currcon = -1;
fb_info.fbops = &tx3912fb_ops;
fb_info.var = tx3912fb_var;
fb_info.fix = tx3912fb_fix;
fb_info.pseudo_palette = pseudo_palette;
fb_info.updatevar = gen_update_var;
fb_info.flags = FBINFO_FLAG_DEFAULT;
/* Clear the framebuffer */
......
......@@ -348,7 +348,6 @@ int __init vesafb_init(void)
fb_info.fbops = &vesafb_ops;
fb_info.var = vesafb_defined;
fb_info.fix = vesafb_fix;
fb_info.currcon = -1;
fb_info.updatevar = gen_update_var;
fb_info.pseudo_palette = pseudo_palette;
fb_info.flags = FBINFO_FLAG_DEFAULT;
......
......@@ -439,9 +439,6 @@ int __init vfb_init(void)
fb_info.pseudo_palette = &vfb_pseudo_palette;
fb_info.flags = FBINFO_FLAG_DEFAULT;
fb_info.currcon = -1;
fb_info.updatevar = gen_update_var;
fb_alloc_cmap(&fb_info.cmap, 256, 0);
if (register_framebuffer(&fb_info) < 0) {
......
This diff is collapsed.
......@@ -364,8 +364,6 @@ struct fb_info {
char fontname[40]; /* default font name */
devfs_handle_t devfs_handle; /* Devfs handle for new name */
devfs_handle_t devfs_lhandle; /* Devfs handle for compat. symlink */
int (*updatevar)(int, struct fb_info*);
/* tell fb to update the vars */
void *pseudo_palette; /* Fake palette of 16 colors and
the cursor's color for non
palette mode */
......
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