Commit 6f8d8d4b authored by James Simmons's avatar James Simmons

M68K updates for there framebuffer devices.

parent 7f933b36
......@@ -61,7 +61,6 @@
#include <asm/amigahw.h>
#include <asm/amigaints.h>
#include <asm/setup.h>
#include <asm/io.h>
#include <video/fbcon.h>
#include <video/fbcon-afb.h>
......@@ -1173,16 +1172,51 @@ static struct fb_ops amifb_ops = {
fb_set_cmap: gen_set_cmap,
fb_setcolreg: amifb_setcolreg,
fb_pan_display: amifb_pan_display,
fb_blankL: amifb_blank,
fb_blank: amifb_blank,
fb_ioctl: amifb_ioctl,
};
static void __init amifb_setup_mcap(char *spec)
{
char *p;
int vmin, vmax, hmin, hmax;
/* Format for monitor capabilities is: <Vmin>;<Vmax>;<Hmin>;<Hmax>
* <V*> vertical freq. in Hz
* <H*> horizontal freq. in kHz
*/
if (!(p = strsep(&spec, ";")) || !*p)
return;
vmin = simple_strtoul(p, NULL, 10);
if (vmin <= 0)
return;
if (!(p = strsep(&spec, ";")) || !*p)
return;
vmax = simple_strtoul(p, NULL, 10);
if (vmax <= 0 || vmax <= vmin)
return;
if (!(p = strsep(&spec, ";")) || !*p)
return;
hmin = 1000 * simple_strtoul(p, NULL, 10);
if (hmin <= 0)
return;
if (!(p = strsep(&spec, "")) || !*p)
return;
hmax = 1000 * simple_strtoul(p, NULL, 10);
if (hmax <= 0 || hmax <= hmin)
return;
fb_info.monspecs.vfmin = vmin;
fb_info.monspecs.vfmax = vmax;
fb_info.monspecs.hfmin = hmin;
fb_info.monspecs.hfmax = hmax;
}
int __init amifb_setup(char *options)
{
char *this_opt;
char mcap_spec[80];
mcap_spec[0] = '\0';
fb_info.fontname[0] = '\0';
if (!options || !*options)
......@@ -1199,7 +1233,7 @@ int __init amifb_setup(char *options)
} else if (!strcmp(this_opt, "ilbm"))
amifb_ilbm = 1;
else if (!strncmp(this_opt, "monitorcap:", 11))
strcpy(mcap_spec, this_opt+11);
amifb_setup_mcap(this_opt+11);
else if (!strncmp(this_opt, "font:", 5))
strcpy(fb_info.fontname, this_opt+5);
else if (!strncmp(this_opt, "fstart:", 7))
......@@ -1211,43 +1245,6 @@ int __init amifb_setup(char *options)
if (min_fstrt < 48)
min_fstrt = 48;
if (*mcap_spec) {
char *p;
int vmin, vmax, hmin, hmax;
/* Format for monitor capabilities is: <Vmin>;<Vmax>;<Hmin>;<Hmax>
* <V*> vertical freq. in Hz
* <H*> horizontal freq. in kHz
*/
if (!(p = strsep(&mcap_spec, ";")) || !*p)
goto cap_invalid;
vmin = simple_strtoul(p, NULL, 10);
if (vmin <= 0)
goto cap_invalid;
if (!(p = strsep(&mcap_spec, ";")) || !*p)
goto cap_invalid;
vmax = simple_strtoul(p, NULL, 10);
if (vmax <= 0 || vmax <= vmin)
goto cap_invalid;
if (!(p = strsep(&mcap_spec, ";")) || !*p)
goto cap_invalid;
hmin = 1000 * simple_strtoul(p, NULL, 10);
if (hmin <= 0)
goto cap_invalid;
if (!(p = strsep(&mcap_spec, "")) || !*p)
goto cap_invalid;
hmax = 1000 * simple_strtoul(p, NULL, 10);
if (hmax <= 0 || hmax <= hmin)
goto cap_invalid;
fb_info.monspecs.vfmin = vmin;
fb_info.monspecs.vfmax = vmax;
fb_info.monspecs.hfmin = hmin;
fb_info.monspecs.hfmax = hmax;
cap_invalid:
;
}
return 0;
}
......
......@@ -2593,6 +2593,35 @@ atafb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
return -EINVAL;
}
/* (un)blank/poweroff
* 0 = unblank
* 1 = blank
* 2 = suspend vsync
* 3 = suspend hsync
* 4 = off
*/
static int
atafb_blank(int blank, struct fb_info *info)
{
unsigned short black[16];
struct fb_cmap cmap;
if (fbhw->blank && !fbhw->blank(blank))
return 1;
if (blank) {
memset(black, 0, 16*sizeof(unsigned short));
cmap.red=black;
cmap.green=black;
cmap.blue=black;
cmap.transp=NULL;
cmap.start=0;
cmap.len=16;
fb_set_cmap(&cmap, 1, info);
}
else
do_install_cmap(info->currcon, info);
return 0;
}
static struct fb_ops atafb_ops = {
owner: THIS_MODULE,
fb_get_fix: atafb_get_fix,
......@@ -2660,35 +2689,6 @@ atafb_switch(int con, struct fb_info *info)
return 0;
}
/* (un)blank/poweroff
* 0 = unblank
* 1 = blank
* 2 = suspend vsync
* 3 = suspend hsync
* 4 = off
*/
static int
atafb_blank(int blank, struct fb_info *info)
{
unsigned short black[16];
struct fb_cmap cmap;
if (fbhw->blank && !fbhw->blank(blank))
return 1;
if (blank) {
memset(black, 0, 16*sizeof(unsigned short));
cmap.red=black;
cmap.green=black;
cmap.blue=black;
cmap.transp=NULL;
cmap.start=0;
cmap.len=16;
fb_set_cmap(&cmap, 1, info);
}
else
do_install_cmap(info->currcon, info);
return 0;
}
int __init atafb_init(void)
{
int pad;
......@@ -2702,21 +2702,21 @@ int __init atafb_init(void)
#ifdef ATAFB_EXT
if (external_addr) {
fbhw = &ext_switch;
fb_info.fb_setcolreg = &ext_setcolreg;
atafb_ops.fb_setcolreg = &ext_setcolreg;
break;
}
#endif
#ifdef ATAFB_TT
if (ATARIHW_PRESENT(TT_SHIFTER)) {
fbhw = &tt_switch;
fb_info.fb_setcolreg = &tt_setcolreg;
atafb_ops.fb_setcolreg = &tt_setcolreg;
break;
}
#endif
#ifdef ATAFB_FALCON
if (ATARIHW_PRESENT(VIDEL_SHIFTER)) {
fbhw = &falcon_switch;
fb_info.fb_setcolreg = &falcon_setcolreg;
atafb_ops.fb_setcolreg = &falcon_setcolreg;
request_irq(IRQ_AUTO_4, falcon_vbl_switcher, IRQ_TYPE_PRIO,
"framebuffer/modeswitch", falcon_vbl_switcher);
break;
......@@ -2726,11 +2726,11 @@ int __init atafb_init(void)
if (ATARIHW_PRESENT(STND_SHIFTER) ||
ATARIHW_PRESENT(EXTD_SHIFTER)) {
fbhw = &st_switch;
fb_info.fb_setcolreg = &stste_setcolreg;
atafb_ops.fb_setcolreg = &stste_setcolreg;
break;
}
fbhw = &st_switch;
fb_info.fb_setcolreg = &stste_setcolreg;
atafb_ops.fb_setcolreg = &stste_setcolreg;
printk("Cannot determine video hardware; defaulting to ST(e)\n");
#else /* ATAFB_STE */
/* no default driver included */
......@@ -2824,103 +2824,10 @@ int __init atafb_init(void)
return 0;
}
int __init atafb_setup( char *options )
{
char *this_opt;
int temp;
char ext_str[80], int_str[100];
char mcap_spec[80];
char user_mode[80];
ext_str[0] =
int_str[0] =
mcap_spec[0] =
user_mode[0] =
fb_info.fontname[0] = '\0';
if (!options || !*options)
return 0;
while ((this_opt = strsep(options, ",")) != NULL) {
if (!*this_opt) continue;
if ((temp=get_video_mode(this_opt)))
default_par=temp;
else if (! strcmp(this_opt, "inverse"))
inverse=1;
else if (!strncmp(this_opt, "font:", 5))
strcpy(fb_info.fontname, this_opt+5);
else if (! strncmp(this_opt, "hwscroll_",9)) {
hwscroll=simple_strtoul(this_opt+9, NULL, 10);
if (hwscroll < 0)
hwscroll = 0;
if (hwscroll > 200)
hwscroll = 200;
}
#ifdef ATAFB_EXT
else if (!strcmp(this_opt,"mv300")) {
external_bitspercol = 8;
external_card_type = IS_MV300;
}
else if (!strncmp(this_opt,"external:",9))
strcpy(ext_str, this_opt+9);
#endif
else if (!strncmp(this_opt,"internal:",9))
strcpy(int_str, this_opt+9);
#ifdef ATAFB_FALCON
else if (!strncmp(this_opt, "eclock:", 7)) {
fext.f = simple_strtoul(this_opt+7, NULL, 10);
/* external pixelclock in kHz --> ps */
fext.t = 1000000000/fext.f;
fext.f *= 1000;
}
else if (!strncmp(this_opt, "monitorcap:", 11))
strcpy(mcap_spec, this_opt+11);
#endif
else if (!strcmp(this_opt, "keep"))
DontCalcRes = 1;
else if (!strncmp(this_opt, "R", 1))
strcpy(user_mode, this_opt+1);
}
if (*int_str) {
/* Format to config extended internal video hardware like OverScan:
"internal:<xres>;<yres>;<xres_max>;<yres_max>;<offset>"
Explanation:
<xres>: x-resolution
<yres>: y-resolution
The following are only needed if you have an overscan which
needs a black border:
<xres_max>: max. length of a line in pixels your OverScan hardware would allow
<yres_max>: max. number of lines your OverScan hardware would allow
<offset>: Offset from physical beginning to visible beginning
of screen in bytes
*/
int xres;
char *p;
if (!(p = strsep(&int_str, ";")) || !*p) goto int_invalid;
xres = simple_strtoul(p, NULL, 10);
if (!(p = strsep(&int_str, ";")) || !*p) goto int_invalid;
sttt_xres=xres;
tt_yres=st_yres=simple_strtoul(p, NULL, 10);
if ((p=strsep(&int_str, ";")) && *p) {
sttt_xres_virtual=simple_strtoul(p, NULL, 10);
}
if ((p=strsep(&int_str, ";")) && *p) {
sttt_yres_virtual=simple_strtoul(p, NULL, 0);
}
if ((p=strsep(&int_str, ";")) && *p) {
ovsc_offset=simple_strtoul(p, NULL, 0);
}
if (ovsc_offset || (sttt_yres_virtual != st_yres))
use_hwscroll=0;
int_invalid:
;
}
#ifdef ATAFB_EXT
if (*ext_str) {
static void __init atafb_setup_ext(char *spec)
{
int xres, xres_virtual, yres, depth, planes;
unsigned long addr, len;
char *p;
......@@ -2935,20 +2842,27 @@ int __init atafb_setup( char *options )
*
* Even xres_virtual is available, we neither support panning nor hw-scrolling!
*/
if (!(p = strsep(&ext_str, ";")) || !*p) goto ext_invalid;
if (!(p = strsep(&spec, ";")) || !*p)
return;
xres_virtual = xres = simple_strtoul(p, NULL, 10);
if (xres <= 0) goto ext_invalid;
if (xres <= 0)
return;
if (!(p = strsep(&ext_str, ";")) || !*p) goto ext_invalid;
if (!(p = strsep(&spec, ";")) || !*p)
return;
yres = simple_strtoul(p, NULL, 10);
if (yres <= 0) goto ext_invalid;
if (yres <= 0)
return;
if (!(p = strsep(&ext_str, ";")) || !*p) goto ext_invalid;
if (!(p = strsep(&spec, ";")) || !*p)
return;
depth = simple_strtoul(p, NULL, 10);
if (depth != 1 && depth != 2 && depth != 4 && depth != 8 &&
depth != 16 && depth != 24) goto ext_invalid;
depth != 16 && depth != 24)
return;
if (!(p = strsep(&ext_str, ";")) || !*p) goto ext_invalid;
if (!(p = strsep(&spec, ";")) || !*p)
return;
if (*p == 'i')
planes = FB_TYPE_INTERLEAVED_PLANES;
else if (*p == 'p')
......@@ -2958,37 +2872,38 @@ int __init atafb_setup( char *options )
else if (*p == 't')
planes = -1; /* true color */
else
goto ext_invalid;
return;
if (!(p = strsep(&ext_str, ";")) || !*p) goto ext_invalid;
if (!(p = strsep(&spec, ";")) || !*p)
return;
addr = simple_strtoul(p, NULL, 0);
if (!(p = strsep(&ext_str, ";")) || !*p)
if (!(p = strsep(&spec, ";")) || !*p)
len = xres*yres*depth/8;
else
len = simple_strtoul(p, NULL, 0);
if ((p = strsep(&ext_str, ";")) && *p) {
if ((p = strsep(&spec, ";")) && *p) {
external_vgaiobase=simple_strtoul(p, NULL, 0);
}
if ((p = strsep(&ext_str, ";")) && *p) {
if ((p = strsep(&spec, ";")) && *p) {
external_bitspercol = simple_strtoul(p, NULL, 0);
if (external_bitspercol > 8)
external_bitspercol = 8;
else if (external_bitspercol < 1)
external_bitspercol = 1;
}
if ((p = strsep(&ext_str, ";")) && *p) {
if ((p = strsep(&spec, ";")) && *p) {
if (!strcmp(p, "vga"))
external_card_type = IS_VGA;
if (!strcmp(p, "mv300"))
external_card_type = IS_MV300;
}
if ((p = strsep(&ext_str, ";")) && *p) {
if ((p = strsep(&spec, ";")) && *p) {
xres_virtual = simple_strtoul(p, NULL, 10);
if (xres_virtual < xres)
xres_virtual = xres;
......@@ -3003,7 +2918,7 @@ int __init atafb_setup( char *options )
external_pmode = planes;
external_addr = (void *)addr;
external_len = len;
if (external_card_type == IS_MV300)
switch (external_depth) {
case 1:
......@@ -3016,14 +2931,52 @@ int __init atafb_setup( char *options )
MV300_reg = MV300_reg_8bit;
break;
}
ext_invalid:
;
}
}
#endif /* ATAFB_EXT */
static void __init atafb_setup_int(char *spec)
{
/* Format to config extended internal video hardware like OverScan:
"internal:<xres>;<yres>;<xres_max>;<yres_max>;<offset>"
Explanation:
<xres>: x-resolution
<yres>: y-resolution
The following are only needed if you have an overscan which
needs a black border:
<xres_max>: max. length of a line in pixels your OverScan hardware would allow
<yres_max>: max. number of lines your OverScan hardware would allow
<offset>: Offset from physical beginning to visible beginning
of screen in bytes
*/
int xres;
char *p;
if (!(p = strsep(&spec, ";")) || !*p)
return;
xres = simple_strtoul(p, NULL, 10);
if (!(p = strsep(&spec, ";")) || !*p)
return;
sttt_xres=xres;
tt_yres=st_yres=simple_strtoul(p, NULL, 10);
if ((p=strsep(&spec, ";")) && *p) {
sttt_xres_virtual=simple_strtoul(p, NULL, 10);
}
if ((p=strsep(&spec, ";")) && *p) {
sttt_yres_virtual=simple_strtoul(p, NULL, 0);
}
if ((p=strsep(&spec, ";")) && *p) {
ovsc_offset=simple_strtoul(p, NULL, 0);
}
if (ovsc_offset || (sttt_yres_virtual != st_yres))
use_hwscroll=0;
}
#ifdef ATAFB_FALCON
if (*mcap_spec) {
static void __init atafb_setup_mcap(char *spec)
{
char *p;
int vmin, vmax, hmin, hmax;
......@@ -3031,51 +2984,110 @@ int __init atafb_setup( char *options )
* <V*> vertical freq. in Hz
* <H*> horizontal freq. in kHz
*/
if (!(p = strsep(&mcap_spec, ";")) || !*p) goto cap_invalid;
if (!(p = strsep(&spec, ";")) || !*p)
return;
vmin = simple_strtoul(p, NULL, 10);
if (vmin <= 0) goto cap_invalid;
if (!(p = strsep(&mcap_spec, ";")) || !*p) goto cap_invalid;
if (vmin <= 0)
return;
if (!(p = strsep(&spec, ";")) || !*p)
return;
vmax = simple_strtoul(p, NULL, 10);
if (vmax <= 0 || vmax <= vmin) goto cap_invalid;
if (!(p = strsep(&mcap_spec, ";")) || !*p) goto cap_invalid;
if (vmax <= 0 || vmax <= vmin)
return;
if (!(p = strsep(&spec, ";")) || !*p)
return;
hmin = 1000 * simple_strtoul(p, NULL, 10);
if (hmin <= 0) goto cap_invalid;
if (!(p = strsep(&mcap_spec, "")) || !*p) goto cap_invalid;
if (hmin <= 0)
return;
if (!(p = strsep(&spec, "")) || !*p)
return;
hmax = 1000 * simple_strtoul(p, NULL, 10);
if (hmax <= 0 || hmax <= hmin) goto cap_invalid;
if (hmax <= 0 || hmax <= hmin)
return;
fb_info.monspecs.vfmin = vmin;
fb_info.monspecs.vfmax = vmax;
fb_info.monspecs.hfmin = hmin;
fb_info.monspecs.hfmax = hmax;
cap_invalid:
;
}
#endif
}
#endif /* ATAFB_FALCON */
if (*user_mode) {
/* Format of user defined video mode is: <xres>;<yres>;<depth>
*/
char *p;
int xres, yres, depth, temp;
if (!(p = strsep(&user_mode, ";")) || !*p) goto user_invalid;
xres = simple_strtoul(p, NULL, 10);
if (!(p = strsep(&user_mode, ";")) || !*p) goto user_invalid;
yres = simple_strtoul(p, NULL, 10);
if (!(p = strsep(&user_mode, "")) || !*p) goto user_invalid;
depth = simple_strtoul(p, NULL, 10);
if ((temp=get_video_mode("user0"))) {
default_par=temp;
atafb_predefined[default_par-1].xres = xres;
atafb_predefined[default_par-1].yres = yres;
atafb_predefined[default_par-1].bits_per_pixel = depth;
}
user_invalid:
;
static void __init atafb_setup_user(char *spec)
{
/* Format of user defined video mode is: <xres>;<yres>;<depth>
*/
char *p;
int xres, yres, depth, temp;
if (!(p = strsep(&spec, ";")) || !*p)
return;
xres = simple_strtoul(p, NULL, 10);
if (!(p = strsep(&spec, ";")) || !*p)
return;
yres = simple_strtoul(p, NULL, 10);
if (!(p = strsep(&spec, "")) || !*p)
return;
depth = simple_strtoul(p, NULL, 10);
if ((temp=get_video_mode("user0"))) {
default_par=temp;
atafb_predefined[default_par-1].xres = xres;
atafb_predefined[default_par-1].yres = yres;
atafb_predefined[default_par-1].bits_per_pixel = depth;
}
return 0;
}
int __init atafb_setup( char *options )
{
char *this_opt;
int temp;
fb_info.fontname[0] = '\0';
if (!options || !*options)
return 0;
while ((this_opt = strsep(&options, ",")) != NULL) {
if (!*this_opt) continue;
if ((temp=get_video_mode(this_opt)))
default_par=temp;
else if (! strcmp(this_opt, "inverse"))
inverse=1;
else if (!strncmp(this_opt, "font:", 5))
strcpy(fb_info.fontname, this_opt+5);
else if (! strncmp(this_opt, "hwscroll_",9)) {
hwscroll=simple_strtoul(this_opt+9, NULL, 10);
if (hwscroll < 0)
hwscroll = 0;
if (hwscroll > 200)
hwscroll = 200;
}
#ifdef ATAFB_EXT
else if (!strcmp(this_opt,"mv300")) {
external_bitspercol = 8;
external_card_type = IS_MV300;
}
else if (!strncmp(this_opt,"external:",9))
atafb_setup_ext(this_opt+9);
#endif
else if (!strncmp(this_opt,"internal:",9))
atafb_setup_int(this_opt+9);
#ifdef ATAFB_FALCON
else if (!strncmp(this_opt, "eclock:", 7)) {
fext.f = simple_strtoul(this_opt+7, NULL, 10);
/* external pixelclock in kHz --> ps */
fext.t = 1000000000/fext.f;
fext.f *= 1000;
}
else if (!strncmp(this_opt, "monitorcap:", 11))
atafb_setup_mcap(this_opt+11);
#endif
else if (!strcmp(this_opt, "keep"))
DontCalcRes = 1;
else if (!strncmp(this_opt, "R", 1))
atafb_setup_user(this_opt+1);
}
return 0;
}
#ifdef MODULE
......
......@@ -115,7 +115,7 @@ static struct display disp;
/* frame buffer operations */
static int dn_fb_blank(int blank, struct fb_info *info);
static int dnfb_blank(int blank, struct fb_info *info);
static void dnfb_copyarea(struct fb_info *info, struct fb_copyarea *area);
static struct fb_ops dn_fb_ops = {
......@@ -165,7 +165,6 @@ void dnfb_copyarea(struct fb_info *info, struct fb_copyarea *area)
{
int incr, y_delta, pre_read = 0, x_end, x_word_count;
int x_count, y_count;
ushort *src, dummy;
uint start_mask, end_mask, dest;
short i, j;
......@@ -173,13 +172,13 @@ void dnfb_copyarea(struct fb_info *info, struct fb_copyarea *area)
incr = (area->dy <= area->sy) ? 1 : -1;
src =
(ushort *) (info->screen_base + area->sy * info->fix.next_line +
(ushort *) (info->screen_base + area->sy * info->fix.line_length +
(area->sx >> 4));
dest = area->dy * (info->fix.next_line >> 1) + (area->dx >> 4);
dest = area->dy * (info->fix.line_length >> 1) + (area->dx >> 4);
if (incr > 0) {
y_delta = (info->fix.next_line * 8) - area->sx - x_count;
x_end = area->dx + x_count - 1;
y_delta = (info->fix.line_length * 8) - area->sx - area->width;
x_end = area->dx + area->width - 1;
x_word_count = (x_end >> 4) - (area->dx >> 4) + 1;
start_mask = 0xffff0000 >> (area->dx & 0xf);
end_mask = 0x7ffff >> (x_end & 0xf);
......@@ -188,8 +187,8 @@ void dnfb_copyarea(struct fb_info *info, struct fb_copyarea *area)
if ((area->dx & 0xf) < (area->sx & 0xf))
pre_read = 1;
} else {
y_delta = -((info->fix.next_line * 8) - area->sx - x_count);
x_end = area->dx - x_count + 1;
y_delta = -((info->fix.line_length * 8) - area->sx - area->width);
x_end = area->dx - area->width + 1;
x_word_count = (area->dx >> 4) - (x_end >> 4) + 1;
start_mask = 0x7ffff >> (area->dx & 0xf);
end_mask = 0xffff0000 >> (x_end & 0xf);
......@@ -199,7 +198,7 @@ void dnfb_copyarea(struct fb_info *info, struct fb_copyarea *area)
pre_read = 1;
}
for (i = 0; i < y_count; i++) {
for (i = 0; i < area->height; i++) {
outb(0xc | (dest >> 16), AP_CONTROL_3A);
......@@ -242,7 +241,7 @@ unsigned long __init dnfb_init(unsigned long mem_start)
{
int err;
strcpy(&fb_info.modename, dnfb_fix);
strcpy(fb_info.modename, dnfb_fix.id);
fb_info.changevar = NULL;
fb_info.fontname[0] = 0;
fb_info.disp = &disp;
......
......@@ -198,8 +198,9 @@ static int fm2fb_blank(int blank, struct fb_info *info)
if (!blank)
t |= FRAMEMASTER_ENABLE | FRAMEMASTER_NOLACE;
fm2fb_reg[0] = t;
return 0;
}
/*
* Set a single color register. The values supplied are already
* rounded down to the hardware's capabilities (according to the
......
......@@ -49,6 +49,7 @@ static struct fb_fix_screeninfo hpfb_fix __initdata = {
visual: FB_VISUAL_PSEUDOCOLOR,
line_length: 1024,
accel: FB_ACCEL_NONE,
};
static struct fb_var_screeninfo hpfb_defined = {
xres: 1024,
......@@ -163,7 +164,7 @@ int __init hpfb_init_one(unsigned long base)
fb_info.flags = FBINFO_FLAG_DEFAULT;
fb_info.var = hpfb_defined;
fb_info.fix = hpfb_fix;
fb_info.screen_base = hpfb_fix.smem_start;
fb_info.screen_base = (char *)hpfb_fix.smem_start; // FIXME
/* The below feilds will go away !!!! */
fb_info.currcon = -1;
......
......@@ -42,7 +42,7 @@ static struct fb_fix_screeninfo q40fb_fix __initdata = {
type: FB_TYPE_PACKED_PIXELS,
visual: FB_VISUAL_TRUECOLOR,
line_length: 1024*2,
accel_flags: FB_ACCEL_NONE,
accel: FB_ACCEL_NONE,
};
static struct fb_var_screeninfo q40fb_var __initdata = {
......@@ -95,9 +95,9 @@ static int q40fb_setcolreg(unsigned regno, unsigned red, unsigned green,
blue>>=10;
if (regno < 16) {
info->pseudo_palette[regno] = ((red & 31) <<6) |
((green & 31) << 11) |
(blue & 63);
((u16 *)info->pseudo_palette)[regno] = ((red & 31) <<6) |
((green & 31) << 11) |
(blue & 63);
}
return 0;
}
......
......@@ -1274,8 +1274,6 @@ static int retz3fb_set_var(struct fb_var_screeninfo *var, int con,
static int retz3fb_get_cmap(struct fb_cmap *cmap, int kspc, int con,
struct fb_info *info)
{
struct retz3_fb_info *zinfo = retz3info(info);
if (con == info->currcon) /* current console? */
return(fb_get_cmap(cmap, kspc, retz3_getcolreg, info));
else if (fb_display[con].cmap.len) /* non default colormap? */
......@@ -1446,8 +1444,6 @@ int __init retz3fb_init(void)
static int z3fb_switch(int con, struct fb_info *info)
{
struct retz3_fb_info *zinfo = retz3info(info);
/* Do we have to save the colormap? */
if (fb_display[info->currcon].cmap.len)
fb_get_cmap(&fb_display[info->currcon].cmap, 1,
......
......@@ -24,7 +24,7 @@
#include <linux/fb.h>
#include <linux/init.h>
#include <linux/fbcon.h>
#include <video/fbcon.h>
/*
* RAM we reserve for the frame buffer. This defines the maximum screen
......@@ -446,7 +446,7 @@ int __init vfb_init(void)
fb_info.pseudo_palette = &vfb_pseudo_palette;
fb_info.flags = FBINFO_FLAG_DEFAULT;
strcpy(fb_info.modename, vesafb_fix.id);
strcpy(fb_info.modename, vfb_fix.id);
fb_info.changevar = NULL;
fb_info.currcon = -1;
fb_info.disp = &disp;
......
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