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

Port of chipsfb driver to new api. Removed the fontwidth8 option. Let the...

Port of chipsfb driver to new api. Removed the fontwidth8 option. Let the xxxfb_imageblit function handle this. 64 bit m achine fixes.
parent f25be5cb
......@@ -28,11 +28,11 @@ obj-$(CONFIG_FB_ATARI) += atafb.o
obj-$(CONFIG_FB_ATY128) += aty128fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_RADEON) += radeonfb.o
obj-$(CONFIG_FB_NEOMAGIC) += neofb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_IGA) += igafb.o cfbfillrect.o cfbcopyarea.o cfbimgblit.o
obj-$(CONFIG_FB_IGA) += igafb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_CONTROL) += controlfb.o
obj-$(CONFIG_FB_PLATINUM) += platinumfb.o
obj-$(CONFIG_FB_VALKYRIE) += valkyriefb.o
obj-$(CONFIG_FB_CT65550) += chipsfb.o
obj-$(CONFIG_FB_CT65550) += chipsfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.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_CYBER) += cyberfb.o
......
......@@ -102,10 +102,10 @@ static inline void color_imageblit(struct fb_image *image, struct fb_info *p, u8
unsigned long start_index, unsigned long pitch_index)
{
/* Draw the penguin */
unsigned long *palette = (unsigned long *) p->pseudo_palette;
unsigned long *dst, *dst2, color = 0, val, shift;
int i, n, bpp = p->var.bits_per_pixel;
unsigned long null_bits = BITS_PER_LONG - bpp;
u32 *palette = (u32 *) p->pseudo_palette;
u8 *src = image->data;
dst2 = (unsigned long *) dst1;
......
This diff is collapsed.
......@@ -138,15 +138,6 @@ config FBCON_ADVANCED
# Guess what we need
config FONTWIDTH8_ONLY
bool "Support only 8 pixels wide fonts"
depends on FRAMEBUFFER_CONSOLE
help
Answer Y here will make the kernel provide only the 8x8 fonts (these
are the less readable).
If unsure, say N.
config FONT_SUN8x16
bool "Sparc console 8x16 font"
depends on FRAMEBUFFER_CONSOLE && (!SPARC32 && !SPARC64 && FONTS || SPARC32 || SPARC64)
......@@ -155,7 +146,7 @@ config FONT_SUN8x16
config FONT_SUN12x22
bool "Sparc console 12x22 font (not supported by all drivers)"
depends on FRAMEBUFFER_CONSOLE && !FONTWIDTH8_ONLY && (!SPARC32 && !SPARC64 && FONTS || SPARC32 || SPARC64)
depends on FRAMEBUFFER_CONSOLE && (!SPARC32 && !SPARC64 && FONTS || SPARC32 || SPARC64)
help
This is the high resolution console font for Sun machines with very
big letters (like the letters used in the SPARC PROM). If the
......@@ -204,7 +195,7 @@ config FONT_8x16
config FONT_6x11
bool "Mac console 6x11 font (not supported by all drivers)" if FONTS
depends on FRAMEBUFFER_CONSOLE && !FONTWIDTH8_ONLY
depends on FRAMEBUFFER_CONSOLE
default y if !SPARC32 && !SPARC64 && !FONTS && MAC
help
Small console font with Macintosh-style high-half glyphs. Some Mac
......
......@@ -799,14 +799,6 @@ static int fbcon_changevar(int con)
p->fontdata = font->data;
}
#ifdef FONTWIDTH8_ONLY
if (!fontwidthvalid(p, vc->vc_font.width)) {
/* ++Geert: changed from panic() to `correct and continue' */
printk(KERN_ERR
"fbcon_set_display: No support for fontwidth %d\n",
vc->vc_font.width);
}
#endif
updatescrollmode(p, vc);
old_cols = vc->vc_cols;
......@@ -949,14 +941,6 @@ static void fbcon_set_display(int con, int init, int logo)
p->fontdata = font->data;
}
#ifdef FONTWIDTH8_ONLY
if (!fontwidthvalid(p, vc->vc_font.width)) {
/* ++Geert: changed from panic() to `correct and continue' */
printk(KERN_ERR
"fbcon_set_display: No support for fontwidth %d\n",
vc->vc_font.width);
}
#endif
updatescrollmode(p, vc);
old_cols = vc->vc_cols;
......@@ -2010,10 +1994,6 @@ static inline int fbcon_get_font(struct vc_data *vc, struct console_font_op *op)
u8 *fontdata = p->fontdata;
int i, j;
#ifdef CONFIG_FONTWIDTH8_ONLY
if (fontwidth(p) != 8)
return -EINVAL;
#endif
op->width = vc->vc_font.width;
op->height = vc->vc_font.height;
op->charcount = (p->charmask == 0x1ff) ? 512 : 256;
......@@ -2028,9 +2008,7 @@ static inline int fbcon_get_font(struct vc_data *vc, struct console_font_op *op)
data += 32;
fontdata += j;
}
}
#ifndef CONFIG_FONTWIDTH8_ONLY
else if (op->width <= 16) {
} else if (op->width <= 16) {
j = vc->vc_font.height * 2;
for (i = 0; i < op->charcount; i++) {
memcpy(data, fontdata, j);
......@@ -2058,7 +2036,6 @@ static inline int fbcon_get_font(struct vc_data *vc, struct console_font_op *op)
fontdata += j;
}
}
#endif
return 0;
}
......@@ -2211,10 +2188,6 @@ static inline int fbcon_set_font(struct vc_data *vc, struct console_font_op *op)
int i, k;
u8 *new_data, *data = op->data, *p;
#ifdef CONFIG_FONTWIDTH8_ONLY
if (w != 8)
return -EINVAL;
#endif
if ((w <= 0) || (w > 32)
|| (op->charcount != 256 && op->charcount != 512))
return -EINVAL;
......@@ -2242,9 +2215,7 @@ static inline int fbcon_set_font(struct vc_data *vc, struct console_font_op *op)
data += 32;
p += h;
}
}
#ifndef CONFIG_FONTWIDTH8_ONLY
else if (w <= 16) {
} else if (w <= 16) {
h *= 2;
for (i = 0; i < op->charcount; i++) {
memcpy(p, data, h);
......@@ -2270,7 +2241,6 @@ static inline int fbcon_set_font(struct vc_data *vc, struct console_font_op *op)
p += h;
}
}
#endif
/* we can do it in u32 chunks because of charcount is 256 or 512, so
font length must be multiple of 256, at least. And 256 is multiple
of 4 */
......
......@@ -51,22 +51,11 @@ extern struct display fb_display[MAX_NR_CONSOLES];
extern char con2fb_map[MAX_NR_CONSOLES];
extern void set_con2fb_map(int unit, int newidx);
#ifdef CONFIG_FONTWIDTH8_ONLY
/* fontwidth w is supported by dispsw */
#define FONTWIDTH(w) (1 << ((8) - 1))
/* fontwidths w1-w2 inclusive are supported by dispsw */
#define FONTWIDTHRANGE(w1,w2) FONTWIDTH(8)
#else
/* fontwidth w is supported by dispsw */
#define FONTWIDTH(w) (1 << ((w) - 1))
/* fontwidths w1-w2 inclusive are supported by dispsw */
#define FONTWIDTHRANGE(w1,w2) (FONTWIDTH(w2+1) - FONTWIDTH(w1))
#endif
/*
* Attribute Decoding
*/
......
This diff is collapsed.
......@@ -1222,11 +1222,13 @@ static int __devinit tdfxfb_probe(struct pci_dev *pdev,
info->pseudo_palette = (void *)(default_par + 1);
info->flags = FBINFO_FLAG_DEFAULT;
#ifndef MODULE
if (!mode_option)
mode_option = "640x480@60";
err = fb_find_mode(&info->var, info, mode_option, NULL, 0, NULL, 8);
if (!err || err == 4)
#endif
info->var = tdfx_var;
size = (info->var.bits_per_pixel == 8) ? 256 : 16;
......
......@@ -416,6 +416,7 @@ struct fb_info {
#define fb_writeb sbus_writeb
#define fb_writew sbus_writew
#define fb_writel sbus_writel
#define fb_writeq sbus_writeq
#define fb_memset sbus_memset_io
#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__)
......@@ -426,6 +427,9 @@ struct fb_info {
#define fb_writeb __raw_writeb
#define fb_writew __raw_writew
#define fb_writel __raw_writel
#if defined(__alpha__) || defined(__hppa__) || defined(__ia64__)
#define fb_writeq __raw_writeq
#endif
#define fb_memset memset_io
#else
......
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