The overlay function of LCDIF only support when the bpp of fb0
and fb1 are the same. So add this check on overlayfb_check_var().
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
struct mxsfb_info *fbi = ofb->fbi;
const struct fb_bitfield *rgb = NULL;
+ /* lcdif doesn't support different bpp of AS and PS */
+ if (var->bits_per_pixel != fbi->fb_info->var.bits_per_pixel)
+ return -EINVAL;
+
/* overlay width & should be equal to fb0 */
if ((var->xres != fbi->fb_info->var.xres) ||
(var->yres != fbi->fb_info->var.yres))