aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/via/hw.c
diff options
context:
space:
mode:
authorFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2010-03-10 18:21:41 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-12 18:52:34 -0500
commite17cea3cece6d3ec47a5b358821505943abe6541 (patch)
treecf474d56ab2a700577dc0c3cc4bb6f33d1e56154 /drivers/video/via/hw.c
parent415559fbf2353f4271a4cd6e11259b8bbc97cc33 (diff)
viafb: support color depth 15 and 30
Add support for the color depth 15 on IGA1 and 30 on IGA1 and IGA2. To allow the usage of those the driver now refuses color depth that are totally off and otherwise the selection in viafb_check_var is used. Therefore the first call to this for the first framebuffer was delayed a bit. It only enables the new formats if they are requested exactly (viafb_bpp=15|30). As this is a new feature, no regressions are expected. The color depth 15 was successfully tested. Didn't get anything usable for 30 but that might be the programs fault. I would like to get some feedback whether it works as expected or not if somebody knows a program/configuration where it should. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw> Cc: Scott Fang <ScottFang@viatech.com.cn> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/via/hw.c')
-rw-r--r--drivers/video/via/hw.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c
index 1823253a6f40..f2583b1b527f 100644
--- a/drivers/video/via/hw.c
+++ b/drivers/video/via/hw.c
@@ -694,12 +694,18 @@ void viafb_set_primary_color_depth(u8 depth)
694 case 8: 694 case 8:
695 value = 0x00; 695 value = 0x00;
696 break; 696 break;
697 case 15:
698 value = 0x04;
699 break;
697 case 16: 700 case 16:
698 value = 0x14; 701 value = 0x14;
699 break; 702 break;
700 case 24: 703 case 24:
701 value = 0x0C; 704 value = 0x0C;
702 break; 705 break;
706 case 30:
707 value = 0x08;
708 break;
703 default: 709 default:
704 printk(KERN_WARNING "viafb_set_primary_color_depth: " 710 printk(KERN_WARNING "viafb_set_primary_color_depth: "
705 "Unsupported depth: %d\n", depth); 711 "Unsupported depth: %d\n", depth);
@@ -724,6 +730,9 @@ void viafb_set_secondary_color_depth(u8 depth)
724 case 24: 730 case 24:
725 value = 0xC0; 731 value = 0xC0;
726 break; 732 break;
733 case 30:
734 value = 0x80;
735 break;
727 default: 736 default:
728 printk(KERN_WARNING "viafb_set_secondary_color_depth: " 737 printk(KERN_WARNING "viafb_set_secondary_color_depth: "
729 "Unsupported depth: %d\n", depth); 738 "Unsupported depth: %d\n", depth);