Commit 3f0b3460 authored by Linus Torvalds's avatar Linus Torvalds

Merge http://fbdev.bkbits.net/fbdev-2.5

into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux
parents f38b769d e73ea16d
......@@ -10,7 +10,7 @@ mod-subdirs := matrox
# This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'.
export-objs := fbmem.o fbcmap.o fbcon.o fbmon.o modedb.o \
fbcon-afb.o fbcon-ilbm.o \
fbcon-afb.o fbcon-ilbm.o fbgen.o \
fbcon-vga.o fbcon-iplan2p2.o fbcon-iplan2p4.o \
fbcon-iplan2p8.o fbcon-vga-planes.o fbcon-cfb16.o \
fbcon-cfb2.o fbcon-cfb24.o fbcon-cfb32.o fbcon-cfb4.o \
......@@ -35,7 +35,7 @@ obj-$(CONFIG_FONT_PEARL_8x8) += font_pearl_8x8.o
obj-$(CONFIG_FONT_ACORN_8x8) += font_acorn_8x8.o
# Add fbmon.o back into obj-$(CONFIG_FB) in 2.5.x
obj-$(CONFIG_FB) += fbmem.o fbcmap.o modedb.o fbcon.o fonts.o
obj-$(CONFIG_FB) += fbmem.o fbcmap.o modedb.o fbcon.o fonts.o fbgen.o
# Only include macmodes.o if we have FB support and are PPC
ifeq ($(CONFIG_FB),y)
obj-$(CONFIG_PPC) += macmodes.o
......@@ -43,7 +43,7 @@ endif
obj-$(CONFIG_FB_ACORN) += acornfb.o
obj-$(CONFIG_FB_AMIGA) += amifb.o
obj-$(CONFIG_FB_PM2) += pm2fb.o fbgen.o
obj-$(CONFIG_FB_PM2) += pm2fb.o
obj-$(CONFIG_FB_APOLLO) += dnfb.o
obj-$(CONFIG_FB_Q40) += q40fb.o
obj-$(CONFIG_FB_ATARI) += atafb.o
......@@ -66,9 +66,9 @@ obj-$(CONFIG_FB_HP300) += hpfb.o
obj-$(CONFIG_FB_OF) += offb.o
obj-$(CONFIG_FB_IMSTT) += imsttfb.o
obj-$(CONFIG_FB_RETINAZ3) += retz3fb.o
obj-$(CONFIG_FB_CLGEN) += clgenfb.o fbgen.o
obj-$(CONFIG_FB_CLGEN) += clgenfb.o
obj-$(CONFIG_FB_S3TRIO) += S3triofb.o
obj-$(CONFIG_FB_TGA) += tgafb.o fbgen.o
obj-$(CONFIG_FB_TGA) += tgafb.o
obj-$(CONFIG_FB_VESA) += vesafb.o
obj-$(CONFIG_FB_VGA16) += vga16fb.o fbcon-vga-planes.o
obj-$(CONFIG_FB_VIRGE) += virgefb.o
......@@ -82,7 +82,7 @@ obj-$(CONFIG_FB_TCX) += tcxfb.o sbusfb.o
obj-$(CONFIG_FB_CGFOURTEEN) += cgfourteenfb.o sbusfb.o
obj-$(CONFIG_FB_P9100) += p9100fb.o sbusfb.o
obj-$(CONFIG_FB_LEO) += leofb.o sbusfb.o
obj-$(CONFIG_FB_STI) += stifb.o sticore.o fbgen.o
obj-$(CONFIG_FB_STI) += stifb.o sticore.o
obj-$(CONFIG_FB_PMAG_BA) += pmag-ba-fb.o
obj-$(CONFIG_FB_PMAGB_B) += pmagb-b-fb.o
obj-$(CONFIG_FB_MAXINE) += maxinefb.o
......@@ -114,8 +114,8 @@ obj-$(CONFIG_FB_BWTWO) += bwtwofb.o
obj-$(CONFIG_FB_HGA) += hgafb.o
obj-$(CONFIG_FB_SA1100) += sa1100fb.o
obj-$(CONFIG_FB_VIRTUAL) += vfb.o
obj-$(CONFIG_FB_HIT) += hitfb.o fbgen.o
obj-$(CONFIG_FB_E1355) += epson1355fb.o fbgen.o
obj-$(CONFIG_FB_HIT) += hitfb.o
obj-$(CONFIG_FB_E1355) += epson1355fb.o
obj-$(CONFIG_FB_PVR2) += pvr2fb.o
obj-$(CONFIG_FB_VOODOO1) += sstfb.o
......
......@@ -2625,7 +2625,7 @@ static int atyfbcon_switch(int con, struct fb_info *fb)
#ifdef CONFIG_FB_ATY_CT
/* Erase HW Cursor */
if (info->cursor)
if (info->cursor && (fb->currcon >= 0))
atyfb_cursor(&fb_display[fb->currcon], CM_ERASE,
info->cursor->pos.x, info->cursor->pos.y);
#endif /* CONFIG_FB_ATY_CT */
......
/*
* FBcon low-level driver for 32 bpp packed pixel (cfb32)
* FBcon low-level driver that is a wrapper for the accel engine.
*/
#ifndef _VIDEO_FBCON_ACCEL_H
......
......@@ -47,8 +47,8 @@ void fbcon_cfb16_bmove(struct display *p, int sy, int sx, int dy, int dx,
u8 *src, *dst;
if (sx == 0 && dx == 0 && width * fontwidth(p) * 2 == bytes) {
fb_memmove(p->screen_base + dy * linesize,
p->screen_base + sy * linesize,
fb_memmove(p->fb_info->screen_base + dy * linesize,
p->fb_info->screen_base + sy * linesize,
height * linesize);
return;
}
......@@ -62,16 +62,16 @@ void fbcon_cfb16_bmove(struct display *p, int sy, int sx, int dy, int dx,
width *= fontwidth(p)*2;
}
if (dy < sy || (dy == sy && dx < sx)) {
src = p->screen_base + sy * linesize + sx;
dst = p->screen_base + dy * linesize + dx;
src = p->fb_info->screen_base + sy * linesize + sx;
dst = p->fb_info->screen_base + dy * linesize + dx;
for (rows = height * fontheight(p); rows--;) {
fb_memmove(dst, src, width);
src += bytes;
dst += bytes;
}
} else {
src = p->screen_base + (sy+height) * linesize + sx - bytes;
dst = p->screen_base + (dy+height) * linesize + dx - bytes;
src = p->fb_info->screen_base + (sy+height) * linesize + sx - bytes;
dst = p->fb_info->screen_base + (dy+height) * linesize + dx - bytes;
for (rows = height * fontheight(p); rows--;) {
fb_memmove(dst, src, width);
src -= bytes;
......@@ -108,7 +108,7 @@ void fbcon_cfb16_clear(struct vc_data *conp, struct display *p, int sy, int sx,
int bytes = p->next_line, lines = height * fontheight(p);
u32 bgx;
dest = p->screen_base + sy * fontheight(p) * bytes + sx * fontwidth(p) * 2;
dest = p->fb_info->screen_base + sy * fontheight(p) * bytes + sx * fontwidth(p) * 2;
bgx = ((u16 *)p->dispsw_data)[attr_bgcol_ec(p, conp)];
......@@ -126,7 +126,7 @@ void fbcon_cfb16_putc(struct vc_data *conp, struct display *p, int c, int yy,
int bytes = p->next_line, rows;
u32 eorx, fgx, bgx;
dest = p->screen_base + yy * fontheight(p) * bytes + xx * fontwidth(p) * 2;
dest = p->fb_info->screen_base + yy * fontheight(p) * bytes + xx * fontwidth(p) * 2;
fgx = ((u16 *)p->dispsw_data)[attr_fgcol(p, c)];
bgx = ((u16 *)p->dispsw_data)[attr_bgcol(p, c)];
......@@ -177,7 +177,7 @@ void fbcon_cfb16_putcs(struct vc_data *conp, struct display *p,
int rows, bytes = p->next_line;
u32 eorx, fgx, bgx;
dest0 = p->screen_base + yy * fontheight(p) * bytes + xx * fontwidth(p) * 2;
dest0 = p->fb_info->screen_base + yy * fontheight(p) * bytes + xx * fontwidth(p) * 2;
c = scr_readw(s);
fgx = ((u16 *)p->dispsw_data)[attr_fgcol(p, c)];
bgx = ((u16 *)p->dispsw_data)[attr_bgcol(p, c)];
......@@ -233,7 +233,7 @@ void fbcon_cfb16_revc(struct display *p, int xx, int yy)
u8 *dest;
int bytes = p->next_line, rows;
dest = p->screen_base + yy * fontheight(p) * bytes + xx * fontwidth(p)*2;
dest = p->fb_info->screen_base + yy * fontheight(p) * bytes + xx * fontwidth(p)*2;
for (rows = fontheight(p); rows--; dest += bytes) {
switch (fontwidth(p)) {
case 16:
......@@ -268,10 +268,10 @@ void fbcon_cfb16_clear_margins(struct vc_data *conp, struct display *p,
bgx = ((u16 *)p->dispsw_data)[attr_bgcol_ec(p, conp)];
if (!bottom_only && (right_width = p->var.xres-right_start))
rectfill(p->screen_base+right_start*2, right_width,
rectfill(p->fb_info->screen_base+right_start*2, right_width,
p->var.yres_virtual, bgx, bytes);
if ((bottom_width = p->var.yres-bottom_start))
rectfill(p->screen_base+(p->var.yoffset+bottom_start)*bytes,
rectfill(p->fb_info->screen_base+(p->var.yoffset+bottom_start)*bytes,
right_start, bottom_width, bgx, bytes);
}
......
......@@ -61,14 +61,14 @@ void fbcon_cfb2_bmove(struct display *p, int sy, int sx, int dy, int dx,
u8 *src,*dst;
if (sx == 0 && dx == 0 && width * 2 == bytes) {
fb_memmove(p->screen_base + dy * linesize,
p->screen_base + sy * linesize,
fb_memmove(p->fb_info->screen_base + dy * linesize,
p->fb_info->screen_base + sy * linesize,
height * linesize);
}
else {
if (dy < sy || (dy == sy && dx < sx)) {
src = p->screen_base + sy * linesize + sx * 2;
dst = p->screen_base + dy * linesize + dx * 2;
src = p->fb_info->screen_base + sy * linesize + sx * 2;
dst = p->fb_info->screen_base + dy * linesize + dx * 2;
for (rows = height * fontheight(p) ; rows-- ;) {
fb_memmove(dst, src, width * 2);
src += bytes;
......@@ -76,10 +76,8 @@ void fbcon_cfb2_bmove(struct display *p, int sy, int sx, int dy, int dx,
}
}
else {
src = p->screen_base + (sy+height) * linesize + sx * 2
- bytes;
dst = p->screen_base + (dy+height) * linesize + dx * 2
- bytes;
src = p->fb_info->screen_base + (sy+height) * linesize + sx * 2 - bytes;
dst = p->fb_info->screen_base + (dy+height) * linesize + dx * 2 - bytes;
for (rows = height * fontheight(p) ; rows-- ;) {
fb_memmove(dst, src, width * 2);
src -= bytes;
......@@ -96,7 +94,7 @@ void fbcon_cfb2_clear(struct vc_data *conp, struct display *p, int sy, int sx,
int bytes=p->next_line,lines=height * fontheight(p), rows, i;
u32 bgx;
dest = p->screen_base + sy * fontheight(p) * bytes + sx * 2;
dest = p->fb_info->screen_base + sy * fontheight(p) * bytes + sx * 2;
bgx=attr_bgcol_ec(p,conp);
bgx |= (bgx << 2); /* expand the colour to 16 bits */
......@@ -128,7 +126,7 @@ void fbcon_cfb2_putc(struct vc_data *conp, struct display *p, int c, int yy,
int bytes=p->next_line,rows;
u32 eorx,fgx,bgx;
dest = p->screen_base + yy * fontheight(p) * bytes + xx * 2;
dest = p->fb_info->screen_base + yy * fontheight(p) * bytes + xx * 2;
cdat = p->fontdata + (c & p->charmask) * fontheight(p);
fgx=3;/*attr_fgcol(p,c);*/
......@@ -153,7 +151,7 @@ void fbcon_cfb2_putcs(struct vc_data *conp, struct display *p, const unsigned sh
int rows,bytes=p->next_line;
u32 eorx, fgx, bgx;
dest0 = p->screen_base + yy * fontheight(p) * bytes + xx * 2;
dest0 = p->fb_info->screen_base + yy * fontheight(p) * bytes + xx * 2;
c = scr_readw(s);
fgx = 3/*attr_fgcol(p, c)*/;
bgx = attr_bgcol(p, c);
......@@ -179,7 +177,7 @@ void fbcon_cfb2_revc(struct display *p, int xx, int yy)
u8 *dest;
int bytes=p->next_line, rows;
dest = p->screen_base + yy * fontheight(p) * bytes + xx * 2;
dest = p->fb_info->screen_base + yy * fontheight(p) * bytes + xx * 2;
for (rows = fontheight(p) ; rows-- ; dest += bytes) {
fb_writew(fb_readw(dest) ^ 0xffff, dest);
}
......
......@@ -36,8 +36,8 @@ void fbcon_cfb24_bmove(struct display *p, int sy, int sx, int dy, int dx,
u8 *src, *dst;
if (sx == 0 && dx == 0 && width * fontwidth(p) * 3 == bytes) {
fb_memmove(p->screen_base + dy * linesize,
p->screen_base + sy * linesize,
fb_memmove(p->fb_info->screen_base + dy * linesize,
p->fb_info->screen_base + sy * linesize,
height * linesize);
return;
}
......@@ -52,16 +52,16 @@ void fbcon_cfb24_bmove(struct display *p, int sy, int sx, int dy, int dx,
}
sx *= 3; dx *= 3; width *= 3;
if (dy < sy || (dy == sy && dx < sx)) {
src = p->screen_base + sy * linesize + sx;
dst = p->screen_base + dy * linesize + dx;
src = p->fb_info->screen_base + sy * linesize + sx;
dst = p->fb_info->screen_base + dy * linesize + dx;
for (rows = height * fontheight(p); rows--;) {
fb_memmove(dst, src, width);
src += bytes;
dst += bytes;
}
} else {
src = p->screen_base + (sy+height) * linesize + sx - bytes;
dst = p->screen_base + (dy+height) * linesize + dx - bytes;
src = p->fb_info->screen_base + (sy+height) * linesize + sx - bytes;
dst = p->fb_info->screen_base + (dy+height) * linesize + dx - bytes;
for (rows = height * fontheight(p); rows--;) {
fb_memmove(dst, src, width);
src -= bytes;
......@@ -122,7 +122,7 @@ void fbcon_cfb24_clear(struct vc_data *conp, struct display *p, int sy, int sx,
int bytes = p->next_line, lines = height * fontheight(p);
u32 bgx;
dest = p->screen_base + sy * fontheight(p) * bytes + sx * fontwidth(p) * 3;
dest = p->fb_info->screen_base + sy * fontheight(p) * bytes + sx * fontwidth(p) * 3;
bgx = ((u32 *)p->dispsw_data)[attr_bgcol_ec(p, conp)];
......@@ -140,7 +140,7 @@ void fbcon_cfb24_putc(struct vc_data *conp, struct display *p, int c, int yy,
int bytes = p->next_line, rows;
u32 eorx, fgx, bgx, d1, d2, d3, d4;
dest = p->screen_base + yy * fontheight(p) * bytes + xx * fontwidth(p) * 3;
dest = p->fb_info->screen_base + yy * fontheight(p) * bytes + xx * fontwidth(p) * 3;
if (fontwidth(p) <= 8)
cdat = p->fontdata + (c & p->charmask) * fontheight(p);
else
......@@ -190,7 +190,7 @@ void fbcon_cfb24_putcs(struct vc_data *conp, struct display *p,
int rows, bytes = p->next_line;
u32 eorx, fgx, bgx, d1, d2, d3, d4;
dest0 = p->screen_base + yy * fontheight(p) * bytes + xx * fontwidth(p) * 3;
dest0 = p->fb_info->screen_base + yy * fontheight(p) * bytes + xx * fontwidth(p) * 3;
c = scr_readw(s);
fgx = ((u32 *)p->dispsw_data)[attr_fgcol(p, c)];
bgx = ((u32 *)p->dispsw_data)[attr_bgcol(p, c)];
......@@ -241,7 +241,7 @@ void fbcon_cfb24_revc(struct display *p, int xx, int yy)
u8 *dest;
int bytes = p->next_line, rows;
dest = p->screen_base + yy * fontheight(p) * bytes + xx * fontwidth(p) * 3;
dest = p->fb_info->screen_base + yy * fontheight(p) * bytes + xx * fontwidth(p) * 3;
for (rows = fontheight(p); rows--; dest += bytes) {
switch (fontwidth(p)) {
case 16:
......@@ -280,10 +280,10 @@ void fbcon_cfb24_clear_margins(struct vc_data *conp, struct display *p,
bgx = ((u32 *)p->dispsw_data)[attr_bgcol_ec(p, conp)];
if (!bottom_only && (right_width = p->var.xres-right_start))
rectfill(p->screen_base+right_start*3, right_width,
rectfill(p->fb_info->screen_base+right_start*3, right_width,
p->var.yres_virtual, bgx, bytes);
if ((bottom_width = p->var.yres-bottom_start))
rectfill(p->screen_base+(p->var.yoffset+bottom_start)*bytes,
rectfill(p->fb_info->screen_base+(p->var.yoffset+bottom_start)*bytes,
right_start, bottom_width, bgx, bytes);
}
......
......@@ -36,8 +36,8 @@ void fbcon_cfb32_bmove(struct display *p, int sy, int sx, int dy, int dx,
u8 *src, *dst;
if (sx == 0 && dx == 0 && width * fontwidth(p) * 4 == bytes) {
fb_memmove(p->screen_base + dy * linesize,
p->screen_base + sy * linesize,
fb_memmove(p->fb_info->screen_base + dy * linesize,
p->fb_info->screen_base + sy * linesize,
height * linesize);
return;
}
......@@ -51,16 +51,16 @@ void fbcon_cfb32_bmove(struct display *p, int sy, int sx, int dy, int dx,
width *= fontwidth(p)*4;
}
if (dy < sy || (dy == sy && dx < sx)) {
src = p->screen_base + sy * linesize + sx;
dst = p->screen_base + dy * linesize + dx;
src = p->fb_info->screen_base + sy * linesize + sx;
dst = p->fb_info->screen_base + dy * linesize + dx;
for (rows = height * fontheight(p); rows--;) {
fb_memmove(dst, src, width);
src += bytes;
dst += bytes;
}
} else {
src = p->screen_base + (sy+height) * linesize + sx - bytes;
dst = p->screen_base + (dy+height) * linesize + dx - bytes;
src = p->fb_info->screen_base + (sy+height) * linesize + sx - bytes;
dst = p->fb_info->screen_base + (dy+height) * linesize + dx - bytes;
for (rows = height * fontheight(p); rows--;) {
fb_memmove(dst, src, width);
src -= bytes;
......@@ -99,7 +99,7 @@ void fbcon_cfb32_clear(struct vc_data *conp, struct display *p, int sy, int sx,
int bytes = p->next_line, lines = height * fontheight(p);
u32 bgx;
dest = p->screen_base + sy * fontheight(p) * bytes + sx * fontwidth(p) * 4;
dest = p->fb_info->screen_base + sy * fontheight(p) * bytes + sx * fontwidth(p) * 4;
bgx = ((u32 *)p->dispsw_data)[attr_bgcol_ec(p, conp)];
......@@ -117,7 +117,7 @@ void fbcon_cfb32_putc(struct vc_data *conp, struct display *p, int c, int yy,
int bytes = p->next_line, rows;
u32 eorx, fgx, bgx, *pt;
dest = p->screen_base + yy * fontheight(p) * bytes + xx * fontwidth(p) * 4;
dest = p->fb_info->screen_base + yy * fontheight(p) * bytes + xx * fontwidth(p) * 4;
if (fontwidth(p) <= 8)
cdat = p->fontdata + (c & p->charmask) * fontheight(p);
else
......@@ -163,7 +163,7 @@ void fbcon_cfb32_putcs(struct vc_data *conp, struct display *p,
int rows, bytes = p->next_line;
u32 eorx, fgx, bgx, *pt;
dest0 = p->screen_base + yy * fontheight(p) * bytes + xx * fontwidth(p) * 4;
dest0 = p->fb_info->screen_base + yy * fontheight(p) * bytes + xx * fontwidth(p) * 4;
c = scr_readw(s);
fgx = ((u32 *)p->dispsw_data)[attr_fgcol(p, c)];
bgx = ((u32 *)p->dispsw_data)[attr_bgcol(p, c)];
......@@ -210,7 +210,7 @@ void fbcon_cfb32_revc(struct display *p, int xx, int yy)
u8 *dest;
int bytes = p->next_line, rows;
dest = p->screen_base + yy * fontheight(p) * bytes + xx * fontwidth(p) * 4;
dest = p->fb_info->screen_base + yy * fontheight(p) * bytes + xx * fontwidth(p) * 4;
for (rows = fontheight(p); rows--; dest += bytes) {
switch (fontwidth(p)) {
case 16:
......@@ -254,10 +254,10 @@ void fbcon_cfb32_clear_margins(struct vc_data *conp, struct display *p,
bgx = ((u32 *)p->dispsw_data)[attr_bgcol_ec(p, conp)];
if (!bottom_only && (right_width = p->var.xres-right_start))
rectfill(p->screen_base+right_start*4, right_width,
rectfill(p->fb_info->screen_base+right_start*4, right_width,
p->var.yres_virtual, bgx, bytes);
if ((bottom_width = p->var.yres-bottom_start))
rectfill(p->screen_base+(p->var.yoffset+bottom_start)*bytes,
rectfill(p->fb_info->screen_base+(p->var.yoffset+bottom_start)*bytes,
right_start, bottom_width, bgx, bytes);
}
......
......@@ -61,14 +61,14 @@ void fbcon_cfb4_bmove(struct display *p, int sy, int sx, int dy, int dx,
u8 *src,*dst;
if (sx == 0 && dx == 0 && width * 4 == bytes) {
fb_memmove(p->screen_base + dy * linesize,
p->screen_base + sy * linesize,
fb_memmove(p->fb_info->screen_base + dy * linesize,
p->fb_info->screen_base + sy * linesize,
height * linesize);
}
else {
if (dy < sy || (dy == sy && dx < sx)) {
src = p->screen_base + sy * linesize + sx * 4;
dst = p->screen_base + dy * linesize + dx * 4;
src = p->fb_info->screen_base + sy * linesize + sx * 4;
dst = p->fb_info->screen_base + dy * linesize + dx * 4;
for (rows = height * fontheight(p) ; rows-- ;) {
fb_memmove(dst, src, width * 4);
src += bytes;
......@@ -76,10 +76,8 @@ void fbcon_cfb4_bmove(struct display *p, int sy, int sx, int dy, int dx,
}
}
else {
src = p->screen_base + (sy+height) * linesize + sx * 4
- bytes;
dst = p->screen_base + (dy+height) * linesize + dx * 4
- bytes;
src = p->fb_info->screen_base + (sy+height) * linesize + sx * 4 - bytes;
dst = p->fb_info->screen_base + (dy+height) * linesize + dx * 4 - bytes;
for (rows = height * fontheight(p) ; rows-- ;) {
fb_memmove(dst, src, width * 4);
src -= bytes;
......@@ -96,9 +94,9 @@ void fbcon_cfb4_clear(struct vc_data *conp, struct display *p, int sy, int sx,
int bytes=p->next_line,lines=height * fontheight(p), rows, i;
u32 bgx;
/* if(p->screen_base!=0xFDD00020)
/* if(p->fb_info->screen_base!=0xFDD00020)
mac_boom(1);*/
dest = p->screen_base + sy * fontheight(p) * bytes + sx * 4;
dest = p->fb_info->screen_base + sy * fontheight(p) * bytes + sx * 4;
bgx=attr_bgcol_ec(p,conp);
bgx |= (bgx << 4); /* expand the colour to 32bits */
......@@ -130,7 +128,7 @@ void fbcon_cfb4_putc(struct vc_data *conp, struct display *p, int c, int yy,
int bytes=p->next_line,rows;
u32 eorx,fgx,bgx;
dest = p->screen_base + yy * fontheight(p) * bytes + xx * 4;
dest = p->fb_info->screen_base + yy * fontheight(p) * bytes + xx * 4;
cdat = p->fontdata + (c & p->charmask) * fontheight(p);
fgx=attr_fgcol(p,c);
......@@ -155,7 +153,7 @@ void fbcon_cfb4_putcs(struct vc_data *conp, struct display *p,
int rows,bytes=p->next_line;
u32 eorx, fgx, bgx;
dest0 = p->screen_base + yy * fontheight(p) * bytes + xx * 4;
dest0 = p->fb_info->screen_base + yy * fontheight(p) * bytes + xx * 4;
c = scr_readw(s);
fgx = attr_fgcol(p, c);
bgx = attr_bgcol(p, c);
......@@ -183,7 +181,7 @@ void fbcon_cfb4_revc(struct display *p, int xx, int yy)
u8 *dest;
int bytes=p->next_line, rows;
dest = p->screen_base + yy * fontheight(p) * bytes + xx * 4;
dest = p->fb_info->screen_base + yy * fontheight(p) * bytes + xx * 4;
for (rows = fontheight(p) ; rows-- ; dest += bytes) {
fb_writel(fb_readl(dest+0) ^ 0xffffffff, dest+0);
}
......
......@@ -52,8 +52,8 @@ void fbcon_cfb8_bmove(struct display *p, int sy, int sx, int dy, int dx,
u8 *src,*dst;
if (sx == 0 && dx == 0 && width * fontwidth(p) == bytes) {
fb_memmove(p->screen_base + dy * linesize,
p->screen_base + sy * linesize,
fb_memmove(p->fb_info->screen_base + dy * linesize,
p->fb_info->screen_base + sy * linesize,
height * linesize);
return;
}
......@@ -63,16 +63,16 @@ void fbcon_cfb8_bmove(struct display *p, int sy, int sx, int dy, int dx,
sx *= fontwidth(p); dx *= fontwidth(p); width *= fontwidth(p);
}
if (dy < sy || (dy == sy && dx < sx)) {
src = p->screen_base + sy * linesize + sx;
dst = p->screen_base + dy * linesize + dx;
src = p->fb_info->screen_base + sy * linesize + sx;
dst = p->fb_info->screen_base + dy * linesize + dx;
for (rows = height * fontheight(p) ; rows-- ;) {
fb_memmove(dst, src, width);
src += bytes;
dst += bytes;
}
} else {
src = p->screen_base + (sy+height) * linesize + sx - bytes;
dst = p->screen_base + (dy+height) * linesize + dx - bytes;
src = p->fb_info->screen_base + (sy+height) * linesize + sx - bytes;
dst = p->fb_info->screen_base + (dy+height) * linesize + dx - bytes;
for (rows = height * fontheight(p) ; rows-- ;) {
fb_memmove(dst, src, width);
src -= bytes;
......@@ -97,7 +97,7 @@ void fbcon_cfb8_clear(struct vc_data *conp, struct display *p, int sy, int sx,
int bytes=p->next_line,lines=height * fontheight(p);
u8 bgx;
dest = p->screen_base + sy * fontheight(p) * bytes + sx * fontwidth(p);
dest = p->fb_info->screen_base + sy * fontheight(p) * bytes + sx * fontwidth(p);
bgx=attr_bgcol_ec(p,conp);
......@@ -115,7 +115,7 @@ void fbcon_cfb8_putc(struct vc_data *conp, struct display *p, int c, int yy,
int bytes=p->next_line,rows;
u32 eorx,fgx,bgx;
dest = p->screen_base + yy * fontheight(p) * bytes + xx * fontwidth(p);
dest = p->fb_info->screen_base + yy * fontheight(p) * bytes + xx * fontwidth(p);
if (fontwidth(p) <= 8)
cdat = p->fontdata + (c & p->charmask) * fontheight(p);
else
......@@ -162,7 +162,7 @@ void fbcon_cfb8_putcs(struct vc_data *conp, struct display *p,
int rows,bytes=p->next_line;
u32 eorx, fgx, bgx;
dest0 = p->screen_base + yy * fontheight(p) * bytes + xx * fontwidth(p);
dest0 = p->fb_info->screen_base + yy * fontheight(p) * bytes + xx * fontwidth(p);
c = scr_readw(s);
fgx = attr_fgcol(p, c);
bgx = attr_bgcol(p, c);
......@@ -219,7 +219,7 @@ void fbcon_cfb8_revc(struct display *p, int xx, int yy)
u8 *dest;
int bytes=p->next_line, rows;
dest = p->screen_base + yy * fontheight(p) * bytes + xx * fontwidth(p);
dest = p->fb_info->screen_base + yy * fontheight(p) * bytes + xx * fontwidth(p);
for (rows = fontheight(p) ; rows-- ; dest += bytes) {
switch (fontwidth(p)) {
case 16: fb_writel(fb_readl(dest+12) ^ 0x0f0f0f0f, dest+12); /* fall thru */
......@@ -244,10 +244,9 @@ void fbcon_cfb8_clear_margins(struct vc_data *conp, struct display *p,
bgx=attr_bgcol_ec(p,conp);
if (!bottom_only && (right_width = p->var.xres-right_start))
rectfill(p->screen_base+right_start, right_width, p->var.yres_virtual,
bgx, bytes);
rectfill(p->fb_info->screen_base+right_start, right_width, p->var.yres_virtual, bgx, bytes);
if ((bottom_width = p->var.yres-bottom_start))
rectfill(p->screen_base+(p->var.yoffset+bottom_start)*bytes,
rectfill(p->fb_info->screen_base+(p->var.yoffset+bottom_start)*bytes,
right_start, bottom_width, bgx, bytes);
}
......
......@@ -38,7 +38,7 @@
static inline u8* rowaddr(struct display *p, u_int row)
{
return p->screen_base + HGA_ROWADDR(row);
return p->fb_info->screen_base + HGA_ROWADDR(row);
}
void fbcon_hga_setup(struct display *p)
......@@ -57,8 +57,8 @@ void fbcon_hga_bmove(struct display *p, int sy, int sx, int dy, int dx,
#if 0
if (sx == 0 && dx == 0 && width == p->next_line) {
src = p->screen_base+sy*fontheight(p)*width;
dest = p->screen_base+dy*fontheight(p)*width;
src = p->fb_info->screen_base+sy*fontheight(p)*width;
dest = p->fb_info->screen_base+dy*fontheight(p)*width;
fb_memmove(dest, src, height*fontheight(p)*width);
} else
#endif
......
......@@ -45,24 +45,24 @@ void fbcon_ilbm_bmove(struct display *p, int sy, int sx, int dy, int dx,
int height, int width)
{
if (sx == 0 && dx == 0 && width == p->next_plane)
fb_memmove(p->screen_base+dy*fontheight(p)*p->next_line,
p->screen_base+sy*fontheight(p)*p->next_line,
fb_memmove(p->fb_info->screen_base+dy*fontheight(p)*p->next_line,
p->fb_info->screen_base+sy*fontheight(p)*p->next_line,
height*fontheight(p)*p->next_line);
else {
u8 *src, *dest;
u_int i;
if (dy <= sy) {
src = p->screen_base+sy*fontheight(p)*p->next_line+sx;
dest = p->screen_base+dy*fontheight(p)*p->next_line+dx;
src = p->fb_info->screen_base+sy*fontheight(p)*p->next_line+sx;
dest = p->fb_info->screen_base+dy*fontheight(p)*p->next_line+dx;
for (i = p->var.bits_per_pixel*height*fontheight(p); i--;) {
fb_memmove(dest, src, width);
src += p->next_plane;
dest += p->next_plane;
}
} else {
src = p->screen_base+(sy+height)*fontheight(p)*p->next_line+sx;
dest = p->screen_base+(dy+height)*fontheight(p)*p->next_line+dx;
src = p->fb_info->screen_base+(sy+height)*fontheight(p)*p->next_line+sx;
dest = p->fb_info->screen_base+(dy+height)*fontheight(p)*p->next_line+dx;
for (i = p->var.bits_per_pixel*height*fontheight(p); i--;) {
src -= p->next_plane;
dest -= p->next_plane;
......@@ -79,7 +79,7 @@ void fbcon_ilbm_clear(struct vc_data *conp, struct display *p, int sy, int sx,
u_int i, rows;
int bg, bg0;
dest = p->screen_base+sy*fontheight(p)*p->next_line+sx;
dest = p->fb_info->screen_base+sy*fontheight(p)*p->next_line+sx;
bg0 = attr_bgcol_ec(p,conp);
for (rows = height*fontheight(p); rows--;) {
......@@ -102,7 +102,7 @@ void fbcon_ilbm_putc(struct vc_data *conp, struct display *p, int c, int yy,
u8 d;
int fg0, bg0, fg, bg;
dest = p->screen_base+yy*fontheight(p)*p->next_line+xx;
dest = p->fb_info->screen_base+yy*fontheight(p)*p->next_line+xx;
cdat = p->fontdata+(c&p->charmask)*fontheight(p);
fg0 = attr_fgcol(p,c);
bg0 = attr_bgcol(p,c);
......@@ -153,7 +153,7 @@ void fbcon_ilbm_putcs(struct vc_data *conp, struct display *p,
u32 d;
int fg0, bg0, fg, bg;
dest0 = p->screen_base+yy*fontheight(p)*p->next_line+xx;
dest0 = p->fb_info->screen_base+yy*fontheight(p)*p->next_line+xx;
c1 = scr_readw(s);
fg0 = attr_fgcol(p, c1);
bg0 = attr_bgcol(p, c1);
......@@ -235,7 +235,7 @@ void fbcon_ilbm_revc(struct display *p, int xx, int yy)
u_int rows, i;
int mask;
dest0 = p->screen_base+yy*fontheight(p)*p->next_line+xx;
dest0 = p->fb_info->screen_base+yy*fontheight(p)*p->next_line+xx;
mask = p->fgcol ^ p->bgcol;
/*
......
......@@ -172,8 +172,8 @@ void fbcon_iplan2p2_bmove(struct display *p, int sy, int sx, int dy, int dx,
/* Special (but often used) case: Moving whole lines can be
* done with memmove()
*/
fb_memmove(p->screen_base + dy * p->next_line * fontheight(p),
p->screen_base + sy * p->next_line * fontheight(p),
fb_memmove(p->fb_info->screen_base + dy * p->next_line * fontheight(p),
p->fb_info->screen_base + sy * p->next_line * fontheight(p),
p->next_line * height * fontheight(p));
} else {
int rows, cols;
......@@ -194,8 +194,8 @@ void fbcon_iplan2p2_bmove(struct display *p, int sy, int sx, int dy, int dx,
if ((sx & 1) == (dx & 1)) {
/* odd->odd or even->even */
if (upwards) {
src = p->screen_base + sy * linesize + (sx>>1)*4 + (sx & 1);
dst = p->screen_base + dy * linesize + (dx>>1)*4 + (dx & 1);
src = p->fb_info->screen_base + sy * linesize + (sx>>1)*4 + (sx & 1);
dst = p->fb_info->screen_base + dy * linesize + (dx>>1)*4 + (dx & 1);
if (sx & 1) {
memmove_2p_col(dst, src, colsize, bytes);
src += 3;
......@@ -217,13 +217,13 @@ void fbcon_iplan2p2_bmove(struct display *p, int sy, int sx, int dy, int dx,
}
} else {
if (!((sx+width-1) & 1)) {
src = p->screen_base + sy * linesize + ((sx+width-1)>>1)*4;
dst = p->screen_base + dy * linesize + ((dx+width-1)>>1)*4;
src = p->fb_info->screen_base + sy * linesize + ((sx+width-1)>>1)*4;
dst = p->fb_info->screen_base + dy * linesize + ((dx+width-1)>>1)*4;
memmove_2p_col(dst, src, colsize, bytes);
--width;
}
src = p->screen_base + sy * linesize + (sx>>1)*4 + (sx & 1);
dst = p->screen_base + dy * linesize + (dx>>1)*4 + (dx & 1);
src = p->fb_info->screen_base + sy * linesize + (sx>>1)*4 + (sx & 1);
dst = p->fb_info->screen_base + dy * linesize + (dx>>1)*4 + (dx & 1);
if (width > 1) {
src += colsize * bytes + (sx & 1)*3;
dst += colsize * bytes + (sx & 1)*3;
......@@ -239,8 +239,8 @@ void fbcon_iplan2p2_bmove(struct display *p, int sy, int sx, int dy, int dx,
} else {
/* odd->even or even->odd */
if (upwards) {
src = p->screen_base + sy * linesize + (sx>>1)*4 + (sx & 1);
dst = p->screen_base + dy * linesize + (dx>>1)*4 + (dx & 1);
src = p->fb_info->screen_base + sy * linesize + (sx>>1)*4 + (sx & 1);
dst = p->fb_info->screen_base + dy * linesize + (dx>>1)*4 + (dx & 1);
for (cols = width; cols > 0; --cols) {
memmove_2p_col(dst, src, colsize, bytes);
INC_2P(src);
......@@ -249,8 +249,8 @@ void fbcon_iplan2p2_bmove(struct display *p, int sy, int sx, int dy, int dx,
} else {
sx += width-1;
dx += width-1;
src = p->screen_base + sy * linesize + (sx>>1)*4 + (sx & 1);
dst = p->screen_base + dy * linesize + (dx>>1)*4 + (dx & 1);
src = p->fb_info->screen_base + sy * linesize + (sx>>1)*4 + (sx & 1);
dst = p->fb_info->screen_base + dy * linesize + (dx>>1)*4 + (dx & 1);
for(cols = width; cols > 0; --cols) {
memmove_2p_col(dst, src, colsize, bytes);
DEC_2P(src);
......@@ -286,13 +286,13 @@ void fbcon_iplan2p2_clear(struct vc_data *conp, struct display *p, int sy,
else
offset = sy * bytes * fontheight(p);
size = lines * bytes;
memset_even_2p(p->screen_base+offset, size, cval);
memset_even_2p(p->fb_info->screen_base+offset, size, cval);
} else {
if (fontheightlog(p))
offset = ((sy * bytes) << fontheightlog(p)) + (sx>>1)*4 + (sx & 1);
else
offset = sy * bytes * fontheight(p) + (sx>>1)*4 + (sx & 1);
start = p->screen_base + offset;
start = p->fb_info->screen_base + offset;
pcval = expand2w(COLOR_2P(attr_bgcol_ec(p,conp)));
/* Clears are split if the region starts at an odd column or
......@@ -328,11 +328,11 @@ void fbcon_iplan2p2_putc(struct vc_data *conp, struct display *p, int c,
u16 eorx, fgx, bgx, fdx;
if (fontheightlog(p)) {
dest = (p->screen_base + ((yy * bytes) << fontheightlog(p)) +
dest = (p->fb_info->screen_base + ((yy * bytes) << fontheightlog(p)) +
(xx>>1)*4 + (xx & 1));
cdat = p->fontdata + ((c & p->charmask) << fontheightlog(p));
} else {
dest = (p->screen_base + yy * bytes * fontheight(p) +
dest = (p->fb_info->screen_base + yy * bytes * fontheight(p) +
(xx>>1)*4 + (xx & 1));
cdat = p->fontdata + (c & p->charmask) * fontheight(p);
}
......@@ -359,10 +359,10 @@ void fbcon_iplan2p2_putcs(struct vc_data *conp, struct display *p,
bytes = p->next_line;
if (fontheightlog(p))
dest0 = (p->screen_base + ((yy * bytes) << fontheightlog(p)) +
dest0 = (p->fb_info->screen_base + ((yy * bytes) << fontheightlog(p)) +
(xx>>1)*4 + (xx & 1));
else
dest0 = (p->screen_base + yy * bytes * fontheight(p) +
dest0 = (p->fb_info->screen_base + yy * bytes * fontheight(p) +
(xx>>1)*4 + (xx & 1));
c = scr_readw(s);
fgx = expand2w(COLOR_2P(attr_fgcol(p, c)));
......@@ -391,10 +391,9 @@ void fbcon_iplan2p2_revc(struct display *p, int xx, int yy)
int bytes;
if (fontheightlog(p))
dest = (p->screen_base + ((yy * p->next_line) << fontheightlog(p)) +
(xx>>1)*4 + (xx & 1));
dest = (p->fb_info->screen_base + ((yy * p->next_line) << fontheightlog(p)) + (xx>>1)*4 + (xx & 1));
else
dest = (p->screen_base + yy * p->next_line * fontheight(p) +
dest = (p->fb_info->screen_base + yy * p->next_line * fontheight(p) +
(xx>>1)*4 + (xx & 1));
j = fontheight(p);
bytes = p->next_line;
......@@ -429,7 +428,7 @@ void fbcon_iplan2p2_clear_margins(struct vc_data *conp, struct display *p,
}
if (lines) {
cval = expand2l(COLOR_2P(attr_bgcol_ec(p,conp)));
memset_even_2p(p->screen_base+offset, lines * bytes, cval);
memset_even_2p(p->fb_info->screen_base+offset, lines * bytes, cval);
}
}
......
......@@ -180,8 +180,8 @@ void fbcon_iplan2p4_bmove(struct display *p, int sy, int sx, int dy, int dx,
/* Special (but often used) case: Moving whole lines can be
*done with memmove()
*/
fb_memmove(p->screen_base + dy * p->next_line * fontheight(p),
p->screen_base + sy * p->next_line * fontheight(p),
fb_memmove(p->fb_info->screen_base + dy * p->next_line * fontheight(p),
p->fb_info->screen_base + sy * p->next_line * fontheight(p),
p->next_line * height * fontheight(p));
} else {
int rows, cols;
......@@ -203,8 +203,8 @@ void fbcon_iplan2p4_bmove(struct display *p, int sy, int sx, int dy, int dx,
/* odd->odd or even->even */
if (upwards) {
src = p->screen_base + sy * linesize + (sx>>1)*8 + (sx & 1);
dst = p->screen_base + dy * linesize + (dx>>1)*8 + (dx & 1);
src = p->fb_info->screen_base + sy * linesize + (sx>>1)*8 + (sx & 1);
dst = p->fb_info->screen_base + dy * linesize + (dx>>1)*8 + (dx & 1);
if (sx & 1) {
memmove_4p_col(dst, src, colsize, bytes);
src += 7;
......@@ -226,13 +226,13 @@ void fbcon_iplan2p4_bmove(struct display *p, int sy, int sx, int dy, int dx,
}
} else {
if (!((sx+width-1) & 1)) {
src = p->screen_base + sy * linesize + ((sx+width-1)>>1)*8;
dst = p->screen_base + dy * linesize + ((dx+width-1)>>1)*8;
src = p->fb_info->screen_base + sy * linesize + ((sx+width-1)>>1)*8;
dst = p->fb_info->screen_base + dy * linesize + ((dx+width-1)>>1)*8;
memmove_4p_col(dst, src, colsize, bytes);
--width;
}
src = p->screen_base + sy * linesize + (sx>>1)*8 + (sx & 1);
dst = p->screen_base + dy * linesize + (dx>>1)*8 + (dx & 1);
src = p->fb_info->screen_base + sy * linesize + (sx>>1)*8 + (sx & 1);
dst = p->fb_info->screen_base + dy * linesize + (dx>>1)*8 + (dx & 1);
if (width > 1) {
src += colsize * bytes + (sx & 1)*7;
dst += colsize * bytes + (sx & 1)*7;
......@@ -250,8 +250,8 @@ void fbcon_iplan2p4_bmove(struct display *p, int sy, int sx, int dy, int dx,
/* odd->even or even->odd */
if (upwards) {
src = p->screen_base + sy * linesize + (sx>>1)*8 + (sx & 1);
dst = p->screen_base + dy * linesize + (dx>>1)*8 + (dx & 1);
src = p->fb_info->screen_base + sy * linesize + (sx>>1)*8 + (sx & 1);
dst = p->fb_info->screen_base + dy * linesize + (dx>>1)*8 + (dx & 1);
for(cols = width; cols > 0; --cols) {
memmove_4p_col(dst, src, colsize, bytes);
INC_4P(src);
......@@ -260,8 +260,8 @@ void fbcon_iplan2p4_bmove(struct display *p, int sy, int sx, int dy, int dx,
} else {
sx += width-1;
dx += width-1;
src = p->screen_base + sy * linesize + (sx>>1)*8 + (sx & 1);
dst = p->screen_base + dy * linesize + (dx>>1)*8 + (dx & 1);
src = p->fb_info->screen_base + sy * linesize + (sx>>1)*8 + (sx & 1);
dst = p->fb_info->screen_base + dy * linesize + (dx>>1)*8 + (dx & 1);
for(cols = width; cols > 0; --cols) {
memmove_4p_col(dst, src, colsize, bytes);
DEC_4P(src);
......@@ -296,13 +296,13 @@ void fbcon_iplan2p4_clear(struct vc_data *conp, struct display *p, int sy,
else
offset = sy * bytes * fontheight(p);
size = lines * bytes;
memset_even_4p(p->screen_base+offset, size, cval1, cval2);
memset_even_4p(p->fb_info->screen_base+offset, size, cval1, cval2);
} else {
if (fontheightlog(p))
offset = ((sy * bytes) << fontheightlog(p)) + (sx>>1)*8 + (sx & 1);
else
offset = sy * bytes * fontheight(p) + (sx>>1)*8 + (sx & 1);
start = p->screen_base + offset;
start = p->fb_info->screen_base + offset;
pcval = expand4l(attr_bgcol_ec(p,conp));
/* Clears are split if the region starts at an odd column or
......@@ -338,11 +338,11 @@ void fbcon_iplan2p4_putc(struct vc_data *conp, struct display *p, int c,
u32 eorx, fgx, bgx, fdx;
if (fontheightlog(p)) {
dest = (p->screen_base + ((yy * bytes) << fontheightlog(p)) +
dest = (p->fb_info->screen_base + ((yy * bytes) << fontheightlog(p)) +
(xx>>1)*8 + (xx & 1));
cdat = p->fontdata + ((c & p->charmask) << fontheightlog(p));
} else {
dest = (p->screen_base + yy * bytes * fontheight(p) +
dest = (p->fb_info->screen_base + yy * bytes * fontheight(p) +
(xx>>1)*8 + (xx & 1));
cdat = p->fontdata + (c & p->charmask) * fontheight(p);
}
......@@ -369,10 +369,10 @@ void fbcon_iplan2p4_putcs(struct vc_data *conp, struct display *p,
bytes = p->next_line;
if (fontheightlog(p))
dest0 = (p->screen_base + ((yy * bytes) << fontheightlog(p)) +
dest0 = (p->fb_info->screen_base + ((yy * bytes) << fontheightlog(p)) +
(xx>>1)*8 + (xx & 1));
else
dest0 = (p->screen_base + yy * bytes * fontheight(p) +
dest0 = (p->fb_info->screen_base + yy * bytes * fontheight(p) +
(xx>>1)*8 + (xx & 1));
c = scr_readw(s);
fgx = expand4l(attr_fgcol(p, c));
......@@ -408,10 +408,10 @@ void fbcon_iplan2p4_revc(struct display *p, int xx, int yy)
int bytes;
if (fontheightlog(p))
dest = (p->screen_base + ((yy * p->next_line) << fontheightlog(p)) +
dest = (p->fb_info->screen_base + ((yy * p->next_line) << fontheightlog(p)) +
(xx>>1)*8 + (xx & 1));
else
dest = (p->screen_base + yy * p->next_line * fontheight(p) +
dest = (p->fb_info->screen_base + yy * p->next_line * fontheight(p) +
(xx>>1)*8 + (xx & 1));
j = fontheight(p);
bytes = p->next_line;
......@@ -449,7 +449,7 @@ void fbcon_iplan2p4_clear_margins(struct vc_data *conp, struct display *p,
}
if (lines) {
expand4dl(attr_bgcol_ec(p,conp), &cval1, &cval2);
memset_even_4p(p->screen_base+offset, lines * bytes, cval1, cval2);
memset_even_4p(p->fb_info->screen_base+offset, lines * bytes, cval1, cval2);
}
}
......
......@@ -212,8 +212,8 @@ void fbcon_iplan2p8_bmove(struct display *p, int sy, int sx, int dy, int dx,
/* Special (but often used) case: Moving whole lines can be
* done with memmove()
*/
fast_memmove(p->screen_base + dy * p->next_line * fontheight(p),
p->screen_base + sy * p->next_line * fontheight(p),
fast_memmove(p->fb_info->screen_base + dy * p->next_line * fontheight(p),
p->fb_info->screen_base + sy * p->next_line * fontheight(p),
p->next_line * height * fontheight(p));
} else {
int rows, cols;
......@@ -235,8 +235,8 @@ void fbcon_iplan2p8_bmove(struct display *p, int sy, int sx, int dy, int dx,
/* odd->odd or even->even */
if (upwards) {
src = p->screen_base + sy * linesize + (sx>>1)*16 + (sx & 1);
dst = p->screen_base + dy * linesize + (dx>>1)*16 + (dx & 1);
src = p->fb_info->screen_base + sy * linesize + (sx>>1)*16 + (sx & 1);
dst = p->fb_info->screen_base + dy * linesize + (dx>>1)*16 + (dx & 1);
if (sx & 1) {
memmove_8p_col(dst, src, colsize, bytes);
src += 15;
......@@ -259,13 +259,13 @@ void fbcon_iplan2p8_bmove(struct display *p, int sy, int sx, int dy, int dx,
}
} else {
if (!((sx+width-1) & 1)) {
src = p->screen_base + sy * linesize + ((sx+width-1)>>1)*16;
dst = p->screen_base + dy * linesize + ((dx+width-1)>>1)*16;
src = p->fb_info->screen_base + sy * linesize + ((sx+width-1)>>1)*16;
dst = p->fb_info->screen_base + dy * linesize + ((dx+width-1)>>1)*16;
memmove_8p_col(dst, src, colsize, bytes);
--width;
}
src = p->screen_base + sy * linesize + (sx>>1)*16 + (sx & 1);
dst = p->screen_base + dy * linesize + (dx>>1)*16 + (dx & 1);
src = p->fb_info->screen_base + sy * linesize + (sx>>1)*16 + (sx & 1);
dst = p->fb_info->screen_base + dy * linesize + (dx>>1)*16 + (dx & 1);
if (width > 1) {
src += colsize * bytes + (sx & 1)*15;
dst += colsize * bytes + (sx & 1)*15;
......@@ -282,8 +282,8 @@ void fbcon_iplan2p8_bmove(struct display *p, int sy, int sx, int dy, int dx,
/* odd->even or even->odd */
if (upwards) {
src = p->screen_base + sy * linesize + (sx>>1)*16 + (sx & 1);
dst = p->screen_base + dy * linesize + (dx>>1)*16 + (dx & 1);
src = p->fb_info->screen_base + sy * linesize + (sx>>1)*16 + (sx & 1);
dst = p->fb_info->screen_base + dy * linesize + (dx>>1)*16 + (dx & 1);
for(cols = width; cols > 0; --cols) {
memmove_8p_col(dst, src, colsize, bytes);
INC_8P(src);
......@@ -292,8 +292,8 @@ void fbcon_iplan2p8_bmove(struct display *p, int sy, int sx, int dy, int dx,
} else {
sx += width-1;
dx += width-1;
src = p->screen_base + sy * linesize + (sx>>1)*16 + (sx & 1);
dst = p->screen_base + dy * linesize + (dx>>1)*16 + (dx & 1);
src = p->fb_info->screen_base + sy * linesize + (sx>>1)*16 + (sx & 1);
dst = p->fb_info->screen_base + dy * linesize + (dx>>1)*16 + (dx & 1);
for(cols = width; cols > 0; --cols) {
memmove_8p_col(dst, src, colsize, bytes);
DEC_8P(src);
......@@ -328,13 +328,13 @@ void fbcon_iplan2p8_clear(struct vc_data *conp, struct display *p, int sy,
else
offset = sy * bytes * fontheight(p);
size = lines * bytes;
memset_even_8p(p->screen_base+offset, size, cval1, cval2, cval3, cval4);
memset_even_8p(p->fb_info->screen_base+offset, size, cval1, cval2, cval3, cval4);
} else {
if (fontheightlog(p))
offset = ((sy * bytes) << fontheightlog(p)) + (sx>>1)*16 + (sx & 1);
else
offset = sy * bytes * fontheight(p) + (sx>>1)*16 + (sx & 1);
start = p->screen_base + offset;
start = p->fb_info->screen_base + offset;
expand8dl(attr_bgcol_ec(p,conp), &pcval1, &pcval2);
/* Clears are split if the region starts at an odd column or
......@@ -370,11 +370,11 @@ void fbcon_iplan2p8_putc(struct vc_data *conp, struct display *p, int c,
u32 eorx1, eorx2, fgx1, fgx2, bgx1, bgx2, fdx;
if (fontheightlog(p)) {
dest = (p->screen_base + ((yy * bytes) << fontheightlog(p)) +
dest = (p->fb_info->screen_base + ((yy * bytes) << fontheightlog(p)) +
(xx>>1)*16 + (xx & 1));
cdat = p->fontdata + ((c & p->charmask) << fontheightlog(p));
} else {
dest = (p->screen_base + yy * bytes * fontheight(p) +
dest = (p->fb_info->screen_base + yy * bytes * fontheight(p) +
(xx>>1)*16 + (xx & 1));
cdat = p->fontdata + (c & p->charmask) * fontheight(p);
}
......@@ -401,10 +401,10 @@ void fbcon_iplan2p8_putcs(struct vc_data *conp, struct display *p,
bytes = p->next_line;
if (fontheightlog(p))
dest0 = (p->screen_base + ((yy * bytes) << fontheightlog(p)) +
dest0 = (p->fb_info->screen_base + ((yy * bytes) << fontheightlog(p)) +
(xx>>1)*16 + (xx & 1));
else
dest0 = (p->screen_base + yy * bytes * fontheight(p) +
dest0 = (p->fb_info->screen_base + yy * bytes * fontheight(p) +
(xx>>1)*16 + (xx & 1));
c = scr_readw(s);
......@@ -442,10 +442,10 @@ void fbcon_iplan2p8_revc(struct display *p, int xx, int yy)
int bytes;
if (fontheightlog(p))
dest = (p->screen_base + ((yy * p->next_line) << fontheightlog(p)) +
dest = (p->fb_info->screen_base + ((yy * p->next_line) << fontheightlog(p)) +
(xx>>1)*16 + (xx & 1));
else
dest = (p->screen_base + yy * p->next_line * fontheight(p) +
dest = (p->fb_info->screen_base + yy * p->next_line * fontheight(p) +
(xx>>1)*16 + (xx & 1));
j = fontheight(p);
bytes = p->next_line;
......@@ -485,7 +485,7 @@ void fbcon_iplan2p8_clear_margins(struct vc_data *conp, struct display *p,
}
if (lines) {
expand8ql(attr_bgcol_ec(p,conp), &cval1, &cval2, &cval3, &cval4);
memset_even_8p(p->screen_base+offset, lines * bytes,
memset_even_8p(p->fb_info->screen_base+offset, lines * bytes,
cval1, cval2, cval3, cval4);
}
}
......
......@@ -57,8 +57,8 @@ void fbcon_mac_bmove(struct display *p, int sy, int sx, int dy, int dx,
int dl,dr,dt,db,dw,dlo;
int move_up;
src = (u8 *) (p->screen_base + sy * fontheight(p) * p->next_line);
dest = (u8 *) (p->screen_base + dy * fontheight(p) * p->next_line);
src = (u8 *) (p->fb_info->screen_base + sy * fontheight(p) * p->next_line);
dest = (u8 *) (p->fb_info->screen_base + dy * fontheight(p) * p->next_line);
if( sx == 0 && width == p->conp->vc_cols) {
s = height * fontheight(p) * p->next_line;
......@@ -197,7 +197,7 @@ void fbcon_mac_clear(struct vc_data *conp, struct display *p, int sy, int sx,
inverse = conp ? attr_reverse(p,conp->vc_attr) : 0;
pixel = inverse ? PIXEL_WHITE_MAC : PIXEL_BLACK_MAC;
dest = (u8 *) (p->screen_base + sy * fontheight(p) * p->next_line);
dest = (u8 *) (p->fb_info->screen_base + sy * fontheight(p) * p->next_line);
if( sx == 0 && width == p->conp->vc_cols) {
s = height * fontheight(p) * p->next_line;
......@@ -353,32 +353,32 @@ static void plot_pixel_mac(struct display *p, int bw, int pixel_x, int pixel_y)
switch (p->var.bits_per_pixel) {
case 1:
dest = (u8 *) ((pixel_x >> 3) + p->screen_base + pixel_y * p->next_line);
dest = (u8 *) ((pixel_x >> 3) + p->fb_info->screen_base + pixel_y * p->next_line);
bit = 0x80 >> (pixel_x & 7);
plot_helper(dest, bit, bw);
break;
case 2:
dest = (u8 *) ((pixel_x >> 2) + p->screen_base + pixel_y * p->next_line);
dest = (u8 *) ((pixel_x >> 2) + p->fb_info->screen_base + pixel_y * p->next_line);
bit = 0xC0 >> ((pixel_x & 3) << 1);
plot_helper(dest, bit, bw);
break;
case 4:
dest = (u8 *) ((pixel_x >> 1) + p->screen_base + pixel_y * p->next_line);
dest = (u8 *) ((pixel_x >> 1) + p->fb_info->screen_base + pixel_y * p->next_line);
bit = 0xF0 >> ((pixel_x & 1) << 2);
plot_helper(dest, bit, bw);
break;
case 8:
dest = (u8 *) (pixel_x + p->screen_base + pixel_y * p->next_line);
dest = (u8 *) (pixel_x + p->fb_info->screen_base + pixel_y * p->next_line);
bit = 0xFF;
plot_helper(dest, bit, bw);
break;
/* FIXME: You can't access framebuffer directly like this! */
case 16:
dest16 = (u16 *) ((pixel_x *2) + p->screen_base + pixel_y * p->next_line);
dest16 = (u16 *) ((pixel_x *2) + p->fb_info->screen_base + pixel_y * p->next_line);
pix16 = 0xFFFF;
switch (bw) {
case PIXEL_BLACK_MAC: *dest16 = ~pix16; break;
......@@ -389,7 +389,7 @@ static void plot_pixel_mac(struct display *p, int bw, int pixel_x, int pixel_y)
break;
case 32:
dest32 = (u32 *) ((pixel_x *4) + p->screen_base + pixel_y * p->next_line);
dest32 = (u32 *) ((pixel_x *4) + p->fb_info->screen_base + pixel_y * p->next_line);
pix32 = 0xFFFFFFFF;
switch (bw) {
case PIXEL_BLACK_MAC: *dest32 = ~pix32; break;
......@@ -410,30 +410,30 @@ static int get_pixel_mac(struct display *p, int pixel_x, int pixel_y)
switch (p->var.bits_per_pixel) {
case 1:
dest = (u8 *) ((pixel_x / 8) + p->screen_base + pixel_y * p->next_line);
dest = (u8 *) ((pixel_x / 8) + p->fb_info->screen_base + pixel_y * p->next_line);
bit = 0x80 >> (pixel_x & 7);
pixel = *dest & bit;
break;
case 2:
dest = (u8 *) ((pixel_x / 4) + p->screen_base + pixel_y * p->next_line);
dest = (u8 *) ((pixel_x / 4) + p->fb_info->screen_base + pixel_y * p->next_line);
bit = 0xC0 >> (pixel_x & 3);
pixel = *dest & bit;
break;
case 4:
dest = (u8 *) ((pixel_x / 2) + p->screen_base + pixel_y * p->next_line);
dest = (u8 *) ((pixel_x / 2) + p->fb_info->screen_base + pixel_y * p->next_line);
bit = 0xF0 >> (pixel_x & 1);
pixel = *dest & bit;
break;
case 8:
dest = (u8 *) (pixel_x + p->screen_base + pixel_y * p->next_line);
dest = (u8 *) (pixel_x + p->fb_info->screen_base + pixel_y * p->next_line);
pixel = *dest;
break;
case 16:
dest16 = (u16 *) ((pixel_x *2) + p->screen_base + pixel_y * p->next_line);
dest16 = (u16 *) ((pixel_x *2) + p->fb_info->screen_base + pixel_y * p->next_line);
pixel = *dest16 ? 1 : 0;
break;
case 32:
dest32 = (u32 *) ((pixel_x *4) + p->screen_base + pixel_y * p->next_line);
dest32 = (u32 *) ((pixel_x *4) + p->fb_info->screen_base + pixel_y * p->next_line);
pixel = *dest32 ? 1 : 0;
break;
}
......
......@@ -39,20 +39,20 @@ void fbcon_mfb_bmove(struct display *p, int sy, int sx, int dy, int dx,
u_int rows;
if (sx == 0 && dx == 0 && width == p->next_line) {
src = p->screen_base+sy*fontheight(p)*width;
dest = p->screen_base+dy*fontheight(p)*width;
src = p->fb_info->screen_base+sy*fontheight(p)*width;
dest = p->fb_info->screen_base+dy*fontheight(p)*width;
fb_memmove(dest, src, height*fontheight(p)*width);
} else if (dy <= sy) {
src = p->screen_base+sy*fontheight(p)*p->next_line+sx;
dest = p->screen_base+dy*fontheight(p)*p->next_line+dx;
src = p->fb_info->screen_base+sy*fontheight(p)*p->next_line+sx;
dest = p->fb_info->screen_base+dy*fontheight(p)*p->next_line+dx;
for (rows = height*fontheight(p); rows--;) {
fb_memmove(dest, src, width);
src += p->next_line;
dest += p->next_line;
}
} else {
src = p->screen_base+((sy+height)*fontheight(p)-1)*p->next_line+sx;
dest = p->screen_base+((dy+height)*fontheight(p)-1)*p->next_line+dx;
src = p->fb_info->screen_base+((sy+height)*fontheight(p)-1)*p->next_line+sx;
dest = p->fb_info->screen_base+((dy+height)*fontheight(p)-1)*p->next_line+dx;
for (rows = height*fontheight(p); rows--;) {
fb_memmove(dest, src, width);
src -= p->next_line;
......@@ -68,7 +68,7 @@ void fbcon_mfb_clear(struct vc_data *conp, struct display *p, int sy, int sx,
u_int rows;
int inverse = conp ? attr_reverse(p,conp->vc_video_erase_char) : 0;
dest = p->screen_base+sy*fontheight(p)*p->next_line+sx;
dest = p->fb_info->screen_base+sy*fontheight(p)*p->next_line+sx;
if (sx == 0 && width == p->next_line) {
if (inverse)
......@@ -90,7 +90,7 @@ void fbcon_mfb_putc(struct vc_data *conp, struct display *p, int c, int yy,
u_int rows, bold, revs, underl;
u8 d;
dest = p->screen_base+yy*fontheight(p)*p->next_line+xx;
dest = p->fb_info->screen_base+yy*fontheight(p)*p->next_line+xx;
cdat = p->fontdata+(c&p->charmask)*fontheight(p);
bold = attr_bold(p,c);
revs = attr_reverse(p,c);
......@@ -116,7 +116,7 @@ void fbcon_mfb_putcs(struct vc_data *conp, struct display *p,
u8 d;
u16 c;
dest0 = p->screen_base+yy*fontheight(p)*p->next_line+xx;
dest0 = p->fb_info->screen_base+yy*fontheight(p)*p->next_line+xx;
c = scr_readw(s);
bold = attr_bold(p, c);
revs = attr_reverse(p, c);
......@@ -144,7 +144,7 @@ void fbcon_mfb_revc(struct display *p, int xx, int yy)
u8 *dest, d;
u_int rows;
dest = p->screen_base+yy*fontheight(p)*p->next_line+xx;
dest = p->fb_info->screen_base+yy*fontheight(p)*p->next_line+xx;
for (rows = fontheight(p); rows--; dest += p->next_line) {
d = fb_readb(dest);
fb_writeb (~d, dest);
......@@ -166,7 +166,7 @@ void fbcon_mfb_clear_margins(struct vc_data *conp, struct display *p,
bottom = conp->vc_rows + p->yscroll;
if (bottom >= p->vrows)
bottom -= p->vrows;
dest = p->screen_base + bottom * fontheight(p) * p->next_line;
dest = p->fb_info->screen_base + bottom * fontheight(p) * p->next_line;
if (inverse)
fb_memset255(dest, height * p->next_line);
else
......
......@@ -158,20 +158,20 @@ fbcon_sti_bmove(struct display *p, int sy, int sx,
u_int rows;
if (sx == 0 && dx == 0 && width == p->next_line) {
src = p->screen_base+sy*fontheight(p)*width;
dest = p->screen_base+dy*fontheight(p)*width;
src = p->fb_info->screen_base+sy*fontheight(p)*width;
dest = p->fb_info->screen_base+dy*fontheight(p)*width;
memcpy_fromhp_tohp(dest, src, height*fontheight(p)*width);
} else if (dy <= sy) {
src = p->screen_base+sy*fontheight(p)*p->next_line+sx;
dest = p->screen_base+dy*fontheight(p)*p->next_line+dx;
src = p->fb_info->screen_base+sy*fontheight(p)*p->next_line+sx;
dest = p->fb_info->screen_base+dy*fontheight(p)*p->next_line+dx;
for (rows = height*fontheight(p); rows--;) {
memcpy_fromhp_tohp(dest, src, width);
src += p->next_line;
dest += p->next_line;
}
} else {
src = p->screen_base+((sy+height)*fontheight(p)-1)*p->next_line+sx;
dest = p->screen_base+((dy+height)*fontheight(p)-1)*p->next_line+dx;
src = p->fb_info->screen_base+((sy+height)*fontheight(p)-1)*p->next_line+sx;
dest = p->fb_info->screen_base+((dy+height)*fontheight(p)-1)*p->next_line+dx;
for (rows = height*fontheight(p); rows--;) {
memcpy_fromhp_tohp(dest, src, width);
src -= p->next_line;
......@@ -190,7 +190,7 @@ fbcon_sti_clear(struct vc_data *conp,
u_int rows;
int inverse = conp ? attr_reverse(p,conp->vc_video_erase_char) : 0;
dest = p->screen_base+sy*fontheight(p)*p->next_line+sx;
dest = p->fb_info->screen_base+sy*fontheight(p)*p->next_line+sx;
if (sx == 0 && width == p->next_line) {
if (inverse)
......@@ -213,7 +213,7 @@ static void fbcon_sti_putc(struct vc_data *conp,
u_int rows, bold, revs, underl;
u8 d;
dest = p->screen_base+yy*fontheight(p)*p->next_line+xx;
dest = p->fb_info->screen_base+yy*fontheight(p)*p->next_line+xx;
cdat = p->fontdata+(c&p->charmask)*fontheight(p);
bold = attr_bold(p,c);
revs = attr_reverse(p,c);
......@@ -248,11 +248,11 @@ static void fbcon_sti_putcs(struct vc_data *conp,
}
dest0 = p->screen_base+yy*fontheight(p)*p->next_line+xx;
dest0 = p->fb_info->screen_base+yy*fontheight(p)*p->next_line+xx;
if(((u32)dest0&0xf0000000)!=0xf0000000) {
printk("refusing to putcs %p %p %p %d %d %d (%p) %p = %p + %d * %d * %ld + %d\n",
conp, p, s, count, yy, xx, __builtin_return_address(0),
dest0, p->screen_base, yy, fontheight(p), p->next_line,
dest0, p->fb_info->screen_base, yy, fontheight(p), p->next_line,
xx);
return;
}
......@@ -286,7 +286,7 @@ static void fbcon_sti_revc(struct display *p,
u_int rows;
dest = p->screen_base+yy*fontheight(p)*p->next_line+xx;
dest = p->fb_info->screen_base+yy*fontheight(p)*p->next_line+xx;
for (rows = fontheight(p); rows--; dest += p->next_line) {
d = readb_hp(dest);
writeb_hp (~d, dest);
......@@ -311,7 +311,7 @@ fbcon_sti_clear_margins(struct vc_data *conp,
bottom = conp->vc_rows + p->yscroll;
if (bottom >= p->vrows)
bottom -= p->vrows;
dest = p->screen_base + bottom * fontheight(p) * p->next_line;
dest = p->fb_info->screen_base + bottom * fontheight(p) * p->next_line;
if (inverse)
memset_tohp(dest, 0xffffffff, height * p->next_line);
else
......
......@@ -120,8 +120,8 @@ void fbcon_vga_planes_bmove(struct display *p, int sy, int sx, int dy, int dx,
if (dy < sy || (dy == sy && dx < sx)) {
line_ofs = p->line_length - width;
dest = p->screen_base + dx + dy * p->line_length;
src = p->screen_base + sx + sy * p->line_length;
dest = p->fb_info->screen_base + dx + dy * p->line_length;
src = p->fb_info->screen_base + sx + sy * p->line_length;
while (height--) {
for (x = 0; x < width; x++) {
readb(src);
......@@ -134,8 +134,8 @@ void fbcon_vga_planes_bmove(struct display *p, int sy, int sx, int dy, int dx,
}
} else {
line_ofs = p->line_length - width;
dest = p->screen_base + dx + width + (dy + height - 1) * p->line_length;
src = p->screen_base + sx + width + (sy + height - 1) * p->line_length;
dest = p->fb_info->screen_base + dx + width + (dy + height - 1) * p->line_length;
src = p->fb_info->screen_base + sx + width + (sy + height - 1) * p->line_length;
while (height--) {
for (x = 0; x < width; x++) {
dest--;
......@@ -167,7 +167,7 @@ void fbcon_vga_planes_clear(struct vc_data *conp, struct display *p, int sy, int
sy *= fontheight(p);
height *= fontheight(p);
where = p->screen_base + sx + sy * p->line_length;
where = p->fb_info->screen_base + sx + sy * p->line_length;
while (height--) {
for (x = 0; x < width; x++) {
writeb(0, where);
......@@ -184,7 +184,7 @@ void fbcon_ega_planes_putc(struct vc_data *conp, struct display *p, int c, int y
int y;
u8 *cdat = p->fontdata + (c & p->charmask) * fontheight(p);
char *where = p->screen_base + xx + yy * p->line_length * fontheight(p);
char *where = p->fb_info->screen_base + xx + yy * p->line_length * fontheight(p);
setmode(0);
setop(0);
......@@ -213,7 +213,7 @@ void fbcon_vga_planes_putc(struct vc_data *conp, struct display *p, int c, int y
int y;
u8 *cdat = p->fontdata + (c & p->charmask) * fontheight(p);
char *where = p->screen_base + xx + yy * p->line_length * fontheight(p);
char *where = p->fb_info->screen_base + xx + yy * p->line_length * fontheight(p);
setmode(2);
setop(0);
......@@ -248,7 +248,7 @@ void fbcon_ega_planes_putcs(struct vc_data *conp, struct display *p, const unsig
selectmask();
setmask(0xff);
where = p->screen_base + xx + yy * p->line_length * fontheight(p);
where = p->fb_info->screen_base + xx + yy * p->line_length * fontheight(p);
writeb(bg, where);
rmb();
readb(where); /* fill latches */
......@@ -289,7 +289,7 @@ void fbcon_vga_planes_putcs(struct vc_data *conp, struct display *p, const unsig
selectmask();
setmask(0xff);
where = p->screen_base + xx + yy * p->line_length * fontheight(p);
where = p->fb_info->screen_base + xx + yy * p->line_length * fontheight(p);
writeb(bg, where);
rmb();
readb(where); /* fill latches */
......@@ -312,7 +312,7 @@ void fbcon_vga_planes_putcs(struct vc_data *conp, struct display *p, const unsig
void fbcon_vga_planes_revc(struct display *p, int xx, int yy)
{
char *where = p->screen_base + xx + yy * p->line_length * fontheight(p);
char *where = p->fb_info->screen_base + xx + yy * p->line_length * fontheight(p);
int y;
setmode(0);
......
......@@ -103,20 +103,20 @@ void fbcon_vga_bmove(struct display *p, int sy, int sx, int dy, int dx,
int rows;
if (sx == 0 && dx == 0 && width == p->next_line/2) {
src = (u16 *)(p->screen_base+sy*p->next_line);
dst = (u16 *)(p->screen_base+dy*p->next_line);
src = (u16 *)(p->fb_info->screen_base+sy*p->next_line);
dst = (u16 *)(p->fb_info->screen_base+dy*p->next_line);
vga_memmovew(dst, src, height*width);
} else if (dy < sy || (dy == sy && dx < sx)) {
src = (u16 *)(p->screen_base+sy*p->next_line+sx*2);
dst = (u16 *)(p->screen_base+dy*p->next_line+dx*2);
src = (u16 *)(p->fb_info->screen_base+sy*p->next_line+sx*2);
dst = (u16 *)(p->fb_info->screen_base+dy*p->next_line+dx*2);
for (rows = height; rows-- ;) {
vga_memmovew(dst, src, width);
src += p->next_line/2;
dst += p->next_line/2;
}
} else {
src = (u16 *)(p->screen_base+(sy+height-1)*p->next_line+sx*2);
dst = (u16 *)(p->screen_base+(dy+height-1)*p->next_line+dx*2);
src = (u16 *)(p->fb_info->screen_base+(sy+height-1)*p->next_line+sx*2);
dst = (u16 *)(p->fb_info->screen_base+(dy+height-1)*p->next_line+dx*2);
for (rows = height; rows-- ;) {
vga_memmovew(dst, src, width);
src -= p->next_line/2;
......@@ -128,7 +128,7 @@ void fbcon_vga_bmove(struct display *p, int sy, int sx, int dy, int dx,
void fbcon_vga_clear(struct vc_data *conp, struct display *p, int sy, int sx,
int height, int width)
{
u16 *dest = (u16 *)(p->screen_base+sy*p->next_line+sx*2);
u16 *dest = (u16 *)(p->fb_info->screen_base+sy*p->next_line+sx*2);
int rows;
if (sx == 0 && width*2 == p->next_line)
......@@ -141,7 +141,7 @@ void fbcon_vga_clear(struct vc_data *conp, struct display *p, int sy, int sx,
void fbcon_vga_putc(struct vc_data *conp, struct display *p, int c, int y,
int x)
{
u16 *dst = (u16 *)(p->screen_base+y*p->next_line+x*2);
u16 *dst = (u16 *)(p->fb_info->screen_base+y*p->next_line+x*2);
if (conp->vc_can_do_color)
vga_writew(c, dst);
else
......@@ -151,7 +151,7 @@ void fbcon_vga_putc(struct vc_data *conp, struct display *p, int c, int y,
void fbcon_vga_putcs(struct vc_data *conp, struct display *p,
const unsigned short *s, int count, int y, int x)
{
u16 *dst = (u16 *)(p->screen_base+y*p->next_line+x*2);
u16 *dst = (u16 *)(p->fb_info->screen_base+y*p->next_line+x*2);
u16 sattr;
if (conp->vc_can_do_color)
while (count--)
......@@ -165,7 +165,7 @@ void fbcon_vga_putcs(struct vc_data *conp, struct display *p,
void fbcon_vga_revc(struct display *p, int x, int y)
{
u16 *dst = (u16 *)(p->screen_base+y*p->next_line+x*2);
u16 *dst = (u16 *)(p->fb_info->screen_base+y*p->next_line+x*2);
u16 val = vga_readw(dst);
val = (val & 0x88ff) | ((val<<4) & 0x7000) | ((val>>4) & 0x0700);
vga_writew(val, dst);
......
......@@ -356,7 +356,6 @@ int __init fm2fb_init(void)
disp.cmap.start = 0;
disp.cmap.len = 0;
disp.cmap.red = disp.cmap.green = disp.cmap.blue = disp.cmap.transp = NULL;
disp.screen_base = (char *)fm2fb_mem;
disp.visual = fb_fix.visual;
disp.type = fb_fix.type;
disp.type_aux = fb_fix.type_aux;
......@@ -376,6 +375,7 @@ int __init fm2fb_init(void)
strcpy(fb_info.modename, fb_fix.id);
fb_info.node = NODEV;
fb_info.fbops = &fm2fb_ops;
fb_info.screen_base = (char *)fm2fb_mem;
fb_info.currcon = -1;
fb_info.disp = &disp;
fb_info.fontname[0] = '\0';
......
......@@ -1535,7 +1535,6 @@ static int neofb_set_var (struct fb_var_screeninfo *var, int con,
fb->fix.line_length = display->next_line;
display->screen_base = fb->screen_base;
display->line_length = fb->fix.line_length;
display->visual = fb->fix.visual;
display->type = fb->fix.type;
......
......@@ -1219,7 +1219,6 @@ static int retz3fb_set_var(struct fb_var_screeninfo *var, int con,
struct fb_fix_screeninfo fix;
retz3fb_get_fix(&fix, con, info);
display->screen_base = zinfo->fbmem;
display->visual = fix.visual;
display->type = fix.type;
display->type_aux = fix.type_aux;
......
......@@ -579,7 +579,6 @@ static void sisfb_set_disp (int con, struct fb_var_screeninfo *var)
sisfb_get_fix (&fix, con, 0);
display->screen_base = ivideo.video_vbase;
display->visual = fix.visual;
display->type = fix.type;
display->type_aux = fix.type_aux;
......@@ -2769,6 +2768,7 @@ sishw_ext.usExternalChip = 0;
fb_info.changevar = NULL;
fb_info.node = NODEV;
fb_info.fbops = &sisfb_ops;
fb_info.screen_base = ivideo.video_vbase;
fb_info.disp = &disp;
fb_info.currcon = -1;
fb_info.switch_con = &sisfb_switch;
......
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