Commit 3c7f4c76 authored by James Simmons's avatar James Simmons

Removed last console and old api related things. Removed experimental flags.

parent 0406890a
......@@ -5,7 +5,7 @@
mainmenu_option next_comment
comment 'Frame-buffer support'
bool 'Support for frame buffer devices (EXPERIMENTAL)' CONFIG_FB
bool 'Support for frame buffer devices ' CONFIG_FB
if [ "$CONFIG_FB" = "y" ]; then
define_bool CONFIG_DUMMY_CONSOLE y
......@@ -97,7 +97,7 @@ if [ "$CONFIG_FB" = "y" ]; then
if [ "$CONFIG_X86" = "y" ]; then
bool ' VESA VGA graphics console' CONFIG_FB_VESA
tristate ' VGA 16-color graphics console' CONFIG_FB_VGA16
tristate ' Hercules mono graphics console (EXPERIMENTAL)' CONFIG_FB_HGA
tristate ' Hercules mono graphics console ' CONFIG_FB_HGA
define_bool CONFIG_VIDEO_SELECT y
fi
if [ "$CONFIG_VISWS" = "y" ]; then
......@@ -123,47 +123,45 @@ if [ "$CONFIG_FB" = "y" ]; then
hex ' Framebuffer Base Address' CONFIG_E1355_FB_BASE a8200000
fi
fi
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
if [ "$CONFIG_PCI" != "n" ]; then
tristate ' nVidia Riva support (EXPERIMENTAL)' CONFIG_FB_RIVA
tristate ' Matrox acceleration (EXPERIMENTAL)' CONFIG_FB_MATROX
if [ "$CONFIG_FB_MATROX" != "n" ]; then
bool ' Millennium I/II support' CONFIG_FB_MATROX_MILLENIUM
bool ' Mystique support' CONFIG_FB_MATROX_MYSTIQUE
bool ' G100/G200/G400/G450/G550 support' CONFIG_FB_MATROX_G450
if [ "$CONFIG_FB_MATROX_G450" = "n" ]; then
bool ' G100/G200/G400 support' CONFIG_FB_MATROX_G100A
fi
if [ "$CONFIG_FB_MATROX_G450" = "y" -o "$CONFIG_FB_MATROX_G100A" = "y" ]; then
define_bool CONFIG_FB_MATROX_G100 y
fi
if [ "$CONFIG_I2C" != "n" ]; then
dep_tristate ' Matrox I2C support' CONFIG_FB_MATROX_I2C $CONFIG_FB_MATROX $CONFIG_I2C_ALGOBIT
if [ "$CONFIG_FB_MATROX_G100" = "y" ]; then
dep_tristate ' G400 second head support' CONFIG_FB_MATROX_MAVEN $CONFIG_FB_MATROX_I2C
fi
fi
bool ' Multihead support' CONFIG_FB_MATROX_MULTIHEAD
if [ "$CONFIG_PCI" != "n" ]; then
tristate ' nVidia Riva support ' CONFIG_FB_RIVA
tristate ' Matrox acceleration ' CONFIG_FB_MATROX
if [ "$CONFIG_FB_MATROX" != "n" ]; then
bool ' Millennium I/II support' CONFIG_FB_MATROX_MILLENIUM
bool ' Mystique support' CONFIG_FB_MATROX_MYSTIQUE
bool ' G100/G200/G400/G450/G550 support' CONFIG_FB_MATROX_G450
if [ "$CONFIG_FB_MATROX_G450" = "n" ]; then
bool ' G100/G200/G400 support' CONFIG_FB_MATROX_G100A
fi
tristate ' ATI Mach64 display support (EXPERIMENTAL)' CONFIG_FB_ATY
if [ "$CONFIG_FB_ATY" != "n" ]; then
bool ' Mach64 GX support (EXPERIMENTAL)' CONFIG_FB_ATY_GX
bool ' Mach64 CT/VT/GT/LT (incl. 3D RAGE) support' CONFIG_FB_ATY_CT
if [ "$CONFIG_FB_MATROX_G450" = "y" -o "$CONFIG_FB_MATROX_G100A" = "y" ]; then
define_bool CONFIG_FB_MATROX_G100 y
fi
tristate ' ATI Radeon display support (EXPERIMENTAL)' CONFIG_FB_RADEON
tristate ' ATI Rage128 display support (EXPERIMENTAL)' CONFIG_FB_ATY128
tristate ' SIS acceleration (EXPERIMENTAL)' CONFIG_FB_SIS
if [ "$CONFIG_FB_SIS" != "n" ]; then
bool ' SIS 630/540/730 support' CONFIG_FB_SIS_300
bool ' SIS 315H/315 support' CONFIG_FB_SIS_315
if [ "$CONFIG_I2C" != "n" ]; then
dep_tristate ' Matrox I2C support' CONFIG_FB_MATROX_I2C $CONFIG_FB_MATROX $CONFIG_I2C_ALGOBIT
if [ "$CONFIG_FB_MATROX_G100" = "y" ]; then
dep_tristate ' G400 second head support' CONFIG_FB_MATROX_MAVEN $CONFIG_FB_MATROX_I2C
fi
fi
tristate ' NeoMagic display support (EXPERIMENTAL)' CONFIG_FB_NEOMAGIC
tristate ' 3Dfx Banshee/Voodoo3 display support (EXPERIMENTAL)' CONFIG_FB_3DFX
tristate ' 3Dfx Voodoo Graphics (sst1) support (EXPERIMENTAL)' CONFIG_FB_VOODOO1
tristate ' Trident support (EXPERIMENTAL)' CONFIG_FB_TRIDENT
tristate ' Permedia3 support (EXPERIMENTAL)' CONFIG_FB_PM3
bool ' Multihead support' CONFIG_FB_MATROX_MULTIHEAD
fi
fi
tristate ' ATI Mach64 display support ' CONFIG_FB_ATY
if [ "$CONFIG_FB_ATY" != "n" ]; then
bool ' Mach64 GX support ' CONFIG_FB_ATY_GX
bool ' Mach64 CT/VT/GT/LT (incl. 3D RAGE) support' CONFIG_FB_ATY_CT
fi
tristate ' ATI Radeon display support ' CONFIG_FB_RADEON
tristate ' ATI Rage128 display support ' CONFIG_FB_ATY128
tristate ' SIS acceleration ' CONFIG_FB_SIS
if [ "$CONFIG_FB_SIS" != "n" ]; then
bool ' SIS 630/540/730 support' CONFIG_FB_SIS_300
bool ' SIS 315H/315 support' CONFIG_FB_SIS_315
fi
tristate ' NeoMagic display support ' CONFIG_FB_NEOMAGIC
tristate ' 3Dfx Banshee/Voodoo3 display support ' CONFIG_FB_3DFX
tristate ' 3Dfx Voodoo Graphics (sst1) support ' CONFIG_FB_VOODOO1
tristate ' Trident support ' CONFIG_FB_TRIDENT
tristate ' Permedia3 support ' CONFIG_FB_PM3
fi
if [ "$CONFIG_SPARC32" = "y" -o "$CONFIG_SPARC64" = "y" ]; then
bool ' SBUS and UPA framebuffers' CONFIG_FB_SBUS
if [ "$CONFIG_FB_SBUS" != "n" ]; then
......@@ -220,12 +218,7 @@ if [ "$CONFIG_FB" = "y" ]; then
bool ' Advanced low level driver options' CONFIG_FBCON_ADVANCED
if [ "$CONFIG_FBCON_ADVANCED" = "y" ]; then
tristate ' Monochrome support' CONFIG_FBCON_MFB
tristate ' 2 bpp packed pixels support' CONFIG_FBCON_CFB2
tristate ' 4 bpp packed pixels support' CONFIG_FBCON_CFB4
tristate ' 8 bpp packed pixels support' CONFIG_FBCON_CFB8
tristate ' 16 bpp packed pixels support' CONFIG_FBCON_CFB16
tristate ' 24 bpp packed pixels support' CONFIG_FBCON_CFB24
tristate ' 32 bpp packed pixels support' CONFIG_FBCON_CFB32
tristate ' Hardware acceleration support' CONFIG_FBCON_ACCEL
tristate ' Amiga bitplanes support' CONFIG_FBCON_AFB
tristate ' Amiga interleaved bitplanes support' CONFIG_FBCON_ILBM
......@@ -234,85 +227,8 @@ if [ "$CONFIG_FB" = "y" ]; then
tristate ' Atari interleaved bitplanes (8 planes) support' CONFIG_FBCON_IPLAN2P8
# tristate ' Atari interleaved bitplanes (16 planes) support' CONFIG_FBCON_IPLAN2P16
tristate ' VGA 16-color planar support' CONFIG_FBCON_VGA_PLANES
tristate ' HGA monochrome support (EXPERIMENTAL)' CONFIG_FBCON_HGA
tristate ' HGA monochrome support ' CONFIG_FBCON_HGA
else
# Guess what we need
if [ "$CONFIG_FB_ACORN" = "y" -o "$CONFIG_FB_AMIGA" = "y" -o \
"$CONFIG_FB_ATARI" = "y" -o "$CONFIG_FB_CYBER" = "y" -o \
"$CONFIG_FB_BWTWO" = "y" -o "$CONFIG_FB_RETINAZ3" = "y" -o \
"$CONFIG_FB_VIRGE" = "y" -o "$CONFIG_FB_CLGEN" = "y" ]; then
define_tristate CONFIG_FBCON_MFB y
else
if [ "$CONFIG_FB_ACORN" = "m" -o "$CONFIG_FB_AMIGA" = "m" -o \
"$CONFIG_FB_ATARI" = "m" -o "$CONFIG_FB_CYBER" = "m" -o \
"$CONFIG_FB_BWTWO" = "m" -o "$CONFIG_FB_RETINAZ3" = "m" -o \
"$CONFIG_FB_VIRGE" = "m" -o "$CONFIG_FB_CLGEN" = "m" ]; then
define_tristate CONFIG_FBCON_MFB m
fi
fi
if [ "$CONFIG_FB_ACORN" = "y" -o "$CONFIG_FB_SA1100" = "y" ]; then
define_tristate CONFIG_FBCON_CFB2 y
define_tristate CONFIG_FBCON_CFB4 y
else
if [ "$CONFIG_FB_ACORN" = "m" -o "$CONFIG_FB_SA1100" = "m" ]; then
define_tristate CONFIG_FBCON_CFB2 m
define_tristate CONFIG_FBCON_CFB4 m
fi
fi
if [ "$CONFIG_FB_ACORN" = "y" -o "$CONFIG_FB_ATARI" = "y" -o \
"$CONFIG_FB_P9100" = "y" -o "$CONFIG_FB_CYBER2000" = "y" -o \
"$CONFIG_FB_RADEON" = "y" -o "$CONFIG_FB_TGA" = "y" -o \
"$CONFIG_FB_SIS" = "y" -o "$CONFIG_FB_PM3" = "y" -o \
"$CONFIG_FB_TCX" = "y" -o "$CONFIG_FB_CGTHREE" = "y" -o \
"$CONFIG_FB_CONTROL" = "y" -o "$CONFIG_FB_CLGEN" = "y" -o \
"$CONFIG_FB_CGFOURTEEN" = "y" -o "$CONFIG_FB_TRIDENT" = "y" -o \
"$CONFIG_FB_VIRGE" = "y" -o "$CONFIG_FB_CYBER" = "y" -o \
"$CONFIG_FB_VALKYRIE" = "y" -o "$CONFIG_FB_PLATINUM" = "y" -o \
"$CONFIG_FB_IGA" = "y" -o "$CONFIG_FB_MATROX" = "y" -o \
"$CONFIG_FB_CT65550" = "y" -o "$CONFIG_FB_PM2" = "y" -o \
"$CONFIG_FB_SA1100" = "y" ]; then
define_tristate CONFIG_FBCON_CFB8 y
else
if [ "$CONFIG_FB_ACORN" = "m" -o "$CONFIG_FB_ATARI" = "m" -o \
"$CONFIG_FB_P9100" = "m" -o "$CONFIG_FB_CYBER2000" = "m" -o \
"$CONFIG_FB_RADEON" = "m" -o "$CONFIG_FB_TGA" = "m" -o \
"$CONFIG_FB_SIS" = "m" -o "$CONFIG_FB_PM3" = "m" -o \
"$CONFIG_FB_TCX" = "m" -o "$CONFIG_FB_CGTHREE" = "m" -o \
"$CONFIG_FB_CONTROL" = "m" -o "$CONFIG_FB_CLGEN" = "m" -o \
"$CONFIG_FB_CGFOURTEEN" = "m" -o "$CONFIG_FB_TRIDENT" = "m" -o \
"$CONFIG_FB_VIRGE" = "m" -o "$CONFIG_FB_CYBER" = "m" -o \
"$CONFIG_FB_VALKYRIE" = "m" -o "$CONFIG_FB_PLATINUM" = "m" -o \
"$CONFIG_FB_IGA" = "m" -o "$CONFIG_FB_MATROX" = "m" -o \
"$CONFIG_FB_CT65550" = "m" -o "$CONFIG_FB_PM2" = "m" -o \
"$CONFIG_FB_SA1100" = "m" ]; then
define_tristate CONFIG_FBCON_CFB8 m
fi
fi
if [ "$CONFIG_FB_ATARI" = "y" -o "$CONFIG_FB_PM3" = "y" -o \
"$CONFIG_FB_SIS" = "y" -o "$CONFIG_FB_PVR2" = "y" -o \
"$CONFIG_FB_TRIDENT" = "y" -o "$CONFIG_FB_TBOX" = "y" -o \
"$CONFIG_FB_VOODOO1" = "y" -o "$CONFIG_FB_RADEON" = "y" -o \
"$CONFIG_FB_CONTROL" = "y" -o "$CONFIG_FB_CLGEN" = "y" -o \
"$CONFIG_FB_VIRGE" = "y" -o "$CONFIG_FB_CYBER" = "y" -o \
"$CONFIG_FB_VALKYRIE" = "y" -o "$CONFIG_FB_PLATINUM" = "y" -o \
"$CONFIG_FB_CT65550" = "y" -o "$CONFIG_FB_MATROX" = "y" -o \
"$CONFIG_FB_PM2" = "y" -o "$CONFIG_FB_CYBER2000" = "y" -o \
"$CONFIG_FB_SA1100" = "y" ]; then
define_tristate CONFIG_FBCON_CFB16 y
else
if [ "$CONFIG_FB_ATARI" = "m" -o "$CONFIG_FB_SIS" = "m" -o \
"$CONFIG_FB_RADEON" = "m" -o "$CONFIG_FB_PVR2" = "m" -o \
"$CONFIG_FB_TRIDENT" = "m" -o "$CONFIG_FB_TBOX" = "m" -o \
"$CONFIG_FB_VOODOO1" = "m" -o "$CONFIG_FB_PM3" = "m" -o \
"$CONFIG_FB_CONTROL" = "m" -o "$CONFIG_FB_CLGEN" = "m" -o \
"$CONFIG_FB_VIRGE" = "m" -o "$CONFIG_FB_CYBER" = "m" -o \
"$CONFIG_FB_VALKYRIE" = "m" -o "$CONFIG_FB_PLATINUM" = "m" -o \
"$CONFIG_FB_CT65550" = "m" -o "$CONFIG_FB_MATROX" = "m" -o \
"$CONFIG_FB_PM2" = "m" -o "$CONFIG_FB_CYBER2000" = "m" -o \
"$CONFIG_FB_SA1100" = "y" ]; then
define_tristate CONFIG_FBCON_CFB16 m
fi
fi
if [ "$CONFIG_FB_CYBER2000" = "y" -o "$CONFIG_FB_VOODOO1" = "y" -o \
"$CONFIG_FB_CLGEN" = "y" -o "$CONFIG_FB_PVR2" = "y" -o \
"$CONFIG_FB_MATROX" = "y" -o "$CONFIG_FB_PM2" = "y" -o \
......@@ -326,25 +242,6 @@ if [ "$CONFIG_FB" = "y" ]; then
define_tristate CONFIG_FBCON_CFB24 m
fi
fi
if [ "$CONFIG_FB_ATARI" = "y" -o "$CONFIG_FB_RADEON" = "y" -o \
"$CONFIG_FB_VOODOO1" = "y" -o "$CONFIG_FB_TRIDENT" = "y" -o \
"$CONFIG_FB_CONTROL" = "y" -o "$CONFIG_FB_CLGEN" = "y" -o \
"$CONFIG_FB_TGA" = "y" -o "$CONFIG_FB_PLATINUM" = "y" -o \
"$CONFIG_FB_MATROX" = "y" -o "$CONFIG_FB_PM2" = "y" -o \
"$CONFIG_FB_PVR2" = "y" -o "$CONFIG_FB_PM3" = "y" -o \
"$CONFIG_FB_SIS" = "y" ]; then
define_tristate CONFIG_FBCON_CFB32 y
else
if [ "$CONFIG_FB_ATARI" = "m" -o "$CONFIG_FB_RADEON" = "m" -o \
"$CONFIG_FB_VOODOO1" = "m" -o "$CONFIG_FB_TRIDENT" = "m" -o \
"$CONFIG_FB_CONTROL" = "m" -o "$CONFIG_FB_CLGEN" = "m" -o \
"$CONFIG_FB_TGA" = "m" -o "$CONFIG_FB_PLATINUM" = "m" -o \
"$CONFIG_FB_MATROX" = "m" -o "$CONFIG_FB_PM2" = "m" -o \
"$CONFIG_FB_SIS" = "m" -o "$CONFIG_FB_PVR2" = "m" -o \
"$CONFIG_FB_PM3" = "m" ]; then
define_tristate CONFIG_FBCON_CFB32 m
fi
fi
if [ "$CONFIG_FB_NEOMAGIC" = "y" -o "$CONFIG_FB_VESA" = "y" -o \
"$CONFIG_FB_FM2" = "y" -o "$CONFIG_FB_HIT" = "y" -o \
"$CONFIG_FB_HP300" = "y" -o "$CONFIG_FB_Q40" = "y" -o \
......
......@@ -106,7 +106,6 @@ 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_MFB) += fbcon-mfb.o
obj-$(CONFIG_FBCON_HGA) += fbcon-hga.o
obj-$(CONFIG_FBCON_STI) += fbcon-sti.o
obj-$(CONFIG_FBCON_ACCEL) += fbcon-accel.o
......
......@@ -62,7 +62,6 @@ anakinfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
static struct fb_ops anakinfb_ops = {
.owner = THIS_MODULE,
.fb_set_var = gen_set_var,
.fb_setcolreg = anakinfb_setcolreg,
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
......
......@@ -146,11 +146,11 @@ static int atyfb_check_var(struct fb_var_screeninfo *var,
static int atyfb_set_par(struct fb_info *info);
static int atyfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
u_int transp, struct fb_info *info);
static int atyfb_pan_display(struct fb_var_screeninfo *var, int con,
static int atyfb_pan_display(struct fb_var_screeninfo *var,
struct fb_info *info);
static int atyfb_blank(int blank, struct fb_info *info);
static int atyfb_ioctl(struct inode *inode, struct file *file, u_int cmd,
u_long arg, int con, struct fb_info *info);
u_long arg, struct fb_info *info);
extern void atyfb_fillrect(struct fb_info *info, struct fb_fillrect *rect);
extern void atyfb_copyarea(struct fb_info *info, struct fb_copyarea *area);
extern void atyfb_imageblit(struct fb_info *info, struct fb_image *image);
......@@ -195,17 +195,10 @@ int atyfb_init(void);
int atyfb_setup(char *);
#endif
int gen_get_var(struct fb_var_screeninfo *var, int con, struct fb_info *info)
{
*var = info->var;
return 0;
}
static struct fb_ops atyfb_ops = {
.owner = THIS_MODULE,
.fb_open = atyfb_open,
.fb_release = atyfb_release,
.fb_set_var = gen_set_var,
.fb_check_var = atyfb_check_var,
.fb_set_par = atyfb_set_par,
.fb_setcolreg = atyfb_setcolreg,
......@@ -1002,7 +995,7 @@ static int atyfb_release(struct fb_info *info, int user)
* This call looks only at xoffset, yoffset and the FB_VMODE_YWRAP flag
*/
static int atyfb_pan_display(struct fb_var_screeninfo *var, int con,
static int atyfb_pan_display(struct fb_var_screeninfo *var,
struct fb_info *info)
{
struct atyfb_par *par = (struct atyfb_par *) info->par;
......@@ -1044,7 +1037,7 @@ struct atyclk {
#endif
static int atyfb_ioctl(struct inode *inode, struct file *file, u_int cmd,
u_long arg, int con, struct fb_info *info)
u_long arg, struct fb_info *info)
{
#if defined(__sparc__) || (defined(DEBUG) && defined(CONFIG_FB_ATY_CT))
struct atyfb_par *par = (struct atyfb_par *) info->par;
......@@ -1829,9 +1822,7 @@ static int __init aty_init(struct fb_info *info, const char *name)
info->node = NODEV;
info->fbops = &atyfb_ops;
info->pseudo_palette = pseudo_palette;
info->currcon = -1;
strcpy(info->fontname, fontname);
info->updatevar = gen_update_var;
info->flags = FBINFO_FLAG_DEFAULT;
#ifdef CONFIG_PMAC_BACKLIGHT
......@@ -1956,9 +1947,6 @@ static int __init aty_init(struct fb_info *info, const char *name)
fb_alloc_cmap(&info->cmap, 256, 0);
var.activate = FB_ACTIVATE_NOW;
gen_set_var(&var, -1, info);
if (register_framebuffer(info) < 0)
return 0;
......
......@@ -7,8 +7,6 @@
#include <asm/io.h>
#include <video/fbcon.h>
#include <video/mach64.h>
#include "atyfb.h"
......
......@@ -11,8 +11,6 @@
#include <asm/io.h>
#include <asm/uaccess.h>
#include <video/fbcon.h>
#ifdef __sparc__
#include <asm/pbm.h>
#include <asm/fbio.h>
......
......@@ -9,8 +9,6 @@
#include <asm/io.h>
#include <video/fbcon.h>
#include <video/mach64.h>
#include "atyfb.h"
......
......@@ -194,7 +194,6 @@ static struct fb_ops clps7111fb_ops = {
.owner = THIS_MODULE,
.fb_check_var = clps7111fb_check_var,
.fb_set_par = clps7111fb_set_par,
.fb_set_var = gen_set_var,
.fb_setcolreg = clps7111fb_setcolreg,
.fb_blank = clps7111fb_blank,
.fb_fillrect = cfb_fillrect,
......@@ -322,7 +321,6 @@ int __init clps711xfb_init(void)
clps_writeb(clps_readb(PDDR) | EDB_PD3_LCDBL, PDDR);
}
gen_set_var(&cfb->var, -1, cfb);
err = register_framebuffer(cfb);
out: return err;
......
......@@ -117,7 +117,6 @@ static void dnfb_copyarea(struct fb_info *info, struct fb_copyarea *area);
static struct fb_ops dn_fb_ops = {
.owner = THIS_MODULE,
.fb_set_var = gen_set_var,
.fb_blank = dnfb_blank,
.fb_fillrect = cfb_fillrect,
.fb_copyarea = dnfb_copyarea,
......
......@@ -335,14 +335,14 @@ int set_all_vcs(int fbidx, struct fb_ops *fb, struct fb_var_screeninfo *var,
int unit, err;
var->activate |= FB_ACTIVATE_TEST;
err = fb->fb_set_var(var, PROC_CONSOLE(info), info);
err = gen_set_var(var, PROC_CONSOLE(info), info);
var->activate &= ~FB_ACTIVATE_TEST;
gen_set_disp(PROC_CONSOLE(info), info);
if (err)
return err;
for (unit = 0; unit < MAX_NR_CONSOLES; unit++)
if (fb_display[unit].conp && con2fb_map[unit] == fbidx) {
fb->fb_set_var(var, unit, info);
gen_set_var(var, unit, info);
gen_set_disp(unit, info);
}
return 0;
......@@ -503,7 +503,6 @@ static const char *fbcon_startup(void)
return display_desc;
}
static void fbcon_init(struct vc_data *conp, int init)
{
int unit = conp->vc_num;
......@@ -512,6 +511,10 @@ static void fbcon_init(struct vc_data *conp, int init)
/* on which frame buffer will we open this console? */
info = registered_fb[(int)con2fb_map[unit]];
/* We trust the mode the driver supplies. */
if (info->fbops->fb_set_par)
info->fbops->fb_set_par(info);
gen_set_disp(unit, info);
DPRINTK("mode: %s\n",info->modename);
DPRINTK("visual: %d\n",info->fix.visual);
......@@ -991,7 +994,7 @@ static __inline__ void ywrap_up(int unit, struct vc_data *conp,
info->var.xoffset = 0;
info->var.yoffset = p->yscroll*fontheight(p);
info->var.vmode |= FB_VMODE_YWRAP;
info->updatevar(unit, info);
gen_update_var(unit, info);
scrollback_max += count;
if (scrollback_max > scrollback_phys_max)
scrollback_max = scrollback_phys_max;
......@@ -1009,7 +1012,7 @@ static __inline__ void ywrap_down(int unit, struct vc_data *conp,
info->var.xoffset = 0;
info->var.yoffset = p->yscroll*fontheight(p);
info->var.vmode |= FB_VMODE_YWRAP;
info->updatevar(unit, info);
gen_update_var(unit, info);
scrollback_max -= count;
if (scrollback_max < 0)
scrollback_max = 0;
......@@ -1030,7 +1033,7 @@ static __inline__ void ypan_up(int unit, struct vc_data *conp,
info->var.xoffset = 0;
info->var.yoffset = p->yscroll*fontheight(p);
info->var.vmode &= ~FB_VMODE_YWRAP;
info->updatevar(unit, info);
gen_update_var(unit, info);
if (p->dispsw->clear_margins)
p->dispsw->clear_margins(conp, p, 1);
scrollback_max += count;
......@@ -1054,7 +1057,7 @@ static __inline__ void ypan_down(int unit, struct vc_data *conp,
info->var.xoffset = 0;
info->var.yoffset = p->yscroll*fontheight(p);
info->var.vmode &= ~FB_VMODE_YWRAP;
info->updatevar(unit, info);
gen_update_var(unit, info);
if (p->dispsw->clear_margins)
p->dispsw->clear_margins(conp, p, 1);
scrollback_max -= count;
......@@ -2145,7 +2148,7 @@ static int fbcon_scrolldelta(struct vc_data *conp, int lines)
offset -= limit;
info->var.xoffset = 0;
info->var.yoffset = offset*fontheight(p);
info->updatevar(unit, info);
gen_update_var(unit, info);
if (!scrollback_current)
fbcon_cursor(conp, CM_DRAW);
return 0;
......@@ -2268,154 +2271,6 @@ static int __init fbcon_show_logo( void )
image.dx = x;
info->fbops->fb_imageblit(info, &image);
done = 1;
#else
#if defined(CONFIG_FBCON_CFB16) || defined(CONFIG_FBCON_CFB24) || \
defined(CONFIG_FBCON_CFB32) || defined(CONFIG_FB_SBUS)
if (info->fix.visual == FB_VISUAL_DIRECTCOLOR) {
unsigned int val; /* max. depth 32! */
int bdepth;
int redshift, greenshift, blueshift;
/* Bug: Doesn't obey msb_right ... (who needs that?) */
redshift = info->var.red.offset;
greenshift = info->var.green.offset;
blueshift = info->var.blue.offset;
if (depth >= 24 && (depth % 8) == 0) {
/* have at least 8 bits per color */
src = logo;
bdepth = depth/8;
for( y1 = 0; y1 < LOGO_H; y1++ ) {
dst = fb + y1*line + x*bdepth;
for( x1 = 0; x1 < LOGO_W; x1++, src++ ) {
val = (*src << redshift) |
(*src << greenshift) |
(*src << blueshift);
if (bdepth == 4 && !((long)dst & 3)) {
/* Some cards require 32bit access */
fb_writel (val, dst);
dst += 4;
} else if (bdepth == 2 && !((long)dst & 1)) {
/* others require 16bit access */
fb_writew (val,dst);
dst +=2;
} else {
#ifdef __LITTLE_ENDIAN
for( i = 0; i < bdepth; ++i )
#else
for( i = bdepth-1; i >= 0; --i )
#endif
fb_writeb (val >> (i*8), dst++);
}
}
}
}
else if (depth >= 12 && depth <= 23) {
/* have 4..7 bits per color, using 16 color image */
unsigned int pix;
src = linux_logo16;
bdepth = (depth+7)/8;
for( y1 = 0; y1 < LOGO_H; y1++ ) {
dst = fb + y1*line + x*bdepth;
for( x1 = 0; x1 < LOGO_W/2; x1++, src++ ) {
pix = *src >> 4; /* upper nibble */
val = (pix << redshift) |
(pix << greenshift) |
(pix << blueshift);
#ifdef __LITTLE_ENDIAN
for( i = 0; i < bdepth; ++i )
#else
for( i = bdepth-1; i >= 0; --i )
#endif
fb_writeb (val >> (i*8), dst++);
pix = *src & 0x0f; /* lower nibble */
val = (pix << redshift) |
(pix << greenshift) |
(pix << blueshift);
#ifdef __LITTLE_ENDIAN
for( i = 0; i < bdepth; ++i )
#else
for( i = bdepth-1; i >= 0; --i )
#endif
fb_writeb (val >> (i*8), dst++);
}
}
}
done = 1;
}
#endif
#if defined(CONFIG_FBCON_CFB16) || defined(CONFIG_FBCON_CFB24) || \
defined(CONFIG_FBCON_CFB32) || defined(CONFIG_FB_SBUS)
if ((depth % 8 == 0) && (info->fix.visual == FB_VISUAL_TRUECOLOR)) {
/* Modes without color mapping, needs special data transformation... */
unsigned int val; /* max. depth 32! */
int bdepth = depth/8;
unsigned char mask[9] = { 0,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff };
unsigned char redmask, greenmask, bluemask;
int redshift, greenshift, blueshift;
/* Bug: Doesn't obey msb_right ... (who needs that?) */
redmask = mask[info->var.red.length < 8 ? info->var.red.length : 8];
greenmask = mask[info->var.green.length < 8 ? info->var.green.length : 8];
bluemask = mask[info->var.blue.length < 8 ? info->var.blue.length : 8];
redshift = info->var.red.offset - (8 - info->var.red.length);
greenshift = info->var.green.offset - (8 - info->var.green.length);
blueshift = info->var.blue.offset - (8 - info->var.blue.length);
src = logo;
for( y1 = 0; y1 < LOGO_H; y1++ ) {
dst = fb + y1*line + x*bdepth;
for( x1 = 0; x1 < LOGO_W; x1++, src++ ) {
val = safe_shift((linux_logo_red[*src-32] & redmask), redshift) |
safe_shift((linux_logo_green[*src-32] & greenmask), greenshift) |
safe_shift((linux_logo_blue[*src-32] & bluemask), blueshift);
if (bdepth == 4 && !((long)dst & 3)) {
/* Some cards require 32bit access */
fb_writel (val, dst);
dst += 4;
} else if (bdepth == 2 && !((long)dst & 1)) {
/* others require 16bit access */
fb_writew (val,dst);
dst +=2;
} else {
#ifdef __LITTLE_ENDIAN
for( i = 0; i < bdepth; ++i )
#else
for( i = bdepth-1; i >= 0; --i )
#endif
fb_writeb (val >> (i*8), dst++);
}
}
}
done = 1;
}
#endif
#if defined(CONFIG_FBCON_CFB4)
if (depth == 4 && info->fix.type == FB_TYPE_PACKED_PIXELS) {
src = logo;
for( y1 = 0; y1 < LOGO_H; y1++) {
dst = fb + y1*line + x/2;
for( x1 = 0; x1 < LOGO_W/2; x1++) {
u8 q = *src++;
q = (q << 4) | (q >> 4);
fb_writeb (q, dst++);
}
}
done = 1;
}
#endif
#if defined(CONFIG_FBCON_CFB8) || defined(CONFIG_FB_SBUS)
if (depth == 8 && info->fix.type == FB_TYPE_PACKED_PIXELS) {
/* depth 8 or more, packed, with color registers */
src = logo;
for( y1 = 0; y1 < LOGO_H; y1++ ) {
dst = fb + y1*line + x;
for( x1 = 0; x1 < LOGO_W; x1++ )
fb_writeb (*src++, dst++);
}
done = 1;
}
#endif
#if defined(CONFIG_FBCON_AFB) || defined(CONFIG_FBCON_ILBM) || \
defined(CONFIG_FBCON_IPLAN2P2) || defined(CONFIG_FBCON_IPLAN2P4) || \
......@@ -2526,7 +2381,6 @@ static int __init fbcon_show_logo( void )
done = 1;
}
#endif
#endif /* CONFIG_FBCON_ACCEL */
}
if (info->fbops->fb_rasterimg)
......
......@@ -43,7 +43,7 @@ int gen_set_var(struct fb_var_screeninfo *var, int con, struct fb_info *info)
info->fbops->fb_set_par(info);
if (info->fbops->fb_pan_display)
info->fbops->fb_pan_display(&info->var, con, info);
info->fbops->fb_pan_display(&info->var, info);
fb_set_cmap(&info->cmap, 1, info);
}
}
......@@ -51,8 +51,7 @@ int gen_set_var(struct fb_var_screeninfo *var, int con, struct fb_info *info)
return 0;
}
int fbgen_pan_display(struct fb_var_screeninfo *var, int con,
struct fb_info *info)
int fbgen_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
{
int xoffset = var->xoffset;
int yoffset = var->yoffset;
......@@ -62,12 +61,11 @@ int fbgen_pan_display(struct fb_var_screeninfo *var, int con,
xoffset + info->var.xres > info->var.xres_virtual ||
yoffset + info->var.yres > info->var.yres_virtual)
return -EINVAL;
if (con == info->currcon) {
if (info->fbops->fb_pan_display) {
if ((err = info->fbops->fb_pan_display(var, con, info)))
if (info->fbops->fb_pan_display) {
if ((err = info->fbops->fb_pan_display(var, info)))
return err;
} else
return -EINVAL;
else
return -EINVAL;
}
info->var.xoffset = var->xoffset;
info->var.yoffset = var->yoffset;
......@@ -87,7 +85,7 @@ int gen_update_var(int con, struct fb_info *info)
if (con == info->currcon) {
if (info->fbops->fb_pan_display) {
if ((err = info->fbops->fb_pan_display(&info->var, con, info)))
if ((err = info->fbops->fb_pan_display(&info->var, info)))
return err;
}
}
......
......@@ -377,7 +377,7 @@ static int fbmem_read_proc(char *buf, char **start, off_t offset,
if (*fi)
clen += sprintf(buf + clen, "%d %s\n",
GET_FB_IDX((*fi)->node),
(*fi)->modename);
(*fi)->fix.id);
*start = buf + offset;
if (clen > offset)
clen -= offset;
......@@ -485,7 +485,7 @@ fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
i = set_all_vcs(fbidx, fb, &var, info);
if (i) return i;
} else {
i = fb->fb_set_var(&var, PROC_CONSOLE(info), info);
i = gen_set_var(&var, PROC_CONSOLE(info), info);
if (i) return i;
gen_set_disp(PROC_CONSOLE(info), info);
}
......@@ -507,7 +507,7 @@ fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
return -EFAULT;
if (fb->fb_pan_display == NULL)
return (var.xoffset || var.yoffset) ? -EINVAL : 0;
if ((i=fb->fb_pan_display(&var, PROC_CONSOLE(info), info)))
if ((i=fb->fb_pan_display(&var, info)))
return i;
if (copy_to_user((void *) arg, &var, sizeof(var)))
return -EFAULT;
......@@ -547,8 +547,7 @@ fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
default:
if (fb->fb_ioctl == NULL)
return -EINVAL;
return fb->fb_ioctl(inode, file, cmd, arg, PROC_CONSOLE(info),
info);
return fb->fb_ioctl(inode, file, cmd, arg, info);
}
}
......
......@@ -173,7 +173,6 @@ static int fm2fb_blank(int blank, struct fb_info *info);
static struct fb_ops fm2fb_ops = {
.owner = THIS_MODULE,
.fb_set_var = gen_set_var,
.fb_setcolreg = fm2fb_setcolreg,
.fb_blank = fm2fb_blank,
.fb_fillrect = cfb_fillrect,
......
......@@ -31,8 +31,6 @@
#include <asm/io.h>
#include <asm/jazz.h>
#include <video/fbcon.h>
/*
* Various defines for the G364
*/
......@@ -108,7 +106,7 @@ static struct fb_var_screeninfo fb_var __initdata = {
*/
int g364fb_init(void);
static int g364fb_pan_display(struct fb_var_screeninfo *var, int con,
static int g364fb_pan_display(struct fb_var_screeninfo *var,
struct fb_info *info);
static int g364fb_setcolreg(u_int regno, u_int red, u_int green,
u_int blue, u_int transp,
......@@ -117,7 +115,6 @@ static int g364fb_blank(int blank, struct fb_info *info);
static struct fb_ops g364fb_ops = {
.owner = THIS_MODULE,
.fb_set_var = gen_set_var,
.fb_setcolreg = g364fb_setcolreg,
.fb_pan_display = g364fb_pan_display,
.fb_blank = g364fb_blank,
......@@ -148,7 +145,7 @@ void fbcon_g364fb_cursor(struct display *p, int mode, int x, int y)
*
* This call looks only at xoffset, yoffset and the FB_VMODE_YWRAP flag
*/
static int g364fb_pan_display(struct fb_var_screeninfo *var, int con,
static int g364fb_pan_display(struct fb_var_screeninfo *var,
struct fb_info *info)
{
if (var->xoffset || var->yoffset + var->yres > var->yres_virtual)
......
......@@ -122,7 +122,6 @@ static int hitfb_setcolreg(unsigned regno, unsigned red, unsigned green,
static struct fb_ops hitfb_ops = {
.owner = THIS_MODULE,
.fb_set_var = gen_set_var,
.fb_check_var = hitfb_check_var,
.fb_set_par = hitfb_set_par,
.fb_setcolreg = hitfb_setcolreg,
......@@ -167,8 +166,6 @@ int __init hitfb_init(void)
size = (fb_info.var.bits_per_pixel == 8) ? 256 : 16;
fb_alloc_cmap(&fb_info.cmap, size, 0);
gen_set_var(&fb_info.var, -1, &fb_info);
if (register_framebuffer(&fb_info) < 0)
return -EINVAL;
......
......@@ -101,7 +101,6 @@ void hpfb_copyarea(struct fb_info *info, struct fb_copyarea *area)
static struct fb_ops hpfb_ops = {
.owner = THIS_MODULE,
.fb_set_var = gen_set_var,
.fb_setcolreg = hpfb_setcolreg,
.fb_fillrect = cfb_fillrect,
.fb_copyarea = hpfb_copyarea,
......
......@@ -222,7 +222,7 @@ static int dafb_setpalette (unsigned int regno, unsigned int red,
local_irq_save(flags);
/* fbcon will set an entire colourmap, but X won't. Hopefully
/* fbdev will set an entire colourmap, but X won't. Hopefully
this should accomodate both of them */
if (regno != lastreg+1) {
int i;
......@@ -585,7 +585,6 @@ static int macfb_setcolreg(unsigned regno, unsigned red, unsigned green,
static struct fb_ops macfb_ops = {
.owner = THIS_MODULE,
.fb_set_var = gen_set_var,
.fb_setcolreg = macfb_setcolreg,
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
......@@ -951,8 +950,6 @@ void __init macfb_init(void)
fb_info.fbops = &macfb_ops;
fb_info.var = macfb_defined;
fb_info.fix = macfb_fix;
fb_info.currcon = -1;
fb_info.updatevar = gen_update_var;
fb_info.pseudo_palette = pseudo_palette;
fb_info.flags = FBINFO_FLAG_DEFAULT;
......
......@@ -111,7 +111,6 @@ static int maxinefb_setcolreg(unsigned regno, unsigned red, unsigned green,
static struct fb_ops maxinefb_ops = {
.owner = THIS_MODULE,
.fb_set_var = gen_set_var,
.fb_setcolreg = maxinefb_setcolreg,
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
......@@ -158,8 +157,6 @@ int __init maxinefb_init(void)
fb_info.screen_base = (char *) maxinefb_fix.smem_start;
fb_info.var = maxinefb_defined;
fb_info.fix = maxinefb_fix;
fb_info.currcon = -1;
fb_info.updatevar = gen_update_var;
fb_info.flags = FBINFO_FLAG_DEFAULT;
fb_alloc_cmap(&fb_info.cmap, 256, 0);
......
......@@ -16,8 +16,6 @@
#include <linux/fb.h>
#include <linux/sched.h>
#include <video/fbcon.h>
#undef DEBUG
#define name_matches(v, s, l) \
......@@ -277,7 +275,7 @@ static int __init my_atoi(const char *name)
int __fb_try_mode(struct fb_var_screeninfo *var, struct fb_info *info,
const struct fb_videomode *mode, unsigned int bpp)
{
int err;
int err = 1;
DPRINTK("Trying mode %s %dx%d-%d@%d\n", mode->name ? mode->name : "noname",
mode->xres, mode->yres, bpp, mode->refresh);
......@@ -298,9 +296,9 @@ int __fb_try_mode(struct fb_var_screeninfo *var, struct fb_info *info,
var->vsync_len = mode->vsync_len;
var->sync = mode->sync;
var->vmode = mode->vmode;
err = info->fbops->fb_set_var(var, PROC_CONSOLE(info), info);
if (info->fbops->fb_check_var)
err = info->fbops->fb_check_var(var, info);
var->activate &= ~FB_ACTIVATE_TEST;
gen_set_disp(PROC_CONSOLE(info), info);
return !err;
}
......
......@@ -1164,10 +1164,9 @@ static void neofb_update_start(struct fb_info *info,
/*
* Pan or Wrap the Display
*/
static int neofb_pan_display(struct fb_var_screeninfo *var, int con,
struct fb_info *fb)
static int neofb_pan_display(struct fb_var_screeninfo *var,
struct fb_info *info)
{
struct fb_info *info = (struct fb_info *) fb;
u_int y_bottom;
y_bottom = var->yoffset;
......@@ -1388,7 +1387,6 @@ static struct fb_ops neofb_ops = {
.owner = THIS_MODULE,
.fb_check_var = neofb_check_var,
.fb_set_par = neofb_set_par,
.fb_set_var = gen_set_var,
.fb_setcolreg = neofb_setcolreg,
.fb_pan_display = neofb_pan_display,
.fb_blank = neofb_blank,
......@@ -1758,7 +1756,6 @@ static struct fb_info *__devinit neo_alloc_fb_info(struct pci_dev *dev, const st
par = &default_par;
memset(par, 0, sizeof(struct neofb_par));
info->currcon = -1;
info->fix.accel = id->driver_data;
par->pci_burst = !nopciburst;
......
......@@ -24,7 +24,6 @@
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/fb.h>
#include <linux/selection.h>
#include <linux/init.h>
#include <linux/ioport.h>
#include <asm/io.h>
......@@ -82,7 +81,6 @@ static void offb_init_fb(const char *name, const char *full_name,
static struct fb_ops offb_ops = {
.owner = THIS_MODULE,
.fb_set_var = gen_set_var,
.fb_setcolreg = offb_setcolreg,
.fb_blank = offb_blank,
.fb_fillrect = cfb_fillrect,
......
......@@ -108,7 +108,6 @@ static int pmagbafb_setcolreg(unsigned regno, unsigned red, unsigned green,
static struct fb_ops pmagbafb_ops = {
.owner = THIS_MODULE,
.fb_set_var = gen_set_var,
.fb_setcolreg = pmagbafb_setcolreg,
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
......@@ -140,8 +139,6 @@ int __init pmagbafb_init_one(int slot)
info->var = pmagbafb_defined;
info->fix = pmagbafb_fix;
info->screen_base = pmagbafb_fix.smem_start;
info->currcon = -1;
info->updatevar = gen_update_var;
info->flags = FBINFO_FLAG_DEFAULT;
fb_alloc_cmap(&fb_info.cmap, 256, 0);
......
......@@ -111,7 +111,6 @@ static int pmagbbfb_setcolreg(unsigned regno, unsigned red, unsigned green,
static struct fb_ops pmagbbfb_ops = {
.owner = THIS_MODULE,
.fb_set_var = gen_set_var,
.fb_setcolreg = pmagbbfb_setcolreg,
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
......@@ -143,8 +142,6 @@ int __init pmagbbfb_init_one(int slot)
info->var = pmagbbfb_defined;
info->fix = pmagbbfb_fix;
info->screen_base = pmagbbfb_fix.smem_start;
info->currcon = -1;
info->updatevar = gen_update_var;
info->flags = FBINFO_FLAG_DEFAULT;
fb_alloc_cmap(&fb_info.cmap, 256, 0);
......
......@@ -66,7 +66,6 @@ static int q40fb_setcolreg(unsigned regno, unsigned red, unsigned green,
static struct fb_ops q40fb_ops = {
.owner = THIS_MODULE,
.fb_set_var = gen_set_var,
.fb_setcolreg = q40fb_setcolreg,
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
......
......@@ -729,8 +729,7 @@ int __init sgivwfb_init(void)
goto fail_ioremap_fbmem;
}
/* turn on default video mode */
gen_set_var(&fb_info->var, -1, &fb_info);
fb_alloc_cmap(&fb_info.cmap, 256, 0);
if (register_framebuffer(&fb_info) < 0) {
printk(KERN_ERR
......
......@@ -295,7 +295,7 @@ static int xxxfb_setcolreg(unsigned regno, unsigned red, unsigned green,
* Returns negative errno on error, or zero on success.
*
*/
static int xxxfb_pan_display(struct fb_var_screeninfo *var, int con,
static int xxxfb_pan_display(struct fb_var_screeninfo *var,
const struct fb_info *info)
{
/* ... */
......@@ -497,9 +497,6 @@ static struct fb_ops xxxfb_ops = {
.owner = THIS_MODULE,
.fb_open = xxxfb_open, /* only if you need it to do something */
.fb_release = xxxfb_release, /* only if you need it to do something */
/* Stuff to go away. Use generic functions for now */
.fb_set_var = gen_set_var,
.fb_check_var = xxxfb_check_var,
.fb_set_par = xxxfb_set_par, /* optional */
.fb_setcolreg = xxxfb_setcolreg,
......
......@@ -77,7 +77,6 @@
#include <linux/spinlock.h>
#include <video/tdfx.h>
#include <video/fbcon.h>
#undef TDFXFB_DEBUG
#ifdef TDFXFB_DEBUG
......@@ -143,10 +142,10 @@ static struct pci_device_id tdfxfb_id_table[] __devinitdata = {
};
static struct pci_driver tdfxfb_driver = {
.name = "tdfxfb",
.id_table = tdfxfb_id_table,
.probe = tdfxfb_probe,
.remove = __devexit_p(tdfxfb_remove),
.name = "tdfxfb",
.id_table = tdfxfb_id_table,
.probe = tdfxfb_probe,
.remove = __devexit_p(tdfxfb_remove),
};
MODULE_DEVICE_TABLE(pci, tdfxfb_id_table);
......@@ -162,14 +161,13 @@ static int tdfxfb_set_par(struct fb_info *info);
static int tdfxfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
u_int transp, struct fb_info *info);
static int tdfxfb_blank(int blank, struct fb_info *info);
static int tdfxfb_pan_display(struct fb_var_screeninfo *var, int con, struct fb_info *info);
static int tdfxfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info);
static void tdfxfb_fillrect(struct fb_info *info, struct fb_fillrect *rect);
static void tdfxfb_copyarea(struct fb_info *info, struct fb_copyarea *area);
static void tdfxfb_imageblit(struct fb_info *info, struct fb_image *image);
static struct fb_ops tdfxfb_ops = {
.owner = THIS_MODULE,
.fb_set_var = gen_set_var,
.fb_check_var = tdfxfb_check_var,
.fb_set_par = tdfxfb_set_par,
.fb_setcolreg = tdfxfb_setcolreg,
......@@ -184,8 +182,8 @@ static struct fb_ops tdfxfb_ops = {
* do_xxx: Hardware-specific functions
*/
static u32 do_calc_pll(int freq, int *freq_out);
static void do_write_regs(struct banshee_reg *reg);
static unsigned long do_lfb_size(unsigned short);
static void do_write_regs(struct tdfx_par *par, struct banshee_reg *reg);
static unsigned long do_lfb_size(struct tdfx_par *par, unsigned short);
/*
* Driver data
......@@ -229,77 +227,77 @@ static inline void vga_outl(struct tdfx_par *par, u32 reg, u32 val) {
#endif
static inline void gra_outb(struct tdfx_par *par, u32 idx, u8 val) {
vga_outb(GRA_I, idx); vga_outb(GRA_D, val);
vga_outb(par, GRA_I, idx); vga_outb(par, GRA_D, val);
}
static inline u8 gra_inb(struct tdfx_par *par, u32 idx) {
vga_outb(GRA_I, idx); return vga_inb(GRA_D);
vga_outb(par, GRA_I, idx); return vga_inb(par, GRA_D);
}
static inline void seq_outb(struct tdfx_par *par, u32 idx, u8 val) {
vga_outb(SEQ_I, idx); vga_outb(SEQ_D, val);
vga_outb(par, SEQ_I, idx); vga_outb(par, SEQ_D, val);
}
static inline u8 seq_inb(struct tdfx_par *par, u32 idx) {
vga_outb(SEQ_I, idx); return vga_inb(SEQ_D);
vga_outb(par, SEQ_I, idx); return vga_inb(par, SEQ_D);
}
static inline void crt_outb(struct tdfx_par *par, u32 idx, u8 val) {
vga_outb(CRT_I, idx); vga_outb(CRT_D, val);
vga_outb(par, CRT_I, idx); vga_outb(par, CRT_D, val);
}
static inline u8 crt_inb(struct tdfx_par *par, u32 idx) {
vga_outb(CRT_I, idx); return vga_inb(CRT_D);
vga_outb(par, CRT_I, idx); return vga_inb(par, CRT_D);
}
static inline void att_outb(struct tdfx_par *par, u32 idx, u8 val)
{
unsigned char tmp;
tmp = vga_inb(IS1_R);
vga_outb(ATT_IW, idx);
vga_outb(ATT_IW, val);
tmp = vga_inb(par, IS1_R);
vga_outb(par, ATT_IW, idx);
vga_outb(par, ATT_IW, val);
}
static inline u8 att_inb(struct tdfx_par *par, u32 idx)
{
unsigned char tmp;
tmp = vga_inb(IS1_R);
vga_outb(ATT_IW, idx);
return vga_inb(ATT_IW);
tmp = vga_inb(par, IS1_R);
vga_outb(par, ATT_IW, idx);
return vga_inb(par, ATT_IW);
}
static inline void vga_disable_video(void)
static inline void vga_disable_video(struct tdfx_par *par)
{
unsigned char s;
s = seq_inb(0x01) | 0x20;
seq_outb(0x00, 0x01);
seq_outb(0x01, s);
seq_outb(0x00, 0x03);
s = seq_inb(par, 0x01) | 0x20;
seq_outb(par, 0x00, 0x01);
seq_outb(par, 0x01, s);
seq_outb(par, 0x00, 0x03);
}
static inline void vga_enable_video(void)
static inline void vga_enable_video(struct tdfx_par *par)
{
unsigned char s;
s = seq_inb(0x01) & 0xdf;
seq_outb(0x00, 0x01);
seq_outb(0x01, s);
seq_outb(0x00, 0x03);
s = seq_inb(par, 0x01) & 0xdf;
seq_outb(par, 0x00, 0x01);
seq_outb(par, 0x01, s);
seq_outb(par, 0x00, 0x03);
}
static inline void vga_disable_palette(void)
static inline void vga_disable_palette(struct tdfx_par *par)
{
vga_inb(IS1_R);
vga_outb(ATT_IW, 0x00);
vga_inb(par, IS1_R);
vga_outb(par, ATT_IW, 0x00);
}
static inline void vga_enable_palette(struct tdfx_par *par)
{
vga_inb(IS1_R);
vga_outb(ATT_IW, 0x20);
vga_inb(par, IS1_R);
vga_outb(par, ATT_IW, 0x20);
}
static inline u32 tdfx_inl(struct tdfx_par *par, unsigned int reg)
......@@ -321,7 +319,7 @@ static inline void banshee_wait_idle(struct tdfx_par *par)
{
int i = 0;
banshee_make_room(1);
banshee_make_room(par, 1);
tdfx_outl(par, COMMAND_3D, COMMAND_3D_NOP);
while(1) {
......@@ -335,7 +333,7 @@ static inline void banshee_wait_idle(struct tdfx_par *par)
*/
static inline void do_setpalentry(struct tdfx_par *par, unsigned regno, u32 c)
{
banshee_make_room(2);
banshee_make_room(par, 2);
tdfx_outl(par, DACADDR, regno);
tdfx_outl(par, DACDATA, c);
}
......@@ -369,71 +367,71 @@ static u32 do_calc_pll(int freq, int* freq_out)
return (n << 8) | (m << 2) | k;
}
static void do_write_regs(struct banshee_reg* reg)
static void do_write_regs(struct tdfx_par *par, struct banshee_reg* reg)
{
int i;
banshee_wait_idle();
banshee_wait_idle(par);
tdfx_outl(MISCINIT1, tdfx_inl(MISCINIT1) | 0x01);
tdfx_outl(par, MISCINIT1, tdfx_inl(par, MISCINIT1) | 0x01);
crt_outb(0x11, crt_inb(0x11) & 0x7f); /* CRT unprotect */
crt_outb(par, 0x11, crt_inb(par, 0x11) & 0x7f); /* CRT unprotect */
banshee_make_room(3);
tdfx_outl(VGAINIT1, reg->vgainit1 & 0x001FFFFF);
tdfx_outl(VIDPROCCFG, reg->vidcfg & ~0x00000001);
banshee_make_room(par, 3);
tdfx_outl(par, VGAINIT1, reg->vgainit1 & 0x001FFFFF);
tdfx_outl(par, VIDPROCCFG, reg->vidcfg & ~0x00000001);
#if 0
tdfx_outl(PLLCTRL1, reg->mempll);
tdfx_outl(PLLCTRL2, reg->gfxpll);
tdfx_outl(par, PLLCTRL1, reg->mempll);
tdfx_outl(par, PLLCTRL2, reg->gfxpll);
#endif
tdfx_outl(PLLCTRL0, reg->vidpll);
tdfx_outl(par, PLLCTRL0, reg->vidpll);
vga_outb(MISC_W, reg->misc[0x00] | 0x01);
vga_outb(par, MISC_W, reg->misc[0x00] | 0x01);
for (i = 0; i < 5; i++)
seq_outb(i, reg->seq[i]);
seq_outb(par, i, reg->seq[i]);
for (i = 0; i < 25; i++)
crt_outb(i, reg->crt[i]);
crt_outb(par, i, reg->crt[i]);
for (i = 0; i < 9; i++)
gra_outb(i, reg->gra[i]);
gra_outb(par, i, reg->gra[i]);
for (i = 0; i < 21; i++)
att_outb(i, reg->att[i]);
att_outb(par, i, reg->att[i]);
crt_outb(0x1a, reg->ext[0]);
crt_outb(0x1b, reg->ext[1]);
crt_outb(par, 0x1a, reg->ext[0]);
crt_outb(par, 0x1b, reg->ext[1]);
vga_enable_palette();
vga_enable_video();
vga_enable_palette(par);
vga_enable_video(par);
banshee_make_room(11);
tdfx_outl(VGAINIT0, reg->vgainit0);
tdfx_outl(DACMODE, reg->dacmode);
tdfx_outl(VIDDESKSTRIDE, reg->stride);
tdfx_outl(HWCURPATADDR, 0);
banshee_make_room(par, 11);
tdfx_outl(par, VGAINIT0, reg->vgainit0);
tdfx_outl(par, DACMODE, reg->dacmode);
tdfx_outl(par, VIDDESKSTRIDE, reg->stride);
tdfx_outl(par, HWCURPATADDR, 0);
tdfx_outl(VIDSCREENSIZE,reg->screensize);
tdfx_outl(VIDDESKSTART, reg->startaddr);
tdfx_outl(VIDPROCCFG, reg->vidcfg);
tdfx_outl(VGAINIT1, reg->vgainit1);
tdfx_outl(MISCINIT0, reg->miscinit0);
banshee_make_room(8);
tdfx_outl(SRCBASE, reg->srcbase);
tdfx_outl(DSTBASE, reg->dstbase);
tdfx_outl(COMMANDEXTRA_2D, 0);
tdfx_outl(CLIP0MIN, 0);
tdfx_outl(CLIP0MAX, 0x0fff0fff);
tdfx_outl(CLIP1MIN, 0);
tdfx_outl(CLIP1MAX, 0x0fff0fff);
tdfx_outl(SRCXY, 0);
banshee_wait_idle();
tdfx_outl(par, VIDSCREENSIZE,reg->screensize);
tdfx_outl(par, VIDDESKSTART, reg->startaddr);
tdfx_outl(par, VIDPROCCFG, reg->vidcfg);
tdfx_outl(par, VGAINIT1, reg->vgainit1);
tdfx_outl(par, MISCINIT0, reg->miscinit0);
banshee_make_room(par, 8);
tdfx_outl(par, SRCBASE, reg->srcbase);
tdfx_outl(par, DSTBASE, reg->dstbase);
tdfx_outl(par, COMMANDEXTRA_2D, 0);
tdfx_outl(par, CLIP0MIN, 0);
tdfx_outl(par, CLIP0MAX, 0x0fff0fff);
tdfx_outl(par, CLIP1MIN, 0);
tdfx_outl(par, CLIP1MAX, 0x0fff0fff);
tdfx_outl(par, SRCXY, 0);
banshee_wait_idle(par);
}
static unsigned long do_lfb_size(unsigned short dev_id)
static unsigned long do_lfb_size(struct tdfx_par *par, unsigned short dev_id)
{
u32 draminit0 = 0;
u32 draminit1 = 0;
......@@ -441,8 +439,8 @@ static unsigned long do_lfb_size(unsigned short dev_id)
u32 lfbsize = 0;
int sgram_p = 0;
draminit0 = tdfx_inl(DRAMINIT0);
draminit1 = tdfx_inl(DRAMINIT1);
draminit0 = tdfx_inl(par, DRAMINIT0);
draminit1 = tdfx_inl(par, DRAMINIT1);
if ((dev_id == PCI_DEVICE_ID_3DFX_BANSHEE) ||
(dev_id == PCI_DEVICE_ID_3DFX_VOODOO3)) {
......@@ -463,12 +461,12 @@ static unsigned long do_lfb_size(unsigned short dev_id)
lfbsize <<= 20;
}
/* disable block writes for SDRAM (why?) */
miscinit1 = tdfx_inl(MISCINIT1);
miscinit1 = tdfx_inl(par, MISCINIT1);
miscinit1 |= sgram_p ? 0 : MISCINIT1_2DBLOCK_DIS;
miscinit1 |= MISCINIT1_CLUT_INV;
banshee_make_room(1);
tdfx_outl(MISCINIT1, miscinit1);
banshee_make_room(par, 1);
tdfx_outl(par, MISCINIT1, miscinit1);
return lfbsize;
}
......@@ -706,7 +704,7 @@ static int tdfxfb_set_par(struct fb_info *info)
VGAINIT0_WAKEUP_3C3 |
VGAINIT0_ALT_READBACK |
VGAINIT0_EXTSHIFTOUT;
reg.vgainit1 = tdfx_inl(VGAINIT1) & 0x1fffff;
reg.vgainit1 = tdfx_inl(par, VGAINIT1) & 0x1fffff;
reg.cursloc = 0;
......@@ -736,7 +734,7 @@ static int tdfxfb_set_par(struct fb_info *info)
reg.screensize = info->var.xres | (info->var.yres << 12);
reg.vidcfg &= ~VIDCFG_HALF_MODE;
reg.miscinit0 = tdfx_inl(MISCINIT0);
reg.miscinit0 = tdfx_inl(par, MISCINIT0);
#if defined(__BIG_ENDIAN)
switch (info->var.bits_per_pixel) {
......@@ -755,7 +753,7 @@ static int tdfxfb_set_par(struct fb_info *info)
break;
}
#endif
do_write_regs(&reg);
do_write_regs(par, &reg);
/* Now change fb_fix_screeninfo according to changes in par */
info->fix.line_length = info->var.xres * ((info->var.bits_per_pixel + 7)>>3);
......@@ -769,6 +767,7 @@ static int tdfxfb_set_par(struct fb_info *info)
static int tdfxfb_setcolreg(unsigned regno, unsigned red, unsigned green,
unsigned blue,unsigned transp,struct fb_info *info)
{
struct tdfx_par *par = (struct tdfx_par *) info->par;
u32 rgbcol;
if (regno >= info->cmap.len) return 1;
......@@ -778,7 +777,7 @@ static int tdfxfb_setcolreg(unsigned regno, unsigned red, unsigned green,
rgbcol =(((u32)red & 0xff00) << 8) |
(((u32)green & 0xff00) << 0) |
(((u32)blue & 0xff00) >> 8);
do_setpalentry(regno, rgbcol);
do_setpalentry(par, regno, rgbcol);
break;
/* Truecolor has no hardware color palettes. */
case FB_VISUAL_TRUECOLOR:
......@@ -801,9 +800,10 @@ static int tdfxfb_setcolreg(unsigned regno, unsigned red, unsigned green,
/* 0 unblank, 1 blank, 2 no vsync, 3 no hsync, 4 off */
static int tdfxfb_blank(int blank, struct fb_info *info)
{
struct tdfx_par *par = (struct tdfx_par *) info->par;
u32 dacmode, state = 0, vgablank = 0;
dacmode = tdfx_inl(DACMODE);
dacmode = tdfx_inl(par, DACMODE);
switch (blank) {
case 0: /* Screen: On; HSync: On, VSync: On */
......@@ -830,21 +830,22 @@ static int tdfxfb_blank(int blank, struct fb_info *info)
dacmode &= ~(BIT(1) | BIT(3));
dacmode |= state;
banshee_make_room(1);
tdfx_outl(DACMODE, dacmode);
banshee_make_room(par, 1);
tdfx_outl(par, DACMODE, dacmode);
if (vgablank)
vga_disable_video();
vga_disable_video(par);
else
vga_enable_video();
vga_enable_video(par);
return 0;
}
/*
* Set the starting position of the visible screen to var->yoffset
*/
static int tdfxfb_pan_display(struct fb_var_screeninfo *var, int con,
static int tdfxfb_pan_display(struct fb_var_screeninfo *var,
struct fb_info *info)
{
struct tdfx_par *par = (struct tdfx_par *) info->par;
u32 addr;
if (nopan || var->xoffset || (var->yoffset > var->yres_virtual))
......@@ -853,8 +854,8 @@ static int tdfxfb_pan_display(struct fb_var_screeninfo *var, int con,
return -EINVAL;
addr = var->yoffset * info->fix.line_length;
banshee_make_room(1);
tdfx_outl(VIDDESKSTART, addr);
banshee_make_room(par, 1);
tdfx_outl(par, VIDDESKSTART, addr);
info->var.xoffset = var->xoffset;
info->var.yoffset = var->yoffset;
......@@ -866,6 +867,7 @@ static int tdfxfb_pan_display(struct fb_var_screeninfo *var, int con,
*/
static void tdfxfb_fillrect(struct fb_info *info, struct fb_fillrect *rect)
{
struct tdfx_par *par = (struct tdfx_par *) info->par;
u32 bpp = info->var.bits_per_pixel;
u32 stride = info->fix.line_length;
u32 fmt= stride | ((bpp+((bpp==8) ? 0 : 8)) << 13);
......@@ -876,13 +878,13 @@ static void tdfxfb_fillrect(struct fb_info *info, struct fb_fillrect *rect)
else
tdfx_rop = TDFX_ROP_XOR;
banshee_make_room(5);
tdfx_outl(DSTFORMAT, fmt);
tdfx_outl(COLORFORE, rect->color);
tdfx_outl(COMMAND_2D, COMMAND_2D_FILLRECT | (tdfx_rop << 24));
tdfx_outl(DSTSIZE, rect->width | (rect->height << 16));
tdfx_outl(LAUNCH_2D, rect->dx | (rect->dy << 16));
banshee_wait_idle();
banshee_make_room(par, 5);
tdfx_outl(par, DSTFORMAT, fmt);
tdfx_outl(par, COLORFORE, rect->color);
tdfx_outl(par, COMMAND_2D, COMMAND_2D_FILLRECT | (tdfx_rop << 24));
tdfx_outl(par, DSTSIZE, rect->width | (rect->height << 16));
tdfx_outl(par, LAUNCH_2D, rect->dx | (rect->dy << 16));
banshee_wait_idle(par);
}
/*
......@@ -890,6 +892,7 @@ static void tdfxfb_fillrect(struct fb_info *info, struct fb_fillrect *rect)
*/
static void tdfxfb_copyarea(struct fb_info *info, struct fb_copyarea *area)
{
struct tdfx_par *par = (struct tdfx_par *) info->par;
u32 bpp = info->var.bits_per_pixel;
u32 stride = info->fix.line_length;
u32 blitcmd = COMMAND_2D_S2S_BITBLT | (TDFX_ROP_COPY << 24);
......@@ -908,19 +911,20 @@ static void tdfxfb_copyarea(struct fb_info *info, struct fb_copyarea *area)
area->dy += area->height - 1;
}
banshee_make_room(6);
tdfx_outl(SRCFORMAT, fmt);
tdfx_outl(DSTFORMAT, fmt);
tdfx_outl(COMMAND_2D, blitcmd);
tdfx_outl(DSTSIZE, area->width | (area->height << 16));
tdfx_outl(DSTXY, area->dx | (area->dy << 16));
tdfx_outl(LAUNCH_2D, area->sx | (area->sy << 16));
banshee_wait_idle();
banshee_make_room(par, 6);
tdfx_outl(par, SRCFORMAT, fmt);
tdfx_outl(par, DSTFORMAT, fmt);
tdfx_outl(par, COMMAND_2D, blitcmd);
tdfx_outl(par, DSTSIZE, area->width | (area->height << 16));
tdfx_outl(par, DSTXY, area->dx | (area->dy << 16));
tdfx_outl(par, LAUNCH_2D, area->sx | (area->sy << 16));
banshee_wait_idle(par);
}
static void tdfxfb_imageblit(struct fb_info *info, struct fb_image *pixmap)
{
struct tdfx_par *par = (struct tdfx_par *) info->par;
int size = pixmap->height*((pixmap->width*pixmap->depth + 7)>>3);
int i, stride = info->fix.line_length;
u32 bpp = info->var.bits_per_pixel;
......@@ -929,25 +933,25 @@ static void tdfxfb_imageblit(struct fb_info *info, struct fb_image *pixmap)
u32 srcfmt;
if (pixmap->depth == 1) {
banshee_make_room(8 + ((size + 3) >> 2));
tdfx_outl(COLORFORE, pixmap->fg_color);
tdfx_outl(COLORBACK, pixmap->bg_color);
banshee_make_room(par, 8 + ((size + 3) >> 2));
tdfx_outl(par, COLORFORE, pixmap->fg_color);
tdfx_outl(par, COLORBACK, pixmap->bg_color);
srcfmt = 0x400000;
} else {
banshee_make_room(6 + ((size + 3) >> 2));
banshee_make_room(par, 6 + ((size + 3) >> 2));
srcfmt = stride | ((bpp+((bpp==8) ? 0 : 8)) << 13) | 0x400000;
}
tdfx_outl(SRCXY, 0);
tdfx_outl(DSTXY, pixmap->dx | (pixmap->dy << 16));
tdfx_outl(COMMAND_2D, COMMAND_2D_H2S_BITBLT | (TDFX_ROP_COPY << 24));
tdfx_outl(SRCFORMAT, srcfmt);
tdfx_outl(DSTFORMAT, dstfmt);
tdfx_outl(DSTSIZE, pixmap->width | (pixmap->height << 16));
tdfx_outl(par, SRCXY, 0);
tdfx_outl(par, DSTXY, pixmap->dx | (pixmap->dy << 16));
tdfx_outl(par, COMMAND_2D, COMMAND_2D_H2S_BITBLT | (TDFX_ROP_COPY << 24));
tdfx_outl(par, SRCFORMAT, srcfmt);
tdfx_outl(par, DSTFORMAT, dstfmt);
tdfx_outl(par, DSTSIZE, pixmap->width | (pixmap->height << 16));
/* Send four bytes at a time of data */
for (i = (size >> 2) ; i > 0; i--) {
tdfx_outl(LAUNCH_2D,*(u32*)chardata);
tdfx_outl(par, LAUNCH_2D,*(u32*)chardata);
chardata += 4;
}
......@@ -955,11 +959,11 @@ static void tdfxfb_imageblit(struct fb_info *info, struct fb_image *pixmap)
i = size%4;
switch (i) {
case 0: break;
case 1: tdfx_outl(LAUNCH_2D,*chardata); break;
case 2: tdfx_outl(LAUNCH_2D,*(u16*)chardata); break;
case 3: tdfx_outl(LAUNCH_2D,*(u16*)chardata | ((chardata[3]) << 24)); break;
case 1: tdfx_outl(par, LAUNCH_2D,*chardata); break;
case 2: tdfx_outl(par, LAUNCH_2D,*(u16*)chardata); break;
case 3: tdfx_outl(par, LAUNCH_2D,*(u16*)chardata | ((chardata[3]) << 24)); break;
}
banshee_wait_idle();
banshee_wait_idle(par);
}
/**
......@@ -974,8 +978,8 @@ static void tdfxfb_imageblit(struct fb_info *info, struct fb_image *pixmap)
static int __devinit tdfxfb_probe(struct pci_dev *pdev,
const struct pci_device_id *id)
{
struct tdfx_par *default_par;
struct fb_info *info;
struct tdfx_par *par;
int size, err;
if ((err = pci_enable_device(pdev))) {
......@@ -983,33 +987,35 @@ static int __devinit tdfxfb_probe(struct pci_dev *pdev,
return err;
}
info = kmalloc(sizeof(struct fb_info) + sizeof(struct tdfx_par) +
sizeof(u32) * 17, GFP_KERNEL);
info = kmalloc(sizeof(struct fb_info) + sizeof(struct display) +
sizeof(u32) * 16, GFP_KERNEL);
if (!info) return -ENOMEM;
memset(info, 0, sizeof(info) + sizeof(struct tdfx_par) + sizeof(u32) * 17);
memset(info, 0, sizeof(info) + sizeof(struct display) + sizeof(u32) * 16);
default_par = kmalloc(sizeof(struct tdfx_par), GFP_KERNEL);
/* Configure the default fb_fix_screeninfo first */
switch (pdev->device) {
case PCI_DEVICE_ID_3DFX_BANSHEE:
strcat(tdfx_fix.id, " Banshee");
par->max_pixclock = BANSHEE_MAX_PIXCLOCK;
default_par->max_pixclock = BANSHEE_MAX_PIXCLOCK;
break;
case PCI_DEVICE_ID_3DFX_VOODOO3:
strcat(tdfx_fix.id, " Voodoo3");
par->max_pixclock = VOODOO3_MAX_PIXCLOCK;
default_par->max_pixclock = VOODOO3_MAX_PIXCLOCK;
break;
case PCI_DEVICE_ID_3DFX_VOODOO5:
strcat(tdfx_fix.id, " Voodoo5");
par->max_pixclock = VOODOO5_MAX_PIXCLOCK;
default_par->max_pixclock = VOODOO5_MAX_PIXCLOCK;
break;
}
tdfx_fix.mmio_start = pci_resource_start(pdev, 0);
tdfx_fix.mmio_len = pci_resource_len(pdev, 0);
par->regbase_virt = ioremap_nocache(tdfx_fix.mmio_start, tdfx_fix.mmio_len);
if (!par->regbase_virt) {
default_par->regbase_virt = ioremap_nocache(tdfx_fix.mmio_start, tdfx_fix.mmio_len);
if (!default_par->regbase_virt) {
printk("fb: Can't remap %s register area.\n", tdfx_fix.id);
goto out_err;
}
......@@ -1021,7 +1027,7 @@ static int __devinit tdfxfb_probe(struct pci_dev *pdev,
}
tdfx_fix.smem_start = pci_resource_start(pdev, 1);
if (!(tdfx_fix.smem_len = do_lfb_size(pdev->device))) {
if (!(tdfx_fix.smem_len = do_lfb_size(default_par, pdev->device))) {
printk("fb: Can't count %s memory.\n", tdfx_fix.id);
release_mem_region(pci_resource_start(pdev, 0),
pci_resource_len(pdev, 0));
......@@ -1047,7 +1053,7 @@ static int __devinit tdfxfb_probe(struct pci_dev *pdev,
goto out_err;
}
par->iobase = pci_resource_start(pdev, 2);
default_par->iobase = pci_resource_start(pdev, 2);
if (!request_region(pci_resource_start(pdev, 2),
pci_resource_len(pdev, 2), "tdfx iobase")) {
......@@ -1070,8 +1076,8 @@ static int __devinit tdfxfb_probe(struct pci_dev *pdev,
info->node = NODEV;
info->fbops = &tdfxfb_ops;
info->fix = tdfx_fix;
info->par = (struct tdfx_par *)(info + 1);
info->pseudo_palette = (void *)(info->par + 1);
info->par = default_par;
info->pseudo_palette = (void *)(info + 1);
info->flags = FBINFO_FLAG_DEFAULT;
if (!mode_option)
......@@ -1084,8 +1090,6 @@ static int __devinit tdfxfb_probe(struct pci_dev *pdev,
size = (info->var.bits_per_pixel == 8) ? 256 : 16;
fb_alloc_cmap(&info->cmap, size, 0);
gen_set_var(&info->var, -1, info);
if (register_framebuffer(info) < 0) {
printk("tdfxfb: can't register framebuffer\n");
goto out_err;
......@@ -1100,11 +1104,10 @@ static int __devinit tdfxfb_probe(struct pci_dev *pdev,
/*
* Cleanup after anything that was remapped/allocated.
*/
if (par->regbase_virt)
iounmap(par->regbase_virt);
if (default_par->regbase_virt)
iounmap(default_par->regbase_virt);
if (info->screen_base)
iounmap(info->screen_base);
kfree(par);
kfree(info);
return -ENXIO;
}
......
......@@ -94,7 +94,6 @@ static int tx3912fb_setcolreg(u_int regno, u_int red, u_int green,
*/
static struct fb_ops tx3912fb_ops = {
.owner = THIS_MODULE,
.fb_set_var = gen_set_var,
.fb_setcolreg = tx3912fb_setcolreg,
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
......@@ -211,6 +210,7 @@ static int tx3912fb_setcolreg(u_int regno, u_int red, u_int green,
int __init tx3912fb_init(void)
{
u_long tx3912fb_paddr = 0;
int size = (info->var.bits_per_pixel == 8) ? 256 : 16;
/* Disable the video logic */
outl(inl(TX3912_VIDEO_CTRL1) &
......
......@@ -59,7 +59,7 @@ static void (*pmi_pal)(void);
/* --------------------------------------------------------------------- */
static int vesafb_pan_display(struct fb_var_screeninfo *var, int con,
static int vesafb_pan_display(struct fb_var_screeninfo *var,
struct fb_info *info)
{
int offset;
......@@ -170,7 +170,6 @@ static int vesafb_setcolreg(unsigned regno, unsigned red, unsigned green,
static struct fb_ops vesafb_ops = {
.owner = THIS_MODULE,
.fb_set_var = gen_set_var,
.fb_setcolreg = vesafb_setcolreg,
.fb_pan_display = vesafb_pan_display,
.fb_fillrect = cfb_fillrect,
......@@ -348,7 +347,6 @@ int __init vesafb_init(void)
fb_info.fbops = &vesafb_ops;
fb_info.var = vesafb_defined;
fb_info.fix = vesafb_fix;
fb_info.updatevar = gen_update_var;
fb_info.pseudo_palette = pseudo_palette;
fb_info.flags = FBINFO_FLAG_DEFAULT;
......
......@@ -87,13 +87,12 @@ static int vfb_check_var(struct fb_var_screeninfo *var,
static int vfb_set_par(struct fb_info *info);
static int vfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
u_int transp, struct fb_info *info);
static int vfb_pan_display(struct fb_var_screeninfo *var, int con,
static int vfb_pan_display(struct fb_var_screeninfo *var,
struct fb_info *info);
static int vfb_mmap(struct fb_info *info, struct file *file,
struct vm_area_struct *vma);
static struct fb_ops vfb_ops = {
.fb_set_var gen_set_var,
.fb_check_var vfb_check_var,
.fb_set_par vfb_set_par,
.fb_setcolreg vfb_setcolreg,
......@@ -351,7 +350,7 @@ static int vfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
* This call looks only at xoffset, yoffset and the FB_VMODE_YWRAP flag
*/
static int vfb_pan_display(struct fb_var_screeninfo *var, int con,
static int vfb_pan_display(struct fb_var_screeninfo *var,
struct fb_info *info)
{
if (var->vmode & FB_VMODE_YWRAP) {
......
......@@ -317,9 +317,6 @@ struct fb_ops {
struct module *owner;
int (*fb_open)(struct fb_info *info, int user);
int (*fb_release)(struct fb_info *info, int user);
/* set settable parameters */
int (*fb_set_var)(struct fb_var_screeninfo *var, int con,
struct fb_info *info);
/* checks var and creates a par based on it */
int (*fb_check_var)(struct fb_var_screeninfo *var, struct fb_info *info);
/* set the video mode according to par */
......@@ -330,7 +327,7 @@ struct fb_ops {
/* blank display */
int (*fb_blank)(int blank, struct fb_info *info);
/* pan display */
int (*fb_pan_display)(struct fb_var_screeninfo *var, int con, struct fb_info *info);
int (*fb_pan_display)(struct fb_var_screeninfo *var, struct fb_info *info);
/* draws a rectangle */
void (*fb_fillrect)(struct fb_info *info, struct fb_fillrect *rect);
/* Copy data from area to another */
......@@ -341,7 +338,7 @@ struct fb_ops {
int (*fb_poll)(struct fb_info *info, poll_table *wait);
/* perform fb specific ioctl (optional) */
int (*fb_ioctl)(struct inode *inode, struct file *file, unsigned int cmd,
unsigned long arg, int con, struct fb_info *info);
unsigned long arg, struct fb_info *info);
/* perform fb specific mmap */
int (*fb_mmap)(struct fb_info *info, struct file *file, struct vm_area_struct *vma);
/* switch to/from raster image mode */
......
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