summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2005-11-30 04:56:07 (GMT)
committerSteve French <sfrench@us.ibm.com>2005-11-30 04:56:07 (GMT)
commit606c0dafbe88102d64c1253caed8a2c36987070f (patch)
tree23ce7b30341e71c6da8e0183d27e29167e833e26 /drivers/video
parent6ab16d249513a50bef3f1b275cea6aa8d3f51832 (diff)
parentd2ef5ebb4c4fe141a82252d4db8d8521e6765c5a (diff)
downloadlinux-fsl-qoriq-606c0dafbe88102d64c1253caed8a2c36987070f.tar.xz
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/Kconfig13
-rw-r--r--drivers/video/cirrusfb.c15
-rw-r--r--drivers/video/console/fbcon_ccw.c2
-rw-r--r--drivers/video/console/fbcon_rotate.h13
4 files changed, 20 insertions, 23 deletions
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 25b6ca6..3e470c8 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -534,6 +534,12 @@ config FB_SUN3
bool "Sun3 framebuffer support"
depends on (FB = y) && (SUN3 || SUN3X) && BROKEN
+config FB_SBUS
+ bool "SBUS and UPA framebuffers"
+ depends on (FB = y) && (SPARC32 || SPARC64)
+ help
+ Say Y if you want support for SBUS or UPA based frame buffer device.
+
config FB_BW2
bool "BWtwo support"
depends on (FB = y) && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3)
@@ -546,6 +552,7 @@ config FB_BW2
config FB_CG3
bool "CGthree support"
depends on (FB = y) && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3)
+ select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
help
@@ -1210,12 +1217,6 @@ config FB_AU1100
source "drivers/video/geode/Kconfig"
-config FB_SBUS
- bool "SBUS and UPA framebuffers"
- depends on (FB = y) && (SPARC32 || SPARC64)
- help
- Say Y if you want support for SBUS or UPA based frame buffer device.
-
config FB_FFB
bool "Creator/Creator3D/Elite3D support"
depends on FB_SBUS && SPARC64
diff --git a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c
index 2858c5c..e0dbdfc 100644
--- a/drivers/video/cirrusfb.c
+++ b/drivers/video/cirrusfb.c
@@ -404,7 +404,7 @@ struct cirrusfb_info {
struct cirrusfb_regs currentmode;
int blank_mode;
- u32 pseudo_palette[17];
+ u32 pseudo_palette[16];
struct { u8 red, green, blue, pad; } palette[256];
#ifdef CONFIG_ZORRO
@@ -1603,14 +1603,14 @@ static int cirrusfb_setcolreg (unsigned regno, unsigned red, unsigned green,
switch (info->var.bits_per_pixel) {
case 8:
- ((u8*)(info->pseudo_palette))[regno] = v;
+ cinfo->pseudo_palette[regno] = v;
break;
case 16:
- ((u16*)(info->pseudo_palette))[regno] = v;
+ cinfo->pseudo_palette[regno] = v;
break;
case 24:
case 32:
- ((u32*)(info->pseudo_palette))[regno] = v;
+ cinfo->pseudo_palette[regno] = v;
break;
}
return 0;
@@ -2020,18 +2020,21 @@ static void cirrusfb_prim_fillrect(struct cirrusfb_info *cinfo,
const struct fb_fillrect *region)
{
int m; /* bytes per pixel */
+ u32 color = (cinfo->info->fix.visual == FB_VISUAL_TRUECOLOR) ?
+ cinfo->pseudo_palette[region->color] : region->color;
+
if(cinfo->info->var.bits_per_pixel == 1) {
cirrusfb_RectFill(cinfo->regbase, cinfo->info->var.bits_per_pixel,
region->dx / 8, region->dy,
region->width / 8, region->height,
- region->color,
+ color,
cinfo->currentmode.line_length);
} else {
m = ( cinfo->info->var.bits_per_pixel + 7 ) / 8;
cirrusfb_RectFill(cinfo->regbase, cinfo->info->var.bits_per_pixel,
region->dx * m, region->dy,
region->width * m, region->height,
- region->color,
+ color,
cinfo->currentmode.line_length);
}
return;
diff --git a/drivers/video/console/fbcon_ccw.c b/drivers/video/console/fbcon_ccw.c
index 3afd1ee..4952b66 100644
--- a/drivers/video/console/fbcon_ccw.c
+++ b/drivers/video/console/fbcon_ccw.c
@@ -34,7 +34,7 @@ static inline void ccw_update_attr(u8 *dst, u8 *src, int attribute,
msk <<= (8 - mod);
if (offset > mod)
- set_bit(FBCON_BIT(7), (void *)&msk1);
+ msk1 |= 0x01;
for (i = 0; i < vc->vc_font.width; i++) {
for (j = 0; j < width; j++) {
diff --git a/drivers/video/console/fbcon_rotate.h b/drivers/video/console/fbcon_rotate.h
index e504fbf..1b8f92f 100644
--- a/drivers/video/console/fbcon_rotate.h
+++ b/drivers/video/console/fbcon_rotate.h
@@ -21,21 +21,13 @@
(s == SCROLL_REDRAW || s == SCROLL_MOVE || !(i)->fix.xpanstep) ? \
(i)->var.xres : (i)->var.xres_virtual; })
-/*
- * The bitmap is always big endian
- */
-#if defined(__LITTLE_ENDIAN)
-#define FBCON_BIT(b) (7 - (b))
-#else
-#define FBCON_BIT(b) (b)
-#endif
static inline int pattern_test_bit(u32 x, u32 y, u32 pitch, const char *pat)
{
u32 tmp = (y * pitch) + x, index = tmp / 8, bit = tmp % 8;
pat +=index;
- return (test_bit(FBCON_BIT(bit), (void *)pat));
+ return (*pat) & (0x80 >> bit);
}
static inline void pattern_set_bit(u32 x, u32 y, u32 pitch, char *pat)
@@ -43,7 +35,8 @@ static inline void pattern_set_bit(u32 x, u32 y, u32 pitch, char *pat)
u32 tmp = (y * pitch) + x, index = tmp / 8, bit = tmp % 8;
pat += index;
- set_bit(FBCON_BIT(bit), (void *)pat);
+
+ (*pat) |= 0x80 >> bit;
}
static inline void rotate_ud(const char *in, char *out, u32 width, u32 height)