aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/via/hw.c
diff options
context:
space:
mode:
authorFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2010-03-10 18:21:38 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-12 18:52:33 -0500
commitbd140691bda491b417a6d1e81b03416b54cb8d8d (patch)
treef19f8fcd1acd4b6ae60ed4ba261e9106f3452793 /drivers/video/via/hw.c
parentdba77f8409eb861b28d295211776d953a8255ec7 (diff)
viafb: rework color checking
Make color checking a bit more tolerant in what values it allows and more fine grained to later support 15 and 30 bits formats. It splits the filling of the color information in var to a seperate function and sets some color related values in var that where previously untouched. This could be a bug fix but at least I don't know any applications that was fooled by not correctly setting the fields in var. At least no regressions are expected. 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.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c
index ed8d78a35b29..47d9024d7c30 100644
--- a/drivers/video/via/hw.c
+++ b/drivers/video/via/hw.c
@@ -2622,36 +2622,6 @@ void viafb_fill_var_timing_info(struct fb_var_screeninfo *var, int refresh,
2622 } 2622 }
2623 2623
2624 crt_reg = crt_timing[index].crtc; 2624 crt_reg = crt_timing[index].crtc;
2625 switch (var->bits_per_pixel) {
2626 case 8:
2627 var->red.offset = 0;
2628 var->green.offset = 0;
2629 var->blue.offset = 0;
2630 var->red.length = 6;
2631 var->green.length = 6;
2632 var->blue.length = 6;
2633 break;
2634 case 16:
2635 var->red.offset = 11;
2636 var->green.offset = 5;
2637 var->blue.offset = 0;
2638 var->red.length = 5;
2639 var->green.length = 6;
2640 var->blue.length = 5;
2641 break;
2642 case 32:
2643 var->red.offset = 16;
2644 var->green.offset = 8;
2645 var->blue.offset = 0;
2646 var->red.length = 8;
2647 var->green.length = 8;
2648 var->blue.length = 8;
2649 break;
2650 default:
2651 /* never happed, put here to keep consistent */
2652 break;
2653 }
2654
2655 var->pixclock = viafb_get_pixclock(var->xres, var->yres, refresh); 2625 var->pixclock = viafb_get_pixclock(var->xres, var->yres, refresh);
2656 var->left_margin = 2626 var->left_margin =
2657 crt_reg.hor_total - (crt_reg.hor_sync_start + crt_reg.hor_sync_end); 2627 crt_reg.hor_total - (crt_reg.hor_sync_start + crt_reg.hor_sync_end);