diff --git a/arch/arm/mach-mxs/include/mach/fb.h b/arch/arm/mach-mxs/include/mach/fb.h index 5346306..2b61dee 100644 --- a/arch/arm/mach-mxs/include/mach/fb.h +++ b/arch/arm/mach-mxs/include/mach/fb.h @@ -37,6 +37,7 @@ 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 */ diff --git a/drivers/video/stm.c b/drivers/video/stm.c index 83c39c8..205cad1 100644 --- a/drivers/video/stm.c +++ b/drivers/video/stm.c @@ -486,7 +486,10 @@ 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) {