patch-2.3.14 linux/drivers/video/fbcon-vga-planes.c
Next file: linux/drivers/video/fbmem.c
Previous file: linux/drivers/video/dnfb.c
Back to the patch index
Back to the overall index
- Lines: 112
- Date:
Thu Aug 12 09:44:38 1999
- Orig file:
v2.3.13/linux/drivers/video/fbcon-vga-planes.c
- Orig date:
Thu May 13 23:48:20 1999
diff -u --recursive --new-file v2.3.13/linux/drivers/video/fbcon-vga-planes.c linux/drivers/video/fbcon-vga-planes.c
@@ -44,7 +44,8 @@
OR. */
static inline void rmw(volatile char *p)
{
- *p |= 1;
+ readb(p);
+ writeb(1, p);
}
/* Set the Graphics Mode Register. Bits 0-1 are write mode, bit 3 is
@@ -122,8 +123,12 @@
dest = p->screen_base + dx + dy * p->line_length;
src = p->screen_base + sx + sy * p->line_length;
while (height--) {
- for (x = 0; x < width; x++)
- *dest++ = *src++;
+ for (x = 0; x < width; x++) {
+ readb(src);
+ writeb(0, dest);
+ dest++;
+ src++;
+ }
src += line_ofs;
dest += line_ofs;
}
@@ -132,8 +137,12 @@
dest = p->screen_base + dx + width + (dy + height - 1) * p->line_length;
src = p->screen_base + sx + width + (sy + height - 1) * p->line_length;
while (height--) {
- for (x = 0; x < width; x++)
- *--dest = *--src;
+ for (x = 0; x < width; x++) {
+ dest--;
+ src--;
+ readb(src);
+ writeb(0, dest);
+ }
src -= line_ofs;
dest -= line_ofs;
}
@@ -160,8 +169,10 @@
where = p->screen_base + sx + sy * p->line_length;
while (height--) {
- for (x = 0; x < width; x++)
- *where++ = 0;
+ for (x = 0; x < width; x++) {
+ writeb(0, where);
+ where++;
+ }
where += line_ofs;
}
}
@@ -211,13 +222,13 @@
selectmask();
setmask(0xff);
- *where = bg;
+ writeb(bg, where);
rmb();
- *(volatile char*)where; /* fill latches */
+ readb(where); /* fill latches */
setmode(3);
wmb();
for (y = 0; y < fontheight(p); y++, where += p->line_length)
- *where = cdat[y];
+ writeb(cdat[y], where);
wmb();
}
@@ -237,9 +248,9 @@
setmask(0xff);
where = p->screen_base + xx + yy * p->line_length * fontheight(p);
- *where = bg;
+ writeb(bg, where);
rmb();
- *(volatile char*)where;
+ readb(where); /* fill latches */
wmb();
selectmask();
for (n = 0; n < count; n++) {
@@ -250,7 +261,7 @@
while (cdat < end) {
outb(*cdat++, GRAPHICS_DATA_REG);
wmb();
- *where = fg;
+ writeb(fg, where);
where += p->line_length;
}
where += 1 - p->line_length * fontheight(p);
@@ -277,9 +288,9 @@
setmask(0xff);
where = p->screen_base + xx + yy * p->line_length * fontheight(p);
- *where = bg;
+ writeb(bg, where);
rmb();
- *(volatile char*)where; /* fill latches with background */
+ readb(where); /* fill latches */
setmode(3);
wmb();
for (n = 0; n < count; n++) {
@@ -288,7 +299,7 @@
u8 *cdat = p->fontdata + (c & p->charmask) * fontheight(p);
for (y = 0; y < fontheight(p); y++, cdat++) {
- *where = *cdat;
+ writeb (*cdat, where);
where += p->line_length;
}
where += 1 - p->line_length * fontheight(p);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)