In suspend/resume and HDMI plugin/plugout stress test,
sometimes fbcon will call fb_set_par with
parameter fb_var_screeninfo that xres anfd yres is zero.
MX frame buffer driver can not correct handle this casue,
it will cause IPU pixel clock gating/ungating mismatch.
Check fb_var_screeninfo parameter in mxcfb_check_var and
mxcfb_set_par function, returned if xres,yres zero.
Signed-off-by: Sandor Yu <R01008@freescale.com>
dev_dbg(fbi->device, "Reconfiguring framebuffer\n");
+ if (fbi->var.xres == 0 || fbi->var.yres == 0)
+ return 0;
+
if (ovfbi_enable) {
ov_pos_ret = ipu_disp_get_window_pos(
mxc_fbi_fg->ipu, mxc_fbi_fg->ipu_ch,
u32 htotal;
struct mxcfb_info *mxc_fbi = (struct mxcfb_info *)info->par;
+
+ if (var->xres == 0 || var->yres == 0)
+ return 0;
+
/* fg should not bigger than bg */
if (mxc_fbi->ipu_ch == MEM_FG_SYNC) {
struct fb_info *fbi_tmp;