]> 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)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:35:26 +0000 (08:35 +0200)
commit555d21d9a918b8b64dd24c62f5ce67d84193208d
tree8ccd3bb578d65dd7a0e6abfb91b03ae64b83e2a8
parent469ff107d173312601c8ea584694fa66b5a8be8a
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