Commit 6bd20e27 authored by Linus Torvalds's avatar Linus Torvalds

Merge http://fbdev.bkbits.net:8080/fbdev-2.5

into home.transmeta.com:/home/torvalds/v2.5/linux
parents d236fbb8 7a356301
...@@ -236,25 +236,25 @@ if [ "$CONFIG_FB" = "y" ]; then ...@@ -236,25 +236,25 @@ if [ "$CONFIG_FB" = "y" ]; then
if [ "$CONFIG_FB_ACORN" = "y" -o "$CONFIG_FB_AMIGA" = "y" -o \ if [ "$CONFIG_FB_ACORN" = "y" -o "$CONFIG_FB_AMIGA" = "y" -o \
"$CONFIG_FB_ATARI" = "y" -o "$CONFIG_FB_CYBER" = "y" -o \ "$CONFIG_FB_ATARI" = "y" -o "$CONFIG_FB_CYBER" = "y" -o \
"$CONFIG_FB_MAC" = "y" -o "$CONFIG_FB_RETINAZ3" = "y" -o \ "$CONFIG_FB_MAC" = "y" -o "$CONFIG_FB_RETINAZ3" = "y" -o \
"$CONFIG_FB_VIRGE" = "y" -o "$CONFIG_FB_TX3912" = "y" -o \ "$CONFIG_FB_VIRGE" = "y" -o "$CONFIG_FB_CLGEN" = "y" -o \
"$CONFIG_FB_BWTWO" = "y" -o "$CONFIG_FB_CLGEN" = "y" ]; then "$CONFIG_FB_BWTWO" = "y" ]; then
define_tristate CONFIG_FBCON_MFB y define_tristate CONFIG_FBCON_MFB y
else else
if [ "$CONFIG_FB_ACORN" = "m" -o "$CONFIG_FB_AMIGA" = "m" -o \ if [ "$CONFIG_FB_ACORN" = "m" -o "$CONFIG_FB_AMIGA" = "m" -o \
"$CONFIG_FB_ATARI" = "m" -o "$CONFIG_FB_CYBER" = "m" -o \ "$CONFIG_FB_ATARI" = "m" -o "$CONFIG_FB_CYBER" = "m" -o \
"$CONFIG_FB_MAC" = "m" -o "$CONFIG_FB_RETINAZ3" = "m" -o \ "$CONFIG_FB_MAC" = "m" -o "$CONFIG_FB_RETINAZ3" = "m" -o \
"$CONFIG_FB_VIRGE" = "m" -o "$CONFIG_FB_TX3912" = "m" -o \ "$CONFIG_FB_VIRGE" = "m" -o "$CONFIG_FB_CLGEN" = "m" -o \
"$CONFIG_FB_BWTWO" = "m" -o "$CONFIG_FB_CLGEN" = "m" ]; then "$CONFIG_FB_BWTWO" = "m" ]; then
define_tristate CONFIG_FBCON_MFB m define_tristate CONFIG_FBCON_MFB m
fi fi
fi fi
if [ "$CONFIG_FB_ACORN" = "y" -o "$CONFIG_FB_MAC" = "y" -o \ if [ "$CONFIG_FB_ACORN" = "y" -o "$CONFIG_FB_MAC" = "y" -o \
"$CONFIG_FB_SA1100" = "y" -o "$CONFIG_FB_TX3912" = "y" ]; then "$CONFIG_FB_SA1100" = "y" ]; then
define_tristate CONFIG_FBCON_CFB2 y define_tristate CONFIG_FBCON_CFB2 y
define_tristate CONFIG_FBCON_CFB4 y define_tristate CONFIG_FBCON_CFB4 y
else else
if [ "$CONFIG_FB_ACORN" = "m" -o "$CONFIG_FB_MAC" = "m" -o \ if [ "$CONFIG_FB_ACORN" = "m" -o "$CONFIG_FB_MAC" = "m" -o \
"$CONFIG_FB_SA1100" = "m" -o "$CONFIG_FB_TX3912" = "m" ]; then "$CONFIG_FB_SA1100" = "m" ]; then
define_tristate CONFIG_FBCON_CFB2 m define_tristate CONFIG_FBCON_CFB2 m
define_tristate CONFIG_FBCON_CFB4 m define_tristate CONFIG_FBCON_CFB4 m
fi fi
...@@ -262,7 +262,7 @@ if [ "$CONFIG_FB" = "y" ]; then ...@@ -262,7 +262,7 @@ if [ "$CONFIG_FB" = "y" ]; then
if [ "$CONFIG_FB_ACORN" = "y" -o "$CONFIG_FB_ATARI" = "y" -o \ if [ "$CONFIG_FB_ACORN" = "y" -o "$CONFIG_FB_ATARI" = "y" -o \
"$CONFIG_FB_ATY" = "y" -o "$CONFIG_FB_MAC" = "y" -o \ "$CONFIG_FB_ATY" = "y" -o "$CONFIG_FB_MAC" = "y" -o \
"$CONFIG_FB_OF" = "y" -o "$CONFIG_FB_TGA" = "y" -o \ "$CONFIG_FB_OF" = "y" -o "$CONFIG_FB_TGA" = "y" -o \
"$CONFIG_FB_NEOMAGIC" = "y" -o "$CONFIG_FB_PM3" = "y" -o \ "$CONFIG_FB_SIS" = "y" -o "$CONFIG_FB_PM3" = "y" -o \
"$CONFIG_FB_TCX" = "y" -o "$CONFIG_FB_CGTHREE" = "y" -o \ "$CONFIG_FB_TCX" = "y" -o "$CONFIG_FB_CGTHREE" = "y" -o \
"$CONFIG_FB_CONTROL" = "y" -o "$CONFIG_FB_CLGEN" = "y" -o \ "$CONFIG_FB_CONTROL" = "y" -o "$CONFIG_FB_CLGEN" = "y" -o \
"$CONFIG_FB_CGFOURTEEN" = "y" -o "$CONFIG_FB_TRIDENT" = "y" -o \ "$CONFIG_FB_CGFOURTEEN" = "y" -o "$CONFIG_FB_TRIDENT" = "y" -o \
...@@ -273,15 +273,13 @@ if [ "$CONFIG_FB" = "y" ]; then ...@@ -273,15 +273,13 @@ if [ "$CONFIG_FB" = "y" ]; then
"$CONFIG_FB_P9100" = "y" -o "$CONFIG_FB_ATY128" = "y" -o \ "$CONFIG_FB_P9100" = "y" -o "$CONFIG_FB_ATY128" = "y" -o \
"$CONFIG_FB_RIVA" = "y" -o "$CONFIG_FB_RADEON" = "y" -o \ "$CONFIG_FB_RIVA" = "y" -o "$CONFIG_FB_RADEON" = "y" -o \
"$CONFIG_FB_SGIVW" = "y" -o "$CONFIG_FB_CYBER2000" = "y" -o \ "$CONFIG_FB_SGIVW" = "y" -o "$CONFIG_FB_CYBER2000" = "y" -o \
"$CONFIG_FB_SA1100" = "y" -o "$CONFIG_FB_SIS" = "y" -o \ "$CONFIG_FB_SA1100" = "y" ]; then
"$CONFIG_FB_PMAG_BA" = "y" -o "$CONFIG_FB_PMAGB_B" = "y" -o \
"$CONFIG_FB_MAXINE" = "y" -o "$CONFIG_FB_TX3912" = "y" ]; then
define_tristate CONFIG_FBCON_CFB8 y define_tristate CONFIG_FBCON_CFB8 y
else else
if [ "$CONFIG_FB_ACORN" = "m" -o "$CONFIG_FB_ATARI" = "m" -o \ if [ "$CONFIG_FB_ACORN" = "m" -o "$CONFIG_FB_ATARI" = "m" -o \
"$CONFIG_FB_ATY" = "m" -o "$CONFIG_FB_MAC" = "m" -o \ "$CONFIG_FB_ATY" = "m" -o "$CONFIG_FB_MAC" = "m" -o \
"$CONFIG_FB_OF" = "m" -o "$CONFIG_FB_TGA" = "m" -o \ "$CONFIG_FB_OF" = "m" -o "$CONFIG_FB_TGA" = "m" -o \
"$CONFIG_FB_NEOMAGIC" = "m" -o "$CONFIG_FB_PM3" = "m" -o \ "$CONFIG_FB_SIS" = "m" -o "$CONFIG_FB_PM3" = "m" -o \
"$CONFIG_FB_TCX" = "m" -o "$CONFIG_FB_CGTHREE" = "m" -o \ "$CONFIG_FB_TCX" = "m" -o "$CONFIG_FB_CGTHREE" = "m" -o \
"$CONFIG_FB_CONTROL" = "m" -o "$CONFIG_FB_CLGEN" = "m" -o \ "$CONFIG_FB_CONTROL" = "m" -o "$CONFIG_FB_CLGEN" = "m" -o \
"$CONFIG_FB_CGFOURTEEN" = "m" -o "$CONFIG_FB_TRIDENT" = "m" -o \ "$CONFIG_FB_CGFOURTEEN" = "m" -o "$CONFIG_FB_TRIDENT" = "m" -o \
...@@ -290,16 +288,14 @@ if [ "$CONFIG_FB" = "y" ]; then ...@@ -290,16 +288,14 @@ if [ "$CONFIG_FB" = "y" ]; then
"$CONFIG_FB_IGA" = "m" -o "$CONFIG_FB_MATROX" = "m" -o \ "$CONFIG_FB_IGA" = "m" -o "$CONFIG_FB_MATROX" = "m" -o \
"$CONFIG_FB_CT65550" = "m" -o "$CONFIG_FB_PM2" = "m" -o \ "$CONFIG_FB_CT65550" = "m" -o "$CONFIG_FB_PM2" = "m" -o \
"$CONFIG_FB_P9100" = "m" -o "$CONFIG_FB_ATY128" = "m" -o \ "$CONFIG_FB_P9100" = "m" -o "$CONFIG_FB_ATY128" = "m" -o \
"$CONFIG_FB_RIVA" = "m" -o "$CONFIG_FB_TX3912" = "m" -o \ "$CONFIG_FB_RIVA" = "m" -o "$CONFIG_FB_RADEON" = "m" -o \
"$CONFIG_FB_SGIVW" = "m" -o "$CONFIG_FB_CYBER2000" = "m" -o \ "$CONFIG_FB_SGIVW" = "m" -o "$CONFIG_FB_CYBER2000" = "m" -o \
"$CONFIG_FB_PMAG_BA" = "m" -o "$CONFIG_FB_PMAGB_B" = "m" -o \ "$CONFIG_FB_SA1100" = "m" ]; then
"$CONFIG_FB_MAXINE" = "m" -o "$CONFIG_FB_RADEON" = "m" -o \
"$CONFIG_FB_SA1100" = "m" -o "$CONFIG_FB_SIS" = "m" ]; then
define_tristate CONFIG_FBCON_CFB8 m define_tristate CONFIG_FBCON_CFB8 m
fi fi
fi fi
if [ "$CONFIG_FB_ATARI" = "y" -o "$CONFIG_FB_ATY" = "y" -o \ if [ "$CONFIG_FB_ATARI" = "y" -o "$CONFIG_FB_ATY" = "y" -o \
"$CONFIG_FB_MAC" = "y" -o "$CONFIG_FB_NEOMAGIC" = "y" -o \ "$CONFIG_FB_MAC" = "y" -o "$CONFIG_FB_PVR2" = "y" -o \
"$CONFIG_FB_TRIDENT" = "y" -o "$CONFIG_FB_TBOX" = "y" -o \ "$CONFIG_FB_TRIDENT" = "y" -o "$CONFIG_FB_TBOX" = "y" -o \
"$CONFIG_FB_VOODOO1" = "y" -o "$CONFIG_FB_RADEON" = "y" -o \ "$CONFIG_FB_VOODOO1" = "y" -o "$CONFIG_FB_RADEON" = "y" -o \
"$CONFIG_FB_CONTROL" = "y" -o "$CONFIG_FB_CLGEN" = "y" -o \ "$CONFIG_FB_CONTROL" = "y" -o "$CONFIG_FB_CLGEN" = "y" -o \
...@@ -309,12 +305,11 @@ if [ "$CONFIG_FB" = "y" ]; then ...@@ -309,12 +305,11 @@ if [ "$CONFIG_FB" = "y" ]; then
"$CONFIG_FB_PM2" = "y" -o "$CONFIG_FB_SGIVW" = "y" -o \ "$CONFIG_FB_PM2" = "y" -o "$CONFIG_FB_SGIVW" = "y" -o \
"$CONFIG_FB_RIVA" = "y" -o "$CONFIG_FB_ATY128" = "y" -o \ "$CONFIG_FB_RIVA" = "y" -o "$CONFIG_FB_ATY128" = "y" -o \
"$CONFIG_FB_CYBER2000" = "y" -o "$CONFIG_FB_PM3" = "y" -o \ "$CONFIG_FB_CYBER2000" = "y" -o "$CONFIG_FB_PM3" = "y" -o \
"$CONFIG_FB_SIS" = "y" -o "$CONFIG_FB_SA1100" = "y" -o \ "$CONFIG_FB_SIS" = "y" -o "$CONFIG_FB_SA1100" = "y" ]; then
"$CONFIG_FB_PVR2" = "y" ]; then
define_tristate CONFIG_FBCON_CFB16 y define_tristate CONFIG_FBCON_CFB16 y
else else
if [ "$CONFIG_FB_ATARI" = "m" -o "$CONFIG_FB_ATY" = "m" -o \ if [ "$CONFIG_FB_ATARI" = "m" -o "$CONFIG_FB_ATY" = "m" -o \
"$CONFIG_FB_MAC" = "m" -o "$CONFIG_FB_NEOMAGIC" = "m" -o \ "$CONFIG_FB_MAC" = "m" -o "$CONFIG_FB_PVR2" = "m" -o \
"$CONFIG_FB_TRIDENT" = "m" -o "$CONFIG_FB_TBOX" = "m" -o \ "$CONFIG_FB_TRIDENT" = "m" -o "$CONFIG_FB_TBOX" = "m" -o \
"$CONFIG_FB_VOODOO1" = "m" -o "$CONFIG_FB_PM3" = "m" -o \ "$CONFIG_FB_VOODOO1" = "m" -o "$CONFIG_FB_PM3" = "m" -o \
"$CONFIG_FB_CONTROL" = "m" -o "$CONFIG_FB_CLGEN" = "m" -o \ "$CONFIG_FB_CONTROL" = "m" -o "$CONFIG_FB_CLGEN" = "m" -o \
...@@ -324,8 +319,7 @@ if [ "$CONFIG_FB" = "y" ]; then ...@@ -324,8 +319,7 @@ if [ "$CONFIG_FB" = "y" ]; then
"$CONFIG_FB_PM2" = "m" -o "$CONFIG_FB_SGIVW" = "m" -o \ "$CONFIG_FB_PM2" = "m" -o "$CONFIG_FB_SGIVW" = "m" -o \
"$CONFIG_FB_RIVA" = "m" -o "$CONFIG_FB_ATY128" = "m" -o \ "$CONFIG_FB_RIVA" = "m" -o "$CONFIG_FB_ATY128" = "m" -o \
"$CONFIG_FB_CYBER2000" = "m" -o "$CONFIG_FB_SIS" = "m" -o \ "$CONFIG_FB_CYBER2000" = "m" -o "$CONFIG_FB_SIS" = "m" -o \
"$CONFIG_FB_SA1100" = "m" -o "$CONFIG_FB_RADEON" = "m" -o \ "$CONFIG_FB_SA1100" = "m" -o "$CONFIG_FB_RADEON" = "m" ]; then
"$CONFIG_FB_PVR2" = "m" ]; then
define_tristate CONFIG_FBCON_CFB16 m define_tristate CONFIG_FBCON_CFB16 m
fi fi
fi fi
...@@ -374,7 +368,9 @@ if [ "$CONFIG_FB" = "y" ]; then ...@@ -374,7 +368,9 @@ if [ "$CONFIG_FB" = "y" ]; then
"$CONFIG_FB_HP300" = "y" -o "$CONFIG_FB_Q40" = "y" -o \ "$CONFIG_FB_HP300" = "y" -o "$CONFIG_FB_Q40" = "y" -o \
"$CONFIG_FB_ANAKIN" = "y" -o "$CONFIG_FB_G364" = "y" -o \ "$CONFIG_FB_ANAKIN" = "y" -o "$CONFIG_FB_G364" = "y" -o \
"$CONFIG_FB_VIRTUAL" = "y" -o "$CONFIG_FB_CLPS711X" = "y" -o \ "$CONFIG_FB_VIRTUAL" = "y" -o "$CONFIG_FB_CLPS711X" = "y" -o \
"$CONFIG_FB_3DFX" = "y" ]; then "$CONFIG_FB_PMAG_BA" = "y" -o "$CONFIG_FB_PMAGB_B" = "y" -o \
"$CONFIG_FB_3DFX" = "y" -o "$CONFIG_FB_TX3912" = "y" -o \
"$CONFIG_FB_MAXINE" = "y" -o "$CONFIG_FB_APOLLO" = "y" ]; then
define_tristate CONFIG_FBCON_ACCEL y define_tristate CONFIG_FBCON_ACCEL y
else else
if [ "$CONFIG_FB_NEOMAGIC" = "m" -o "$CONFIG_FB_HIT" = "m" -o \ if [ "$CONFIG_FB_NEOMAGIC" = "m" -o "$CONFIG_FB_HIT" = "m" -o \
......
...@@ -43,18 +43,18 @@ obj-$(CONFIG_FB_ACORN) += acornfb.o ...@@ -43,18 +43,18 @@ obj-$(CONFIG_FB_ACORN) += acornfb.o
obj-$(CONFIG_FB_AMIGA) += amifb.o obj-$(CONFIG_FB_AMIGA) += amifb.o
obj-$(CONFIG_FB_PM2) += pm2fb.o obj-$(CONFIG_FB_PM2) += pm2fb.o
obj-$(CONFIG_FB_PM3) += pm3fb.o obj-$(CONFIG_FB_PM3) += pm3fb.o
obj-$(CONFIG_FB_APOLLO) += dnfb.o obj-$(CONFIG_FB_APOLLO) += dnfb.o cfbfillrect.o cfbimgblt.o
obj-$(CONFIG_FB_Q40) += q40fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_Q40) += q40fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_ATARI) += atafb.o obj-$(CONFIG_FB_ATARI) += atafb.o
obj-$(CONFIG_FB_ATY128) += aty128fb.o obj-$(CONFIG_FB_ATY128) += aty128fb.o
obj-$(CONFIG_FB_RADEON) += radeonfb.o obj-$(CONFIG_FB_RADEON) += radeonfb.o
obj-$(CONFIG_FB_NEOMAGIC) += neofb.o obj-$(CONFIG_FB_NEOMAGIC) += neofb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_IGA) += igafb.o obj-$(CONFIG_FB_IGA) += igafb.o
obj-$(CONFIG_FB_CONTROL) += controlfb.o obj-$(CONFIG_FB_CONTROL) += controlfb.o
obj-$(CONFIG_FB_PLATINUM) += platinumfb.o obj-$(CONFIG_FB_PLATINUM) += platinumfb.o
obj-$(CONFIG_FB_VALKYRIE) += valkyriefb.o obj-$(CONFIG_FB_VALKYRIE) += valkyriefb.o
obj-$(CONFIG_FB_CT65550) += chipsfb.o obj-$(CONFIG_FB_CT65550) += chipsfb.o
obj-$(CONFIG_FB_ANAKIN) += anakinfb.o obj-$(CONFIG_FB_ANAKIN) += anakinfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_CLPS711X) += clps711xfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_CLPS711X) += clps711xfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_CYBER) += cyberfb.o obj-$(CONFIG_FB_CYBER) += cyberfb.o
obj-$(CONFIG_FB_CYBER2000) += cyber2000fb.o obj-$(CONFIG_FB_CYBER2000) += cyber2000fb.o
...@@ -83,10 +83,10 @@ obj-$(CONFIG_FB_CGFOURTEEN) += cgfourteenfb.o sbusfb.o ...@@ -83,10 +83,10 @@ obj-$(CONFIG_FB_CGFOURTEEN) += cgfourteenfb.o sbusfb.o
obj-$(CONFIG_FB_P9100) += p9100fb.o sbusfb.o obj-$(CONFIG_FB_P9100) += p9100fb.o sbusfb.o
obj-$(CONFIG_FB_LEO) += leofb.o sbusfb.o obj-$(CONFIG_FB_LEO) += leofb.o sbusfb.o
obj-$(CONFIG_FB_STI) += stifb.o sticore.o obj-$(CONFIG_FB_STI) += stifb.o sticore.o
obj-$(CONFIG_FB_PMAG_BA) += pmag-ba-fb.o obj-$(CONFIG_FB_PMAG_BA) += pmag-ba-fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_PMAGB_B) += pmagb-b-fb.o obj-$(CONFIG_FB_PMAGB_B) += pmagb-b-fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_MAXINE) += maxinefb.o obj-$(CONFIG_FB_MAXINE) += maxinefb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_TX3912) += tx3912fb.o obj-$(CONFIG_FB_TX3912) += tx3912fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_MATROX) += matrox/ obj-$(CONFIG_FB_MATROX) += matrox/
obj-$(CONFIG_FB_RIVA) += riva/ obj-$(CONFIG_FB_RIVA) += riva/
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <video/fbcon.h> #include <video/fbcon.h>
#include <video/fbcon-cfb16.h>
static u32 colreg[16]; static u32 colreg[16];
static struct fb_info fb_info; static struct fb_info fb_info;
...@@ -84,7 +83,8 @@ anakinfb_init(void) ...@@ -84,7 +83,8 @@ anakinfb_init(void)
memset(&display, 0, sizeof(struct display)); memset(&display, 0, sizeof(struct display));
strcpy(fb_info.modename, anakinfb_fix.id); strcpy(fb_info.modename, anakinfb_fix.id);
fb_info.node = fb_info.currcon = -1; fb_info.node = NODEV;
fb_info.currcon = -1;
fb_info.flags = FBINFO_FLAG_DEFAULT; fb_info.flags = FBINFO_FLAG_DEFAULT;
fb_info.fbops = &anakinfb_ops; fb_info.fbops = &anakinfb_ops;
fb_info.var = anakinfb_var; fb_info.var = anakinfb_var;
......
...@@ -1659,7 +1659,7 @@ aty128_init(struct fb_info_aty128 *info, const char *name) ...@@ -1659,7 +1659,7 @@ aty128_init(struct fb_info_aty128 *info, const char *name)
{ {
struct fb_var_screeninfo var; struct fb_var_screeninfo var;
u32 dac; u32 dac;
int j, k; int j, k, size;
u8 chip_rev; u8 chip_rev;
const struct aty128_chip_info *aci = &aty128_pci_probe_list[0]; const struct aty128_chip_info *aci = &aty128_pci_probe_list[0];
char *video_card = "Rage128"; char *video_card = "Rage128";
...@@ -1772,6 +1772,9 @@ aty128_init(struct fb_info_aty128 *info, const char *name) ...@@ -1772,6 +1772,9 @@ aty128_init(struct fb_info_aty128 *info, const char *name)
board_list = aty128_board_list_add(board_list, info); board_list = aty128_board_list_add(board_list, info);
size = (fb_display[con].var.bits_per_pixel <= 8) ? 256 : 32;
fb_alloc_cmap(info->fb_info.cmap, size, 0);
if (register_framebuffer(&info->fb_info) < 0) if (register_framebuffer(&info->fb_info) < 0)
return 0; return 0;
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
void cfb_copyarea(struct fb_info *p, struct fb_copyarea *area) void cfb_copyarea(struct fb_info *p, struct fb_copyarea *area)
{ {
int x2, y2, lineincr, shift, shift_right, shift_left, old_dx, old_dy; int x2, y2, lineincr, shift, shift_right, shift_left, old_dx, old_dy;
int n, j, linesize = p->fix.line_length, bpl = sizeof(unsigned long); int j, linesize = p->fix.line_length, bpl = sizeof(unsigned long);
unsigned long start_index, end_index, start_mask, end_mask, last; unsigned long start_index, end_index, start_mask, end_mask, last;
unsigned long *dst = NULL, *src = NULL; unsigned long *dst = NULL, *src = NULL;
char *src1, *dst1; char *src1, *dst1;
...@@ -102,7 +102,7 @@ void cfb_copyarea(struct fb_info *p, struct fb_copyarea *area) ...@@ -102,7 +102,7 @@ void cfb_copyarea(struct fb_info *p, struct fb_copyarea *area)
end_mask = -1 << ((bpl - end_index) << 3); end_mask = -1 << ((bpl - end_index) << 3);
n -= end_index; n -= end_index;
} }
n = n / bpl; n /= bpl;
if (n <= 0) { if (n <= 0) {
if (start_mask) { if (start_mask) {
......
...@@ -108,11 +108,10 @@ void cfb_imageblit(struct fb_info *p, struct fb_image *image) ...@@ -108,11 +108,10 @@ void cfb_imageblit(struct fb_info *p, struct fb_image *image)
} }
if (n) { if (n) {
for (j = n; j > 0; j--) {
end_mask = 0; end_mask = 0;
for (j = n; j > 0; j--) {
if (test_bit(l, src)) if (test_bit(l, src))
end_mask |= (tmp >> (p->var.bits_per_pixel*(k-1))); end_mask |= (tmp >> (p->var.bits_per_pixel*(j-1)));
l--; l--;
if (l < 0) { l = 7; src++; } if (l < 0) { l = 7; src++; }
} }
...@@ -125,9 +124,6 @@ void cfb_imageblit(struct fb_info *p, struct fb_image *image) ...@@ -125,9 +124,6 @@ void cfb_imageblit(struct fb_info *p, struct fb_image *image)
} else { } else {
/* Draw the penguin */ /* Draw the penguin */
n = ((image->width * p->var.bits_per_pixel) >> 3); n = ((image->width * p->var.bits_per_pixel) >> 3);
//shift = ((unsigned long) dst1 & (bpl -1));
end_mask = 0; end_mask = 0;
// n = n/bpl;
} }
} }
...@@ -203,6 +203,9 @@ static struct fb_ops clps7111fb_ops = { ...@@ -203,6 +203,9 @@ static struct fb_ops clps7111fb_ops = {
fb_get_cmap: gen_get_cmap, fb_get_cmap: gen_get_cmap,
fb_setcolreg: clps7111fb_setcolreg, fb_setcolreg: clps7111fb_setcolreg,
fb_blank: clps7111fb_blank, fb_blank: clps7111fb_blank,
fb_fillrect: cfb_fillrect,
fb_copyarea: cfb_copyarea,
fb_imageblit: cfb_imageblit,
}; };
static int static int
......
...@@ -1729,8 +1729,9 @@ static int cyberpro_pci_resume(struct pci_dev *dev) ...@@ -1729,8 +1729,9 @@ static int cyberpro_pci_resume(struct pci_dev *dev)
} }
static struct pci_device_id cyberpro_pci_table[] __devinitdata = { static struct pci_device_id cyberpro_pci_table[] __devinitdata = {
{ PCI_VENDOR_ID_INTERG, PCI_DEVICE_ID_INTERG_1682, // Not yet
PCI_ANY_ID, PCI_ANY_ID, 0, 0, ID_IGA_1682 }, // { PCI_VENDOR_ID_INTERG, PCI_DEVICE_ID_INTERG_1682,
// PCI_ANY_ID, PCI_ANY_ID, 0, 0, ID_IGA_1682 },
{ PCI_VENDOR_ID_INTERG, PCI_DEVICE_ID_INTERG_2000, { PCI_VENDOR_ID_INTERG, PCI_DEVICE_ID_INTERG_2000,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, ID_CYBERPRO_2000 }, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ID_CYBERPRO_2000 },
{ PCI_VENDOR_ID_INTERG, PCI_DEVICE_ID_INTERG_2010, { PCI_VENDOR_ID_INTERG, PCI_DEVICE_ID_INTERG_2010,
......
#ifndef _DN_ACCEL_H_
#define _DN_ACCEL_H_
#include <linux/fb.h>
void dn_bitblt(struct display *p,int x_src,int y_src, int x_dest, int y_dest,
int x_count, int y_count);
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -150,7 +150,7 @@ void fb_copy_cmap(struct fb_cmap *from, struct fb_cmap *to, int fsfromto) ...@@ -150,7 +150,7 @@ void fb_copy_cmap(struct fb_cmap *from, struct fb_cmap *to, int fsfromto)
else else
tooff = from->start-to->start; tooff = from->start-to->start;
size = to->len-tooff; size = to->len-tooff;
if (size > from->len-fromoff) if (size > (int) (from->len - fromoff))
size = from->len-fromoff; size = from->len-fromoff;
if (size <= 0) if (size <= 0)
return; return;
......
...@@ -132,6 +132,7 @@ extern int pmagbafb_init(void); ...@@ -132,6 +132,7 @@ extern int pmagbafb_init(void);
extern int pmagbbfb_init(void); extern int pmagbbfb_init(void);
extern void maxinefb_init(void); extern void maxinefb_init(void);
extern int tx3912fb_init(void); extern int tx3912fb_init(void);
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);
...@@ -300,7 +301,7 @@ static struct { ...@@ -300,7 +301,7 @@ static struct {
{ "hitfb", hitfb_init, NULL }, { "hitfb", hitfb_init, NULL },
#endif #endif
#ifdef CONFIG_FB_TX3912 #ifdef CONFIG_FB_TX3912
{ "tx3912", tx3912fb_init, NULL }, { "tx3912", tx3912fb_init, tx3912fb_setup },
#endif #endif
#ifdef CONFIG_FB_E1355 #ifdef CONFIG_FB_E1355
{ "e1355fb", e1355fb_init, e1355fb_setup }, { "e1355fb", e1355fb_init, e1355fb_setup },
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
* *
*/ */
#include <linux/module.h> #include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/sched.h> #include <linux/sched.h>
...@@ -42,48 +41,32 @@ ...@@ -42,48 +41,32 @@
/* whether are really running on a maxine, KM */ /* whether are really running on a maxine, KM */
#include <asm/bootinfo.h> #include <asm/bootinfo.h>
#include <video/fbcon-mfb.h>
#include <video/fbcon-cfb2.h>
#include <video/fbcon-cfb4.h>
#include <video/fbcon-cfb8.h>
#define arraysize(x) (sizeof(x)/sizeof(*(x)))
static struct display disp;
static struct fb_info fb_info; static struct fb_info fb_info;
static struct display disp;
unsigned long fb_start, fb_size = 1024 * 768, fb_line_length = 1024;
unsigned long fb_regs;
unsigned char fb_bitmask;
static struct fb_var_screeninfo maxinefb_defined = { static struct fb_var_screeninfo maxinefb_defined = {
0, 0, 0, 0, /* W,H, W, H (virtual) load xres,xres_virtual */ xres: 1024,
0, 0, /* virtual -> visible no offset */ yres: 768,
0, /* depth -> load bits_per_pixel */ xres_virtual: 1024,
0, /* greyscale ? */ yres_virtual: 768,
{0, 0, 0}, /* R */ bits_per_pixel: 8,
{0, 0, 0}, /* G */ activate: FB_ACTIVATE_NOW,
{0, 0, 0}, /* B */ height: -1,
{0, 0, 0}, /* transparency */ width: -1,
0, /* standard pixel format */ vmode: FB_VMODE_NONINTERLACED,
FB_ACTIVATE_NOW,
274, 195, /* 14" monitor */
FB_ACCEL_NONE,
0L, 0L, 0L, 0L, 0L,
0L, 0L, 0, /* No sync info */
FB_VMODE_NONINTERLACED,
{0, 0, 0, 0, 0, 0}
};
struct maxinefb_par {
}; };
struct maxinefb_par current_par; static struct fb_fix_screeninfo maxinefb_fix = {
id: "Maxine onboard graphics 1024x768x8",
smem_len: (1024*768),
type: FB_TYPE_PACKED_PIXELS,
visual: FB_VISUAL_PSEUDOCOLOR,
line_length: 1024,
}
/* Reference to machine type set in arch/mips/dec/prom/identify.c, KM */ /* Reference to machine type set in arch/mips/dec/prom/identify.c, KM */
extern unsigned long mips_machtype; extern unsigned long mips_machtype;
/* Handle the funny Inmos RamDAC/video controller ... */ /* Handle the funny Inmos RamDAC/video controller ... */
void maxinefb_ims332_write_register(int regno, register unsigned int val) void maxinefb_ims332_write_register(int regno, register unsigned int val)
...@@ -109,212 +92,41 @@ unsigned int maxinefb_ims332_read_register(int regno) ...@@ -109,212 +92,41 @@ unsigned int maxinefb_ims332_read_register(int regno)
return (j & 0xffff) | ((k & 0xff00) << 8); return (j & 0xffff) | ((k & 0xff00) << 8);
} }
static void maxinefb_encode_var(struct fb_var_screeninfo *var,
struct maxinefb_par *par)
{
int i = 0;
var->xres = 1024;
var->yres = 768;
var->xres_virtual = 1024;
var->yres_virtual = 768;
var->xoffset = 0;
var->yoffset = 0;
var->bits_per_pixel = 8;
var->grayscale = 0;
var->transp.offset = 0;
var->transp.length = 0;
var->transp.msb_right = 0;
var->nonstd = 0;
var->activate = 1;
var->height = -1;
var->width = -1;
var->vmode = FB_VMODE_NONINTERLACED;
var->pixclock = 0;
var->sync = 0;
var->left_margin = 0;
var->right_margin = 0;
var->upper_margin = 0;
var->lower_margin = 0;
var->hsync_len = 0;
var->vsync_len = 0;
for (i = 0; i < arraysize(var->reserved); i++)
var->reserved[i] = 0;
}
static void maxinefb_get_par(struct maxinefb_par *par)
{
*par = current_par;
}
static int maxinefb_fb_update_var(int con, struct fb_info *info)
{
return 0;
}
static int maxinefb_do_fb_set_var(struct fb_var_screeninfo *var,
int isactive)
{
struct maxinefb_par par;
maxinefb_get_par(&par);
maxinefb_encode_var(var, &par);
return 0;
}
/* Get the palette */
static int maxinefb_get_cmap(struct fb_cmap *cmap, int kspc, int con,
struct fb_info *info)
{
unsigned int i;
unsigned long hw_colorvalue = 0; /* raw color value from the register */
unsigned int length;
if (((cmap->start) + (cmap->len)) >= 256) {
length = 256 - (cmap->start);
} else {
length = cmap->len;
}
for (i = 0; i < length; i++) {
hw_colorvalue =
maxinefb_ims332_read_register(IMS332_REG_COLOR_PALETTE
+ cmap->start + i);
(cmap->red[i]) = ((hw_colorvalue & 0x0000ff));
(cmap->green[i]) = ((hw_colorvalue & 0x00ff00) >> 8);
(cmap->blue[i]) = ((hw_colorvalue & 0xff0000) >> 16);
}
return 0;
}
/* Set the palette */ /* Set the palette */
static int maxinefb_setcolreg(unsigned regno, unsigned red, unsigned green,
static int maxinefb_set_cmap(struct fb_cmap *cmap, int kspc, int con, unsigned blue, unsigned transp, struct fb_info *info)
struct fb_info *info)
{
unsigned int i;
unsigned long hw_colorvalue; /* value to be written into the palette reg. */
unsigned short cmap_red;
unsigned short cmap_green;
unsigned short cmap_blue;
unsigned int length;
hw_colorvalue = 0;
if (((cmap->start) + (cmap->len)) >= 256) {
length = 256 - (cmap->start);
} else {
length = cmap->len;
}
for (i = 0; i < length; i++) {
cmap_red = ((cmap->red[i]) >> 8); /* The cmap fields are 16 bits */
cmap_green = ((cmap->green[i]) >> 8); /* wide, but the harware colormap */
cmap_blue = ((cmap->blue[i]) >> 8); /* registers are only 8 bits wide */
hw_colorvalue =
(cmap_blue << 16) + (cmap_green << 8) + (cmap_red);
maxinefb_ims332_write_register(IMS332_REG_COLOR_PALETTE +
cmap->start + i,
hw_colorvalue);
}
return 0;
}
static int maxinefb_get_var(struct fb_var_screeninfo *var, int con,
struct fb_info *info)
{ {
struct maxinefb_par par; /* value to be written into the palette reg. */
if (con == -1) { unsigned long hw_colorvalue = 0;
maxinefb_get_par(&par);
maxinefb_encode_var(var, &par);
} else
*var = fb_display[con].var;
return 0;
}
red >>= 8; /* The cmap fields are 16 bits */
green >>= 8; /* wide, but the harware colormap */
blue >>= 8; /* registers are only 8 bits wide */
static int maxinefb_set_var(struct fb_var_screeninfo *var, int con, hw_colorvalue = (blue << 16) + (green << 8) + (red);
struct fb_info *info)
{
int err;
if ((err = maxinefb_do_fb_set_var(var, 1)))
return err;
return 0;
}
static void maxinefb_encode_fix(struct fb_fix_screeninfo *fix,
struct maxinefb_par *par)
{
memset(fix, 0, sizeof(struct fb_fix_screeninfo));
strcpy(fix->id, "maxinefb");
/* fix->id is a char[16], so a maximum of 15 characters, KM */
fix->smem_start = (char *) fb_start; /* display memory base address, KM */
fix->smem_len = fb_size;
fix->type = FB_TYPE_PACKED_PIXELS;
fix->visual = FB_VISUAL_PSEUDOCOLOR;
fix->xpanstep = 0;
fix->ypanstep = 0;
fix->ywrapstep = 0;
fix->line_length = fb_line_length;
}
static int maxinefb_get_fix(struct fb_fix_screeninfo *fix, int con, maxinefb_ims332_write_register(IMS332_REG_COLOR_PALETTE + regno,
struct fb_info *info) hw_colorvalue);
{
struct maxinefb_par par;
maxinefb_get_par(&par);
maxinefb_encode_fix(fix, &par);
return 0;
}
static int maxinefb_switch(int con, struct fb_info *info)
{
maxinefb_do_fb_set_var(&fb_display[con].var, 1);
info->currcon = con;
return 0; return 0;
} }
static void maxinefb_set_disp(int con)
{
struct fb_fix_screeninfo fix;
struct display *display;
if (con >= 0)
display = &fb_display[con];
else
display = &disp; /* used during initialization */
maxinefb_get_fix(&fix, con, 0);
display->visual = fix.visual;
display->type = fix.type;
display->type_aux = fix.type_aux;
display->ypanstep = fix.ypanstep;
display->ywrapstep = fix.ywrapstep;
display->line_length = fix.line_length;
display->next_line = fix.line_length;
display->can_soft_blank = 0;
display->inverse = 0;
display->dispsw = &fbcon_cfb8;
}
static struct fb_ops maxinefb_ops = { static struct fb_ops maxinefb_ops = {
owner: THIS_MODULE, owner: THIS_MODULE,
fb_get_fix: maxinefb_get_fix, fb_get_fix: gen_get_fix,
fb_get_var: maxinefb_get_var, fb_get_var: gen_get_var,
fb_set_var: maxinefb_set_var, fb_set_var: gen_set_var,
fb_get_cmap: maxinefb_get_cmap, fb_get_cmap: gen_get_cmap,
fb_set_cmap: maxinefb_set_cmap, fb_set_cmap: gen_set_cmap,
fb_setcolreg: maxinefb_setcolreg,
fb_fillrect: cfb_fillrect,
fb_copyarea: cfb_copyarea,
fb_imageblit: cfb_imageblit,
}; };
int __init maxinefb_init(void) int __init maxinefb_init(void)
{ {
volatile unsigned char *fboff; volatile unsigned char *fboff;
unsigned long fb_start;
int i; int i;
/* Validate we're on the proper machine type */ /* Validate we're on the proper machine type */
...@@ -332,6 +144,8 @@ int __init maxinefb_init(void) ...@@ -332,6 +144,8 @@ int __init maxinefb_init(void)
for (fboff = fb_start; fboff < fb_start + 0x1ffff; fboff++) for (fboff = fb_start; fboff < fb_start + 0x1ffff; fboff++)
*fboff = 0x0; *fboff = 0x0;
maxinefb_fix.smem_start = fb_start;
/* erase hardware cursor */ /* erase hardware cursor */
for (i = 0; i < 512; i++) { for (i = 0; i < 512; i++) {
maxinefb_ims332_write_register(IMS332_REG_CURSOR_RAM + i, maxinefb_ims332_write_register(IMS332_REG_CURSOR_RAM + i,
...@@ -344,34 +158,26 @@ int __init maxinefb_init(void) ...@@ -344,34 +158,26 @@ int __init maxinefb_init(void)
*/ */
} }
/* Fill in the available video resolution */
maxinefb_defined.xres = 1024;
maxinefb_defined.yres = 768;
maxinefb_defined.xres_virtual = 1024;
maxinefb_defined.yres_virtual = 768;
maxinefb_defined.bits_per_pixel = 8;
/* Let there be consoles... */ /* Let there be consoles... */
strcpy(fb_info.modename, "Maxine onboard graphics 1024x768x8"); strcpy(fb_info.modename, "Maxine onboard graphics 1024x768x8");
/* fb_info.modename: maximum of 39 characters + trailing nullbyte, KM */
fb_info.changevar = NULL; fb_info.changevar = NULL;
fb_info.node = NODEV; fb_info.node = NODEV;
fb_info.fbops = &maxinefb_ops; fb_info.fbops = &maxinefb_ops;
fb_info.screen_base = (char *) fb_start; fb_info.screen_base = (char *) maxinefb_fix.smem_start;
fb_info.var = maxinefb_defined;
fb_info.fix = maxinefb_fix;
fb_info.disp = &disp; fb_info.disp = &disp;
fb_info.currcon = -1; fb_info.currcon = -1;
fb_info.switch_con = &maxinefb_switch; fb_info.switch_con = gen_switch;
fb_info.updatevar = &maxinefb_fb_update_var; fb_info.updatevar = gen_update_var;
fb_info.flags = FBINFO_FLAG_DEFAULT; fb_info.flags = FBINFO_FLAG_DEFAULT;
maxinefb_do_fb_set_var(&maxinefb_defined, 1);
maxinefb_get_var(&disp.var, -1, &fb_info); fb_alloc_cmap(&fb_info.cmap, 256, 0);
maxinefb_set_disp(-1); gen_set_disp(-1, &fb_info);
if (register_framebuffer(&fb_info) < 0) if (register_framebuffer(&fb_info) < 0)
return 1; return 1;
return 0; return 0;
} }
......
This diff is collapsed.
This diff is collapsed.
...@@ -37,12 +37,6 @@ ...@@ -37,12 +37,6 @@
#include "pmag-ba-fb.h" #include "pmag-ba-fb.h"
#include <video/fbcon.h> #include <video/fbcon.h>
#include <video/fbcon-mfb.h>
#include <video/fbcon-cfb2.h>
#include <video/fbcon-cfb4.h>
#include <video/fbcon-cfb8.h>
#define arraysize(x) (sizeof(x)/sizeof(*(x)))
struct pmag_ba_ramdac_regs { struct pmag_ba_ramdac_regs {
unsigned char addr_low; unsigned char addr_low;
...@@ -54,316 +48,119 @@ struct pmag_ba_ramdac_regs { ...@@ -54,316 +48,119 @@ struct pmag_ba_ramdac_regs {
unsigned char cmap; unsigned char cmap;
}; };
struct pmag_ba_my_fb_info {
struct fb_info info;
struct pmag_ba_ramdac_regs *bt459_regs;
unsigned long pmagba_fb_start;
unsigned long pmagba_fb_size;
unsigned long pmagba_fb_line_length;
};
static struct display disp;
/* /*
* Max 3 TURBOchannel slots -> max 3 PMAG-BA :) * Max 3 TURBOchannel slots -> max 3 PMAG-BA :)
*/ */
static struct pmag_ba_my_fb_info pmagba_fb_info[3]; static struct fb_info pmagba_fb_info[3];
static struct display pmagba_disp[3];
static struct fb_var_screeninfo pmagbafb_defined = { static struct fb_var_screeninfo pmagbafb_defined = {
0, 0, 0, 0, /* W,H, W, H (virtual) load xres,xres_virtual */ xres: 1024,
0, 0, /* virtual -> visible no offset */ yres: 864,
0, /* depth -> load bits_per_pixel */ xres_virtual: 1024,
0, /* greyscale ? */ yres_virtual: 864,
{0, 0, 0}, /* R */ bits_per_pixel: 8,
{0, 0, 0}, /* G */ activate: FB_ACTIVATE_NOW,
{0, 0, 0}, /* B */ height: 274,
{0, 0, 0}, /* transparency */ width: 195,
0, /* standard pixel format */ accel: FB_ACCEL_NONE,
FB_ACTIVATE_NOW, vmode: FB_VMODE_NONINTERLACED,
274, 195, /* 14" monitor */ }
FB_ACCEL_NONE,
0L, 0L, 0L, 0L, 0L, static struct fb_fix_screeninfo pmagbafb_fix = {
0L, 0L, 0, /* No sync info */ id: "PMAG-BA",
FB_VMODE_NONINTERLACED, smem_len: (1024 * 864),
{0, 0, 0, 0, 0, 0} type: FB_TYPE_PACKED_PIXELS,
}; visual: FB_VISUAL_PSEUDOCOLOR,
line_length: 1024,
struct pmagbafb_par {
};
struct pmagbafb_par current_par;
static void pmagbafb_encode_var(struct fb_var_screeninfo *var,
struct pmagbafb_par *par)
{
int i = 0;
var->xres = 1024;
var->yres = 864;
var->xres_virtual = 1024;
var->yres_virtual = 864;
var->xoffset = 0;
var->yoffset = 0;
var->bits_per_pixel = 8;
var->grayscale = 0;
var->transp.offset = 0;
var->transp.length = 0;
var->transp.msb_right = 0;
var->nonstd = 0;
var->activate = 1;
var->height = -1;
var->width = -1;
var->vmode = FB_VMODE_NONINTERLACED;
var->pixclock = 0;
var->sync = 0;
var->left_margin = 0;
var->right_margin = 0;
var->upper_margin = 0;
var->lower_margin = 0;
var->hsync_len = 0;
var->vsync_len = 0;
for (i = 0; i < arraysize(var->reserved); i++)
var->reserved[i] = 0;
}
static void pmagbafb_get_par(struct pmagbafb_par *par)
{
*par = current_par;
}
static int pmagba_fb_update_var(int con, struct fb_info *info)
{
return 0;
}
static int pmagba_do_fb_set_var(struct fb_var_screeninfo *var,
int isactive)
{
struct pmagbafb_par par;
pmagbafb_get_par(&par);
pmagbafb_encode_var(var, &par);
return 0;
} }
/* /*
* Turn hardware cursor off * Turn hardware cursor off
*/ */
void pmagbafb_erase_cursor(struct pmag_ba_my_fb_info *info) void pmagbafb_erase_cursor(struct pmag_ba_ramdac_regs *bt459_regs)
{ {
info->bt459_regs->addr_low = 0; bt459_regs->addr_low = 0;
info->bt459_regs->addr_hi = 3; bt459_regs->addr_hi = 3;
info->bt459_regs->data = 0; bt459_regs->data = 0;
}
/*
* Write to a Bt459 color map register
*/
void pmag_ba_bt459_write_colormap(struct pmag_ba_my_fb_info *info,
int reg, __u8 red, __u8 green, __u8 blue)
{
info->bt459_regs->addr_low = (__u8) reg;
info->bt459_regs->addr_hi = 0;
info->bt459_regs->cmap = red;
info->bt459_regs->cmap = green;
info->bt459_regs->cmap = blue;
}
/*
* Get the palette
*/
static int pmagbafb_get_cmap(struct fb_cmap *cmap, int kspc, int con,
struct fb_info *info)
{
unsigned int i;
unsigned int length;
if (((cmap->start) + (cmap->len)) >= 256) {
length = 256 - (cmap->start);
} else {
length = cmap->len;
}
for (i = 0; i < length; i++) {
/*
* TODO
*/
}
return 0;
} }
/* /*
* Set the palette. * Set the palette.
*/ */
static int pmagbafb_set_cmap(struct fb_cmap *cmap, int kspc, int con, static int pmagbafb_setcolreg(unsigned regno, unsigned red, unsigned green,
struct fb_info *info) unsigned blue, unsigned transp,
{
unsigned int i;
__u8 cmap_red, cmap_green, cmap_blue;
unsigned int length;
if (((cmap->start) + (cmap->len)) >= 256)
length = 256 - (cmap->start);
else
length = cmap->len;
for (i = 0; i < length; i++) {
cmap_red = ((cmap->red[i]) >> 8); /* The cmap fields are 16 bits */
cmap_green = ((cmap->green[i]) >> 8); /* wide, but the harware colormap */
cmap_blue = ((cmap->blue[i]) >> 8); /* registers are only 8 bits wide */
pmag_ba_bt459_write_colormap((struct pmag_ba_my_fb_info *)
info, cmap->start + i,
cmap_red, cmap_green,
cmap_blue);
}
return 0;
}
static int pmagbafb_get_var(struct fb_var_screeninfo *var, int con,
struct fb_info *info)
{
struct pmagbafb_par par;
if (con == -1) {
pmagbafb_get_par(&par);
pmagbafb_encode_var(var, &par);
} else
*var = fb_display[con].var;
return 0;
}
static int pmagbafb_set_var(struct fb_var_screeninfo *var, int con,
struct fb_info *info)
{
int err;
if ((err = pmagba_do_fb_set_var(var, 1)))
return err;
return 0;
}
static void pmagbafb_encode_fix(struct fb_fix_screeninfo *fix,
struct pmagbafb_par *par,
struct pmag_ba_my_fb_info *info)
{
memset(fix, 0, sizeof(struct fb_fix_screeninfo));
strcpy(fix->id, "PMAG-BA");
fix->smem_start = info->pmagba_fb_start;
fix->smem_len = info->pmagba_fb_size;
fix->type = FB_TYPE_PACKED_PIXELS;
fix->visual = FB_VISUAL_PSEUDOCOLOR;
fix->xpanstep = 0;
fix->ypanstep = 0;
fix->ywrapstep = 0;
fix->line_length = info->pmagba_fb_line_length;
}
static int pmagbafb_get_fix(struct fb_fix_screeninfo *fix, int con,
struct fb_info *info) struct fb_info *info)
{ {
struct pmagbafb_par par; struct pmag_ba_ramdac_regs *bt459_regs = (struct pmag_ba_ramdac_regs *) info->par;
pmagbafb_get_par(&par); if (regno >= info->cmap.len)
pmagbafb_encode_fix(fix, &par, (struct pmag_ba_my_fb_info *) info); return 1;
return 0; red >>= 8; /* The cmap fields are 16 bits */
} green >>= 8; /* wide, but the harware colormap */
blue >>= 8; /* registers are only 8 bits wide */
static int pmagbafb_switch(int con, struct fb_info *info) bt459_regs->addr_low = (__u8) regno;
{ bt459_regs->addr_hi = 0;
pmagba_do_fb_set_var(&fb_display[con].var, 1); bt459_regs->cmap = red;
info->currcon = con; bt459_regs->cmap = green;
bt459_regs->cmap = blue;
return 0; return 0;
} }
static void pmagbafb_set_disp(int con, struct pmag_ba_my_fb_info *info)
{
struct fb_fix_screeninfo fix;
struct display *display;
if (con >= 0)
display = &fb_display[con];
else
display = &disp; /* used during initialization */
pmagbafb_get_fix(&fix, con, (struct fb_info *) info);
display->visual = fix.visual;
display->type = fix.type;
display->type_aux = fix.type_aux;
display->ypanstep = fix.ypanstep;
display->ywrapstep = fix.ywrapstep;
display->line_length = fix.line_length;
display->next_line = fix.line_length;
display->can_soft_blank = 0;
display->inverse = 0;
display->dispsw = &fbcon_cfb8;
}
static struct fb_ops pmagbafb_ops = { static struct fb_ops pmagbafb_ops = {
owner: THIS_MODULE, owner: THIS_MODULE,
fb_get_fix: pmagbafb_get_fix, fb_get_fix: gen_get_fix,
fb_get_var: pmagbafb_get_var, fb_get_var: gen_get_var,
fb_set_var: pmagbafb_set_var, fb_set_var: gen_set_var,
fb_get_cmap: pmagbafb_get_cmap, fb_get_cmap: gen_get_cmap,
fb_set_cmap: pmagbafb_set_cmap, fb_set_cmap: gen_set_cmap,
}; fb_setcolreg: pmagbafb_setcolreg,
fb_fillrect: cfb_fillrect,
fb_copyarea: cfb_copyarea,
fb_imageblit: cfb_imageblit,
}
int __init pmagbafb_init_one(int slot) int __init pmagbafb_init_one(int slot)
{ {
unsigned long base_addr = get_tc_base_addr(slot); unsigned long base_addr = get_tc_base_addr(slot);
struct pmag_ba_my_fb_info *ip = struct fb_info *info = &pmagba_fb_info[slot];
(struct pmag_ba_my_fb_info *) &pmagba_fb_info[slot]; struct display *disp = &pmagba_disp[slot];
printk("PMAG-BA framebuffer in slot %d\n", slot); printk("PMAG-BA framebuffer in slot %d\n", slot);
/* /*
* Framebuffer display memory base address and friends * Framebuffer display memory base address and friends
*/ */
ip->bt459_regs = pmagbafb_fix.smem_start = base_addr + PMAG_BA_ONBOARD_FBMEM_OFFSET;
(struct pmag_ba_ramdac_regs *) (base_addr + info->par = (base_addr + PMAG_BA_BT459_OFFSET);
PMAG_BA_BT459_OFFSET);
ip->pmagba_fb_start = base_addr + PMAG_BA_ONBOARD_FBMEM_OFFSET;
ip->pmagba_fb_size = 1024 * 864;
ip->pmagba_fb_line_length = 1024;
/* /*
* Configure the Bt459 RAM DAC * Configure the Bt459 RAM DAC
*/ */
pmagbafb_erase_cursor(ip); pmagbafb_erase_cursor((struct pmag_ba_ramdac_regs *) info->par);
/*
* Fill in the available video resolution
*/
pmagbafb_defined.xres = 1024;
pmagbafb_defined.yres = 864;
pmagbafb_defined.xres_virtual = 1024;
pmagbafb_defined.yres_virtual = 864;
pmagbafb_defined.bits_per_pixel = 8;
/* /*
* Let there be consoles.. * Let there be consoles..
*/ */
strcpy(ip->info.modename, "PMAG-BA"); strcpy(info->modename, pmagbafb_fix.id);
ip->info.changevar = NULL; info->changevar = NULL;
ip->info.node = NODEV; info->node = NODEV;
ip->info.fbops = &pmagbafb_ops; info->fbops = &pmagbafb_ops;
ip->info.screen_base = ip->pmagba_fb_start; info->var = pmagbafb_defined;
ip->info.disp = &disp; info->fix = pmagbafb_fix;
ip->info.currcon = -1; info->screen_base = pmagbafb_fix.smem_start;
ip->info.switch_con = &pmagbafb_switch; info->disp = &disp;
ip->info.updatevar = &pmagba_fb_update_var; info->currcon = -1;
ip->info.flags = FBINFO_FLAG_DEFAULT; info->switch_con = gen_switch;
info->updatevar = gen_update_var;
pmagba_do_fb_set_var(&pmagbafb_defined, 1); info->flags = FBINFO_FLAG_DEFAULT;
pmagbafb_get_var(&disp.var, -1, (struct fb_info *) ip);
pmagbafb_set_disp(-1, ip); fb_alloc_cmap(&fb_info.cmap, 256, 0);
gen_set_disp(-1, info);
if (register_framebuffer((struct fb_info *) ip) < 0)
if (register_framebuffer(info) < 0)
return 1; return 1;
return 0; return 0;
} }
......
...@@ -40,12 +40,6 @@ ...@@ -40,12 +40,6 @@
#include "pmagb-b-fb.h" #include "pmagb-b-fb.h"
#include <video/fbcon.h> #include <video/fbcon.h>
#include <video/fbcon-mfb.h>
#include <video/fbcon-cfb2.h>
#include <video/fbcon-cfb4.h>
#include <video/fbcon-cfb8.h>
#define arraysize(x) (sizeof(x)/sizeof(*(x)))
struct pmagb_b_ramdac_regs { struct pmagb_b_ramdac_regs {
unsigned char addr_low; unsigned char addr_low;
...@@ -57,317 +51,119 @@ struct pmagb_b_ramdac_regs { ...@@ -57,317 +51,119 @@ struct pmagb_b_ramdac_regs {
unsigned char cmap; unsigned char cmap;
}; };
struct pmagb_b_my_fb_info {
struct fb_info info;
struct pmagb_b_ramdac_regs *bt459_regs;
unsigned long pmagbb_fb_start;
unsigned long pmagbb_fb_size;
unsigned long pmagbb_fb_line_length;
};
static struct display disp;
/* /*
* Max 3 TURBOchannel slots -> max 3 PMAGB-B :) * Max 3 TURBOchannel slots -> max 3 PMAGB-B :)
*/ */
static struct pmagb_b_my_fb_info pmagbb_fb_info[3]; static struct fb_info pmagbb_fb_info[3];
static struct display pmagbb_disp[3];
static struct fb_var_screeninfo pmagbbfb_defined = { static struct fb_var_screeninfo pmagbbfb_defined = {
0, 0, 0, 0, /* W,H, W, H (virtual) load xres,xres_virtual */ xres: 1280,
0, 0, /* virtual -> visible no offset */ yres: 1024,
0, /* depth -> load bits_per_pixel */ xres_virtual: 1280,
0, /* greyscale ? */ yres_virtual: 1024,
{0, 0, 0}, /* R */ bits_per_pixel: 8,
{0, 0, 0}, /* G */ activate: FB_ACTIVATE_NOW,
{0, 0, 0}, /* B */ height: 274,
{0, 0, 0}, /* transparency */ width: 195,
0, /* standard pixel format */ accel_flags: FB_ACCEL_NONE,
FB_ACTIVATE_NOW, vmode: FB_VMODE_NONINTERLACED,
274, 195, /* 14" monitor */
FB_ACCEL_NONE,
0L, 0L, 0L, 0L, 0L,
0L, 0L, 0, /* No sync info */
FB_VMODE_NONINTERLACED,
{0, 0, 0, 0, 0, 0}
}; };
struct pmagbbfb_par { static struct fb_fix_screeninfo pmagbafb_fix = {
}; id: "PMAGB-BA",
smem_len: (1280 * 1024),
struct pmagbbfb_par current_par; type: FB_TYPE_PACKED_PIXELS,
visual: FB_VISUAL_PSEUDOCOLOR,
static void pmagbbfb_encode_var(struct fb_var_screeninfo *var, line_length: 1280,
struct pmagbbfb_par *par)
{
int i = 0;
var->xres = 1280;
var->yres = 1024;
var->xres_virtual = 1280;
var->yres_virtual = 1024;
var->xoffset = 0;
var->yoffset = 0;
var->bits_per_pixel = 8;
var->grayscale = 0;
var->transp.offset = 0;
var->transp.length = 0;
var->transp.msb_right = 0;
var->nonstd = 0;
var->activate = 1;
var->height = -1;
var->width = -1;
var->vmode = FB_VMODE_NONINTERLACED;
var->pixclock = 0;
var->sync = 0;
var->left_margin = 0;
var->right_margin = 0;
var->upper_margin = 0;
var->lower_margin = 0;
var->hsync_len = 0;
var->vsync_len = 0;
for (i = 0; i < arraysize(var->reserved); i++)
var->reserved[i] = 0;
}
static void pmagbbfb_get_par(struct pmagbbfb_par *par)
{
*par = current_par;
}
static int pmagbb_fb_update_var(int con, struct fb_info *info)
{
return 0;
}
static int pmagbb_do_fb_set_var(struct fb_var_screeninfo *var,
int isactive)
{
struct pmagbbfb_par par;
pmagbbfb_get_par(&par);
pmagbbfb_encode_var(var, &par);
return 0;
} }
/* /*
* Turn hardware cursor off * Turn hardware cursor off
*/ */
void pmagbbfb_erase_cursor(struct pmagb_b_my_fb_info *info) void pmagbbfb_erase_cursor(struct pmagb_b_ramdac_regs *bt459_regs)
{ {
info->bt459_regs->addr_low = 0; bt459_regs->addr_low = 0;
info->bt459_regs->addr_hi = 3; bt459_regs->addr_hi = 3;
info->bt459_regs->data = 0; bt459_regs->data = 0;
}
/*
* Write to a Bt459 color map register
*/
void pmagb_b_bt459_write_colormap(struct pmagb_b_my_fb_info *info,
int reg, __u8 red, __u8 green, __u8 blue)
{
info->bt459_regs->addr_low = (__u8) reg;
info->bt459_regs->addr_hi = 0;
info->bt459_regs->cmap = red;
info->bt459_regs->cmap = green;
info->bt459_regs->cmap = blue;
}
/*
* Get the palette
*/
static int pmagbbfb_get_cmap(struct fb_cmap *cmap, int kspc, int con,
struct fb_info *info)
{
unsigned int i;
unsigned int length;
if (((cmap->start) + (cmap->len)) >= 256) {
length = 256 - (cmap->start);
} else {
length = cmap->len;
}
for (i = 0; i < length; i++) {
/*
* TODO
*/
}
return 0;
} }
/* /*
* Set the palette. * Set the palette.
*/ */
static int pmagbbfb_set_cmap(struct fb_cmap *cmap, int kspc, int con, static int pmagbbfb_setcolreg(unsigned regno, unsigned red, unsigned green,
struct fb_info *info) unsigned blue, unsigned transp,
{
unsigned int i;
__u8 cmap_red, cmap_green, cmap_blue;
unsigned int length;
if (((cmap->start) + (cmap->len)) >= 256)
length = 256 - (cmap->start);
else
length = cmap->len;
for (i = 0; i < length; i++) {
cmap_red = ((cmap->red[i]) >> 8); /* The cmap fields are 16 bits */
cmap_green = ((cmap->green[i]) >> 8); /* wide, but the harware colormap */
cmap_blue = ((cmap->blue[i]) >> 8); /* registers are only 8 bits wide */
pmagb_b_bt459_write_colormap((struct pmagb_b_my_fb_info *)
info, cmap->start + i,
cmap_red, cmap_green,
cmap_blue);
}
return 0;
}
static int pmagbbfb_get_var(struct fb_var_screeninfo *var, int con,
struct fb_info *info) struct fb_info *info)
{ {
struct pmagbbfb_par par; struct pmagb_b_ramdac_regs *bt459_regs = (struct pmagb_b_ramdac_regs *) info->par;
if (con == -1) {
pmagbbfb_get_par(&par);
pmagbbfb_encode_var(var, &par);
} else
*var = fb_display[con].var;
return 0;
}
static int pmagbbfb_set_var(struct fb_var_screeninfo *var, int con, if (regno >= info->cmap.len)
struct fb_info *info) return 1;
{
int err;
if ((err = pmagbb_do_fb_set_var(var, 1)))
return err;
return 0;
}
static void pmagbbfb_encode_fix(struct fb_fix_screeninfo *fix,
struct pmagbbfb_par *par,
struct pmagb_b_my_fb_info *info)
{
memset(fix, 0, sizeof(struct fb_fix_screeninfo));
strcpy(fix->id, "PMAGB-BA");
fix->smem_start = info->pmagbb_fb_start;
fix->smem_len = info->pmagbb_fb_size;
fix->type = FB_TYPE_PACKED_PIXELS;
fix->visual = FB_VISUAL_PSEUDOCOLOR;
fix->xpanstep = 0;
fix->ypanstep = 0;
fix->ywrapstep = 0;
fix->line_length = info->pmagbb_fb_line_length;
}
static int pmagbbfb_get_fix(struct fb_fix_screeninfo *fix, int con,
struct fb_info *info)
{
struct pmagbbfb_par par;
pmagbbfb_get_par(&par); red >>= 8; /* The cmap fields are 16 bits */
pmagbbfb_encode_fix(fix, &par, (struct pmagb_b_my_fb_info *) info); green >>= 8; /* wide, but the harware colormap */
blue >>= 8; /* registers are only 8 bits wide */
bt459_regs->addr_low = (__u8) regno;
bt459_regs->addr_hi = 0;
bt459_regs->cmap = red;
bt459_regs->cmap = green;
bt459_regs->cmap = blue;
return 0; return 0;
} }
static int pmagbbfb_switch(int con, struct fb_info *info)
{
pmagbb_do_fb_set_var(&fb_display[con].var, 1);
info->currcon = con;
return 0;
}
static void pmagbbfb_set_disp(int con, struct pmagb_b_my_fb_info *info)
{
struct fb_fix_screeninfo fix;
struct display *display;
if (con >= 0)
display = &fb_display[con];
else
display = &disp; /* used during initialization */
pmagbbfb_get_fix(&fix, con, (struct fb_info *) info);
display->visual = fix.visual;
display->type = fix.type;
display->type_aux = fix.type_aux;
display->ypanstep = fix.ypanstep;
display->ywrapstep = fix.ywrapstep;
display->line_length = fix.line_length;
display->next_line = fix.line_length;
display->can_soft_blank = 0;
display->inverse = 0;
display->dispsw = &fbcon_cfb8;
}
static struct fb_ops pmagbbfb_ops = { static struct fb_ops pmagbbfb_ops = {
owner: THIS_MODULE, owner: THIS_MODULE,
fb_get_fix: pmagbbfb_get_fix, fb_get_fix: gen_get_fix,
fb_get_var: pmagbbfb_get_var, fb_get_var: gen_get_var,
fb_set_var: pmagbbfb_set_var, fb_set_var: gen_set_var,
fb_get_cmap: pmagbbfb_get_cmap, fb_get_cmap: gen_get_cmap,
fb_set_cmap: pmagbbfb_set_cmap, fb_set_cmap: gen_set_cmap,
fb_setcolreg: pmagbbfb_setcolreg,
fb_fillrect: cfb_fillrect,
fb_copyarea: cfb_copyarea,
fb_imageblit: cfb_imageblit,
}; };
int __init pmagbbfb_init_one(int slot) int __init pmagbbfb_init_one(int slot)
{ {
unsigned long base_addr = get_tc_base_addr(slot); unsigned long base_addr = get_tc_base_addr(slot);
struct pmagb_b_my_fb_info *ip = struct fb_info *info = &pmagbb_fb_info[slot];
(struct pmagb_b_my_fb_info *) &pmagbb_fb_info[slot]; struct display *disp = &pmagbb_disp[slot];
printk("PMAGB-BA framebuffer in slot %d\n", slot); printk("PMAGB-BA framebuffer in slot %d\n", slot);
/* /*
* Framebuffer display memory base address and friends * Framebuffer display memory base address and friends
*/ */
ip->bt459_regs = pmagbbfb_fix.smem_start = base_addr + PMAGB_B_ONBOARD_FBMEM_OFFSET;
(struct pmagb_b_ramdac_regs *) (base_addr + info->par = (base_addr + PMAGB_B_BT459_OFFSET);
PMAGB_B_BT459_OFFSET);
ip->pmagbb_fb_start = base_addr + PMAGB_B_ONBOARD_FBMEM_OFFSET;
ip->pmagbb_fb_size = 1280 * 1024;
ip->pmagbb_fb_line_length = 1280;
/* /*
* Configure the Bt459 RAM DAC * Configure the Bt459 RAM DAC
*/ */
pmagbbfb_erase_cursor(ip); pmagbbfb_erase_cursor((struct pmagb_b_ramdac_regs *) info->par);
/*
* Fill in the available video resolution
*/
pmagbbfb_defined.xres = 1280;
pmagbbfb_defined.yres = 1024;
pmagbbfb_defined.xres_virtual = 1280;
pmagbbfb_defined.yres_virtual = 1024;
pmagbbfb_defined.bits_per_pixel = 8;
/* /*
* Let there be consoles.. * Let there be consoles..
*/ */
strcpy(ip->info.modename, "PMAGB-BA"); strcpy(info->modename, pmagbbfb_fix.id);
ip->info.changevar = NULL; info->changevar = NULL;
ip->info.node = NODEV; info->node = NODEV;
ip->info.fbops = &pmagbbfb_ops; info->fbops = &pmagbbfb_ops;
ip->info.screen_base = (char *) ip->pmagbb_fb_start; info->var = pmagbbfb_defined;
fix->smem_len = info->pmagbb_fb_size; info->fix = pmagbbfb_fix;
ip->info.disp = &disp; info->screen_base = pmagbbfb_fix.smem_start;
ip->info.currcon = -1; info->disp = &disp;
ip->info.switch_con = &pmagbbfb_switch; info->currcon = -1;
ip->info.updatevar = &pmagbb_fb_update_var; info->switch_con = gen_switch;
ip->info.flags = FBINFO_FLAG_DEFAULT; info->updatevar = gen_update_var;
info->flags = FBINFO_FLAG_DEFAULT;
pmagbb_do_fb_set_var(&pmagbbfb_defined, 1);
pmagbbfb_get_var(&disp.var, -1, (struct fb_info *) ip); fb_alloc_cmap(&fb_info.cmap, 256, 0);
pmagbbfb_set_disp(-1, ip); gen_set_disp(-1, info);
if (register_framebuffer((struct fb_info *) ip) < 0) if (register_framebuffer(info) < 0)
return 1; return 1;
return 0; return 0;
} }
......
...@@ -298,7 +298,7 @@ static int xxxfb_setcolreg(unsigned regno, unsigned red, unsigned green, ...@@ -298,7 +298,7 @@ static int xxxfb_setcolreg(unsigned regno, unsigned red, unsigned green,
* Returns negative errno on error, or zero on success. * Returns negative errno on error, or zero on success.
* *
*/ */
static int xxxfb_pan_display(struct fb_var_screeninfo *var, static int xxxfb_pan_display(struct fb_var_screeninfo *var, int con,
const struct fb_info *info) const struct fb_info *info)
{ {
/* ... */ /* ... */
......
This diff is collapsed.
This diff is collapsed.
...@@ -90,7 +90,7 @@ static int vfb_check_var(struct fb_var_screeninfo *var, ...@@ -90,7 +90,7 @@ static int vfb_check_var(struct fb_var_screeninfo *var,
static int vfb_set_par(struct fb_info *info); 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, static int vfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
u_int transp, struct fb_info *info); u_int transp, struct fb_info *info);
static int vfb_pan_display(struct fb_var_screeninfo *var, static int vfb_pan_display(struct fb_var_screeninfo *var, int con,
struct fb_info *info); struct fb_info *info);
static int vfb_mmap(struct fb_info *info, struct file *file, static int vfb_mmap(struct fb_info *info, struct file *file,
struct vm_area_struct *vma); struct vm_area_struct *vma);
...@@ -358,7 +358,7 @@ static int vfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, ...@@ -358,7 +358,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 * This call looks only at xoffset, yoffset and the FB_VMODE_YWRAP flag
*/ */
static int vfb_pan_display(struct fb_var_screeninfo *var, static int vfb_pan_display(struct fb_var_screeninfo *var, int con,
struct fb_info *info) struct fb_info *info)
{ {
if (var->vmode & FB_VMODE_YWRAP) { if (var->vmode & FB_VMODE_YWRAP) {
......
This diff is collapsed.
/* /*
* linux/drivers/video/tx3912fb.h * linux/include/video/tx3912.h
* *
* Copyright (C) 2001 Steven Hill (sjhill@realitydiluted.com) * Copyright (C) 2001 Steven Hill (sjhill@realitydiluted.com)
* *
...@@ -60,69 +60,3 @@ ...@@ -60,69 +60,3 @@
/* Video Control 4 Register */ /* Video Control 4 Register */
#define TX3912_VIDCTRL4_VIDBASELO_MASK 0x000ffff0 #define TX3912_VIDCTRL4_VIDBASELO_MASK 0x000ffff0
/*
* Begin platform specific configurations
*/
#if defined(CONFIG_NINO_4MB) || defined(CONFIG_NINO_8MB)
#define FB_X_RES 240
#define FB_Y_RES 320
#if defined(CONFIG_FBCON_CFB4)
#define FB_BPP 4
#else
#if defined(CONFIG_FBCON_CFB2)
#define FB_BPP 2
#else
#define FB_BPP 1
#endif
#endif
#define FB_IS_GREY 1
#define FB_IS_INVERSE 0
#endif
#ifdef CONFIG_NINO_16MB
#define FB_X_RES 240
#define FB_Y_RES 320
#define FB_BPP 8
#define FB_IS_GREY 0
#define FB_IS_INVERSE 0
#endif
/*
* Define virtual resolutions if necessary
*/
#ifndef FB_X_VIRTUAL_RES
#define FB_X_VIRTUAL_RES FB_X_RES
#endif
#ifndef FB_Y_VIRTUAL_RES
#define FB_Y_VIRTUAL_RES FB_Y_RES
#endif
/*
* Framebuffer address and size
*/
u_long tx3912fb_paddr = 0;
u_long tx3912fb_vaddr = 0;
u_long tx3912fb_size = (FB_X_RES * FB_Y_RES * FB_BPP / 8);
/*
* Framebuffer info structure
*/
static struct fb_var_screeninfo tx3912fb_info = {
FB_X_RES, FB_Y_RES,
FB_X_VIRTUAL_RES, FB_Y_VIRTUAL_RES,
0, 0,
FB_BPP, FB_IS_GREY,
{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
0, FB_ACTIVATE_NOW,
-1, -1, 0, 20000,
64, 64, 32, 32, 64, 2,
0, FB_VMODE_NONINTERLACED,
{0,0,0,0,0,0}
};
/*
* Framebuffer name
*/
static char TX3912FB_NAME[16] = "tx3912fb";
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