Commit aa988fec authored by James Simmons's avatar James Simmons

Some how not all the files with the screen_base change got merged. Here are the rest,

parent e66d5915
...@@ -47,8 +47,8 @@ void fbcon_cfb16_bmove(struct display *p, int sy, int sx, int dy, int dx, ...@@ -47,8 +47,8 @@ void fbcon_cfb16_bmove(struct display *p, int sy, int sx, int dy, int dx,
u8 *src, *dst; u8 *src, *dst;
if (sx == 0 && dx == 0 && width * fontwidth(p) * 2 == bytes) { if (sx == 0 && dx == 0 && width * fontwidth(p) * 2 == bytes) {
fb_memmove(p->screen_base + dy * linesize, fb_memmove(p->fb_info->screen_base + dy * linesize,
p->screen_base + sy * linesize, p->fb_info->screen_base + sy * linesize,
height * linesize); height * linesize);
return; return;
} }
...@@ -62,16 +62,16 @@ void fbcon_cfb16_bmove(struct display *p, int sy, int sx, int dy, int dx, ...@@ -62,16 +62,16 @@ void fbcon_cfb16_bmove(struct display *p, int sy, int sx, int dy, int dx,
width *= fontwidth(p)*2; width *= fontwidth(p)*2;
} }
if (dy < sy || (dy == sy && dx < sx)) { if (dy < sy || (dy == sy && dx < sx)) {
src = p->screen_base + sy * linesize + sx; src = p->fb_info->screen_base + sy * linesize + sx;
dst = p->screen_base + dy * linesize + dx; dst = p->fb_info->screen_base + dy * linesize + dx;
for (rows = height * fontheight(p); rows--;) { for (rows = height * fontheight(p); rows--;) {
fb_memmove(dst, src, width); fb_memmove(dst, src, width);
src += bytes; src += bytes;
dst += bytes; dst += bytes;
} }
} else { } else {
src = p->screen_base + (sy+height) * linesize + sx - bytes; src = p->fb_info->screen_base + (sy+height) * linesize + sx - bytes;
dst = p->screen_base + (dy+height) * linesize + dx - bytes; dst = p->fb_info->screen_base + (dy+height) * linesize + dx - bytes;
for (rows = height * fontheight(p); rows--;) { for (rows = height * fontheight(p); rows--;) {
fb_memmove(dst, src, width); fb_memmove(dst, src, width);
src -= bytes; src -= bytes;
...@@ -108,7 +108,7 @@ void fbcon_cfb16_clear(struct vc_data *conp, struct display *p, int sy, int sx, ...@@ -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); int bytes = p->next_line, lines = height * fontheight(p);
u32 bgx; 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)]; 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, ...@@ -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; int bytes = p->next_line, rows;
u32 eorx, fgx, bgx; 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)]; fgx = ((u16 *)p->dispsw_data)[attr_fgcol(p, c)];
bgx = ((u16 *)p->dispsw_data)[attr_bgcol(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, ...@@ -177,7 +177,7 @@ void fbcon_cfb16_putcs(struct vc_data *conp, struct display *p,
int rows, bytes = p->next_line; int rows, bytes = p->next_line;
u32 eorx, fgx, bgx; 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); c = scr_readw(s);
fgx = ((u16 *)p->dispsw_data)[attr_fgcol(p, c)]; fgx = ((u16 *)p->dispsw_data)[attr_fgcol(p, c)];
bgx = ((u16 *)p->dispsw_data)[attr_bgcol(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) ...@@ -233,7 +233,7 @@ void fbcon_cfb16_revc(struct display *p, int xx, int yy)
u8 *dest; u8 *dest;
int bytes = p->next_line, rows; 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) { for (rows = fontheight(p); rows--; dest += bytes) {
switch (fontwidth(p)) { switch (fontwidth(p)) {
case 16: case 16:
...@@ -268,10 +268,10 @@ void fbcon_cfb16_clear_margins(struct vc_data *conp, struct display *p, ...@@ -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)]; bgx = ((u16 *)p->dispsw_data)[attr_bgcol_ec(p, conp)];
if (!bottom_only && (right_width = p->var.xres-right_start)) 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); p->var.yres_virtual, bgx, bytes);
if ((bottom_width = p->var.yres-bottom_start)) 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); 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, ...@@ -61,14 +61,14 @@ void fbcon_cfb2_bmove(struct display *p, int sy, int sx, int dy, int dx,
u8 *src,*dst; u8 *src,*dst;
if (sx == 0 && dx == 0 && width * 2 == bytes) { if (sx == 0 && dx == 0 && width * 2 == bytes) {
fb_memmove(p->screen_base + dy * linesize, fb_memmove(p->fb_info->screen_base + dy * linesize,
p->screen_base + sy * linesize, p->fb_info->screen_base + sy * linesize,
height * linesize); height * linesize);
} }
else { else {
if (dy < sy || (dy == sy && dx < sx)) { if (dy < sy || (dy == sy && dx < sx)) {
src = p->screen_base + sy * linesize + sx * 2; src = p->fb_info->screen_base + sy * linesize + sx * 2;
dst = p->screen_base + dy * linesize + dx * 2; dst = p->fb_info->screen_base + dy * linesize + dx * 2;
for (rows = height * fontheight(p) ; rows-- ;) { for (rows = height * fontheight(p) ; rows-- ;) {
fb_memmove(dst, src, width * 2); fb_memmove(dst, src, width * 2);
src += bytes; src += bytes;
...@@ -76,10 +76,8 @@ void fbcon_cfb2_bmove(struct display *p, int sy, int sx, int dy, int dx, ...@@ -76,10 +76,8 @@ void fbcon_cfb2_bmove(struct display *p, int sy, int sx, int dy, int dx,
} }
} }
else { else {
src = p->screen_base + (sy+height) * linesize + sx * 2 src = p->fb_info->screen_base + (sy+height) * linesize + sx * 2 - bytes;
- bytes; dst = p->fb_info->screen_base + (dy+height) * linesize + dx * 2 - bytes;
dst = p->screen_base + (dy+height) * linesize + dx * 2
- bytes;
for (rows = height * fontheight(p) ; rows-- ;) { for (rows = height * fontheight(p) ; rows-- ;) {
fb_memmove(dst, src, width * 2); fb_memmove(dst, src, width * 2);
src -= bytes; src -= bytes;
...@@ -96,7 +94,7 @@ void fbcon_cfb2_clear(struct vc_data *conp, struct display *p, int sy, int sx, ...@@ -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; int bytes=p->next_line,lines=height * fontheight(p), rows, i;
u32 bgx; 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=attr_bgcol_ec(p,conp);
bgx |= (bgx << 2); /* expand the colour to 16 bits */ 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, ...@@ -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; int bytes=p->next_line,rows;
u32 eorx,fgx,bgx; 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); cdat = p->fontdata + (c & p->charmask) * fontheight(p);
fgx=3;/*attr_fgcol(p,c);*/ fgx=3;/*attr_fgcol(p,c);*/
...@@ -153,7 +151,7 @@ void fbcon_cfb2_putcs(struct vc_data *conp, struct display *p, const unsigned sh ...@@ -153,7 +151,7 @@ void fbcon_cfb2_putcs(struct vc_data *conp, struct display *p, const unsigned sh
int rows,bytes=p->next_line; int rows,bytes=p->next_line;
u32 eorx, fgx, bgx; 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); c = scr_readw(s);
fgx = 3/*attr_fgcol(p, c)*/; fgx = 3/*attr_fgcol(p, c)*/;
bgx = attr_bgcol(p, c); bgx = attr_bgcol(p, c);
...@@ -179,7 +177,7 @@ void fbcon_cfb2_revc(struct display *p, int xx, int yy) ...@@ -179,7 +177,7 @@ void fbcon_cfb2_revc(struct display *p, int xx, int yy)
u8 *dest; u8 *dest;
int bytes=p->next_line, rows; 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) { for (rows = fontheight(p) ; rows-- ; dest += bytes) {
fb_writew(fb_readw(dest) ^ 0xffff, dest); 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, ...@@ -36,8 +36,8 @@ void fbcon_cfb24_bmove(struct display *p, int sy, int sx, int dy, int dx,
u8 *src, *dst; u8 *src, *dst;
if (sx == 0 && dx == 0 && width * fontwidth(p) * 3 == bytes) { if (sx == 0 && dx == 0 && width * fontwidth(p) * 3 == bytes) {
fb_memmove(p->screen_base + dy * linesize, fb_memmove(p->fb_info->screen_base + dy * linesize,
p->screen_base + sy * linesize, p->fb_info->screen_base + sy * linesize,
height * linesize); height * linesize);
return; return;
} }
...@@ -52,16 +52,16 @@ void fbcon_cfb24_bmove(struct display *p, int sy, int sx, int dy, int dx, ...@@ -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; sx *= 3; dx *= 3; width *= 3;
if (dy < sy || (dy == sy && dx < sx)) { if (dy < sy || (dy == sy && dx < sx)) {
src = p->screen_base + sy * linesize + sx; src = p->fb_info->screen_base + sy * linesize + sx;
dst = p->screen_base + dy * linesize + dx; dst = p->fb_info->screen_base + dy * linesize + dx;
for (rows = height * fontheight(p); rows--;) { for (rows = height * fontheight(p); rows--;) {
fb_memmove(dst, src, width); fb_memmove(dst, src, width);
src += bytes; src += bytes;
dst += bytes; dst += bytes;
} }
} else { } else {
src = p->screen_base + (sy+height) * linesize + sx - bytes; src = p->fb_info->screen_base + (sy+height) * linesize + sx - bytes;
dst = p->screen_base + (dy+height) * linesize + dx - bytes; dst = p->fb_info->screen_base + (dy+height) * linesize + dx - bytes;
for (rows = height * fontheight(p); rows--;) { for (rows = height * fontheight(p); rows--;) {
fb_memmove(dst, src, width); fb_memmove(dst, src, width);
src -= bytes; src -= bytes;
...@@ -122,7 +122,7 @@ void fbcon_cfb24_clear(struct vc_data *conp, struct display *p, int sy, int sx, ...@@ -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); int bytes = p->next_line, lines = height * fontheight(p);
u32 bgx; 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)]; 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, ...@@ -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; int bytes = p->next_line, rows;
u32 eorx, fgx, bgx, d1, d2, d3, d4; 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) if (fontwidth(p) <= 8)
cdat = p->fontdata + (c & p->charmask) * fontheight(p); cdat = p->fontdata + (c & p->charmask) * fontheight(p);
else else
...@@ -190,7 +190,7 @@ void fbcon_cfb24_putcs(struct vc_data *conp, struct display *p, ...@@ -190,7 +190,7 @@ void fbcon_cfb24_putcs(struct vc_data *conp, struct display *p,
int rows, bytes = p->next_line; int rows, bytes = p->next_line;
u32 eorx, fgx, bgx, d1, d2, d3, d4; 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); c = scr_readw(s);
fgx = ((u32 *)p->dispsw_data)[attr_fgcol(p, c)]; fgx = ((u32 *)p->dispsw_data)[attr_fgcol(p, c)];
bgx = ((u32 *)p->dispsw_data)[attr_bgcol(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) ...@@ -241,7 +241,7 @@ void fbcon_cfb24_revc(struct display *p, int xx, int yy)
u8 *dest; u8 *dest;
int bytes = p->next_line, rows; 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) { for (rows = fontheight(p); rows--; dest += bytes) {
switch (fontwidth(p)) { switch (fontwidth(p)) {
case 16: case 16:
...@@ -280,10 +280,10 @@ void fbcon_cfb24_clear_margins(struct vc_data *conp, struct display *p, ...@@ -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)]; bgx = ((u32 *)p->dispsw_data)[attr_bgcol_ec(p, conp)];
if (!bottom_only && (right_width = p->var.xres-right_start)) 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); p->var.yres_virtual, bgx, bytes);
if ((bottom_width = p->var.yres-bottom_start)) 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); 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, ...@@ -36,8 +36,8 @@ void fbcon_cfb32_bmove(struct display *p, int sy, int sx, int dy, int dx,
u8 *src, *dst; u8 *src, *dst;
if (sx == 0 && dx == 0 && width * fontwidth(p) * 4 == bytes) { if (sx == 0 && dx == 0 && width * fontwidth(p) * 4 == bytes) {
fb_memmove(p->screen_base + dy * linesize, fb_memmove(p->fb_info->screen_base + dy * linesize,
p->screen_base + sy * linesize, p->fb_info->screen_base + sy * linesize,
height * linesize); height * linesize);
return; return;
} }
...@@ -51,16 +51,16 @@ void fbcon_cfb32_bmove(struct display *p, int sy, int sx, int dy, int dx, ...@@ -51,16 +51,16 @@ void fbcon_cfb32_bmove(struct display *p, int sy, int sx, int dy, int dx,
width *= fontwidth(p)*4; width *= fontwidth(p)*4;
} }
if (dy < sy || (dy == sy && dx < sx)) { if (dy < sy || (dy == sy && dx < sx)) {
src = p->screen_base + sy * linesize + sx; src = p->fb_info->screen_base + sy * linesize + sx;
dst = p->screen_base + dy * linesize + dx; dst = p->fb_info->screen_base + dy * linesize + dx;
for (rows = height * fontheight(p); rows--;) { for (rows = height * fontheight(p); rows--;) {
fb_memmove(dst, src, width); fb_memmove(dst, src, width);
src += bytes; src += bytes;
dst += bytes; dst += bytes;
} }
} else { } else {
src = p->screen_base + (sy+height) * linesize + sx - bytes; src = p->fb_info->screen_base + (sy+height) * linesize + sx - bytes;
dst = p->screen_base + (dy+height) * linesize + dx - bytes; dst = p->fb_info->screen_base + (dy+height) * linesize + dx - bytes;
for (rows = height * fontheight(p); rows--;) { for (rows = height * fontheight(p); rows--;) {
fb_memmove(dst, src, width); fb_memmove(dst, src, width);
src -= bytes; src -= bytes;
...@@ -99,7 +99,7 @@ void fbcon_cfb32_clear(struct vc_data *conp, struct display *p, int sy, int sx, ...@@ -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); int bytes = p->next_line, lines = height * fontheight(p);
u32 bgx; 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)]; 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, ...@@ -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; int bytes = p->next_line, rows;
u32 eorx, fgx, bgx, *pt; 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) if (fontwidth(p) <= 8)
cdat = p->fontdata + (c & p->charmask) * fontheight(p); cdat = p->fontdata + (c & p->charmask) * fontheight(p);
else else
...@@ -163,7 +163,7 @@ void fbcon_cfb32_putcs(struct vc_data *conp, struct display *p, ...@@ -163,7 +163,7 @@ void fbcon_cfb32_putcs(struct vc_data *conp, struct display *p,
int rows, bytes = p->next_line; int rows, bytes = p->next_line;
u32 eorx, fgx, bgx, *pt; 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); c = scr_readw(s);
fgx = ((u32 *)p->dispsw_data)[attr_fgcol(p, c)]; fgx = ((u32 *)p->dispsw_data)[attr_fgcol(p, c)];
bgx = ((u32 *)p->dispsw_data)[attr_bgcol(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) ...@@ -210,7 +210,7 @@ void fbcon_cfb32_revc(struct display *p, int xx, int yy)
u8 *dest; u8 *dest;
int bytes = p->next_line, rows; 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) { for (rows = fontheight(p); rows--; dest += bytes) {
switch (fontwidth(p)) { switch (fontwidth(p)) {
case 16: case 16:
...@@ -254,10 +254,10 @@ void fbcon_cfb32_clear_margins(struct vc_data *conp, struct display *p, ...@@ -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)]; bgx = ((u32 *)p->dispsw_data)[attr_bgcol_ec(p, conp)];
if (!bottom_only && (right_width = p->var.xres-right_start)) 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); p->var.yres_virtual, bgx, bytes);
if ((bottom_width = p->var.yres-bottom_start)) 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); 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, ...@@ -61,14 +61,14 @@ void fbcon_cfb4_bmove(struct display *p, int sy, int sx, int dy, int dx,
u8 *src,*dst; u8 *src,*dst;
if (sx == 0 && dx == 0 && width * 4 == bytes) { if (sx == 0 && dx == 0 && width * 4 == bytes) {
fb_memmove(p->screen_base + dy * linesize, fb_memmove(p->fb_info->screen_base + dy * linesize,
p->screen_base + sy * linesize, p->fb_info->screen_base + sy * linesize,
height * linesize); height * linesize);
} }
else { else {
if (dy < sy || (dy == sy && dx < sx)) { if (dy < sy || (dy == sy && dx < sx)) {
src = p->screen_base + sy * linesize + sx * 4; src = p->fb_info->screen_base + sy * linesize + sx * 4;
dst = p->screen_base + dy * linesize + dx * 4; dst = p->fb_info->screen_base + dy * linesize + dx * 4;
for (rows = height * fontheight(p) ; rows-- ;) { for (rows = height * fontheight(p) ; rows-- ;) {
fb_memmove(dst, src, width * 4); fb_memmove(dst, src, width * 4);
src += bytes; src += bytes;
...@@ -76,10 +76,8 @@ void fbcon_cfb4_bmove(struct display *p, int sy, int sx, int dy, int dx, ...@@ -76,10 +76,8 @@ void fbcon_cfb4_bmove(struct display *p, int sy, int sx, int dy, int dx,
} }
} }
else { else {
src = p->screen_base + (sy+height) * linesize + sx * 4 src = p->fb_info->screen_base + (sy+height) * linesize + sx * 4 - bytes;
- bytes; dst = p->fb_info->screen_base + (dy+height) * linesize + dx * 4 - bytes;
dst = p->screen_base + (dy+height) * linesize + dx * 4
- bytes;
for (rows = height * fontheight(p) ; rows-- ;) { for (rows = height * fontheight(p) ; rows-- ;) {
fb_memmove(dst, src, width * 4); fb_memmove(dst, src, width * 4);
src -= bytes; src -= bytes;
...@@ -96,9 +94,9 @@ void fbcon_cfb4_clear(struct vc_data *conp, struct display *p, int sy, int sx, ...@@ -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; int bytes=p->next_line,lines=height * fontheight(p), rows, i;
u32 bgx; u32 bgx;
/* if(p->screen_base!=0xFDD00020) /* if(p->fb_info->screen_base!=0xFDD00020)
mac_boom(1);*/ 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=attr_bgcol_ec(p,conp);
bgx |= (bgx << 4); /* expand the colour to 32bits */ 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, ...@@ -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; int bytes=p->next_line,rows;
u32 eorx,fgx,bgx; 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); cdat = p->fontdata + (c & p->charmask) * fontheight(p);
fgx=attr_fgcol(p,c); fgx=attr_fgcol(p,c);
...@@ -155,7 +153,7 @@ void fbcon_cfb4_putcs(struct vc_data *conp, struct display *p, ...@@ -155,7 +153,7 @@ void fbcon_cfb4_putcs(struct vc_data *conp, struct display *p,
int rows,bytes=p->next_line; int rows,bytes=p->next_line;
u32 eorx, fgx, bgx; 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); c = scr_readw(s);
fgx = attr_fgcol(p, c); fgx = attr_fgcol(p, c);
bgx = attr_bgcol(p, c); bgx = attr_bgcol(p, c);
...@@ -183,7 +181,7 @@ void fbcon_cfb4_revc(struct display *p, int xx, int yy) ...@@ -183,7 +181,7 @@ void fbcon_cfb4_revc(struct display *p, int xx, int yy)
u8 *dest; u8 *dest;
int bytes=p->next_line, rows; 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) { for (rows = fontheight(p) ; rows-- ; dest += bytes) {
fb_writel(fb_readl(dest+0) ^ 0xffffffff, dest+0); 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, ...@@ -52,8 +52,8 @@ void fbcon_cfb8_bmove(struct display *p, int sy, int sx, int dy, int dx,
u8 *src,*dst; u8 *src,*dst;
if (sx == 0 && dx == 0 && width * fontwidth(p) == bytes) { if (sx == 0 && dx == 0 && width * fontwidth(p) == bytes) {
fb_memmove(p->screen_base + dy * linesize, fb_memmove(p->fb_info->screen_base + dy * linesize,
p->screen_base + sy * linesize, p->fb_info->screen_base + sy * linesize,
height * linesize); height * linesize);
return; return;
} }
...@@ -63,16 +63,16 @@ void fbcon_cfb8_bmove(struct display *p, int sy, int sx, int dy, int dx, ...@@ -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); sx *= fontwidth(p); dx *= fontwidth(p); width *= fontwidth(p);
} }
if (dy < sy || (dy == sy && dx < sx)) { if (dy < sy || (dy == sy && dx < sx)) {
src = p->screen_base + sy * linesize + sx; src = p->fb_info->screen_base + sy * linesize + sx;
dst = p->screen_base + dy * linesize + dx; dst = p->fb_info->screen_base + dy * linesize + dx;
for (rows = height * fontheight(p) ; rows-- ;) { for (rows = height * fontheight(p) ; rows-- ;) {
fb_memmove(dst, src, width); fb_memmove(dst, src, width);
src += bytes; src += bytes;
dst += bytes; dst += bytes;
} }
} else { } else {
src = p->screen_base + (sy+height) * linesize + sx - bytes; src = p->fb_info->screen_base + (sy+height) * linesize + sx - bytes;
dst = p->screen_base + (dy+height) * linesize + dx - bytes; dst = p->fb_info->screen_base + (dy+height) * linesize + dx - bytes;
for (rows = height * fontheight(p) ; rows-- ;) { for (rows = height * fontheight(p) ; rows-- ;) {
fb_memmove(dst, src, width); fb_memmove(dst, src, width);
src -= bytes; src -= bytes;
...@@ -97,7 +97,7 @@ void fbcon_cfb8_clear(struct vc_data *conp, struct display *p, int sy, int sx, ...@@ -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); int bytes=p->next_line,lines=height * fontheight(p);
u8 bgx; 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); 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, ...@@ -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; int bytes=p->next_line,rows;
u32 eorx,fgx,bgx; 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) if (fontwidth(p) <= 8)
cdat = p->fontdata + (c & p->charmask) * fontheight(p); cdat = p->fontdata + (c & p->charmask) * fontheight(p);
else else
...@@ -162,7 +162,7 @@ void fbcon_cfb8_putcs(struct vc_data *conp, struct display *p, ...@@ -162,7 +162,7 @@ void fbcon_cfb8_putcs(struct vc_data *conp, struct display *p,
int rows,bytes=p->next_line; int rows,bytes=p->next_line;
u32 eorx, fgx, bgx; 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); c = scr_readw(s);
fgx = attr_fgcol(p, c); fgx = attr_fgcol(p, c);
bgx = attr_bgcol(p, c); bgx = attr_bgcol(p, c);
...@@ -219,7 +219,7 @@ void fbcon_cfb8_revc(struct display *p, int xx, int yy) ...@@ -219,7 +219,7 @@ void fbcon_cfb8_revc(struct display *p, int xx, int yy)
u8 *dest; u8 *dest;
int bytes=p->next_line, rows; 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) { for (rows = fontheight(p) ; rows-- ; dest += bytes) {
switch (fontwidth(p)) { switch (fontwidth(p)) {
case 16: fb_writel(fb_readl(dest+12) ^ 0x0f0f0f0f, dest+12); /* fall thru */ 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, ...@@ -244,10 +244,9 @@ void fbcon_cfb8_clear_margins(struct vc_data *conp, struct display *p,
bgx=attr_bgcol_ec(p,conp); bgx=attr_bgcol_ec(p,conp);
if (!bottom_only && (right_width = p->var.xres-right_start)) if (!bottom_only && (right_width = p->var.xres-right_start))
rectfill(p->screen_base+right_start, right_width, p->var.yres_virtual, rectfill(p->fb_info->screen_base+right_start, right_width, p->var.yres_virtual, bgx, bytes);
bgx, bytes);
if ((bottom_width = p->var.yres-bottom_start)) 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); right_start, bottom_width, bgx, bytes);
} }
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
static inline u8* rowaddr(struct display *p, u_int row) 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) 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, ...@@ -57,8 +57,8 @@ void fbcon_hga_bmove(struct display *p, int sy, int sx, int dy, int dx,
#if 0 #if 0
if (sx == 0 && dx == 0 && width == p->next_line) { if (sx == 0 && dx == 0 && width == p->next_line) {
src = p->screen_base+sy*fontheight(p)*width; src = p->fb_info->screen_base+sy*fontheight(p)*width;
dest = p->screen_base+dy*fontheight(p)*width; dest = p->fb_info->screen_base+dy*fontheight(p)*width;
fb_memmove(dest, src, height*fontheight(p)*width); fb_memmove(dest, src, height*fontheight(p)*width);
} else } else
#endif #endif
......
...@@ -45,24 +45,24 @@ void fbcon_ilbm_bmove(struct display *p, int sy, int sx, int dy, int dx, ...@@ -45,24 +45,24 @@ void fbcon_ilbm_bmove(struct display *p, int sy, int sx, int dy, int dx,
int height, int width) int height, int width)
{ {
if (sx == 0 && dx == 0 && width == p->next_plane) if (sx == 0 && dx == 0 && width == p->next_plane)
fb_memmove(p->screen_base+dy*fontheight(p)*p->next_line, fb_memmove(p->fb_info->screen_base+dy*fontheight(p)*p->next_line,
p->screen_base+sy*fontheight(p)*p->next_line, p->fb_info->screen_base+sy*fontheight(p)*p->next_line,
height*fontheight(p)*p->next_line); height*fontheight(p)*p->next_line);
else { else {
u8 *src, *dest; u8 *src, *dest;
u_int i; u_int i;
if (dy <= sy) { if (dy <= sy) {
src = p->screen_base+sy*fontheight(p)*p->next_line+sx; src = p->fb_info->screen_base+sy*fontheight(p)*p->next_line+sx;
dest = p->screen_base+dy*fontheight(p)*p->next_line+dx; dest = p->fb_info->screen_base+dy*fontheight(p)*p->next_line+dx;
for (i = p->var.bits_per_pixel*height*fontheight(p); i--;) { for (i = p->var.bits_per_pixel*height*fontheight(p); i--;) {
fb_memmove(dest, src, width); fb_memmove(dest, src, width);
src += p->next_plane; src += p->next_plane;
dest += p->next_plane; dest += p->next_plane;
} }
} else { } else {
src = p->screen_base+(sy+height)*fontheight(p)*p->next_line+sx; src = p->fb_info->screen_base+(sy+height)*fontheight(p)*p->next_line+sx;
dest = p->screen_base+(dy+height)*fontheight(p)*p->next_line+dx; 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--;) { for (i = p->var.bits_per_pixel*height*fontheight(p); i--;) {
src -= p->next_plane; src -= p->next_plane;
dest -= 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, ...@@ -79,7 +79,7 @@ void fbcon_ilbm_clear(struct vc_data *conp, struct display *p, int sy, int sx,
u_int i, rows; u_int i, rows;
int bg, bg0; 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); bg0 = attr_bgcol_ec(p,conp);
for (rows = height*fontheight(p); rows--;) { 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, ...@@ -102,7 +102,7 @@ void fbcon_ilbm_putc(struct vc_data *conp, struct display *p, int c, int yy,
u8 d; u8 d;
int fg0, bg0, fg, bg; 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); cdat = p->fontdata+(c&p->charmask)*fontheight(p);
fg0 = attr_fgcol(p,c); fg0 = attr_fgcol(p,c);
bg0 = attr_bgcol(p,c); bg0 = attr_bgcol(p,c);
...@@ -153,7 +153,7 @@ void fbcon_ilbm_putcs(struct vc_data *conp, struct display *p, ...@@ -153,7 +153,7 @@ void fbcon_ilbm_putcs(struct vc_data *conp, struct display *p,
u32 d; u32 d;
int fg0, bg0, fg, bg; 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); c1 = scr_readw(s);
fg0 = attr_fgcol(p, c1); fg0 = attr_fgcol(p, c1);
bg0 = attr_bgcol(p, c1); bg0 = attr_bgcol(p, c1);
...@@ -235,7 +235,7 @@ void fbcon_ilbm_revc(struct display *p, int xx, int yy) ...@@ -235,7 +235,7 @@ void fbcon_ilbm_revc(struct display *p, int xx, int yy)
u_int rows, i; u_int rows, i;
int mask; 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; mask = p->fgcol ^ p->bgcol;
/* /*
......
...@@ -172,8 +172,8 @@ void fbcon_iplan2p2_bmove(struct display *p, int sy, int sx, int dy, int dx, ...@@ -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 /* Special (but often used) case: Moving whole lines can be
* done with memmove() * done with memmove()
*/ */
fb_memmove(p->screen_base + dy * p->next_line * fontheight(p), fb_memmove(p->fb_info->screen_base + dy * p->next_line * fontheight(p),
p->screen_base + sy * p->next_line * fontheight(p), p->fb_info->screen_base + sy * p->next_line * fontheight(p),
p->next_line * height * fontheight(p)); p->next_line * height * fontheight(p));
} else { } else {
int rows, cols; int rows, cols;
...@@ -194,8 +194,8 @@ void fbcon_iplan2p2_bmove(struct display *p, int sy, int sx, int dy, int dx, ...@@ -194,8 +194,8 @@ void fbcon_iplan2p2_bmove(struct display *p, int sy, int sx, int dy, int dx,
if ((sx & 1) == (dx & 1)) { if ((sx & 1) == (dx & 1)) {
/* odd->odd or even->even */ /* odd->odd or even->even */
if (upwards) { if (upwards) {
src = p->screen_base + sy * linesize + (sx>>1)*4 + (sx & 1); src = p->fb_info->screen_base + sy * linesize + (sx>>1)*4 + (sx & 1);
dst = p->screen_base + dy * linesize + (dx>>1)*4 + (dx & 1); dst = p->fb_info->screen_base + dy * linesize + (dx>>1)*4 + (dx & 1);
if (sx & 1) { if (sx & 1) {
memmove_2p_col(dst, src, colsize, bytes); memmove_2p_col(dst, src, colsize, bytes);
src += 3; src += 3;
...@@ -217,13 +217,13 @@ void fbcon_iplan2p2_bmove(struct display *p, int sy, int sx, int dy, int dx, ...@@ -217,13 +217,13 @@ void fbcon_iplan2p2_bmove(struct display *p, int sy, int sx, int dy, int dx,
} }
} else { } else {
if (!((sx+width-1) & 1)) { if (!((sx+width-1) & 1)) {
src = p->screen_base + sy * linesize + ((sx+width-1)>>1)*4; src = p->fb_info->screen_base + sy * linesize + ((sx+width-1)>>1)*4;
dst = p->screen_base + dy * linesize + ((dx+width-1)>>1)*4; dst = p->fb_info->screen_base + dy * linesize + ((dx+width-1)>>1)*4;
memmove_2p_col(dst, src, colsize, bytes); memmove_2p_col(dst, src, colsize, bytes);
--width; --width;
} }
src = p->screen_base + sy * linesize + (sx>>1)*4 + (sx & 1); src = p->fb_info->screen_base + sy * linesize + (sx>>1)*4 + (sx & 1);
dst = p->screen_base + dy * linesize + (dx>>1)*4 + (dx & 1); dst = p->fb_info->screen_base + dy * linesize + (dx>>1)*4 + (dx & 1);
if (width > 1) { if (width > 1) {
src += colsize * bytes + (sx & 1)*3; src += colsize * bytes + (sx & 1)*3;
dst += 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, ...@@ -239,8 +239,8 @@ void fbcon_iplan2p2_bmove(struct display *p, int sy, int sx, int dy, int dx,
} else { } else {
/* odd->even or even->odd */ /* odd->even or even->odd */
if (upwards) { if (upwards) {
src = p->screen_base + sy * linesize + (sx>>1)*4 + (sx & 1); src = p->fb_info->screen_base + sy * linesize + (sx>>1)*4 + (sx & 1);
dst = p->screen_base + dy * linesize + (dx>>1)*4 + (dx & 1); dst = p->fb_info->screen_base + dy * linesize + (dx>>1)*4 + (dx & 1);
for (cols = width; cols > 0; --cols) { for (cols = width; cols > 0; --cols) {
memmove_2p_col(dst, src, colsize, bytes); memmove_2p_col(dst, src, colsize, bytes);
INC_2P(src); INC_2P(src);
...@@ -249,8 +249,8 @@ void fbcon_iplan2p2_bmove(struct display *p, int sy, int sx, int dy, int dx, ...@@ -249,8 +249,8 @@ void fbcon_iplan2p2_bmove(struct display *p, int sy, int sx, int dy, int dx,
} else { } else {
sx += width-1; sx += width-1;
dx += width-1; dx += width-1;
src = p->screen_base + sy * linesize + (sx>>1)*4 + (sx & 1); src = p->fb_info->screen_base + sy * linesize + (sx>>1)*4 + (sx & 1);
dst = p->screen_base + dy * linesize + (dx>>1)*4 + (dx & 1); dst = p->fb_info->screen_base + dy * linesize + (dx>>1)*4 + (dx & 1);
for(cols = width; cols > 0; --cols) { for(cols = width; cols > 0; --cols) {
memmove_2p_col(dst, src, colsize, bytes); memmove_2p_col(dst, src, colsize, bytes);
DEC_2P(src); DEC_2P(src);
...@@ -286,13 +286,13 @@ void fbcon_iplan2p2_clear(struct vc_data *conp, struct display *p, int sy, ...@@ -286,13 +286,13 @@ void fbcon_iplan2p2_clear(struct vc_data *conp, struct display *p, int sy,
else else
offset = sy * bytes * fontheight(p); offset = sy * bytes * fontheight(p);
size = lines * bytes; size = lines * bytes;
memset_even_2p(p->screen_base+offset, size, cval); memset_even_2p(p->fb_info->screen_base+offset, size, cval);
} else { } else {
if (fontheightlog(p)) if (fontheightlog(p))
offset = ((sy * bytes) << fontheightlog(p)) + (sx>>1)*4 + (sx & 1); offset = ((sy * bytes) << fontheightlog(p)) + (sx>>1)*4 + (sx & 1);
else else
offset = sy * bytes * fontheight(p) + (sx>>1)*4 + (sx & 1); 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))); pcval = expand2w(COLOR_2P(attr_bgcol_ec(p,conp)));
/* Clears are split if the region starts at an odd column or /* 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, ...@@ -328,11 +328,11 @@ void fbcon_iplan2p2_putc(struct vc_data *conp, struct display *p, int c,
u16 eorx, fgx, bgx, fdx; u16 eorx, fgx, bgx, fdx;
if (fontheightlog(p)) { 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)); (xx>>1)*4 + (xx & 1));
cdat = p->fontdata + ((c & p->charmask) << fontheightlog(p)); cdat = p->fontdata + ((c & p->charmask) << fontheightlog(p));
} else { } else {
dest = (p->screen_base + yy * bytes * fontheight(p) + dest = (p->fb_info->screen_base + yy * bytes * fontheight(p) +
(xx>>1)*4 + (xx & 1)); (xx>>1)*4 + (xx & 1));
cdat = p->fontdata + (c & p->charmask) * fontheight(p); cdat = p->fontdata + (c & p->charmask) * fontheight(p);
} }
...@@ -359,10 +359,10 @@ void fbcon_iplan2p2_putcs(struct vc_data *conp, struct display *p, ...@@ -359,10 +359,10 @@ void fbcon_iplan2p2_putcs(struct vc_data *conp, struct display *p,
bytes = p->next_line; bytes = p->next_line;
if (fontheightlog(p)) 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)); (xx>>1)*4 + (xx & 1));
else else
dest0 = (p->screen_base + yy * bytes * fontheight(p) + dest0 = (p->fb_info->screen_base + yy * bytes * fontheight(p) +
(xx>>1)*4 + (xx & 1)); (xx>>1)*4 + (xx & 1));
c = scr_readw(s); c = scr_readw(s);
fgx = expand2w(COLOR_2P(attr_fgcol(p, c))); fgx = expand2w(COLOR_2P(attr_fgcol(p, c)));
...@@ -391,10 +391,9 @@ void fbcon_iplan2p2_revc(struct display *p, int xx, int yy) ...@@ -391,10 +391,9 @@ void fbcon_iplan2p2_revc(struct display *p, int xx, int yy)
int bytes; int bytes;
if (fontheightlog(p)) 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)*4 + (xx & 1));
(xx>>1)*4 + (xx & 1));
else 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)); (xx>>1)*4 + (xx & 1));
j = fontheight(p); j = fontheight(p);
bytes = p->next_line; bytes = p->next_line;
...@@ -429,7 +428,7 @@ void fbcon_iplan2p2_clear_margins(struct vc_data *conp, struct display *p, ...@@ -429,7 +428,7 @@ void fbcon_iplan2p2_clear_margins(struct vc_data *conp, struct display *p,
} }
if (lines) { if (lines) {
cval = expand2l(COLOR_2P(attr_bgcol_ec(p,conp))); 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, ...@@ -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 /* Special (but often used) case: Moving whole lines can be
*done with memmove() *done with memmove()
*/ */
fb_memmove(p->screen_base + dy * p->next_line * fontheight(p), fb_memmove(p->fb_info->screen_base + dy * p->next_line * fontheight(p),
p->screen_base + sy * p->next_line * fontheight(p), p->fb_info->screen_base + sy * p->next_line * fontheight(p),
p->next_line * height * fontheight(p)); p->next_line * height * fontheight(p));
} else { } else {
int rows, cols; int rows, cols;
...@@ -203,8 +203,8 @@ void fbcon_iplan2p4_bmove(struct display *p, int sy, int sx, int dy, int dx, ...@@ -203,8 +203,8 @@ void fbcon_iplan2p4_bmove(struct display *p, int sy, int sx, int dy, int dx,
/* odd->odd or even->even */ /* odd->odd or even->even */
if (upwards) { if (upwards) {
src = p->screen_base + sy * linesize + (sx>>1)*8 + (sx & 1); src = p->fb_info->screen_base + sy * linesize + (sx>>1)*8 + (sx & 1);
dst = p->screen_base + dy * linesize + (dx>>1)*8 + (dx & 1); dst = p->fb_info->screen_base + dy * linesize + (dx>>1)*8 + (dx & 1);
if (sx & 1) { if (sx & 1) {
memmove_4p_col(dst, src, colsize, bytes); memmove_4p_col(dst, src, colsize, bytes);
src += 7; src += 7;
...@@ -226,13 +226,13 @@ void fbcon_iplan2p4_bmove(struct display *p, int sy, int sx, int dy, int dx, ...@@ -226,13 +226,13 @@ void fbcon_iplan2p4_bmove(struct display *p, int sy, int sx, int dy, int dx,
} }
} else { } else {
if (!((sx+width-1) & 1)) { if (!((sx+width-1) & 1)) {
src = p->screen_base + sy * linesize + ((sx+width-1)>>1)*8; src = p->fb_info->screen_base + sy * linesize + ((sx+width-1)>>1)*8;
dst = p->screen_base + dy * linesize + ((dx+width-1)>>1)*8; dst = p->fb_info->screen_base + dy * linesize + ((dx+width-1)>>1)*8;
memmove_4p_col(dst, src, colsize, bytes); memmove_4p_col(dst, src, colsize, bytes);
--width; --width;
} }
src = p->screen_base + sy * linesize + (sx>>1)*8 + (sx & 1); src = p->fb_info->screen_base + sy * linesize + (sx>>1)*8 + (sx & 1);
dst = p->screen_base + dy * linesize + (dx>>1)*8 + (dx & 1); dst = p->fb_info->screen_base + dy * linesize + (dx>>1)*8 + (dx & 1);
if (width > 1) { if (width > 1) {
src += colsize * bytes + (sx & 1)*7; src += colsize * bytes + (sx & 1)*7;
dst += 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, ...@@ -250,8 +250,8 @@ void fbcon_iplan2p4_bmove(struct display *p, int sy, int sx, int dy, int dx,
/* odd->even or even->odd */ /* odd->even or even->odd */
if (upwards) { if (upwards) {
src = p->screen_base + sy * linesize + (sx>>1)*8 + (sx & 1); src = p->fb_info->screen_base + sy * linesize + (sx>>1)*8 + (sx & 1);
dst = p->screen_base + dy * linesize + (dx>>1)*8 + (dx & 1); dst = p->fb_info->screen_base + dy * linesize + (dx>>1)*8 + (dx & 1);
for(cols = width; cols > 0; --cols) { for(cols = width; cols > 0; --cols) {
memmove_4p_col(dst, src, colsize, bytes); memmove_4p_col(dst, src, colsize, bytes);
INC_4P(src); INC_4P(src);
...@@ -260,8 +260,8 @@ void fbcon_iplan2p4_bmove(struct display *p, int sy, int sx, int dy, int dx, ...@@ -260,8 +260,8 @@ void fbcon_iplan2p4_bmove(struct display *p, int sy, int sx, int dy, int dx,
} else { } else {
sx += width-1; sx += width-1;
dx += width-1; dx += width-1;
src = p->screen_base + sy * linesize + (sx>>1)*8 + (sx & 1); src = p->fb_info->screen_base + sy * linesize + (sx>>1)*8 + (sx & 1);
dst = p->screen_base + dy * linesize + (dx>>1)*8 + (dx & 1); dst = p->fb_info->screen_base + dy * linesize + (dx>>1)*8 + (dx & 1);
for(cols = width; cols > 0; --cols) { for(cols = width; cols > 0; --cols) {
memmove_4p_col(dst, src, colsize, bytes); memmove_4p_col(dst, src, colsize, bytes);
DEC_4P(src); DEC_4P(src);
...@@ -296,13 +296,13 @@ void fbcon_iplan2p4_clear(struct vc_data *conp, struct display *p, int sy, ...@@ -296,13 +296,13 @@ void fbcon_iplan2p4_clear(struct vc_data *conp, struct display *p, int sy,
else else
offset = sy * bytes * fontheight(p); offset = sy * bytes * fontheight(p);
size = lines * bytes; 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 { } else {
if (fontheightlog(p)) if (fontheightlog(p))
offset = ((sy * bytes) << fontheightlog(p)) + (sx>>1)*8 + (sx & 1); offset = ((sy * bytes) << fontheightlog(p)) + (sx>>1)*8 + (sx & 1);
else else
offset = sy * bytes * fontheight(p) + (sx>>1)*8 + (sx & 1); 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)); pcval = expand4l(attr_bgcol_ec(p,conp));
/* Clears are split if the region starts at an odd column or /* 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, ...@@ -338,11 +338,11 @@ void fbcon_iplan2p4_putc(struct vc_data *conp, struct display *p, int c,
u32 eorx, fgx, bgx, fdx; u32 eorx, fgx, bgx, fdx;
if (fontheightlog(p)) { 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)); (xx>>1)*8 + (xx & 1));
cdat = p->fontdata + ((c & p->charmask) << fontheightlog(p)); cdat = p->fontdata + ((c & p->charmask) << fontheightlog(p));
} else { } else {
dest = (p->screen_base + yy * bytes * fontheight(p) + dest = (p->fb_info->screen_base + yy * bytes * fontheight(p) +
(xx>>1)*8 + (xx & 1)); (xx>>1)*8 + (xx & 1));
cdat = p->fontdata + (c & p->charmask) * fontheight(p); cdat = p->fontdata + (c & p->charmask) * fontheight(p);
} }
...@@ -369,10 +369,10 @@ void fbcon_iplan2p4_putcs(struct vc_data *conp, struct display *p, ...@@ -369,10 +369,10 @@ void fbcon_iplan2p4_putcs(struct vc_data *conp, struct display *p,
bytes = p->next_line; bytes = p->next_line;
if (fontheightlog(p)) 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)); (xx>>1)*8 + (xx & 1));
else else
dest0 = (p->screen_base + yy * bytes * fontheight(p) + dest0 = (p->fb_info->screen_base + yy * bytes * fontheight(p) +
(xx>>1)*8 + (xx & 1)); (xx>>1)*8 + (xx & 1));
c = scr_readw(s); c = scr_readw(s);
fgx = expand4l(attr_fgcol(p, c)); fgx = expand4l(attr_fgcol(p, c));
...@@ -408,10 +408,10 @@ void fbcon_iplan2p4_revc(struct display *p, int xx, int yy) ...@@ -408,10 +408,10 @@ void fbcon_iplan2p4_revc(struct display *p, int xx, int yy)
int bytes; int bytes;
if (fontheightlog(p)) 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)); (xx>>1)*8 + (xx & 1));
else 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)); (xx>>1)*8 + (xx & 1));
j = fontheight(p); j = fontheight(p);
bytes = p->next_line; bytes = p->next_line;
...@@ -449,7 +449,7 @@ void fbcon_iplan2p4_clear_margins(struct vc_data *conp, struct display *p, ...@@ -449,7 +449,7 @@ void fbcon_iplan2p4_clear_margins(struct vc_data *conp, struct display *p,
} }
if (lines) { if (lines) {
expand4dl(attr_bgcol_ec(p,conp), &cval1, &cval2); 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, ...@@ -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 /* Special (but often used) case: Moving whole lines can be
* done with memmove() * done with memmove()
*/ */
fast_memmove(p->screen_base + dy * p->next_line * fontheight(p), fast_memmove(p->fb_info->screen_base + dy * p->next_line * fontheight(p),
p->screen_base + sy * p->next_line * fontheight(p), p->fb_info->screen_base + sy * p->next_line * fontheight(p),
p->next_line * height * fontheight(p)); p->next_line * height * fontheight(p));
} else { } else {
int rows, cols; int rows, cols;
...@@ -235,8 +235,8 @@ void fbcon_iplan2p8_bmove(struct display *p, int sy, int sx, int dy, int dx, ...@@ -235,8 +235,8 @@ void fbcon_iplan2p8_bmove(struct display *p, int sy, int sx, int dy, int dx,
/* odd->odd or even->even */ /* odd->odd or even->even */
if (upwards) { if (upwards) {
src = p->screen_base + sy * linesize + (sx>>1)*16 + (sx & 1); src = p->fb_info->screen_base + sy * linesize + (sx>>1)*16 + (sx & 1);
dst = p->screen_base + dy * linesize + (dx>>1)*16 + (dx & 1); dst = p->fb_info->screen_base + dy * linesize + (dx>>1)*16 + (dx & 1);
if (sx & 1) { if (sx & 1) {
memmove_8p_col(dst, src, colsize, bytes); memmove_8p_col(dst, src, colsize, bytes);
src += 15; src += 15;
...@@ -259,13 +259,13 @@ void fbcon_iplan2p8_bmove(struct display *p, int sy, int sx, int dy, int dx, ...@@ -259,13 +259,13 @@ void fbcon_iplan2p8_bmove(struct display *p, int sy, int sx, int dy, int dx,
} }
} else { } else {
if (!((sx+width-1) & 1)) { if (!((sx+width-1) & 1)) {
src = p->screen_base + sy * linesize + ((sx+width-1)>>1)*16; src = p->fb_info->screen_base + sy * linesize + ((sx+width-1)>>1)*16;
dst = p->screen_base + dy * linesize + ((dx+width-1)>>1)*16; dst = p->fb_info->screen_base + dy * linesize + ((dx+width-1)>>1)*16;
memmove_8p_col(dst, src, colsize, bytes); memmove_8p_col(dst, src, colsize, bytes);
--width; --width;
} }
src = p->screen_base + sy * linesize + (sx>>1)*16 + (sx & 1); src = p->fb_info->screen_base + sy * linesize + (sx>>1)*16 + (sx & 1);
dst = p->screen_base + dy * linesize + (dx>>1)*16 + (dx & 1); dst = p->fb_info->screen_base + dy * linesize + (dx>>1)*16 + (dx & 1);
if (width > 1) { if (width > 1) {
src += colsize * bytes + (sx & 1)*15; src += colsize * bytes + (sx & 1)*15;
dst += 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, ...@@ -282,8 +282,8 @@ void fbcon_iplan2p8_bmove(struct display *p, int sy, int sx, int dy, int dx,
/* odd->even or even->odd */ /* odd->even or even->odd */
if (upwards) { if (upwards) {
src = p->screen_base + sy * linesize + (sx>>1)*16 + (sx & 1); src = p->fb_info->screen_base + sy * linesize + (sx>>1)*16 + (sx & 1);
dst = p->screen_base + dy * linesize + (dx>>1)*16 + (dx & 1); dst = p->fb_info->screen_base + dy * linesize + (dx>>1)*16 + (dx & 1);
for(cols = width; cols > 0; --cols) { for(cols = width; cols > 0; --cols) {
memmove_8p_col(dst, src, colsize, bytes); memmove_8p_col(dst, src, colsize, bytes);
INC_8P(src); INC_8P(src);
...@@ -292,8 +292,8 @@ void fbcon_iplan2p8_bmove(struct display *p, int sy, int sx, int dy, int dx, ...@@ -292,8 +292,8 @@ void fbcon_iplan2p8_bmove(struct display *p, int sy, int sx, int dy, int dx,
} else { } else {
sx += width-1; sx += width-1;
dx += width-1; dx += width-1;
src = p->screen_base + sy * linesize + (sx>>1)*16 + (sx & 1); src = p->fb_info->screen_base + sy * linesize + (sx>>1)*16 + (sx & 1);
dst = p->screen_base + dy * linesize + (dx>>1)*16 + (dx & 1); dst = p->fb_info->screen_base + dy * linesize + (dx>>1)*16 + (dx & 1);
for(cols = width; cols > 0; --cols) { for(cols = width; cols > 0; --cols) {
memmove_8p_col(dst, src, colsize, bytes); memmove_8p_col(dst, src, colsize, bytes);
DEC_8P(src); DEC_8P(src);
...@@ -328,13 +328,13 @@ void fbcon_iplan2p8_clear(struct vc_data *conp, struct display *p, int sy, ...@@ -328,13 +328,13 @@ void fbcon_iplan2p8_clear(struct vc_data *conp, struct display *p, int sy,
else else
offset = sy * bytes * fontheight(p); offset = sy * bytes * fontheight(p);
size = lines * bytes; 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 { } else {
if (fontheightlog(p)) if (fontheightlog(p))
offset = ((sy * bytes) << fontheightlog(p)) + (sx>>1)*16 + (sx & 1); offset = ((sy * bytes) << fontheightlog(p)) + (sx>>1)*16 + (sx & 1);
else else
offset = sy * bytes * fontheight(p) + (sx>>1)*16 + (sx & 1); 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); expand8dl(attr_bgcol_ec(p,conp), &pcval1, &pcval2);
/* Clears are split if the region starts at an odd column or /* 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, ...@@ -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; u32 eorx1, eorx2, fgx1, fgx2, bgx1, bgx2, fdx;
if (fontheightlog(p)) { 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)); (xx>>1)*16 + (xx & 1));
cdat = p->fontdata + ((c & p->charmask) << fontheightlog(p)); cdat = p->fontdata + ((c & p->charmask) << fontheightlog(p));
} else { } else {
dest = (p->screen_base + yy * bytes * fontheight(p) + dest = (p->fb_info->screen_base + yy * bytes * fontheight(p) +
(xx>>1)*16 + (xx & 1)); (xx>>1)*16 + (xx & 1));
cdat = p->fontdata + (c & p->charmask) * fontheight(p); cdat = p->fontdata + (c & p->charmask) * fontheight(p);
} }
...@@ -401,10 +401,10 @@ void fbcon_iplan2p8_putcs(struct vc_data *conp, struct display *p, ...@@ -401,10 +401,10 @@ void fbcon_iplan2p8_putcs(struct vc_data *conp, struct display *p,
bytes = p->next_line; bytes = p->next_line;
if (fontheightlog(p)) 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)); (xx>>1)*16 + (xx & 1));
else else
dest0 = (p->screen_base + yy * bytes * fontheight(p) + dest0 = (p->fb_info->screen_base + yy * bytes * fontheight(p) +
(xx>>1)*16 + (xx & 1)); (xx>>1)*16 + (xx & 1));
c = scr_readw(s); c = scr_readw(s);
...@@ -442,10 +442,10 @@ void fbcon_iplan2p8_revc(struct display *p, int xx, int yy) ...@@ -442,10 +442,10 @@ void fbcon_iplan2p8_revc(struct display *p, int xx, int yy)
int bytes; int bytes;
if (fontheightlog(p)) 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)); (xx>>1)*16 + (xx & 1));
else 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)); (xx>>1)*16 + (xx & 1));
j = fontheight(p); j = fontheight(p);
bytes = p->next_line; bytes = p->next_line;
...@@ -485,7 +485,7 @@ void fbcon_iplan2p8_clear_margins(struct vc_data *conp, struct display *p, ...@@ -485,7 +485,7 @@ void fbcon_iplan2p8_clear_margins(struct vc_data *conp, struct display *p,
} }
if (lines) { if (lines) {
expand8ql(attr_bgcol_ec(p,conp), &cval1, &cval2, &cval3, &cval4); 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); cval1, cval2, cval3, cval4);
} }
} }
......
...@@ -57,8 +57,8 @@ void fbcon_mac_bmove(struct display *p, int sy, int sx, int dy, int dx, ...@@ -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 dl,dr,dt,db,dw,dlo;
int move_up; int move_up;
src = (u8 *) (p->screen_base + sy * fontheight(p) * p->next_line); src = (u8 *) (p->fb_info->screen_base + sy * fontheight(p) * p->next_line);
dest = (u8 *) (p->screen_base + dy * 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) { if( sx == 0 && width == p->conp->vc_cols) {
s = height * fontheight(p) * p->next_line; 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, ...@@ -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; inverse = conp ? attr_reverse(p,conp->vc_attr) : 0;
pixel = inverse ? PIXEL_WHITE_MAC : PIXEL_BLACK_MAC; 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) { if( sx == 0 && width == p->conp->vc_cols) {
s = height * fontheight(p) * p->next_line; 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) ...@@ -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) { switch (p->var.bits_per_pixel) {
case 1: 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); bit = 0x80 >> (pixel_x & 7);
plot_helper(dest, bit, bw); plot_helper(dest, bit, bw);
break; break;
case 2: 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); bit = 0xC0 >> ((pixel_x & 3) << 1);
plot_helper(dest, bit, bw); plot_helper(dest, bit, bw);
break; break;
case 4: 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); bit = 0xF0 >> ((pixel_x & 1) << 2);
plot_helper(dest, bit, bw); plot_helper(dest, bit, bw);
break; break;
case 8: 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; bit = 0xFF;
plot_helper(dest, bit, bw); plot_helper(dest, bit, bw);
break; break;
/* FIXME: You can't access framebuffer directly like this! */ /* FIXME: You can't access framebuffer directly like this! */
case 16: 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; pix16 = 0xFFFF;
switch (bw) { switch (bw) {
case PIXEL_BLACK_MAC: *dest16 = ~pix16; break; 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) ...@@ -389,7 +389,7 @@ static void plot_pixel_mac(struct display *p, int bw, int pixel_x, int pixel_y)
break; break;
case 32: 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; pix32 = 0xFFFFFFFF;
switch (bw) { switch (bw) {
case PIXEL_BLACK_MAC: *dest32 = ~pix32; break; 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) ...@@ -410,30 +410,30 @@ static int get_pixel_mac(struct display *p, int pixel_x, int pixel_y)
switch (p->var.bits_per_pixel) { switch (p->var.bits_per_pixel) {
case 1: 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); bit = 0x80 >> (pixel_x & 7);
pixel = *dest & bit; pixel = *dest & bit;
break; break;
case 2: 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); bit = 0xC0 >> (pixel_x & 3);
pixel = *dest & bit; pixel = *dest & bit;
break; break;
case 4: 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); bit = 0xF0 >> (pixel_x & 1);
pixel = *dest & bit; pixel = *dest & bit;
break; break;
case 8: 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; pixel = *dest;
break; break;
case 16: 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; pixel = *dest16 ? 1 : 0;
break; break;
case 32: 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; pixel = *dest32 ? 1 : 0;
break; break;
} }
......
...@@ -39,20 +39,20 @@ void fbcon_mfb_bmove(struct display *p, int sy, int sx, int dy, int dx, ...@@ -39,20 +39,20 @@ void fbcon_mfb_bmove(struct display *p, int sy, int sx, int dy, int dx,
u_int rows; u_int rows;
if (sx == 0 && dx == 0 && width == p->next_line) { if (sx == 0 && dx == 0 && width == p->next_line) {
src = p->screen_base+sy*fontheight(p)*width; src = p->fb_info->screen_base+sy*fontheight(p)*width;
dest = p->screen_base+dy*fontheight(p)*width; dest = p->fb_info->screen_base+dy*fontheight(p)*width;
fb_memmove(dest, src, height*fontheight(p)*width); fb_memmove(dest, src, height*fontheight(p)*width);
} else if (dy <= sy) { } else if (dy <= sy) {
src = p->screen_base+sy*fontheight(p)*p->next_line+sx; src = p->fb_info->screen_base+sy*fontheight(p)*p->next_line+sx;
dest = p->screen_base+dy*fontheight(p)*p->next_line+dx; dest = p->fb_info->screen_base+dy*fontheight(p)*p->next_line+dx;
for (rows = height*fontheight(p); rows--;) { for (rows = height*fontheight(p); rows--;) {
fb_memmove(dest, src, width); fb_memmove(dest, src, width);
src += p->next_line; src += p->next_line;
dest += p->next_line; dest += p->next_line;
} }
} else { } else {
src = p->screen_base+((sy+height)*fontheight(p)-1)*p->next_line+sx; src = p->fb_info->screen_base+((sy+height)*fontheight(p)-1)*p->next_line+sx;
dest = p->screen_base+((dy+height)*fontheight(p)-1)*p->next_line+dx; dest = p->fb_info->screen_base+((dy+height)*fontheight(p)-1)*p->next_line+dx;
for (rows = height*fontheight(p); rows--;) { for (rows = height*fontheight(p); rows--;) {
fb_memmove(dest, src, width); fb_memmove(dest, src, width);
src -= p->next_line; src -= p->next_line;
...@@ -68,7 +68,7 @@ void fbcon_mfb_clear(struct vc_data *conp, struct display *p, int sy, int sx, ...@@ -68,7 +68,7 @@ void fbcon_mfb_clear(struct vc_data *conp, struct display *p, int sy, int sx,
u_int rows; u_int rows;
int inverse = conp ? attr_reverse(p,conp->vc_video_erase_char) : 0; 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 (sx == 0 && width == p->next_line) {
if (inverse) if (inverse)
...@@ -90,7 +90,7 @@ void fbcon_mfb_putc(struct vc_data *conp, struct display *p, int c, int yy, ...@@ -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; u_int rows, bold, revs, underl;
u8 d; 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); cdat = p->fontdata+(c&p->charmask)*fontheight(p);
bold = attr_bold(p,c); bold = attr_bold(p,c);
revs = attr_reverse(p,c); revs = attr_reverse(p,c);
...@@ -116,7 +116,7 @@ void fbcon_mfb_putcs(struct vc_data *conp, struct display *p, ...@@ -116,7 +116,7 @@ void fbcon_mfb_putcs(struct vc_data *conp, struct display *p,
u8 d; u8 d;
u16 c; 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); c = scr_readw(s);
bold = attr_bold(p, c); bold = attr_bold(p, c);
revs = attr_reverse(p, c); revs = attr_reverse(p, c);
...@@ -144,7 +144,7 @@ void fbcon_mfb_revc(struct display *p, int xx, int yy) ...@@ -144,7 +144,7 @@ void fbcon_mfb_revc(struct display *p, int xx, int yy)
u8 *dest, d; u8 *dest, d;
u_int rows; 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) { for (rows = fontheight(p); rows--; dest += p->next_line) {
d = fb_readb(dest); d = fb_readb(dest);
fb_writeb (~d, dest); fb_writeb (~d, dest);
...@@ -166,7 +166,7 @@ void fbcon_mfb_clear_margins(struct vc_data *conp, struct display *p, ...@@ -166,7 +166,7 @@ void fbcon_mfb_clear_margins(struct vc_data *conp, struct display *p,
bottom = conp->vc_rows + p->yscroll; bottom = conp->vc_rows + p->yscroll;
if (bottom >= p->vrows) if (bottom >= p->vrows)
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) if (inverse)
fb_memset255(dest, height * p->next_line); fb_memset255(dest, height * p->next_line);
else else
......
...@@ -158,20 +158,20 @@ fbcon_sti_bmove(struct display *p, int sy, int sx, ...@@ -158,20 +158,20 @@ fbcon_sti_bmove(struct display *p, int sy, int sx,
u_int rows; u_int rows;
if (sx == 0 && dx == 0 && width == p->next_line) { if (sx == 0 && dx == 0 && width == p->next_line) {
src = p->screen_base+sy*fontheight(p)*width; src = p->fb_info->screen_base+sy*fontheight(p)*width;
dest = p->screen_base+dy*fontheight(p)*width; dest = p->fb_info->screen_base+dy*fontheight(p)*width;
memcpy_fromhp_tohp(dest, src, height*fontheight(p)*width); memcpy_fromhp_tohp(dest, src, height*fontheight(p)*width);
} else if (dy <= sy) { } else if (dy <= sy) {
src = p->screen_base+sy*fontheight(p)*p->next_line+sx; src = p->fb_info->screen_base+sy*fontheight(p)*p->next_line+sx;
dest = p->screen_base+dy*fontheight(p)*p->next_line+dx; dest = p->fb_info->screen_base+dy*fontheight(p)*p->next_line+dx;
for (rows = height*fontheight(p); rows--;) { for (rows = height*fontheight(p); rows--;) {
memcpy_fromhp_tohp(dest, src, width); memcpy_fromhp_tohp(dest, src, width);
src += p->next_line; src += p->next_line;
dest += p->next_line; dest += p->next_line;
} }
} else { } else {
src = p->screen_base+((sy+height)*fontheight(p)-1)*p->next_line+sx; src = p->fb_info->screen_base+((sy+height)*fontheight(p)-1)*p->next_line+sx;
dest = p->screen_base+((dy+height)*fontheight(p)-1)*p->next_line+dx; dest = p->fb_info->screen_base+((dy+height)*fontheight(p)-1)*p->next_line+dx;
for (rows = height*fontheight(p); rows--;) { for (rows = height*fontheight(p); rows--;) {
memcpy_fromhp_tohp(dest, src, width); memcpy_fromhp_tohp(dest, src, width);
src -= p->next_line; src -= p->next_line;
...@@ -190,7 +190,7 @@ fbcon_sti_clear(struct vc_data *conp, ...@@ -190,7 +190,7 @@ fbcon_sti_clear(struct vc_data *conp,
u_int rows; u_int rows;
int inverse = conp ? attr_reverse(p,conp->vc_video_erase_char) : 0; 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 (sx == 0 && width == p->next_line) {
if (inverse) if (inverse)
...@@ -213,7 +213,7 @@ static void fbcon_sti_putc(struct vc_data *conp, ...@@ -213,7 +213,7 @@ static void fbcon_sti_putc(struct vc_data *conp,
u_int rows, bold, revs, underl; u_int rows, bold, revs, underl;
u8 d; 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); cdat = p->fontdata+(c&p->charmask)*fontheight(p);
bold = attr_bold(p,c); bold = attr_bold(p,c);
revs = attr_reverse(p,c); revs = attr_reverse(p,c);
...@@ -248,11 +248,11 @@ static void fbcon_sti_putcs(struct vc_data *conp, ...@@ -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) { if(((u32)dest0&0xf0000000)!=0xf0000000) {
printk("refusing to putcs %p %p %p %d %d %d (%p) %p = %p + %d * %d * %ld + %d\n", 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), 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); xx);
return; return;
} }
...@@ -286,7 +286,7 @@ static void fbcon_sti_revc(struct display *p, ...@@ -286,7 +286,7 @@ static void fbcon_sti_revc(struct display *p,
u_int rows; 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) { for (rows = fontheight(p); rows--; dest += p->next_line) {
d = readb_hp(dest); d = readb_hp(dest);
writeb_hp (~d, dest); writeb_hp (~d, dest);
...@@ -311,7 +311,7 @@ fbcon_sti_clear_margins(struct vc_data *conp, ...@@ -311,7 +311,7 @@ fbcon_sti_clear_margins(struct vc_data *conp,
bottom = conp->vc_rows + p->yscroll; bottom = conp->vc_rows + p->yscroll;
if (bottom >= p->vrows) if (bottom >= p->vrows)
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) if (inverse)
memset_tohp(dest, 0xffffffff, height * p->next_line); memset_tohp(dest, 0xffffffff, height * p->next_line);
else else
......
...@@ -120,8 +120,8 @@ void fbcon_vga_planes_bmove(struct display *p, int sy, int sx, int dy, int dx, ...@@ -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)) { if (dy < sy || (dy == sy && dx < sx)) {
line_ofs = p->line_length - width; line_ofs = p->line_length - width;
dest = p->screen_base + dx + dy * p->line_length; dest = p->fb_info->screen_base + dx + dy * p->line_length;
src = p->screen_base + sx + sy * p->line_length; src = p->fb_info->screen_base + sx + sy * p->line_length;
while (height--) { while (height--) {
for (x = 0; x < width; x++) { for (x = 0; x < width; x++) {
readb(src); readb(src);
...@@ -134,8 +134,8 @@ void fbcon_vga_planes_bmove(struct display *p, int sy, int sx, int dy, int dx, ...@@ -134,8 +134,8 @@ void fbcon_vga_planes_bmove(struct display *p, int sy, int sx, int dy, int dx,
} }
} else { } else {
line_ofs = p->line_length - width; line_ofs = p->line_length - width;
dest = p->screen_base + dx + width + (dy + height - 1) * p->line_length; dest = p->fb_info->screen_base + dx + width + (dy + height - 1) * p->line_length;
src = p->screen_base + sx + width + (sy + height - 1) * p->line_length; src = p->fb_info->screen_base + sx + width + (sy + height - 1) * p->line_length;
while (height--) { while (height--) {
for (x = 0; x < width; x++) { for (x = 0; x < width; x++) {
dest--; dest--;
...@@ -167,7 +167,7 @@ void fbcon_vga_planes_clear(struct vc_data *conp, struct display *p, int sy, int ...@@ -167,7 +167,7 @@ void fbcon_vga_planes_clear(struct vc_data *conp, struct display *p, int sy, int
sy *= fontheight(p); sy *= fontheight(p);
height *= 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--) { while (height--) {
for (x = 0; x < width; x++) { for (x = 0; x < width; x++) {
writeb(0, where); writeb(0, where);
...@@ -184,7 +184,7 @@ void fbcon_ega_planes_putc(struct vc_data *conp, struct display *p, int c, int y ...@@ -184,7 +184,7 @@ void fbcon_ega_planes_putc(struct vc_data *conp, struct display *p, int c, int y
int y; int y;
u8 *cdat = p->fontdata + (c & p->charmask) * fontheight(p); 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); setmode(0);
setop(0); setop(0);
...@@ -213,7 +213,7 @@ void fbcon_vga_planes_putc(struct vc_data *conp, struct display *p, int c, int y ...@@ -213,7 +213,7 @@ void fbcon_vga_planes_putc(struct vc_data *conp, struct display *p, int c, int y
int y; int y;
u8 *cdat = p->fontdata + (c & p->charmask) * fontheight(p); 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); setmode(2);
setop(0); setop(0);
...@@ -248,7 +248,7 @@ void fbcon_ega_planes_putcs(struct vc_data *conp, struct display *p, const unsig ...@@ -248,7 +248,7 @@ void fbcon_ega_planes_putcs(struct vc_data *conp, struct display *p, const unsig
selectmask(); selectmask();
setmask(0xff); 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); writeb(bg, where);
rmb(); rmb();
readb(where); /* fill latches */ readb(where); /* fill latches */
...@@ -289,7 +289,7 @@ void fbcon_vga_planes_putcs(struct vc_data *conp, struct display *p, const unsig ...@@ -289,7 +289,7 @@ void fbcon_vga_planes_putcs(struct vc_data *conp, struct display *p, const unsig
selectmask(); selectmask();
setmask(0xff); 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); writeb(bg, where);
rmb(); rmb();
readb(where); /* fill latches */ readb(where); /* fill latches */
...@@ -312,7 +312,7 @@ void fbcon_vga_planes_putcs(struct vc_data *conp, struct display *p, const unsig ...@@ -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) 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; int y;
setmode(0); setmode(0);
......
...@@ -103,20 +103,20 @@ void fbcon_vga_bmove(struct display *p, int sy, int sx, int dy, int dx, ...@@ -103,20 +103,20 @@ void fbcon_vga_bmove(struct display *p, int sy, int sx, int dy, int dx,
int rows; int rows;
if (sx == 0 && dx == 0 && width == p->next_line/2) { if (sx == 0 && dx == 0 && width == p->next_line/2) {
src = (u16 *)(p->screen_base+sy*p->next_line); src = (u16 *)(p->fb_info->screen_base+sy*p->next_line);
dst = (u16 *)(p->screen_base+dy*p->next_line); dst = (u16 *)(p->fb_info->screen_base+dy*p->next_line);
vga_memmovew(dst, src, height*width); vga_memmovew(dst, src, height*width);
} else if (dy < sy || (dy == sy && dx < sx)) { } else if (dy < sy || (dy == sy && dx < sx)) {
src = (u16 *)(p->screen_base+sy*p->next_line+sx*2); src = (u16 *)(p->fb_info->screen_base+sy*p->next_line+sx*2);
dst = (u16 *)(p->screen_base+dy*p->next_line+dx*2); dst = (u16 *)(p->fb_info->screen_base+dy*p->next_line+dx*2);
for (rows = height; rows-- ;) { for (rows = height; rows-- ;) {
vga_memmovew(dst, src, width); vga_memmovew(dst, src, width);
src += p->next_line/2; src += p->next_line/2;
dst += p->next_line/2; dst += p->next_line/2;
} }
} else { } else {
src = (u16 *)(p->screen_base+(sy+height-1)*p->next_line+sx*2); src = (u16 *)(p->fb_info->screen_base+(sy+height-1)*p->next_line+sx*2);
dst = (u16 *)(p->screen_base+(dy+height-1)*p->next_line+dx*2); dst = (u16 *)(p->fb_info->screen_base+(dy+height-1)*p->next_line+dx*2);
for (rows = height; rows-- ;) { for (rows = height; rows-- ;) {
vga_memmovew(dst, src, width); vga_memmovew(dst, src, width);
src -= p->next_line/2; src -= p->next_line/2;
...@@ -128,7 +128,7 @@ void fbcon_vga_bmove(struct display *p, int sy, int sx, int dy, int dx, ...@@ -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, void fbcon_vga_clear(struct vc_data *conp, struct display *p, int sy, int sx,
int height, int width) 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; int rows;
if (sx == 0 && width*2 == p->next_line) 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, ...@@ -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, void fbcon_vga_putc(struct vc_data *conp, struct display *p, int c, int y,
int x) 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) if (conp->vc_can_do_color)
vga_writew(c, dst); vga_writew(c, dst);
else else
...@@ -151,7 +151,7 @@ void fbcon_vga_putc(struct vc_data *conp, struct display *p, int c, int y, ...@@ -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, void fbcon_vga_putcs(struct vc_data *conp, struct display *p,
const unsigned short *s, int count, int y, int x) 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; u16 sattr;
if (conp->vc_can_do_color) if (conp->vc_can_do_color)
while (count--) while (count--)
...@@ -165,7 +165,7 @@ void fbcon_vga_putcs(struct vc_data *conp, struct display *p, ...@@ -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) 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); u16 val = vga_readw(dst);
val = (val & 0x88ff) | ((val<<4) & 0x7000) | ((val>>4) & 0x0700); val = (val & 0x88ff) | ((val<<4) & 0x7000) | ((val>>4) & 0x0700);
vga_writew(val, dst); vga_writew(val, dst);
......
...@@ -356,7 +356,6 @@ int __init fm2fb_init(void) ...@@ -356,7 +356,6 @@ int __init fm2fb_init(void)
disp.cmap.start = 0; disp.cmap.start = 0;
disp.cmap.len = 0; disp.cmap.len = 0;
disp.cmap.red = disp.cmap.green = disp.cmap.blue = disp.cmap.transp = NULL; 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.visual = fb_fix.visual;
disp.type = fb_fix.type; disp.type = fb_fix.type;
disp.type_aux = fb_fix.type_aux; disp.type_aux = fb_fix.type_aux;
...@@ -376,6 +375,7 @@ int __init fm2fb_init(void) ...@@ -376,6 +375,7 @@ int __init fm2fb_init(void)
strcpy(fb_info.modename, fb_fix.id); strcpy(fb_info.modename, fb_fix.id);
fb_info.node = NODEV; fb_info.node = NODEV;
fb_info.fbops = &fm2fb_ops; fb_info.fbops = &fm2fb_ops;
fb_info.screen_base = (char *)fm2fb_mem;
fb_info.currcon = -1; fb_info.currcon = -1;
fb_info.disp = &disp; fb_info.disp = &disp;
fb_info.fontname[0] = '\0'; fb_info.fontname[0] = '\0';
......
...@@ -1535,7 +1535,6 @@ static int neofb_set_var (struct fb_var_screeninfo *var, int con, ...@@ -1535,7 +1535,6 @@ static int neofb_set_var (struct fb_var_screeninfo *var, int con,
fb->fix.line_length = display->next_line; fb->fix.line_length = display->next_line;
display->screen_base = fb->screen_base;
display->line_length = fb->fix.line_length; display->line_length = fb->fix.line_length;
display->visual = fb->fix.visual; display->visual = fb->fix.visual;
display->type = fb->fix.type; display->type = fb->fix.type;
......
...@@ -1219,7 +1219,6 @@ static int retz3fb_set_var(struct fb_var_screeninfo *var, int con, ...@@ -1219,7 +1219,6 @@ static int retz3fb_set_var(struct fb_var_screeninfo *var, int con,
struct fb_fix_screeninfo fix; struct fb_fix_screeninfo fix;
retz3fb_get_fix(&fix, con, info); retz3fb_get_fix(&fix, con, info);
display->screen_base = zinfo->fbmem;
display->visual = fix.visual; display->visual = fix.visual;
display->type = fix.type; display->type = fix.type;
display->type_aux = fix.type_aux; display->type_aux = fix.type_aux;
......
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