9
0
Fork 0

ARM STM/i.MX: Add possibility to choose the bit per pixel for STM video driver

When describing an new video interface, it is now possible to select
the bit per pixel. If nothing is chosen 16bpp is selected by default.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Gregory CLEMENT 2011-01-04 15:35:27 +01:00 committed by Sascha Hauer
parent b82f0d4c09
commit bd56e41d19
2 changed files with 5 additions and 1 deletions

View File

@ -37,6 +37,7 @@ struct imx_fb_platformdata {
unsigned dotclk_delay; /**< refer manual HW_LCDIF_VDCTRL4 register */
unsigned ld_intf_width; /**< refer STMLCDIF_* macros */
unsigned bits_per_pixel;
void *fixed_screen; /**< if != NULL use this as framebuffer memory */
unsigned fixed_screen_size; /**< framebuffer memory size for fixed_screen */

View File

@ -486,7 +486,10 @@ static int stmfb_probe(struct device_d *hw_dev)
fbi.info.mode = &fbi.info.mode_list[0];
fbi.info.xres = fbi.info.mode->xres;
fbi.info.yres = fbi.info.mode->yres;
fbi.info.bits_per_pixel = 16;
if (pdata->bits_per_pixel)
fbi.info.bits_per_pixel = pdata->bits_per_pixel;
else
fbi.info.bits_per_pixel = 16;
ret = register_framebuffer(&fbi.info);
if (ret != 0) {