Commit ef927254 authored by James Simmons's avatar James Simmons

Fixed the anakin and noemagic framebuffer driver. Made font selection...

Fixed the anakin and noemagic framebuffer driver. Made font selection depeneded on framebuffer consoel instead of just framebuffer support. Fixed return to be int for tx3912 framebuffer.
parent 6dad4779
...@@ -335,38 +335,8 @@ source "drivers/media/Kconfig" ...@@ -335,38 +335,8 @@ source "drivers/media/Kconfig"
source "fs/Kconfig" source "fs/Kconfig"
menu "Console drivers"
depends on VT
config STI_CONSOLE
bool "STI console"
help
STI refers to the HP "Standard Text Interface" which is a set of
BIOS routines contained in a ROM chip in HP PA-RISC based machines.
Enabling this option will give you an 8 color text console on
most of the PA-RISC systems.
Really old HP boxes may not have STI, in which case you must use the
PDC console or your primary serial port as a console.
The text console uses a strange memory layout, and changing the
plane mask to create colored characters requires calls to the STI
routines. Because of that do not expect it to be actually very fast,
but it is sufficient for basic text console functions, including fonts.
The alternative is to use your primary serial port as a console.
It is safe to enable this option, so you should probably say "Y".
config DUMMY_CONSOLE
bool
depends on STI_CONSOLE || SERIAL_8250_CONSOLE
default y
source "drivers/video/Kconfig" source "drivers/video/Kconfig"
endmenu
menu "Sound" menu "Sound"
config SOUND config SOUND
......
...@@ -20,32 +20,32 @@ ...@@ -20,32 +20,32 @@
#include <asm/io.h> #include <asm/io.h>
static u32 colreg[16]; static u32 colreg[17];
static struct fb_info fb_info; static struct fb_info fb_info;
static struct fb_var_screeninfo anakinfb_var = { static struct fb_var_screeninfo anakinfb_var = {
.xres = 400, .xres = 400,
.yres = 234, .yres = 234,
.xres_virtual = 400, .xres_virtual = 400,
.yres_virtual = 234, .yres_virtual = 234,
.bits_per_pixel =16, .bits_per_pixel = 16,
.red = { 11, 5, 0 }, .red = { 11, 5, 0 },
.green = { 5, 6, 0 }, .green = { 5, 6, 0 },
.blue = { 0, 5, 0 }, .blue = { 0, 5, 0 },
.activate FB_ACTIVATE_NOW, .activate = FB_ACTIVATE_NOW,
.height -1, .height = -1,
.width -1, .width = -1,
.vmode FB_VMODE_NONINTERLACED, .vmode = FB_VMODE_NONINTERLACED,
}; };
static struct fb_fix_screeninfo anakinfb_fix = { static struct fb_fix_screeninfo anakinfb_fix = {
.id = "AnakinFB", .id = "AnakinFB",
.smem_start = VGA_START, .smem_start = VGA_START,
.smem_len = VGA_SIZE, .smem_len = VGA_SIZE,
.type = FB_TYPE_PACKED_PIXELS, .type = FB_TYPE_PACKED_PIXELS,
.visual = FB_VISUAL_TRUECOLOR, .visual = FB_VISUAL_TRUECOLOR,
.line_length = 400*2, .line_length = 400*2,
.accel = FB_ACCEL_NONE, .accel = FB_ACCEL_NONE,
}; };
static int static int
...@@ -55,8 +55,7 @@ anakinfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, ...@@ -55,8 +55,7 @@ anakinfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
if (regno > 15) if (regno > 15)
return 1; return 1;
colreg[regno] = (red & 0xf800) | (green & 0xfc00 >> 5) | ((u16 *)(info->pseudo_palette))[regno] = (red & 0xf800) | (green & 0xfc00 >> 5) | (blue & 0xf800 >> 11);
(blue & 0xf800 >> 11);
return 0; return 0;
} }
...@@ -79,6 +78,7 @@ anakinfb_init(void) ...@@ -79,6 +78,7 @@ anakinfb_init(void)
fb_info.fbops = &anakinfb_ops; fb_info.fbops = &anakinfb_ops;
fb_info.var = anakinfb_var; fb_info.var = anakinfb_var;
fb_info.fix = anakinfb_fix; fb_info.fix = anakinfb_fix;
fb_info.psuedo_palette = colreg;
if (!(request_mem_region(VGA_START, VGA_SIZE, "vga"))) if (!(request_mem_region(VGA_START, VGA_SIZE, "vga")))
return -ENOMEM; return -ENOMEM;
if (fb_info.screen_base = ioremap(VGA_START, VGA_SIZE)) { if (fb_info.screen_base = ioremap(VGA_START, VGA_SIZE)) {
......
...@@ -174,7 +174,7 @@ config FBCON_STI ...@@ -174,7 +174,7 @@ config FBCON_STI
config FBCON_FONTWIDTH8_ONLY config FBCON_FONTWIDTH8_ONLY
bool "Support only 8 pixels wide fonts" bool "Support only 8 pixels wide fonts"
depends on FB depends on FRAMEBUFFER_CONSOLE
help help
Answer Y here will make the kernel provide only the 8x8 fonts (these Answer Y here will make the kernel provide only the 8x8 fonts (these
are the less readable). are the less readable).
...@@ -183,13 +183,13 @@ config FBCON_FONTWIDTH8_ONLY ...@@ -183,13 +183,13 @@ config FBCON_FONTWIDTH8_ONLY
config FONT_SUN8x16 config FONT_SUN8x16
bool "Sparc console 8x16 font" bool "Sparc console 8x16 font"
depends on FB && (!SPARC32 && !SPARC64 && FBCON_FONTS || SPARC32 || SPARC64) depends on FRAMEBUFFER_CONSOLE && (!SPARC32 && !SPARC64 && FBCON_FONTS || SPARC32 || SPARC64)
help help
This is the high resolution console font for Sun machines. Say Y. This is the high resolution console font for Sun machines. Say Y.
config FONT_SUN12x22 config FONT_SUN12x22
bool "Sparc console 12x22 font (not supported by all drivers)" bool "Sparc console 12x22 font (not supported by all drivers)"
depends on FB && !FBCON_FONTWIDTH8_ONLY && (!SPARC32 && !SPARC64 && FBCON_FONTS || SPARC32 || SPARC64) depends on FRAMEBUFFER_CONSOLE && !FBCON_FONTWIDTH8_ONLY && (!SPARC32 && !SPARC64 && FBCON_FONTS || SPARC32 || SPARC64)
help help
This is the high resolution console font for Sun machines with very This is the high resolution console font for Sun machines with very
big letters (like the letters used in the SPARC PROM). If the big letters (like the letters used in the SPARC PROM). If the
...@@ -197,7 +197,7 @@ config FONT_SUN12x22 ...@@ -197,7 +197,7 @@ config FONT_SUN12x22
config FBCON_FONTS config FBCON_FONTS
bool "Select other fonts" if SPARC32 || SPARC64 bool "Select other fonts" if SPARC32 || SPARC64
depends on FB depends on FRAMEBUFFER_CONSOLE
help help
Say Y here if you would like to use fonts other than the default Say Y here if you would like to use fonts other than the default
your frame buffer console usually use. your frame buffer console usually use.
...@@ -210,11 +210,11 @@ config FBCON_FONTS ...@@ -210,11 +210,11 @@ config FBCON_FONTS
config FBCON_FONTS config FBCON_FONTS
prompt "Select compiled-in fonts" prompt "Select compiled-in fonts"
depends on FB && !SPARC32 && !SPARC64 depends on FRAMEBUFFER_CONSOLE && !SPARC32 && !SPARC64
config FONT_8x8 config FONT_8x8
bool "VGA 8x8 font" if FBCON_FONTS bool "VGA 8x8 font" if FBCON_FONTS
depends on FB depends on FRAMEBUFFER_CONSOLE
default y if !SPARC32 && !SPARC64 && !FBCON_FONTS default y if !SPARC32 && !SPARC64 && !FBCON_FONTS
help help
This is the "high resolution" font for the VGA frame buffer (the one This is the "high resolution" font for the VGA frame buffer (the one
...@@ -228,7 +228,7 @@ config FONT_8x8 ...@@ -228,7 +228,7 @@ config FONT_8x8
config FONT_8x16 config FONT_8x16
bool "VGA 8x16 font" if FBCON_FONTS bool "VGA 8x16 font" if FBCON_FONTS
depends on FB || SGI_NEWPORT_CONSOLE=y depends on FRAMEBUFFER_CONSOLE || SGI_NEWPORT_CONSOLE=y
default y if !SPARC32 && !SPARC64 && !FBCON_FONTS default y if !SPARC32 && !SPARC64 && !FBCON_FONTS
help help
This is the "high resolution" font for the VGA frame buffer (the one This is the "high resolution" font for the VGA frame buffer (the one
...@@ -238,7 +238,7 @@ config FONT_8x16 ...@@ -238,7 +238,7 @@ config FONT_8x16
config FONT_6x11 config FONT_6x11
bool "Mac console 6x11 font (not supported by all drivers)" if FBCON_FONTS bool "Mac console 6x11 font (not supported by all drivers)" if FBCON_FONTS
depends on FB && !FBCON_FONTWIDTH8_ONLY depends on FRAMEBUFFER_CONSOLE && !FBCON_FONTWIDTH8_ONLY
default y if !SPARC32 && !SPARC64 && !FBCON_FONTS && MAC default y if !SPARC32 && !SPARC64 && !FBCON_FONTS && MAC
help help
Small console font with Macintosh-style high-half glyphs. Some Mac Small console font with Macintosh-style high-half glyphs. Some Mac
...@@ -246,7 +246,7 @@ config FONT_6x11 ...@@ -246,7 +246,7 @@ config FONT_6x11
config FONT_PEARL_8x8 config FONT_PEARL_8x8
bool "Pearl (old m68k) console 8x8 font" if FBCON_FONTS bool "Pearl (old m68k) console 8x8 font" if FBCON_FONTS
depends on FB depends on FRAMEBUFFER_CONSOLE
default y if !SPARC32 && !SPARC64 && !FBCON_FONTS && AMIGA default y if !SPARC32 && !SPARC64 && !FBCON_FONTS && AMIGA
help help
Small console font with PC-style control-character and high-half Small console font with PC-style control-character and high-half
...@@ -254,7 +254,7 @@ config FONT_PEARL_8x8 ...@@ -254,7 +254,7 @@ config FONT_PEARL_8x8
config FONT_ACORN_8x8 config FONT_ACORN_8x8
bool "Acorn console 8x8 font" if FBCON_FONTS bool "Acorn console 8x8 font" if FBCON_FONTS
depends on FB depends on FRAMEBUFFER_CONSOLE
default y if !SPARC32 && !SPARC64 && !FBCON_FONTS && ARM && ARCH_ACORN default y if !SPARC32 && !SPARC64 && !FBCON_FONTS && ARM && ARCH_ACORN
help help
Small console font with PC-style control characters and high-half Small console font with PC-style control characters and high-half
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -132,9 +132,9 @@ extern int stifb_init(void); ...@@ -132,9 +132,9 @@ extern int stifb_init(void);
extern int stifb_setup(char*); extern int stifb_setup(char*);
extern int pmagbafb_init(void); extern int pmagbafb_init(void);
extern int pmagbbfb_init(void); extern int pmagbbfb_init(void);
extern void maxinefb_init(void); extern int maxinefb_init(void);
extern int tx3912fb_init(void); extern int tx3912fb_init(void);
extern void tx3912fb_setup(char*); extern int tx3912fb_setup(char*);
extern int radeonfb_init(void); extern int radeonfb_init(void);
extern int radeonfb_setup(char*); extern int radeonfb_setup(char*);
extern int e1355fb_init(void); extern int e1355fb_init(void);
......
...@@ -85,8 +85,6 @@ extern int tosh_smm(SMMRegisters *regs); ...@@ -85,8 +85,6 @@ extern int tosh_smm(SMMRegisters *regs);
#define NEOFB_VERSION "0.4.1" #define NEOFB_VERSION "0.4.1"
struct neofb_par default_par;
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
static int disabled; static int disabled;
...@@ -466,15 +464,16 @@ static void vgaHWRestore(const struct fb_info *info, ...@@ -466,15 +464,16 @@ static void vgaHWRestore(const struct fb_info *info,
/* /*
* Hardware Acceleration for Neo2200+ * Hardware Acceleration for Neo2200+
*/ */
static inline void neo2200_wait_idle(struct neofb_par *par) static inline void neo2200_sync(struct fb_info *info)
{ {
struct neofb_par *par = (struct neofb_par *) info->par;
int waitcycles; int waitcycles;
while (par->neo2200->bltStat & 1) while (par->neo2200->bltStat & 1)
waitcycles++; waitcycles++;
} }
static inline void neo2200_wait_fifo(struct neofb_par *par, static inline void neo2200_wait_fifo(struct fb_info *info,
int requested_fifo_space) int requested_fifo_space)
{ {
// ndev->neo.waitfifo_calls++; // ndev->neo.waitfifo_calls++;
...@@ -500,17 +499,17 @@ static inline void neo2200_wait_fifo(struct neofb_par *par, ...@@ -500,17 +499,17 @@ static inline void neo2200_wait_fifo(struct neofb_par *par,
neo_fifo_space -= requested_fifo_space; neo_fifo_space -= requested_fifo_space;
*/ */
neo2200_wait_idle(par); neo2200_sync(info);
} }
static inline void neo2200_accel_init(struct fb_info *fb, static inline void neo2200_accel_init(struct fb_info *info,
struct fb_var_screeninfo *var) struct fb_var_screeninfo *var)
{ {
struct neofb_par *par = (struct neofb_par *) fb->par; struct neofb_par *par = (struct neofb_par *) info->par;
Neo2200 *neo2200 = par->neo2200; Neo2200 *neo2200 = par->neo2200;
u32 bltMod, pitch; u32 bltMod, pitch;
neo2200_wait_idle(par); neo2200_sync(info);
switch (var->bits_per_pixel) { switch (var->bits_per_pixel) {
case 8: case 8:
...@@ -695,6 +694,10 @@ neofb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) ...@@ -695,6 +694,10 @@ neofb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
if (var->yoffset + var->yres > var->yres_virtual) if (var->yoffset + var->yres > var->yres_virtual)
var->yoffset = var->yres_virtual - var->yres; var->yoffset = var->yres_virtual - var->yres;
var->nonstd = 0;
var->height = -1;
var->width = -1;
if (var->bits_per_pixel >= 24 || !par->neo2200) if (var->bits_per_pixel >= 24 || !par->neo2200)
var->accel_flags &= ~FB_ACCELF_TEXT; var->accel_flags &= ~FB_ACCELF_TEXT;
return 0; return 0;
...@@ -1198,19 +1201,18 @@ static int neofb_pan_display(struct fb_var_screeninfo *var, ...@@ -1198,19 +1201,18 @@ static int neofb_pan_display(struct fb_var_screeninfo *var,
if (var->xoffset > (var->xres_virtual - var->xres)) if (var->xoffset > (var->xres_virtual - var->xres))
return -EINVAL; return -EINVAL;
if (y_bottom > fb->var.yres_virtual) if (y_bottom > info->var.yres_virtual)
return -EINVAL; return -EINVAL;
neofb_update_start(info, var); neofb_update_start(info, var);
fb->var.xoffset = var->xoffset; info->var.xoffset = var->xoffset;
fb->var.yoffset = var->yoffset; info->var.yoffset = var->yoffset;
if (var->vmode & FB_VMODE_YWRAP) if (var->vmode & FB_VMODE_YWRAP)
fb->var.vmode |= FB_VMODE_YWRAP; info->var.vmode |= FB_VMODE_YWRAP;
else else
fb->var.vmode &= ~FB_VMODE_YWRAP; info->var.vmode &= ~FB_VMODE_YWRAP;
return 0; return 0;
} }
...@@ -1259,10 +1261,8 @@ static int neofb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, ...@@ -1259,10 +1261,8 @@ static int neofb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
/* /*
* (Un)Blank the display. * (Un)Blank the display.
*/ */
static int neofb_blank(int blank, struct fb_info *fb) static int neofb_blank(int blank, struct fb_info *info)
{ {
// struct fb_info *info = (struct fb_info *)fb;
/* /*
* Blank the screen if blank_mode != 0, else unblank. If * Blank the screen if blank_mode != 0, else unblank. If
* blank == NULL then the caller blanks by setting the CLUT * blank == NULL then the caller blanks by setting the CLUT
...@@ -1317,7 +1317,7 @@ static int neofb_blank(int blank, struct fb_info *fb) ...@@ -1317,7 +1317,7 @@ static int neofb_blank(int blank, struct fb_info *fb)
} }
static void static void
neo2200fb_fillrect(struct fb_info *info, struct fb_fillrect *rect) neo2200_fillrect(struct fb_info *info, struct fb_fillrect *rect)
{ {
struct neofb_par *par = (struct neofb_par *) info->par; struct neofb_par *par = (struct neofb_par *) info->par;
u_long dst, rop; u_long dst, rop;
...@@ -1325,7 +1325,7 @@ neo2200fb_fillrect(struct fb_info *info, struct fb_fillrect *rect) ...@@ -1325,7 +1325,7 @@ neo2200fb_fillrect(struct fb_info *info, struct fb_fillrect *rect)
dst = rect->dx + rect->dy * info->var.xres_virtual; dst = rect->dx + rect->dy * info->var.xres_virtual;
rop = rect->rop ? 0x060000 : 0x0c0000; rop = rect->rop ? 0x060000 : 0x0c0000;
neo2200_wait_fifo(par, 4); neo2200_wait_fifo(info, 4);
/* set blt control */ /* set blt control */
par->neo2200->bltCntl = NEO_BC3_FIFO_EN | par->neo2200->bltCntl = NEO_BC3_FIFO_EN |
...@@ -1351,7 +1351,7 @@ neo2200fb_fillrect(struct fb_info *info, struct fb_fillrect *rect) ...@@ -1351,7 +1351,7 @@ neo2200fb_fillrect(struct fb_info *info, struct fb_fillrect *rect)
} }
static void static void
neo2200fb_copyarea(struct fb_info *info, struct fb_copyarea *area) neo2200_copyarea(struct fb_info *info, struct fb_copyarea *area)
{ {
struct neofb_par *par = (struct neofb_par *) info->par; struct neofb_par *par = (struct neofb_par *) info->par;
u_long src, dst, bltCntl; u_long src, dst, bltCntl;
...@@ -1379,7 +1379,7 @@ neo2200fb_copyarea(struct fb_info *info, struct fb_copyarea *area) ...@@ -1379,7 +1379,7 @@ neo2200fb_copyarea(struct fb_info *info, struct fb_copyarea *area)
area->dx * (info->var.bits_per_pixel >> 3) + area->dx * (info->var.bits_per_pixel >> 3) +
area->dy * info->fix.line_length; area->dy * info->fix.line_length;
neo2200_wait_fifo(par, 4); neo2200_wait_fifo(info, 4);
/* set blt control */ /* set blt control */
par->neo2200->bltCntl = bltCntl; par->neo2200->bltCntl = bltCntl;
...@@ -1391,11 +1391,11 @@ neo2200fb_copyarea(struct fb_info *info, struct fb_copyarea *area) ...@@ -1391,11 +1391,11 @@ neo2200fb_copyarea(struct fb_info *info, struct fb_copyarea *area)
} }
static void static void
neo2200fb_imageblit(struct fb_info *info, struct fb_image *image) neo2200_imageblit(struct fb_info *info, struct fb_image *image)
{ {
struct neofb_par *par = (struct neofb_par *) info->par; struct neofb_par *par = (struct neofb_par *) info->par;
neo2200_wait_idle(par); neo2200_sync(info);
switch (info->var.bits_per_pixel) { switch (info->var.bits_per_pixel) {
case 8: case 8:
...@@ -1427,6 +1427,33 @@ neo2200fb_imageblit(struct fb_info *info, struct fb_image *image) ...@@ -1427,6 +1427,33 @@ neo2200fb_imageblit(struct fb_info *info, struct fb_image *image)
(image->width * image->height) >> 3); (image->width * image->height) >> 3);
} }
static void
neofb_fillrect(struct fb_info *info, struct fb_fillrect *rect)
{
if (info->var.accel_flags == FB_ACCELF_TEXT)
neo2200_fillrect(info, rect);
else
cfb_fillrect(info, rect);
}
static void
neofb_copyarea(struct fb_info *info, struct fb_copyarea *area)
{
if (info->var.accel_flags == FB_ACCELF_TEXT)
neo2200_copyarea(info, area);
else
cfb_copyarea(info, area);
}
static void
neofb_imageblit(struct fb_info *info, struct fb_image *image)
{
if (info->var.accel_flags == FB_ACCELF_TEXT)
neo2200_imageblit(info, image);
else
cfb_imageblit(info, image);
}
static struct fb_ops neofb_ops = { static struct fb_ops neofb_ops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.fb_check_var = neofb_check_var, .fb_check_var = neofb_check_var,
...@@ -1434,9 +1461,10 @@ static struct fb_ops neofb_ops = { ...@@ -1434,9 +1461,10 @@ static struct fb_ops neofb_ops = {
.fb_setcolreg = neofb_setcolreg, .fb_setcolreg = neofb_setcolreg,
.fb_pan_display = neofb_pan_display, .fb_pan_display = neofb_pan_display,
.fb_blank = neofb_blank, .fb_blank = neofb_blank,
.fb_fillrect = cfb_fillrect, .fb_sync = neo2200_sync,
.fb_copyarea = cfb_copyarea, .fb_fillrect = neofb_fillrect,
.fb_imageblit = cfb_imageblit, .fb_copyarea = neofb_copyarea,
.fb_imageblit = neofb_imageblit,
.fb_cursor = cfb_cursor, .fb_cursor = cfb_cursor,
}; };
...@@ -1533,8 +1561,6 @@ static struct fb_var_screeninfo __devinitdata neofb_var1280x1024x8 = { ...@@ -1533,8 +1561,6 @@ static struct fb_var_screeninfo __devinitdata neofb_var1280x1024x8 = {
}; };
#endif #endif
static struct fb_var_screeninfo *neofb_var = NULL;
static int __devinit neo_map_mmio(struct fb_info *info, static int __devinit neo_map_mmio(struct fb_info *info,
struct pci_dev *dev) struct pci_dev *dev)
{ {
...@@ -1639,6 +1665,7 @@ static void __devinit neo_unmap_video(struct fb_info *info) ...@@ -1639,6 +1665,7 @@ static void __devinit neo_unmap_video(struct fb_info *info)
static int __devinit neo_init_hw(struct fb_info *info) static int __devinit neo_init_hw(struct fb_info *info)
{ {
struct neofb_par *par = (struct neofb_par *) info->par; struct neofb_par *par = (struct neofb_par *) info->par;
unsigned char type, display;
int videoRam = 896; int videoRam = 896;
int maxClock = 65000; int maxClock = 65000;
int CursorMem = 1024; int CursorMem = 1024;
...@@ -1646,7 +1673,6 @@ static int __devinit neo_init_hw(struct fb_info *info) ...@@ -1646,7 +1673,6 @@ static int __devinit neo_init_hw(struct fb_info *info)
int linearSize = 1024; int linearSize = 1024;
int maxWidth = 1024; int maxWidth = 1024;
int maxHeight = 1024; int maxHeight = 1024;
unsigned char type, display;
int w; int w;
DBG("neo_init_hw"); DBG("neo_init_hw");
...@@ -1682,24 +1708,24 @@ static int __devinit neo_init_hw(struct fb_info *info) ...@@ -1682,24 +1708,24 @@ static int __devinit neo_init_hw(struct fb_info *info)
case 0x00: case 0x00:
par->NeoPanelWidth = 640; par->NeoPanelWidth = 640;
par->NeoPanelHeight = 480; par->NeoPanelHeight = 480;
neofb_var = &neofb_var640x480x8; info->var = neofb_var640x480x8;
break; break;
case 0x01: case 0x01:
par->NeoPanelWidth = 800; par->NeoPanelWidth = 800;
par->NeoPanelHeight = par->libretto ? 480 : 600; par->NeoPanelHeight = par->libretto ? 480 : 600;
neofb_var = par->libretto ? &neofb_var800x480x8 : &neofb_var800x600x8; info->var = par->libretto ? neofb_var800x480x8 : neofb_var800x600x8;
break; break;
case 0x02: case 0x02:
par->NeoPanelWidth = 1024; par->NeoPanelWidth = 1024;
par->NeoPanelHeight = 768; par->NeoPanelHeight = 768;
neofb_var = &neofb_var1024x768x8; info->var = neofb_var1024x768x8;
break; break;
case 0x03: case 0x03:
/* 1280x1024 panel support needs to be added */ /* 1280x1024 panel support needs to be added */
#ifdef NOT_DONE #ifdef NOT_DONE
par->NeoPanelWidth = 1280; par->NeoPanelWidth = 1280;
par->NeoPanelHeight = 1024; par->NeoPanelHeight = 1024;
neofb_var = &neofb_var1280x1024x8; info->var = neofb_var1280x1024x8;
break; break;
#else #else
printk(KERN_ERR printk(KERN_ERR
...@@ -1709,7 +1735,7 @@ static int __devinit neo_init_hw(struct fb_info *info) ...@@ -1709,7 +1735,7 @@ static int __devinit neo_init_hw(struct fb_info *info)
default: default:
par->NeoPanelWidth = 640; par->NeoPanelWidth = 640;
par->NeoPanelHeight = 480; par->NeoPanelHeight = 480;
neofb_var = &neofb_var640x480x8; info->var = neofb_var640x480x8;
break; break;
} }
...@@ -1815,16 +1841,15 @@ static struct fb_info *__devinit neo_alloc_fb_info(struct pci_dev *dev, const st ...@@ -1815,16 +1841,15 @@ static struct fb_info *__devinit neo_alloc_fb_info(struct pci_dev *dev, const st
struct fb_info *info; struct fb_info *info;
struct neofb_par *par; struct neofb_par *par;
info = kmalloc(sizeof(struct fb_info) + info = kmalloc(sizeof(struct fb_info) + sizeof(struct neofb_par) +
sizeof(u32) * 17, GFP_KERNEL); sizeof(u32) * 17, GFP_KERNEL);
if (!info) if (!info)
return NULL; return NULL;
memset(info, 0, sizeof(struct fb_info) + sizeof(u32) * 17); memset(info, 0, sizeof(struct fb_info) + sizeof(struct neofb_par) + sizeof(u32) * 17);
par = &default_par; par = (struct neofb_par *) (info + 1);
memset(par, 0, sizeof(struct neofb_par));
info->fix.accel = id->driver_data; info->fix.accel = id->driver_data;
...@@ -1872,17 +1897,10 @@ static struct fb_info *__devinit neo_alloc_fb_info(struct pci_dev *dev, const st ...@@ -1872,17 +1897,10 @@ static struct fb_info *__devinit neo_alloc_fb_info(struct pci_dev *dev, const st
info->fix.ywrapstep = 0; info->fix.ywrapstep = 0;
info->fix.accel = id->driver_data; info->fix.accel = id->driver_data;
info->var.nonstd = 0;
info->var.activate = FB_ACTIVATE_NOW;
info->var.height = -1;
info->var.width = -1;
info->var.accel_flags = 0;
info->fbops = &neofb_ops; info->fbops = &neofb_ops;
info->updatevar = gen_update_var;
info->flags = FBINFO_FLAG_DEFAULT; info->flags = FBINFO_FLAG_DEFAULT;
info->par = par; info->par = par;
info->pseudo_palette = (void *) (info + 1); info->pseudo_palette = (void *) (par + 1);
fb_alloc_cmap(&info->cmap, NR_PALETTE, 0); fb_alloc_cmap(&info->cmap, NR_PALETTE, 0);
...@@ -1961,7 +1979,7 @@ static int __devinit neofb_probe(struct pci_dev *dev, ...@@ -1961,7 +1979,7 @@ static int __devinit neofb_probe(struct pci_dev *dev,
goto failed; goto failed;
printk(KERN_INFO "fb%d: %s frame buffer device\n", printk(KERN_INFO "fb%d: %s frame buffer device\n",
minor(info->node), info->modename); minor(info->node), info->fix.id);
/* /*
* Our driver data * Our driver data
...@@ -2061,7 +2079,6 @@ static void __exit neo_done(void) ...@@ -2061,7 +2079,6 @@ static void __exit neo_done(void)
pci_unregister_driver(&neofb_driver); pci_unregister_driver(&neofb_driver);
} }
#ifndef MODULE #ifndef MODULE
/* ************************* init in-kernel code ************************** */ /* ************************* init in-kernel code ************************** */
......
...@@ -313,7 +313,7 @@ int __init tx3912fb_init(void) ...@@ -313,7 +313,7 @@ int __init tx3912fb_init(void)
return 0; return 0;
} }
void __init tx3912fb_setup(char *options) int __init tx3912fb_setup(char *options)
{ {
char *this_opt; char *this_opt;
...@@ -324,6 +324,7 @@ void __init tx3912fb_setup(char *options) ...@@ -324,6 +324,7 @@ void __init tx3912fb_setup(char *options)
if (!strncmp(options, "bpp:", 4)) if (!strncmp(options, "bpp:", 4))
tx3912fb_var.bits_per_pixel = simple_strtoul(options+4, NULL, 0); tx3912fb_var.bits_per_pixel = simple_strtoul(options+4, NULL, 0);
} }
return 0;
} }
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
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