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:
parent
b82f0d4c09
commit
bd56e41d19
|
@ -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 */
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue