diff options
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/Kconfig | 13 | ||||
-rw-r--r-- | drivers/video/cirrusfb.c | 15 |
2 files changed, 16 insertions, 12 deletions
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 25b6ca6ad081..3e470c8b4193 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig | |||
@@ -534,6 +534,12 @@ config FB_SUN3 | |||
534 | bool "Sun3 framebuffer support" | 534 | bool "Sun3 framebuffer support" |
535 | depends on (FB = y) && (SUN3 || SUN3X) && BROKEN | 535 | depends on (FB = y) && (SUN3 || SUN3X) && BROKEN |
536 | 536 | ||
537 | config FB_SBUS | ||
538 | bool "SBUS and UPA framebuffers" | ||
539 | depends on (FB = y) && (SPARC32 || SPARC64) | ||
540 | help | ||
541 | Say Y if you want support for SBUS or UPA based frame buffer device. | ||
542 | |||
537 | config FB_BW2 | 543 | config FB_BW2 |
538 | bool "BWtwo support" | 544 | bool "BWtwo support" |
539 | depends on (FB = y) && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) | 545 | depends on (FB = y) && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) |
@@ -546,6 +552,7 @@ config FB_BW2 | |||
546 | config FB_CG3 | 552 | config FB_CG3 |
547 | bool "CGthree support" | 553 | bool "CGthree support" |
548 | depends on (FB = y) && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) | 554 | depends on (FB = y) && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) |
555 | select FB_CFB_FILLRECT | ||
549 | select FB_CFB_COPYAREA | 556 | select FB_CFB_COPYAREA |
550 | select FB_CFB_IMAGEBLIT | 557 | select FB_CFB_IMAGEBLIT |
551 | help | 558 | help |
@@ -1210,12 +1217,6 @@ config FB_AU1100 | |||
1210 | 1217 | ||
1211 | source "drivers/video/geode/Kconfig" | 1218 | source "drivers/video/geode/Kconfig" |
1212 | 1219 | ||
1213 | config FB_SBUS | ||
1214 | bool "SBUS and UPA framebuffers" | ||
1215 | depends on (FB = y) && (SPARC32 || SPARC64) | ||
1216 | help | ||
1217 | Say Y if you want support for SBUS or UPA based frame buffer device. | ||
1218 | |||
1219 | config FB_FFB | 1220 | config FB_FFB |
1220 | bool "Creator/Creator3D/Elite3D support" | 1221 | bool "Creator/Creator3D/Elite3D support" |
1221 | depends on FB_SBUS && SPARC64 | 1222 | depends on FB_SBUS && SPARC64 |
diff --git a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c index 2858c5c8ba3c..e0dbdfc0c8b4 100644 --- a/drivers/video/cirrusfb.c +++ b/drivers/video/cirrusfb.c | |||
@@ -404,7 +404,7 @@ struct cirrusfb_info { | |||
404 | struct cirrusfb_regs currentmode; | 404 | struct cirrusfb_regs currentmode; |
405 | int blank_mode; | 405 | int blank_mode; |
406 | 406 | ||
407 | u32 pseudo_palette[17]; | 407 | u32 pseudo_palette[16]; |
408 | struct { u8 red, green, blue, pad; } palette[256]; | 408 | struct { u8 red, green, blue, pad; } palette[256]; |
409 | 409 | ||
410 | #ifdef CONFIG_ZORRO | 410 | #ifdef CONFIG_ZORRO |
@@ -1603,14 +1603,14 @@ static int cirrusfb_setcolreg (unsigned regno, unsigned red, unsigned green, | |||
1603 | 1603 | ||
1604 | switch (info->var.bits_per_pixel) { | 1604 | switch (info->var.bits_per_pixel) { |
1605 | case 8: | 1605 | case 8: |
1606 | ((u8*)(info->pseudo_palette))[regno] = v; | 1606 | cinfo->pseudo_palette[regno] = v; |
1607 | break; | 1607 | break; |
1608 | case 16: | 1608 | case 16: |
1609 | ((u16*)(info->pseudo_palette))[regno] = v; | 1609 | cinfo->pseudo_palette[regno] = v; |
1610 | break; | 1610 | break; |
1611 | case 24: | 1611 | case 24: |
1612 | case 32: | 1612 | case 32: |
1613 | ((u32*)(info->pseudo_palette))[regno] = v; | 1613 | cinfo->pseudo_palette[regno] = v; |
1614 | break; | 1614 | break; |
1615 | } | 1615 | } |
1616 | return 0; | 1616 | return 0; |
@@ -2020,18 +2020,21 @@ static void cirrusfb_prim_fillrect(struct cirrusfb_info *cinfo, | |||
2020 | const struct fb_fillrect *region) | 2020 | const struct fb_fillrect *region) |
2021 | { | 2021 | { |
2022 | int m; /* bytes per pixel */ | 2022 | int m; /* bytes per pixel */ |
2023 | u32 color = (cinfo->info->fix.visual == FB_VISUAL_TRUECOLOR) ? | ||
2024 | cinfo->pseudo_palette[region->color] : region->color; | ||
2025 | |||
2023 | if(cinfo->info->var.bits_per_pixel == 1) { | 2026 | if(cinfo->info->var.bits_per_pixel == 1) { |
2024 | cirrusfb_RectFill(cinfo->regbase, cinfo->info->var.bits_per_pixel, | 2027 | cirrusfb_RectFill(cinfo->regbase, cinfo->info->var.bits_per_pixel, |
2025 | region->dx / 8, region->dy, | 2028 | region->dx / 8, region->dy, |
2026 | region->width / 8, region->height, | 2029 | region->width / 8, region->height, |
2027 | region->color, | 2030 | color, |
2028 | cinfo->currentmode.line_length); | 2031 | cinfo->currentmode.line_length); |
2029 | } else { | 2032 | } else { |
2030 | m = ( cinfo->info->var.bits_per_pixel + 7 ) / 8; | 2033 | m = ( cinfo->info->var.bits_per_pixel + 7 ) / 8; |
2031 | cirrusfb_RectFill(cinfo->regbase, cinfo->info->var.bits_per_pixel, | 2034 | cirrusfb_RectFill(cinfo->regbase, cinfo->info->var.bits_per_pixel, |
2032 | region->dx * m, region->dy, | 2035 | region->dx * m, region->dy, |
2033 | region->width * m, region->height, | 2036 | region->width * m, region->height, |
2034 | region->color, | 2037 | color, |
2035 | cinfo->currentmode.line_length); | 2038 | cinfo->currentmode.line_length); |
2036 | } | 2039 | } |
2037 | return; | 2040 | return; |