[ARM] pxafb: cleanup of the color format manipulation code
authorEric Miao <ycmiao@ycmiao-hp520.(none)>
Thu, 18 Dec 2008 14:36:26 +0000 (22:36 +0800)
committerEric Miao <eric.miao@marvell.com>
Mon, 29 Dec 2008 09:59:17 +0000 (17:59 +0800)
commit878f5783199a95cfa91db45a6e34d2f72756fa18
treec979a4d4fdadf270baff1471f44ac91fe5c5e6af
parenta0427509a76c61984fbba4e206b617c689f419ef
[ARM] pxafb: cleanup of the color format manipulation code

1. introduce var_to_depth() to calculate the color depth including the
   transparency bit

2. the conversion from 'fb_var_screeninfo' to LCCR3 BPP bits can be re-
   used by overlays (in OVLxC1), thus an individual pxafb_var_to_bpp()
   has been separated out.

3. pxafb_setmode() should really set the color bitfields correctly at
   begining, introduce a pxafb_set_pixfmt() for this

4. allow user apps to specify color formats within fb_var_screeninfo,
   and checking of this in pxafb_check_var() has been simplified as
   below:

   a) pxafb_var_to_bpp() should pass - which means a basically correct
      bits_per_pixel and color depth setting
   b) the RGBT bitfields are then forced into supported values by
      pxafb_set_pixfmt()

Signed-off-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Eric Miao <ycmiao@ycmiao-hp520.(none)>
arch/arm/mach-pxa/include/mach/regs-lcd.h
drivers/video/pxafb.c