cirrusfb: check_var improvements
authorKrzysztof Helt <krzysztof.h1@wp.pl>
Tue, 31 Mar 2009 22:25:09 +0000 (15:25 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 1 Apr 2009 15:59:27 +0000 (08:59 -0700)
commit99a4584752bb41330342a427d014482525de7433
tree5a705f234f5ace69c028578102919394dfc0bf26
parent1b48cb563d59e03dbf530174f30c0ed3b6fba513
cirrusfb: check_var improvements

Break cirrusfb_decode_var() function into two parts:
cirrusfb_check_pixclock() which can be called from the
cirrusfb_check_var() aand merge rest into the cirrusfb_set_par_foo().
This allows rejecting modes with too high pixclock before before any
change to hardware state (and a console is messed up).

Also, fix RGB field's lengths for 8bpp modes to correct ones so X11 works
with fbdev driver with cirrusfb.

Kill some redundant function calls or register loads.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/video/cirrusfb.c