]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ENGR00224700 IPUv3 FB:Support RGB24/RGB32/ABGR32 pixel formats
authorLiu Ying <Ying.Liu@freescale.com>
Sat, 15 Sep 2012 16:06:43 +0000 (00:06 +0800)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:13:01 +0000 (14:13 +0200)
commit202b68621f38343f0716b2677807455489c9750b
tree8ccd3bb578d65dd7a0e6abfb91b03ae64b83e2a8
parentd2bc77843a89f1289768ac0c470f49191829e8d7
ENGR00224700 IPUv3 FB:Support RGB24/RGB32/ABGR32 pixel formats

Users may call FBIOPUT_VSCREENINFO framebuffer ioctrl to set
a framebuffer's pixel format by specifying bits_per_pixel field
and red/green/blue/transp fields of struct fb_var_screeninfo.
Users may also know a framebuffer's pixel format at which it is
working by calling FBIOGET_VSCREENINFO framebuffer ioctrl, red/
green/blue/transp bitfields of struct fb_var_screeninfo tell the
exact offset and length of each color component in a pixel. This
patch supports RGB24/RGB32/ABGR32 pixel formats with these 2 ioctrls.
To change the default pixel format when initializeing a framebuffer
at the first time, users may add 'fbpix=' option in framebuffer
kernel command line option, for example, 'video=mxcfb0:fbpix=ABGR32'
makes fb0's default pixel format be ABGR32. 'bpp=' option cannot
overwrite 'fbpix=' option, for example, 'video=mxfb0:fbpix=RGB24,
bpp=16' still makes fb0 work at RGB24 by default. To be back
compatible, this patch doesn't change the default pixel formats
(BGR24/BGR32/RGB565) for each bits_per_pixel, if users don't
provide valid 'fbpix=' option.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
drivers/video/mxc/mxc_ipuv3_fb.c