patch-2.2.4 linux/include/asm-ppc/vga.h
Next file: linux/include/asm-sparc/asm_offsets.h
Previous file: linux/include/asm-ppc/unistd.h
Back to the patch index
Back to the overall index
- Lines: 41
- Date:
Fri Mar 19 10:50:09 1999
- Orig file:
v2.2.3/linux/include/asm-ppc/vga.h
- Orig date:
Wed Mar 10 15:29:49 1999
diff -u --recursive --new-file v2.2.3/linux/include/asm-ppc/vga.h linux/include/asm-ppc/vga.h
@@ -8,17 +8,38 @@
#define _LINUX_ASM_VGA_H_
#include <asm/io.h>
+#include <asm/processor.h>
+
+#include <linux/config.h>
+#include <linux/console.h>
#define VT_BUF_HAVE_RW
extern inline void scr_writew(u16 val, u16 *addr)
{
- st_le16(addr, val);
+ /* If using vgacon (not fbcon) byteswap the writes.
+ * If non-vgacon assume fbcon and don't byteswap
+ * just like include/linux/vt_buffer.h.
+ * XXX: this is a performance loss so get rid of it
+ * as soon as fbcon works on prep.
+ * -- Cort
+ */
+#ifdef CONFIG_FB
+ if ( conswitchp != &vga_con )
+ (*(addr) = (val));
+ else
+#endif /* CONFIG_FB */
+ st_le16(addr, val);
}
extern inline u16 scr_readw(const u16 *addr)
{
- return ld_le16(addr);
+#ifdef CONFIG_FB
+ if ( conswitchp != &vga_con )
+ return (*(addr));
+ else
+#endif /* CONFIG_FB */
+ return ld_le16((unsigned short *)addr);
}
#define VT_BUF_HAVE_MEMCPYF
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)