Commit 0dc1531b authored by James Simmons's avatar James Simmons

Moved over fbcon to use the accel api only. This will shrink the code considerably.

parent c83e515d
......@@ -3024,6 +3024,7 @@ EXPORT_SYMBOL(vc_resize);
EXPORT_SYMBOL(fg_console);
EXPORT_SYMBOL(console_blank_hook);
EXPORT_SYMBOL(vt_cons);
EXPORT_SYMBOL(vc_cons);
#ifndef VT_SINGLE_DRIVER
EXPORT_SYMBOL(take_over_console);
EXPORT_SYMBOL(give_up_console);
......
......@@ -85,7 +85,7 @@ config DUMMY_CONSOLE
default y
config FRAMEBUFFER_CONSOLE
bool "Framebuffer Console support"
tristate "Framebuffer Console support"
depends on FB
config PCI_CONSOLE
......@@ -118,48 +118,6 @@ config FBCON_ADVANCED
If unsure, say N.
config FBCON_AFB
tristate "Amiga bitplanes support" if FBCON_ADVANCED
depends on FRAMEBUFFER_CONSOLE
default m if !FBCON_ADVANCED && FB_AMIGA=m
default y if !FBCON_ADVANCED && FB_AMIGA=y
help
This is the low level frame buffer console driver for 1 to 8
bitplanes (2 to 256 colors) on Amiga.
config FBCON_ILBM
tristate "Amiga interleaved bitplanes support" if FBCON_ADVANCED
depends on FRAMEBUFFER_CONSOLE
default m if !FBCON_ADVANCED && FB_AMIGA=m
default y if !FBCON_ADVANCED && FB_AMIGA=y
help
This is the low level frame buffer console driver for 1 to 8
interleaved bitplanes (2 to 256 colors) on Amiga.
config FBCON_IPLAN2P2
tristate "Atari interleaved bitplanes (2 planes) support" if FBCON_ADVANCED
depends on FRAMEBUFFER_CONSOLE
default y if !FBCON_ADVANCED && FB_ATARI
help
This is the low level frame buffer console driver for 2 interleaved
bitplanes (4 colors) on Atari.
config FBCON_IPLAN2P4
tristate "Atari interleaved bitplanes (4 planes) support" if FBCON_ADVANCED
depends on FRAMEBUFFER_CONSOLE
default y if !FBCON_ADVANCED && FB_ATARI
help
This is the low level frame buffer console driver for 4 interleaved
bitplanes (16 colors) on Atari.
config FBCON_IPLAN2P8
tristate "Atari interleaved bitplanes (8 planes) support" if FBCON_ADVANCED
depends on FRAMEBUFFER_CONSOLE
default y if !FBCON_ADVANCED && FB_ATARI
help
This is the low level frame buffer console driver for 8 interleaved
bitplanes (256 colors) on Atari.
# Guess what we need
config FBCON_STI
tristate
......
......@@ -5,9 +5,7 @@
# All of the (potential) objects that export symbols.
# This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'.
export-objs := fbcon.o fbcon-accel.o fbcon-afb.o fbcon-ilbm.o \
fbcon-iplan2p2.o fbcon-iplan2p4.o fbcon-iplan2p8.o \
fbcon-hga.o
export-objs := fbcon.o
# Each configuration option enables a list of files.
......@@ -17,6 +15,8 @@ obj-$(CONFIG_PROM_CONSOLE) += promcon.o promcon_tbl.o
obj-$(CONFIG_STI_CONSOLE) += sticon.o sticore.o
obj-$(CONFIG_VGA_CONSOLE) += vgacon.o
obj-$(CONFIG_MDA_CONSOLE) += mdacon.o
obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += fbcon.o fonts.o
obj-$(CONFIG_FONT_SUN8x16) += font_sun8x16.o
obj-$(CONFIG_FONT_SUN12x22) += font_sun12x22.o
......@@ -27,15 +27,8 @@ obj-$(CONFIG_FONT_PEARL_8x8) += font_pearl_8x8.o
obj-$(CONFIG_FONT_ACORN_8x8) += font_acorn_8x8.o
obj-$(CONFIG_FONT_MINI_4x6) += font_mini_4x6.o
obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += fbcon.o fonts.o fbcon-accel.o
# Generic Low Level Drivers
obj-$(CONFIG_FBCON_AFB) += fbcon-afb.o
obj-$(CONFIG_FBCON_ILBM) += fbcon-ilbm.o
obj-$(CONFIG_FBCON_IPLAN2P2) += fbcon-iplan2p2.o
obj-$(CONFIG_FBCON_IPLAN2P4) += fbcon-iplan2p4.o
obj-$(CONFIG_FBCON_IPLAN2P8) += fbcon-iplan2p8.o
obj-$(CONFIG_FBCON_STI) += fbcon-sti.o
# Files generated that shall be removed upon make clean
......
/*
* linux/drivers/video/fbcon-accel.c -- Framebuffer accel console wrapper
*
* Created 20 Feb 2001 by James Simmons <jsimmons@users.sf.net>
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file COPYING in the main directory of this archive for
* more details.
*/
#include <linux/module.h>
#include <linux/tty.h>
#include <linux/console.h>
#include <linux/string.h>
#include <linux/fb.h>
#include "fbcon.h"
#include "fbcon-accel.h"
void fbcon_accel_bmove(struct display *p, int sy, int sx, int dy, int dx,
int height, int width)
{
struct fb_info *info = p->fb_info;
struct vc_data *vc = p->conp;
struct fb_copyarea area;
area.sx = sx * vc->vc_font.width;
area.sy = sy * vc->vc_font.height;
area.dx = dx * vc->vc_font.width;
area.dy = dy * vc->vc_font.height;
area.height = height * vc->vc_font.height;
area.width = width * vc->vc_font.width;
info->fbops->fb_copyarea(info, &area);
}
void fbcon_accel_clear(struct vc_data *vc, struct display *p, int sy,
int sx, int height, int width)
{
struct fb_info *info = p->fb_info;
struct fb_fillrect region;
region.color = attr_bgcol_ec(p, vc);
region.dx = sx * vc->vc_font.width;
region.dy = sy * vc->vc_font.height;
region.width = width * vc->vc_font.width;
region.height = height * vc->vc_font.height;
region.rop = ROP_COPY;
info->fbops->fb_fillrect(info, &region);
}
void fbcon_accel_putcs(struct vc_data *vc, struct display *p,
const unsigned short *s, int count, int yy, int xx)
{
struct fb_info *info = p->fb_info;
unsigned short charmask = p->charmask;
unsigned int width = ((vc->vc_font.width + 7) >> 3);
struct fb_image image;
u16 c = scr_readw(s);
image.fg_color = attr_fgcol(p, c);
image.bg_color = attr_bgcol(p, c);
image.dx = xx * vc->vc_font.width;
image.dy = yy * vc->vc_font.height;
image.width = vc->vc_font.width;
image.height = vc->vc_font.height;
image.depth = 1;
while (count--) {
image.data = p->fontdata +
(scr_readw(s++) & charmask) * vc->vc_font.height * width;
info->fbops->fb_imageblit(info, &image);
image.dx += vc->vc_font.width;
}
}
void fbcon_accel_clear_margins(struct vc_data *vc, struct display *p,
int bottom_only)
{
struct fb_info *info = p->fb_info;
unsigned int cw = vc->vc_font.width;
unsigned int ch = vc->vc_font.height;
unsigned int rw = info->var.xres % cw;
unsigned int bh = info->var.yres % ch;
unsigned int rs = info->var.xres - rw;
unsigned int bs = info->var.yres - bh;
struct fb_fillrect region;
region.color = attr_bgcol_ec(p, vc);
region.rop = ROP_COPY;
if (rw && !bottom_only) {
region.dx = info->var.xoffset + rs;
region.dy = 0;
region.width = rw;
region.height = info->var.yres_virtual;
info->fbops->fb_fillrect(info, &region);
}
if (bh) {
region.dx = info->var.xoffset;
region.dy = info->var.yoffset + bs;
region.width = rs;
region.height = bh;
info->fbops->fb_fillrect(info, &region);
}
}
void fbcon_accel_cursor(struct display *p, int flags, int xx, int yy)
{
static char mask[64], image[64], *dest;
struct vc_data *vc = p->conp;
static int fgcolor, bgcolor, shape, width, height;
struct fb_info *info = p->fb_info;
struct fb_cursor cursor;
int c;
char *font;
cursor.set = FB_CUR_SETPOS;
if (width != vc->vc_font.width || height != vc->vc_font.height) {
width = vc->vc_font.width;
height = vc->vc_font.height;
cursor.set |= FB_CUR_SETSIZE;
}
if ((vc->vc_cursor_type & 0x0f) != shape) {
shape = vc->vc_cursor_type & 0x0f;
cursor.set |= FB_CUR_SETSHAPE;
}
c = scr_readw((u16 *) vc->vc_pos);
if (fgcolor != (int) attr_fgcol(p, c) ||
bgcolor != (int) attr_bgcol(p, c)) {
fgcolor = (int) attr_fgcol(p, c);
bgcolor = (int) attr_bgcol(p, c);
cursor.set |= FB_CUR_SETCMAP;
cursor.image.bg_color = bgcolor;
cursor.image.fg_color = fgcolor;
}
c &= p->charmask;
font = p->fontdata + (c * ((width + 7) / 8) * height);
if (font != dest) {
dest = font;
cursor.set |= FB_CUR_SETDEST;
}
if (flags & FB_CUR_SETCUR)
cursor.enable = 1;
else
cursor.enable = 0;
if (cursor.set & FB_CUR_SETSIZE) {
memset(image, 0xff, 64);
cursor.set |= FB_CUR_SETSHAPE;
}
if (cursor.set & FB_CUR_SETSHAPE) {
int w, cur_height, size, i = 0;
w = (width + 7) / 8;
switch (shape) {
case CUR_NONE:
cur_height = 0;
break;
case CUR_UNDERLINE:
cur_height = (height < 10) ? 1 : 2;
break;
case CUR_LOWER_THIRD:
cur_height = height / 3;
break;
case CUR_LOWER_HALF:
cur_height = height / 2;
break;
case CUR_TWO_THIRDS:
cur_height = (height * 2) / 3;
break;
case CUR_BLOCK:
default:
cur_height = height;
break;
}
size = (height - cur_height) * w;
while (size--)
mask[i++] = 0;
size = cur_height * w;
while (size--)
mask[i++] = 0xff;
}
cursor.image.width = width;
cursor.image.height = height;
cursor.image.dx = xx * width;
cursor.image.dy = yy * height;
cursor.image.depth = 1;
cursor.image.data = image;
cursor.mask = mask;
cursor.dest = dest;
cursor.rop = ROP_XOR;
if (info->fbops->fb_cursor)
info->fbops->fb_cursor(info, &cursor);
}
/*
* `switch' for the low level operations
*/
struct display_switch fbcon_accel = {
.bmove = fbcon_accel_bmove,
.clear = fbcon_accel_clear,
.putcs = fbcon_accel_putcs,
.clear_margins = fbcon_accel_clear_margins,
.cursor = fbcon_accel_cursor,
.fontwidthmask = FONTWIDTHRANGE(1, 16)
};
#ifdef MODULE
MODULE_LICENSE("GPL");
int init_module(void)
{
return 0;
}
void cleanup_module(void)
{
}
#endif /* MODULE */
/*
* Visible symbols for modules
*/
EXPORT_SYMBOL(fbcon_accel);
EXPORT_SYMBOL(fbcon_accel_bmove);
EXPORT_SYMBOL(fbcon_accel_clear);
EXPORT_SYMBOL(fbcon_accel_putcs);
EXPORT_SYMBOL(fbcon_accel_clear_margins);
/*
* FBcon low-level driver that is a wrapper for the accel engine.
*/
#ifndef _VIDEO_FBCON_ACCEL_H
#define _VIDEO_FBCON_ACCEL_H
#include <linux/config.h>
#ifdef MODULE
#if defined(CONFIG_FBCON_ACCEL) || defined(CONFIG_FBCON_ACCEL_MODULE)
#define FBCON_HAS_ACCEL
#endif
#else
#if defined(CONFIG_FBCON_ACCEL)
#define FBCON_HAS_ACCEL
#endif
#endif
extern struct display_switch fbcon_accel;
extern void fbcon_accel_bmove(struct display *p, int sy, int sx, int dy,
int dx, int height, int width);
extern void fbcon_accel_clear(struct vc_data *vc, struct display *p, int sy,
int sx, int height, int width);
extern void fbcon_accel_putc(struct vc_data *vc, struct display *p, int c,
int yy, int xx);
extern void fbcon_accel_putcs(struct vc_data *vc, struct display *p,
const unsigned short *s, int count, int yy, int xx);
extern void fbcon_accel_revc(struct display *p, int xx, int yy);
extern void fbcon_accel_clear_margins(struct vc_data *vc, struct display *p,
int bottom_only);
#endif /* _VIDEO_FBCON_ACCEL_H */
This diff is collapsed.
/*
* FBcon low-level driver for Amiga bitplanes (afb)
*/
#ifndef _VIDEO_FBCON_AFB_H
#define _VIDEO_FBCON_AFB_H
#include <linux/config.h>
#ifdef MODULE
#if defined(CONFIG_FBCON_AFB) || defined(CONFIG_FBCON_AFB_MODULE)
#define FBCON_HAS_AFB
#endif
#else
#if defined(CONFIG_FBCON_AFB)
#define FBCON_HAS_AFB
#endif
#endif
extern struct display_switch fbcon_afb;
extern void fbcon_afb_setup(struct display *p);
extern void fbcon_afb_bmove(struct display *p, int sy, int sx, int dy, int dx,
int height, int width);
extern void fbcon_afb_clear(struct vc_data *conp, struct display *p, int sy,
int sx, int height, int width);
extern void fbcon_afb_putc(struct vc_data *conp, struct display *p, int c,
int yy, int xx);
extern void fbcon_afb_putcs(struct vc_data *conp, struct display *p,
const unsigned short *s, int count, int yy, int xx);
extern void fbcon_afb_revc(struct display *p, int xx, int yy);
#endif
/*
* linux/drivers/video/ilbm.c -- Low level frame buffer operations for
* interleaved bitplanes la Amiga
*
* Created 5 Apr 1997 by Geert Uytterhoeven
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file COPYING in the main directory of this archive for
* more details.
*/
#include <linux/module.h>
#include <linux/tty.h>
#include <linux/console.h>
#include <linux/string.h>
#include <linux/fb.h>
#include "fbcon.h"
#include "fbcon-ilbm.h"
/*
* Interleaved bitplanes la Amiga
*
* This code heavily relies on the fact that
*
* next_line == interleave == next_plane*bits_per_pixel
*
* But maybe it can be merged with the code for normal bitplanes without
* much performance loss?
*/
void fbcon_ilbm_setup(struct display *p)
{
if (p->fb_info->fix.line_length) {
p->next_line = p->fb_info->fix.line_length*p->var.bits_per_pixel;
p->next_plane = p->fb_info->fix.line_length;
} else {
p->next_line = p->fb_info->fix.type_aux;
p->next_plane = p->fb_info->fix.type_aux/p->var.bits_per_pixel;
}
}
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->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->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->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;
fb_memmove(dest, src, width);
}
}
}
}
void fbcon_ilbm_clear(struct vc_data *conp, struct display *p, int sy, int sx,
int height, int width)
{
u8 *dest;
u_int i, rows;
int bg, bg0;
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--;) {
bg = bg0;
for (i = p->var.bits_per_pixel; i--; dest += p->next_plane) {
if (bg & 1)
fb_memset255(dest, width);
else
fb_memclear(dest, width);
bg >>= 1;
}
}
}
void fbcon_ilbm_putc(struct vc_data *conp, struct display *p, int c, int yy,
int xx)
{
u8 *dest, *cdat;
u_int rows, i;
u8 d;
int fg0, bg0, fg, bg;
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);
for (rows = fontheight(p); rows--;) {
d = *cdat++;
fg = fg0;
bg = bg0;
for (i = p->var.bits_per_pixel; i--; dest += p->next_plane) {
if (bg & 1){
if (fg & 1)
*dest = 0xff;
else
*dest = ~d;
}else{
if (fg & 1)
*dest = d;
else
*dest = 0x00;
}
bg >>= 1;
fg >>= 1;
}
}
}
/*
* I've split the console character loop in two parts:
*
* - slow version: this blits one character at a time
*
* - fast version: this blits 4 characters at a time at a longword
* aligned address, to reduce the number of expensive
* Chip RAM accesses.
*
* Experiments on my A4000/040 revealed that this makes a console switch
* on a 640x400 screen with 256 colors about 3 times faster.
*
* -- Geert
*/
void fbcon_ilbm_putcs(struct vc_data *conp, struct display *p,
const unsigned short *s, int count, int yy, int xx)
{
u8 *dest0, *dest, *cdat1, *cdat2, *cdat3, *cdat4;
u_int rows, i;
u16 c1, c2, c3, c4;
u32 d;
int fg0, bg0, fg, bg;
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);
while (count--)
if (xx&3 || count < 3) { /* Slow version */
c1 = scr_readw(s++) & p->charmask;
dest = dest0++;
xx++;
cdat1 = p->fontdata+c1*fontheight(p);
for (rows = fontheight(p); rows--;) {
d = *cdat1++;
fg = fg0;
bg = bg0;
for (i = p->var.bits_per_pixel; i--; dest += p->next_plane) {
if (bg & 1){
if (fg & 1)
*dest = 0xff;
else
*dest = ~d;
}else{
if (fg & 1)
*dest = d;
else
*dest = 0x00;
}
bg >>= 1;
fg >>= 1;
}
}
} else { /* Fast version */
c1 = scr_readw(&s[0]) & p->charmask;
c2 = scr_readw(&s[1]) & p->charmask;
c3 = scr_readw(&s[2]) & p->charmask;
c4 = scr_readw(&s[3]) & p->charmask;
dest = dest0;
cdat1 = p->fontdata+c1*fontheight(p);
cdat2 = p->fontdata+c2*fontheight(p);
cdat3 = p->fontdata+c3*fontheight(p);
cdat4 = p->fontdata+c4*fontheight(p);
for (rows = fontheight(p); rows--;) {
#if defined(__BIG_ENDIAN)
d = *cdat1++<<24 | *cdat2++<<16 | *cdat3++<<8 | *cdat4++;
#elif defined(__LITTLE_ENDIAN)
d = *cdat1++ | *cdat2++<<8 | *cdat3++<<16 | *cdat4++<<24;
#else
#error FIXME: No endianness??
#endif
fg = fg0;
bg = bg0;
for (i = p->var.bits_per_pixel; i--; dest += p->next_plane) {
if (bg & 1){
if (fg & 1)
*(u32 *)dest = 0xffffffff;
else
*(u32 *)dest = ~d;
}else{
if (fg & 1)
*(u32 *)dest = d;
else
*(u32 *)dest = 0x00000000;
}
bg >>= 1;
fg >>= 1;
}
}
s += 4;
dest0 += 4;
xx += 4;
count -= 3;
}
}
void fbcon_ilbm_revc(struct display *p, int xx, int yy)
{
u8 *dest, *dest0;
u_int rows, i;
int mask;
dest0 = p->fb_info->screen_base+yy*fontheight(p)*p->next_line+xx;
mask = p->fgcol ^ p->bgcol;
/*
* This should really obey the individual character's
* background and foreground colors instead of simply
* inverting.
*/
for (i = p->var.bits_per_pixel; i--; dest0 += p->next_plane) {
if (mask & 1) {
dest = dest0;
for (rows = fontheight(p); rows--; dest += p->next_line)
*dest = ~*dest;
}
mask >>= 1;
}
}
/*
* `switch' for the low level operations
*/
struct display_switch fbcon_ilbm = {
setup: fbcon_ilbm_setup,
bmove: fbcon_ilbm_bmove,
clear: fbcon_ilbm_clear,
putc: fbcon_ilbm_putc,
putcs: fbcon_ilbm_putcs,
revc: fbcon_ilbm_revc,
fontwidthmask: FONTWIDTH(8)
};
#ifdef MODULE
MODULE_LICENSE("GPL");
int init_module(void)
{
return 0;
}
void cleanup_module(void)
{}
#endif /* MODULE */
/*
* Visible symbols for modules
*/
EXPORT_SYMBOL(fbcon_ilbm);
EXPORT_SYMBOL(fbcon_ilbm_setup);
EXPORT_SYMBOL(fbcon_ilbm_bmove);
EXPORT_SYMBOL(fbcon_ilbm_clear);
EXPORT_SYMBOL(fbcon_ilbm_putc);
EXPORT_SYMBOL(fbcon_ilbm_putcs);
EXPORT_SYMBOL(fbcon_ilbm_revc);
/*
* FBcon low-level driver for Amiga interleaved bitplanes (ilbm)
*/
#ifndef _VIDEO_FBCON_ILBM_H
#define _VIDEO_FBCON_ILBM_H
#include <linux/config.h>
#ifdef MODULE
#if defined(CONFIG_FBCON_ILBM) || defined(CONFIG_FBCON_ILBM_MODULE)
#define FBCON_HAS_ILBM
#endif
#else
#if defined(CONFIG_FBCON_ILBM)
#define FBCON_HAS_ILBM
#endif
#endif
extern struct display_switch fbcon_ilbm;
extern void fbcon_ilbm_setup(struct display *p);
extern void fbcon_ilbm_bmove(struct display *p, int sy, int sx, int dy, int dx,
int height, int width);
extern void fbcon_ilbm_clear(struct vc_data *conp, struct display *p, int sy,
int sx, int height, int width);
extern void fbcon_ilbm_putc(struct vc_data *conp, struct display *p, int c,
int yy, int xx);
extern void fbcon_ilbm_putcs(struct vc_data *conp, struct display *p,
const unsigned short *s, int count, int yy, int xx);
extern void fbcon_ilbm_revc(struct display *p, int xx, int yy);
#endif /* _VIDEO_FBCON_ILBM_H */
This diff is collapsed.
/*
* FBcon low-level driver for Atari interleaved bitplanes (2 planes) (iplan2p2)
*/
#ifndef _VIDEO_FBCON_IPLAN2P2_H
#define _VIDEO_FBCON_IPLAN2P2_H
#include <linux/config.h>
#ifdef MODULE
#if defined(CONFIG_FBCON_IPLAN2P2) || defined(CONFIG_FBCON_IPLAN2P2_MODULE)
#define FBCON_HAS_IPLAN2P2
#endif
#else
#if defined(CONFIG_FBCON_IPLAN2P2)
#define FBCON_HAS_IPLAN2P2
#endif
#endif
extern struct display_switch fbcon_iplan2p2;
extern void fbcon_iplan2p2_setup(struct display *p);
extern void fbcon_iplan2p2_bmove(struct display *p, int sy, int sx, int dy,
int dx, int height, int width);
extern void fbcon_iplan2p2_clear(struct vc_data *conp, struct display *p,
int sy, int sx, int height, int width);
extern void fbcon_iplan2p2_putc(struct vc_data *conp, struct display *p, int c,
int yy, int xx);
extern void fbcon_iplan2p2_putcs(struct vc_data *conp, struct display *p,
const unsigned short *s, int count, int yy, int xx);
extern void fbcon_iplan2p2_revc(struct display *p, int xx, int yy);
#endif /* _VIDEO_FBCON_IPLAN2P2_H */
This diff is collapsed.
/*
* FBcon low-level driver for Atari interleaved bitplanes (4 planes) (iplan2p4)
*/
#ifndef _VIDEO_FBCON_IPLAN2P4_H
#define _VIDEO_FBCON_IPLAN2P4_H
#include <linux/config.h>
#ifdef MODULE
#if defined(CONFIG_FBCON_IPLAN2P4) || defined(CONFIG_FBCON_IPLAN2P4_MODULE)
#define FBCON_HAS_IPLAN2P4
#endif
#else
#if defined(CONFIG_FBCON_IPLAN2P4)
#define FBCON_HAS_IPLAN2P4
#endif
#endif
extern struct display_switch fbcon_iplan2p4;
extern void fbcon_iplan2p4_setup(struct display *p);
extern void fbcon_iplan2p4_bmove(struct display *p, int sy, int sx, int dy,
int dx, int height, int width);
extern void fbcon_iplan2p4_clear(struct vc_data *conp, struct display *p,
int sy, int sx, int height, int width);
extern void fbcon_iplan2p4_putc(struct vc_data *conp, struct display *p, int c,
int yy, int xx);
extern void fbcon_iplan2p4_putcs(struct vc_data *conp, struct display *p,
const unsigned short *s, int count, int yy, int xx);
extern void fbcon_iplan2p4_revc(struct display *p, int xx, int yy);
#endif /* _VIDEO_FBCON_IPLAN2P4_H */
This diff is collapsed.
/*
* FBcon low-level driver for Atari interleaved bitplanes (8 planes) (iplan2p8)
*/
#ifndef _VIDEO_FBCON_IPLAN2P8_H
#define _VIDEO_FBCON_IPLAN2P8_H
#include <linux/config.h>
#ifdef MODULE
#if defined(CONFIG_FBCON_IPLAN2P8) || defined(CONFIG_FBCON_IPLAN2P8_MODULE)
#define FBCON_HAS_IPLAN2P8
#endif
#else
#if defined(CONFIG_FBCON_IPLAN2P8)
#define FBCON_HAS_IPLAN2P8
#endif
#endif
extern struct display_switch fbcon_iplan2p8;
extern void fbcon_iplan2p8_setup(struct display *p);
extern void fbcon_iplan2p8_bmove(struct display *p, int sy, int sx, int dy,
int dx, int height, int width);
extern void fbcon_iplan2p8_clear(struct vc_data *conp, struct display *p,
int sy, int sx, int height, int width);
extern void fbcon_iplan2p8_putc(struct vc_data *conp, struct display *p, int c,
int yy, int xx);
extern void fbcon_iplan2p8_putcs(struct vc_data *conp, struct display *p,
const unsigned short *s, int count, int yy, int xx);
extern void fbcon_iplan2p8_revc(struct display *p, int xx, int yy);
#endif /* _VIDEO_FBCON_IPLAN2P8_H */
This diff is collapsed.
......@@ -18,28 +18,6 @@
#include <asm/io.h>
struct display;
/*
* `switch' for the Low Level Operations
*/
struct display_switch {
void (*bmove)(struct display *p, int sy, int sx, int dy, int dx,
int height, int width);
/* for clear, conp may be NULL, which means use a blanking (black) color */
void (*clear)(struct vc_data *conp, struct display *p, int sy, int sx,
int height, int width);
void (*putcs)(struct vc_data *conp, struct display *p, const unsigned short *s,
int count, int yy, int xx);
void (*cursor)(struct display *p, int flags, int xx, int yy);
void (*clear_margins)(struct vc_data *conp, struct display *p,
int bottom_only);
unsigned int fontwidthmask; /* 1 at (1 << (width - 1)) if width is supported */
};
extern struct display_switch fbcon_dummy;
/*
* This is the interface between the low-level console driver and the
* low-level frame buffer device
......@@ -65,6 +43,7 @@ struct display {
short yscroll; /* Hardware scrolling */
unsigned char fgshift, bgshift;
unsigned short charmask; /* 0xff or 0x1ff */
unsigned int fontwidthmask; /* 1 at (1 << (width - 1)) if width is supported */
};
/* drivers/video/console/fbcon.c */
......
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